This example uses the Expression Builder to build a JavaScript expression that defines a process instance description. The process instance description formed by this example tells the purpose of the process instance.
To build a sample JavaScript expression:
Create a process definition.
Add a User Defined Attribute (UDA) of type STRING called Description.
For details, refer to section 6.18 Specifying User Defined Attributes.
Click the empty space in the Process Definition editor to display the Properties view for the process definition.
Select the Action Set tab. Add the Java Action Set Process Instance Description as an Init Action:
Click Add in the Init Action area.
Expand Server Actions and double click Set Process Instance Description.
In the Action Editor - Set Process Description dialog, click the Expression Mode Button until an E is displayed on it. Then click A + B to open the Expression Builder.
Type Process started in the Literals field. Click Add to add this constant to the JavaScript expression.
Click the + operator to add it to the JavaScript expression.
Select Description from the Variables list. Click Add.
The JavaScript expression should now look like this:
Figure 11.49 Building a Sample JavaScript Expression
Click OK to verify the JavaScript expression.
If it is valid, the Expression Builder is closed and the JavaScript expression is displayed in the Action Editor - Set Process Description dialog .
Figure 11.50 Expression Field with Sample