Administering and Monitoring Business Processes 10.4 | Administering and Monitoring Business Processes | Task Engine User’s Guide | Administering Tasks | Working with Global Task Rules | Creating a Global Task Rule
 
Creating a Global Task Rule
You can create a new global schedule or change rule, that applies to all task types in My webMethods.
* To create a new global task rule
1. In My webMethods: Navigate > Applications > Administration > Business > Tasks > Task Engine Administration.
2. On the Task Engine Administration page, click the appropriate icon for the global rule type you want to create, as described in Managing Global Rules.
3. On the Global [Rule Type] Rules page for the selected rule type (for example, Manage Change Rules), click the Create New Rule tab.
4. In the Name and Description boxes, type a unique name for the rule and a description of the intended behavior of the rule.
5. Create a condition expression by typing in the expression terms and clicking the Add Operator button, and then selecting the desired value from the resulting display. When this condition is matched, the rule will be enforced.
For example:
#{oldTask.taskInfo.status} == "new"
This indicates a condition for a task change rule where the task status is "new". This occurs when a task is started. For more information about creating conditions, see About Condition Expressions.
Note: Global change rules support expressions such as caf["MyWebApp"].valueOf("managedBeanName.method"), which is invoked when any task instance in the system is changed. This functionality enables you to access managed beans in other contexts.
6. Create a results expression by typing in the expression terms and clicking the Add Operator button, and then selecting the desired value from the resulting display.
For example:
#{currentTask.completeTask}
With the condition and result examples given above, this rule would auto-complete any newly started task.
For more information about expressions, see Understanding Task Expressions.
7. When creating a global schedule rule, specify the rule variables and attributes as follows:
a. Under Rule Variables, specify values for any variables that your task expression contains.
b. Under Rule Attributes, in the Every n day/hour/minute fields, specify how often the rule is evaluated. For example, every 10 minutes, every 12 hours, every 3 days.
8. Click Create Rule to save your entries. The rule appears beneath the selected rule type.

Copyright © 2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.
Innovation Release