CASESTART

Usage

TIBCO iProcess Workspace (Browser)

TIBCO iProcess Workspace (Windows)

Warning: (iProcess only) This expression is not available to the TIBCO iProcess Script Server Plug-in. Therefore, even though you can successfully enter the expression in your iProcess Script plug-in definition, it will not be processed by the iProcess Engine. It will return SW_NA.

Start a new case of a procedure at a step, with input data.

Syntax

CASESTART(procname, casedesc, startstep, flags, [fieldname, fieldvalue] ...])

where:

procname (text) is the procedure name; the default is the current procedure at the current node.
casedesc (text) is the case description.
startstep (text) is the step at which to start the case; if the start step is not specified then "" must be supplied as the argument which defaults to the start step in the procedure definition.
flags (numeric) is currently not used but must be specified. The argument value should be supplied as 0.
fieldname (text) is used to start the case with data. The argument consists of sets of pairs of arguments. Fieldname is the first argument in the pair.
fieldvalue (any type) is used to start the case with data. The argument consists of sets of pairs of arguments. Fieldvalue is the second argument in the pair.

This expression works with the default version of a procedure.

Returns

One of the following numeric values:

Value

Description

>0

Case number

-100

Invalid or unknown procedure

-101

Invalid or unknown start step

-104

Start step is not a valid type

-105

Procedure requires a case description and none was supplied

-106

Specified procedure is a sub-procedure

-108

Unknown error from server

Examples

TIBCO iProcess Modeler:

1. This example starts a new case of the procedure Hiring with a case description of Test Case at the first step defined in the procedure definition.
CASESTART ("hiring", "Test Case", "", 0)
2. This example starts a new case of the procedure Hiring with a case description which is a concatenation of text and the return value from the TIMESTR function, at a step called ALTSTART.
CASESTART ("hiring@node1", "Autostarted at" + TIMESTR(SW_TIME), "ALTSTART", 0)
3. This example starts a new case of the procedure Hiring with a case description of Test Case at the start step defined in the procedure definition with the following data:
CASESTART ("hiring", "Test Case","",0, "TEXTFLD", txtfld, \
"NUMFLD", numfld, \
"STARTDATE", SW_DATE, \
"STARTTIME", SW_TIME)
Note: This example uses the “\” new line continuation feature available in iProcess scripts.

TIBCO Business Studio:

  1. Equivalent of iProcess Example 1:

    IPEProcessUtil.CASESTART("hiring","Test Case","",0);
  2. Equivalent of iProcess Example 2. Note the use of IPESystemValues for SW_TIME.

    IPEProcessUtil.CASESTART("hiring@node1", "Autostarted at" + IPEConversionUtil.TIMESTR(IPESystemValues.SW_TIME),
    "ALTSTART",0);
  3. Equivalent of iProcess Example 3:

    IPEProcessUtil.CASESTART("hiring", "Test Case","",0, "TEXTFLD",
    txtfld, "NUMFLD", numfld, "STARTDATE", IPESystemValues.SW_DATE,
    "STARTTIME", IPESystemValues.SW_TIME);