CASESTARTEX

Usage

 TIBCO iProcess Workspace (Browser)

 TIBCO iProcess Workspace (Windows)

Start a new case of a procedure at a step, with extended user information and input data. Unlike CASESTART, you can call this expression from both client and server that is, from TIBCO iProcess Workspace (Browser) and Script Server Plug-in.

Syntax

CASESTARTEX(procname, casedesc, startstep, flags, username, [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.
username (text) is the user name. The case starts on behalf of this user.
Note: username is mandatory for the Script Server Plug-in and optional for TIBCO iProcess Workspace (Windows).
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 (anytype) 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

-114 Invalid or missing user name

Examples

1. This example starts a new case of the procedure Hiring with username as swadmin and case description of Test Case at the first step defined in the procedure definition.
CASESTARTEX ("hiring", "Test Case", "", 0, "swadmin")
2. This example starts a new case of the procedure Hiring with username as swadmin with a case description which is a concatenation of text and the return value from the TIMESTR function, at a step called ALTSTART.
CASESTARTEX ("hiring@node1", "Autostarted at" + TIMESTR(SW_TIME), "ALTSTART", 0, "swadmin")
3. This example starts a new case of the procedure Hiring with username as swadmin with a case description of Test Case at the start step defined in the procedure definition with the following data:
CASESTARTEX ("hiring", "Test Case", "", 0, "swadmin" "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.CASESTARTEX("hiring", "Test Case", "", 0, "swadmin");
  2. Equivalent of iProcess Example 2. Note the use of IPESystemValues for SW_TIME.

    IPEProcessUtil.CASESTARTEX("hiring@node1", "Autostarted at" + IPEConversionUtil.TIMESTR(IPESystemValues.SW_TIME),

    "ALTSTART",0,"swadmin");
  3. Equivalent of iProcess Example 3:

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