Runtime Formula Processing

Navigation:  Formulas >

Runtime Formula Processing

Previous pageReturn to chapter overviewNext page

In this section, we will explain how IDIOM processes formulas at runtime.

Two important concepts that you need to understand are context and reachability. These are detailed in Table 4-4.

Concept

Description

Context

All formulas have a context node, which is the node on the schema that they are linked to. The formula can be said to be located on this node.

If you create a formula from a decision, then the context node of the formula will be the same context node as the decision that it was created from.

Reachability

The context node determines the 'reachability' of other nodes within the schema(s).

A node is reachable from the context node whenever a process can retrieve a single value from that node when navigating from the context node.

Table 4-4: Context and Reachability are central to runtime formula processing

 

During runtime processing of formulas, IDIOM executes each operator in the formula in its proper order to ultimately create a single value that will be returned to decision, and via the decision to that decision’s context node on the Decision Request document (see IDIOM Architecture).

A node must be reachable to be accessed directly by any of the single valued node operators (see list below):

4-30NodeOperators

Figure 4-30: Single Valued Node Operators

 

Node Operator

Function

Node

Retrieves the node value.

IsValidNode

Returns a boolean 'true' if the node both exists and has a value (note that blank and zero are valid values).

NodeLiteral

Retrieves a node's value as a string regardless of its data type.

NodeEnum

Retrieves the nodes enumerated value.

NodeEnumLiteral

Allows a selected enumeration value to be set as a literal value.

ExternalContext

Moves the context to a node that is visible to IDIOM in the existing runtime processing model (e.g. a parent decision group node).

Copy

Identifies the node that is to be copied FROM, including all descendants of the node.

CopyTarget

Identifies the node that the copied node (and its descendants) is copied TO.

Table 4-5: Node operator functions

 

The following nodes are reachable and can therefore be accessed directly by a node operator:

·

Any ancestor node, whether the ancestor is a repeating node or not.

·

Any single-valued node that is reachable from the context node, or any ancestor of such a node.

·

The root and any single-valued node that is reachable from it on any other schema that is present in the decision model.

However, you cannot retrieve a single value from a repeating node that does not meet any of the above criteria. You need to perform some further operations using Node list operators (see Changing Context with Node List Operators) to retrieve a single value from these nodes.