Model Rules In an Operation

You can model business rules as Business Rule elements in the Business Rules package, and attach them to the Rule Task elements in a RuleFlow Activity diagram.

Alternatively, in the Business Domain model, if you have operations in the rules processing Class that represent business action, you can define each of those operations as a Rule Task.

Access     Project Browser | Double-click on Operation > General

Model Business Task on an operation



See also


In the Stereotype field type RuleTask.



Click on the Save button and on the Close button.



Drag the Operation from the Project Browser onto the RuleFlow Activity diagram.



Representation of Operation Rule Tasks



See also

Project Browser

The operations stereotyped as RuleTask display in the Project Browser as shown:




To pass the parameters for these operation calls, open the operation Properties dialog and select the Call page, then set the Behavior field to the operation to be called; under the Arguments field, click on the Edit button and set up or edit the argument values to be passed.

On code generation, the code for rules logic is generated in the method body.












Behaviour Calls

Behaviour Call Arguments

On the Rule Flow Diagram

When you drag and drop a RuleTask-stereotyped operation onto a Rule Flow diagram, an operation Call Behavior Action is created, as shown by the two darker elements.




You must build the Call Behavior Actions into the activity flow, as for the normal Rule Task Actions.



Learn more