Xelence creates all logical rules with an empty field that will contain the rule's logic. The most common way to design that logic is to drag and drop elements from the toolbox on the field (the other way is to open the X# view and directly code the logic). These are the available elements, row by row, from top left to bottom right. Any logical rule can contain any number of any of these elements.
Variable Declaration
Declares a local variable of a specified data type (string, int, etc.) that can be used to perform a calculation or trigger an action.
Action
Calculates a value and assigns the result of the calculation to a data element.
Switch
Evaluates an expression and uses Case blocks to determine execution.
Case
Block the Switch input is routed to.
Default
Block the Switch input proceeds to if it doesn't match any Case blocks.
If
Evaluates an expression and follows an "if-then" pattern to determine the path to follow.
Else If
Block the If input proceeds to if the previous block condition is not true.
Else
Block the If input proceeds to if none of the If or Else If conditions are true.
For
Repeating sequence of activities contained within a process. The rule repeats the execution as long as the specified condition is true and ends when the condition is false.
ForEach
Repeating sequence of activities contained within a process. The rule repeats the execution for all the items in the object or collection.
While
Repeats a set of instructions until the condition is true.
Break
Exits a loop.
Continue
Ends the current iteration of a Loop and skips the rest of the statements in the innermost Loop of the indicated type. The rule continues executing at the top of the Loop with the next iteration.
Return
Constant or variable of a specified datatype (string, int, etc.) that executing the rule produces.
Try
Contains a rule that can throw an exception.
Catch
Contains the exceptional handler for the Try block.
Finally
Contains the rule that needs to be executed regardless of whether the exception has occurred.
Throw
Explicitly throws an exception for a block of code.
Query
A rule can use a query to retrieve data, then use that data to continue its execution. You can call any query from the rule's linked entity. This feature is available, but it is preferable not to build your rules this way. Best practice is to keep logic independent of data.
Logical Rule
A logical rule can execute another logical rule (if that rule either belongs to the same entity or is static), then use its result to continue its own execution. If the rule has a Parent Rule, Xelence displays it in the Parent Rules tab in the left panel.
Decision Table
A logical rule can execute a decision table, then use its result to continue its own execution.
Excel Matrix
A logical rule can execute an Excel matrix, then use its result to continue its own execution.
Helper Function
A logical rule can execute a helper function, then use its result to continue its own execution.
Object Method
A logical rule can execute an object method, then use its result to continue its own execution.
#Rules