◷ Reading Time: 4 minutes
What is Tree Procedure?
Procedural rules in a tree procedure are suitable for implementing complex rules and logic. Alternatively, there might be some parts of the application that are unclear and yet to be hard-coded. Or some logic looks as if it needs fully-fledged compiled code to handle all of the required flow controls, conditions, variable and resource access, and calculations. The fact is that all of these can be implemented as a procedural rule. So instead of hard coding them as a compiled, static and executable code you can benefit from having dynamic and flexible procedural rules and logic, then delegate the execution to our procedural rule engine in order to execute your implementation.
Complex logic may have one or more of the following behaviors:
- May have formula or calculation logic
- May need to implement sequential If-ElseIf-Else conditions
- May require to do a loop, iteration or implement an algorithm
- May need to have input parameters of any type be passed from applications/systems/users
- May require to return some values of any type to applications/systems/users
- May need to access external resources (e.g., Database, Files, XML, etc.)
- May need to instantiate an object of any type (class) and/or need to access object – properties/attributes values or call object methods
There are two ways of entering the rules:
- Using mouse (drag and drop technique)
- Using keyboard (filter and enter technique)
To compose a rule using the drag and drop method involves several steps;
- Select an item from the toolbox
- Drag it over the document (blank opened rule document)
- Drop the item into the document.
The following table shows how to create a procedure rule and start adding the first element to the rule document:
To add a new Tree Procedure document,
Document Types --> Decision Logic --> Tree Procedure
Once you add a document, this will be the window.
Tree Procedure Properties
- Enabled: Whether it is enabled
- Name: Name of the tree procedure
The toolbox has the following items.
At the top menu, you can see the following items.
- Open related rule document: To open the related rule document
- Move down the selected node: Move a node
- Move up the selected node: Move a node up
- Delete selected node: Delete a node
- Show properties of node: Show properties of a node
- Expand tree: Show more of a tree node
- Collapse tree: Show less of a tree node
If you click on a node, its property window will appear. The properties vary depending on the node type.
Sample Tree Procedure
Download the sample Tree Procedure (Sample-tree-procedure.zip) using the attachment.