You use the Business Logic callable object type to make process flow decisions based on dynamic expressions. They can be defined for output parameters and result states and are evaluated at runtime depending on the actual values of the input parameters. This is possible without any coding or use of an external rule engine.
To construct dynamic expressions, you can use a built-in expression editor that provides predefined operators and functions, as well as a validation tool.
The following categories are available:
· Text functions
· Numeric functions
· Date functions
· Time functions
· Conditional functions
· Scientific functions
· Operators
You have the appropriate rights to work with Guided Procedures (GP) design time.
More information: Authorizations
...
1. Open the gallery and from the contextual panel choose Create Callable Object.
2. From the Type list, select Process Control → Business Logic and enter the required basic data as follows:
Parameter |
Description |
Name |
Enter a name for the new object. |
Description |
Provide a short and meaningful description. |
Original Language |
Choose the language in which the translatable texts of the callable object definition are created. |
Folder |
Select a destination folder in the gallery.
You can either use an existing folder, or create a new one. |
3. Choose Next.
The Define Object screen appears. You can see a short description of the object characteristics and purpose. Continue by choosing Next.
4. On the Define Input screen, choose Insert New… to create input parameters. You can define an arbitrary set of input parameters.
5. Once you have created the parameters you need, choose Next to continue.
6. On the Define Output screen, choose Insert New… to add output parameters.
You can have an arbitrary number of output parameters on the root level. However, you cannot create parameters of type Structure.
7. Choose Next to continue.
8. On the Set Configuration screen, enter expressions for the output parameters defined previously:
a. Select an output parameter from the list and choose (Browse).
b. If you are familiar with expression syntax, enter an expression in the text area on the left.
c. If you are not sure about the syntax, use the predefined functions from the list on the right.
For a list of some frequently used functions, see Tables of Functions.
d. To insert a function into the text area, expand a node and select the relevant entry.
Each of these functions provides a quick info text description with syntax rules and examples. To view this information, point at the specific entry in the list.
e. To test the expression, choose Validate.
f. Once you have defined the expression, choose Apply to save it.
9. If you want to define result states for the callable object, choose the Add option under Result States.
10. Enter a name for the new result state and choose Add State.
The state appears in the list.
11. Repeat steps 9 through 10 to define an arbitrary number of result states.
12. To define expressions for the result states you have created, select a result state from the list and follow the procedure in step 8.
Result state expressions should evaluate to Boolean.
13. Choose Next and Finish and Open.
You can test the callable object in GP design time or include it in a process to test it in runtime. If you insert it in an action, you should be able to see all result states that you have defined.
You can create a callable object that calculates the monthly payments to redeem a certain credit amount based on a specified interest rate and time period. It approves the credit request if the monthly payment does not exceed half the monthly income of the person and outputs the amount of the payment. Otherwise, it rejects the credit request.
This callable object has the following characteristics:
Parameter Type |
Name |
Type |
Dynamic Expression (uses the technical names of the input parameters) |
Input
|
First Name Last Name Income (monthly) Credit amount Period (years) Interest rate (percent) |
String String Double Double Integer Double |
|
Output |
Name Monthly Payment |
String Double |
CAPITAL(@FirstName)& ’ ’& CAPITAL(@LastName) ROUND(@credit* POW((1+@interest/100), @period) /(12*@period)*100)/100 |
Result states (all result states evaluate to Boolean) |
Approved |
|
@credit* POW((1+@interest/100), @period) /(12*@period)<(@income/2) |
Rejected |
@credit* POW((1+@interest/100), @period) /(12*@period)>=(@income/2) |