Action Context Section
The Action Context section (actionContext
in the source view) has a similar purpose to the Actions section of a rule.
The Action Context section (actionContext
in the source view) has a similar purpose to the Actions section of a rule. The Action Context section, however, defines
all possible actions that can be taken by a business rule (after all conditions are met). Only the action context statements that the WebStudio user selects and defines as commands in the business rules are actually taken (depending on rule evaluation at runtime).
Defining the superset of all possible actions simplifies and restricts the configuration of business rules in WebStudio.
The actions are not completely defined in the rule template. Completing the definition of an action is a WebStudio user task. If bindings are used (and a view) then in WebStudio, the business rule writer has to enter only the binding values to complete the definition.
Action context statements are of three types: create, modify, and call, plus arbitrary actions, as explained next.
create Concepts.Bulk bulk;
In the rule template, that is as far as you go. It’s up to the business rule developer to assign the specific constructor values for the entity type.
modify bulk;
Only entities in the scope of the rule can be used. As with create statements, it is up to the business rule developer to determine which properties to change and assign values to those properties.
call RuleFunctions.matchFound matchfound;
The business rule developer assigns the parameters for the rule function.
create Concepts.Bulk bulk; if (mybinding > 10) { MyRFs.myRF(otherbinding); mycon.prop1 = thirdbinding; }