Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# 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 Statements
Create statements enable business rule developers to create new concepts or events. Create statement uses fully qualified name for the concepts and events instead of simple name. For example:

    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 Statements
Modify statements enable business rule developers to modify concepts or events. For example:

    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 Statements
Call statements enable business rule developers to call rule functions. Call statement uses fully qualified name for the concepts and events instead of simple name. Call statement uses a variable to store the return value. Call statement uses this return variable even if the return type is void. For example:

    call RuleFunctions.matchFound matchfound;

The business rule developer assigns the parameters for the rule function.

Arbitrary Actions
Rule template developers can add arbitrary actions as well as create, modify, and call statements. For example:

    create Concepts.Bulk bulk;
    if (mybinding > 10) {
       MyRFs.myRF(otherbinding);
       mycon.prop1 = thirdbinding;
    }

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.