Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved


Chapter 14 Using the Rule Editor : Invoking the Rule Editor

Invoking the Rule Editor
TIBCO Object Service Broker UI
This chapter describes how to perform various tasks in TIBCO Object Service Broker using the text-based workbench. You can also perform these tasks using the TIBCO Object Service Broker UI, which provides a graphical environment for TIBCO Object Service Broker development. For information about using the TIBCO Object Service Broker UI, refer to the TIBCO Object Service Broker UI online help.
Steps to Invoke the Rule Editor
To invoke the Rule Editor for a new rule or an existing rule, do one of the following from the workbench:
ER edit rule ==> rulename
EX execute rule ==> EDITRULE(rulename)
COMMAND==> ER rulename
Using any of these methods causes the Rule Editor screen to appear. If you do not enter a rule name and you are invoking the Rule Editor, the Object Manager screen for the Rule Editor appears instead. Refer toScreen Layout of the Rule Editor for information about this screen. Refer toValid Values for Rule Names for information about rule names.
Example Rule Editor Screen

 
RULE EDITOR ===> SCROLL: P
EMPLOYEES_RAISE(JOBTITTLE, REGION);
_ LOCAL RAISE, RATE;
_ ---------------------------------------------------------------------------
_ JOBTITLE = 'SENIOR ANALYST'; | Y N N
_ JOBTITLE = 'ANALYST'; | Y N
_ ------------------------------------------------------------+---------------
_ RATE = 0.1; | 1
_ RATE = 0.05; | 1
_ RATE = 0.02; | 1
_ GET EMPLOYEES(REGION) WHERE POSITION = JOBTITLE; | 2
_ FORALL EMPLOYEES(REGION) WHERE POSITION = JOBTITLE: | 2 2 3
_ RAISE = EMPLOYEES.SALARY * RATE; |
_ EMPLOYEES.SALARY = EMPLOYEES.SALARY + RAISE; |
_ CALL REPLACE_SALARY(REGION); |
_ CALL MSGLOG(EMPLOYEES.LNAME || ' NOW EARNS ' || |
_ EMPLOYEES.SALARY); |
_ END; |
_ ----------------------------------------------------------------------------
ON GETFAIL:
CALL ENDMSG('POSITION IS INVALID');
PFKEYS: 1=HELP 3=END 12=CANCEL 13=PRINT 14=EXPAND 2=DOCUMENT 22=DELETE

 
Rule Displayed
The Rule Editor displays the source code of the rule for you to edit after searching the rules libraries in the following order:
1.
2.
3.
This is the default order, but the search order can be modified by you or your system administrator as part of your user profile or session options.
If the rule does not exist in one of the three libraries, the Rule Editor displays a template for creating a new rule.
Valid Values for Rule Names
The following conditions apply to naming a rule. The name:
Can be a character string of up to sixteen characters, beginning with a letter (A‑Z) or a special character ($ or #), continuing with more letters, special characters, or digits (0-9), or underscore characters
See Also
TIBCO Object Service Broker Managing Security and TIBCO Object Service Broker Parameters about modifying the search order for rules libraries.
TIBCO Object Service Broker Shareable Tools about using user exits with the Rule Editor.

Copyright © TIBCO Software Inc. All Rights Reserved
Copyright © TIBCO Software Inc. All Rights Reserved