![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
See Rule Function Resource Reference for details on completing values.
1. In BusinessEvents Studio Explorer, right click the folder where you want to store the rule function and select New > Rule Function. You see the New Rule Function Wizard.
b. In the Description field, type a description. (In the source editor the description appears in the * @description line of the comments at the top of the editor).
c. Set the return type for the rule function. Default is void. Browse to select a return type as needed. For return types that require additional configuration, such as ContainedConcept, complete the configuration in the Rule Function editor.
d.
2. Click Finish. If you see the source editor, click the Form tab at the bottom of the editor to use the form editor as desired.
Rule Function Editor Preference To set which mode the editor uses upon first opening, go to Window > Preferences > TIBCO BusinessEvents > Rules and check or uncheck the following checkbox as desired: Initially show ’Form’ tab in Rule Function Editor.
3. In the Form editor Configuration section, add or edit an alias and a description as desired. (In the source editor the description appears in the * @description line of the comments at the top of the editor and the Alias appears in the attribute list.).
6. From the Validity drop-down list, select the value that specifies where the rule function can be used (source editor attribute equivalents shown in parentheses):
− Action (validity=ACTION)
− Action and Condition (validity=CONDITION)
− Action, Condition and Query (validity=QUERY)
7. If the rule function returns a value, specify the Return Type, otherwise leave this field set to void. (Appears in the signature of the rule function in the Source editor.)
8. In the Scope section (scope statements in the source editor) you define the arguments of the rule function. Drag entities into the Scope area from BusinessEvents Studio Explorer, OR do the following:
a. Click Add to add resources that you will be using in your rule function. You see the Select Rule Function Scope Arguments dialog.
c. If you want to specify an array, check the isArray checkbox. (You can specify a variable array in the source editor in the usual way, for example, int[] myArr.)
e. Click OK.
10. In the Body section (Body statements in the source editor), use the TIBCO BusinessEvents rule language to implement the function. (Virtual rule functions have only a signature, and no implementation at design time.)See Using Variables and Functions in the Rule Editor and Tips for Working in the Rule Editor for more information on working in the rule editor.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |