TRIGGEREVENT

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.

Trigger an event step in a case of a procedure, with or without input data.

Syntax

TRIGGEREVENT (procname, casenum, eventstep, options, [fieldname, fieldvalue]...])

where:

procname (text) is the procedure name.
casenum (numeric) is the case number.
eventstep (text) is the name of the event step to trigger.
options (numeric) must be any combination of the values specified in the following table.

Value

Description

0

Do not use any of the following options.

1

Resurrect the (previously closed) case.

2

Update the pack_data table for the case using the supplied fieldname/fieldvalue pairs.

You can propagate these pack_data changes into sub-cases as described in the section “Propagation of New Field Values” in the TIBCO iProcess Modeler Integration Techniques.

4

Recalculate deadlines for the case and case steps, but not for any associated sub-cases and sub-case steps, using the supplied fieldname/fieldvalue pairs.

See "Dynamically Recalculating Deadlines" in TIBCO iProcess Modeler Basic Design for more information about using this option on a step.

See "Case Deadline Setting" in TIBCO iProcess Modeler Procedure Management for more information about using this option on a case.

8

Recalculate deadlines for the case, case steps, sub-cases, and sub-cases steps, using the supplied fieldname/fieldvalue pairs.

See "Dynamically Recalculating Deadlines" in TIBCO iProcess Modeler Basic Design for more information about using this option on a step.

See "Case Deadline Setting" in TIBCO iProcess Modeler Procedure Management for more information about using this option on a case.

For example, if you want to recalculate deadlines for the case and its sub-cases (8) and update pack data (2), specify the options value as 10. If you do not want to resurrect a closed case, update pack data or recalculate deadlines, specify the options value as 0.

fieldname (text) is the name of a field that you want to update with the value specified in the following fieldvalue parameter.
fieldvalue (anytype) is the new value that you want to specify for the field specified in the preceding fieldname parameter.
Note: You can supply as many fieldname/fieldvalue pairs as you require. You must supply at least one fieldname/fieldvalue pair if you have specified an options value to update pack data or recalculate deadlines for the case.

Returns

One of the following numeric values:

Value

Description

1

Success

-100

Invalid or unknown procedure

-101

Invalid or unknown event step

-102

Invalid or unknown case number

-104

Event is not a valid type

-107

Specified case has terminated

-108

Unknown error from server

-109

Invalid or unknown parameter

Examples

TIBCO iProcess Modeler:

1. This example triggers the step called Event of the procedure Hiring in case 23.
TRIGGEREVENT ("hiring", 23, "event",0)
2. This example triggers the step called Event in the procedure Hiring in case 23 and inputs the values John in the FIRST (name) field and Smith in the LAST (name) field.
TRIGGEREVENT ("hiring", 23, "event",0,"FIRST","John", "LAST","Smith")

TIBCO Business Studio

  1. Equivalent of iProcess Example 1:

    IPEProcessUtil.TRIGGEREVENT("hiring", 23, "event",0);
  2. Equivalent of iProcess Example 2:

    IPEProcessUtil.TRIGGEREVENT("hiring", 23, "event",0,"FIRST","John", "LAST","Smith");