Designer 10.5 | webMethods BPM Task Development Help | Working with Task Expressions | Building a Sample Task Expression
 
Building a Sample Task Expression
Although this sample creates a very simple condition expression, you can use the basic procedure to build advanced task expressions for both conditions and actions. The following condition expression determines if the current task status is "active:"
#{currentTask.taskInfo.status} == "active"
You select expression terms by clicking the Add Field and Add Operator buttons on the Edit Expression dialog box, and then selecting the data field or operator from the resulting lists. Various operators such as AND and OR enable you to combine data tests in a single condition.
*For more information about condition expressions, see About Condition Expressions.
*For more information about action expressions, see About Action Expressions.
*To create a simple condition expression
1. Open the advanced expression editor in the task editor as described in Configuring Advanced Task Expressions.
2. Click the Add Field button in the Edit Expression dialog box.
3. In the Expression Binding dialog box, expand Current Task State > Task Info, and then click Status.
4. The expression element #{currentTask.taskInfo.status} appears in the box at the top of the dialog box.
Tip:
Click The Show Expert Properties button in the tool bar to show all available properties. All expressions are checked for validity as they are created and syntax errors are displayed as they are typed. Click a field or operator and click OK to add it to the Edit Expression dialog box. Near the top of the Add Field display is the entry Managed Beans. You can create your own custom Java methods for providing data and include them in the task managed beans. They will then be available for use in expressions from this location.
5. Click OK.
6. Place the cursor at the end of the expression in the Edit Expression dialog box.
7. Click the Add Operator button.
8. In the Choose Operator dialog box, click the "equals" operator (==).
9. Click OK.
10. Place the cursor at the end of the expression in the Edit Expression dialog box.
11. Click the Add Field button on the Edit Expression dialog box.
12. In the Expression Binding dialog box, expand Task Status and then click Active.
13. The expression element "active" appears in the box at the top of the dialog box.
14. Click OK.
Related Topics