Message Flows Conditional Branching


You may define Conditional Branch command that instructs the DRA to execute any command within a flow when some predefined conditions are met.

The Conditional Branch command evaluates pre-configured expressions and then jumps to a different command in a message flow based on the result of the evaluation.  The pre-configured expressions specify the AVP (for example, result-code) of the received diameter message used for evaluation and how the AVP is compared with (i.e., the operator used to compare, for example, equal-to) the provided value. You may use a Conditional Branch command to implement an IF, IF-ELSE, basic loop logic; or, multiple Conditional Branch commands for implementing more complex evaluation.  

Additional Message Flow details in Message Flows topic.


Conditional Branch Tab

Set up/configure condition/evaluation expressions in a Conditional Branch command.

Click to add a row to specify a Condition Expression used to execute Condition Branch command. You may add a maximum of five condition expressions, after which the button is greyed.

Click -- to delete the selected row.

AVP

Select an AVP of a received message which will be used in an expression.  

  • result – Result-Code AVP
  • experimental-result – Experimental-Result-Code AVP

Operator

Select an operator/condition from the list.

  • == to test whether a specified AVP equals to a provided value.
  • != to test whether a specified AVP is not equal to a provided value.
  • > to test whether a specified AVP is greater than a provided value.
  • < to test whether a specified AVP is less than a provided value.
  • >=  to test whether a specified AVP is greater than or equal to a provided value.
  • <=to test whether a specified AVP is less than or equal to a provided value.
  • inrange(x-y) to test whether a specified AVP is within a provided range.
  • outrange(x-y) to test whether a specified AVP is outside a provided range.
  • in(a,b,c) to test whether a specified AVP is one of the listed values.
  • not(a,b,c) to test whether a specified AVP is not one of the listed values.
  • matches(regex) to test whether a specified AVP matches a provided regular-expression.

Value

Enter an appropriate value for the selected operator.  When multiple values are required (for example, ‘inrange(x-y) operator), use space to separate values.

NOTE: When multiple expressions are provided, the final result is a combined (logical AND operation) expressions.

If true GOTO

Indicates the command is executed when a result of the evaluation is TRUE. When a Command ID is not provided, defaults to the next Command ID in the message flow. When this parameter is set to zero (0), it indicated the end of a flow (i.e., to abort).

  • Select and enter a command ID.

OR

  • Click ... and select a command Id from a list.

NOTE: The list of Command Id depends on the number of message flows.

If false GOTO

Indicates the command is executed when a result of the evaluation is FALSE. When a Command ID is not provided, defaults to the next Command ID in the message flow.. When this parameter is set to zero (0), it indicated the end of a flow (i.e., to abort).

  • Select and enter a command ID.

OR

  • Click ... and select a command Id from a list.

 

NOTE: The list of Command Id depends on the number of message flows.

 

Expire after lifetime (count)

Selected by default and the count is set as 1. You may change the value of the count.

NOTE: Each Conditional Branch command has a default value of 1 (whether selected or not, the count is automatically set as 1). The MN subtracts the lifetime of Conditional Branch command by 1 every time the command is executed and considers the final result as expired when the lifetime value is less than 0.

If expires GOTO

Available only when Expire after lifetime (count) is selected.

Specifies the ID of any command in a message flow which will be executed when a Conditional Branch command expires (see Expire after lifetime). When a Command ID is not provided, defaults to the next Command ID in the message flow.  When this parameter is set to zero (0), it indicated the end of a flow (i.e., to abort).

  • Select and enter a command ID.

OR

  • Click ... and select a command Id from a list.

NOTE: The list of Command Id depends on the number of message flows.

 

Condition Branch Command Execution:  

The following lists the Condition Branch command execution after evaluating the conditional expressions.

  • When a final evaluation result is TRUE (success), MN executes the Condition Branch Command based on If true GOTO (exec-on-eval-success).
  • When a final evaluation result is FALSE (failure), MN executes the Condition Branch Command based on If False GOTO (exec-on-eval-failure).
  • When a final evaluation result is EXPIRED, MN executes the Condition Branch Command based on If expires GOTO (exec-on-eval-expired).

NOTE: Any attempt to execute an expired Conditional Branch command results in execution of command  exec-on-eval-expired. See Expire after lifetime.

 

 


GOTO Tab

GOTO Command #

Click ... and select the command Id from the list.

NOTES:

  • The list of Command Id depends on the number of message flows.
  • There is no condition associated with a GOTO command.  The DRA executes GOTO commands regardless of received messages.
 

 

^ Back to Top