Decisions |
A decision is a programmatic construct in USoft Definer that allows you to: •Mix logic expressed in SQL with logic expressed in action scripts. •Add branching and looping to SQL statements and action scripts. This is a technical concept. Do not confuse it with the business concept of 'decision' as used in Decision Engines and Decision Modeling and Notation (DMN, the OMG standard first published in 2014). The USoft Rules Engine can functionally act as a Decision Engine, but it is not technically defined in terms of decision trees or decision calls. Instead, it automatically implements business rules in response to data manipulation events. As such, it is constructed entirely by implementing Business Rules and does not need Decision as a modeling concept. A Decision is defined in the Decisions info window, which displays the 4 attributes that make up every decision: •Decision Name. •Decision SQL. •Yes Action. •No Action. Example The decision shown in the picture below uses SQL to retrieve the name of the system directory and concatenate it with a command-line instruction. The result is passed to the operating system (and represented by the :1 placeholder in the Yes Action) for execution. If, for some reason, the SQL statement does not yield a result, nothing happens (No Action). This is probably not expected in this particular situation. The decision is executed when it is called from an Action Task in a job, from another (or indeed from the same) Decision, from a GUI element in Windows Designer or Web Designer, or from an action script in a SQL Command window. The call from an Action Task looks like this:
To call a decision from a SQL context, for example the SQL Command window, you must use the action keyword :
See also |