Branch by Property Value Plug-in

Ops Center Automator Service Builder User Guide

Version
11.0.x
Audience
anonymous
Part Number
MK-99AUT002-18

The Branch by Property Value Plug-in branches the flow of processing based on service property values.

The plug-in compares the value of a service property, the value of a reserved property, a literal string, or any combination of these values against a specified value. The result of the comparison determines which step Ops Center Automator runs next.

This Branch by Property Value Plug-in allows you to select which step to run next based on the return code of the preceding step.

This plug-in connects to two branch destination steps: A succeeding step, and a step that is only run when the judgment condition is met. If the input value matches the condition, Ops Center Automator runs the branch destination step and the succeeding step, in that order. If the input value does not match the conditions, Ops Center Automator runs the succeeding step only.

This plug-in combines the functionality of a test value plug-in and a Branch by Returncode plug-in.

The following figure shows how the Branch by Property Value Plug-in is used.


How to use the Branch by Property Value Plug-in

Cautionary notes

  • When you run this plug-in, the information output to the task log reflects the execution of the test value plug-in. The Branch by Property Value Plug-in does not contribute to the task log.
  • If a task is stopped while the plug-in is running, the task enters Completed status after the Branch by Property Value Plug-in finishes processing.

Return codes

The Branch by Property Value Plug-in generates the following return codes:

Return Code Description
0 The plug-in returns 0 when:
  • The condition result is true.
  • A numerical comparison is specified in the condition property, a value that cannot be compared on a numerical basis is specified in any of the valueX, value1, and value2 properties, and 0 is specified in the defaultReturnCode property.
1 The plug-in returns 1 when:
  • The condition result is false.
  • A numerical comparison is specified in the condition property, a value that cannot be compared on a numerical basis is specified in any of the valueX, value1, and value2 properties, and 1 is specified in the defaultReturnCode property.
80 The plug-in returns 80 when task execution is stopped.

Property list

The following properties are available for the Branch by Property Value Plug-in:

Property key Property name Description I/O type
condition R Condition Specify the branch condition for the valueX property. You can select from the following conditions:
  • valueX>=value1

    ValueX is greater than or equal to Value1 (numerical comparison).

  • valueX>value1 AND valueX<value2

    ValueX is greater than Value1 and less than Value2 (numerical comparison).

  • valueX>=value1 AND valueX<value2

    ValueX is greater than or equal to Value1, and less than Value2 (numerical comparison).

  • valueX>value1 AND valueX<=value2

    ValueX is greater than Value1, and less than or equal to Value2 (numerical comparison).

  • valueX>=value1 AND valueX<=value2

    ValueX is greater than or equal to Value1, and less than or equal to Value2 (numerical comparison).

  • valueX<value1 OR valueX>value2

    ValueX is less than Value1, or greater than Value2 (numerical comparison).

  • valueX<=value1 OR valueX>value2

    ValueX is less than or equal to Value1, or greater than Value2 (numerical comparison).

  • valueX<value1 OR valueX>=value2

    ValueX is less than Value1, or greater than or equal to Value2 (numerical comparison).

  • valueX<=value1 OR valueX>=value2

    ValueX is less than or equal to Value1, or greater than or equal to Value2 (numerical comparison).

  • valueX equals value1

    ValueX and Value1 are equal. This judgment is case sensitive (character string comparison).

  • valueX not equals value1

    ValueX and Value1 are not equal. This judgment is case sensitive (character string comparison).

  • valueX contains value1

    ValueX contains Value1. This judgment is case sensitive (character string comparison).

  • valueX not contains value1

    ValueX does not contain Value1. This judgment is case sensitive (character string comparison).

The default value is valueX=value1.

Input
valueX R ValueX Specify a value as the basis for comparison, using no more than 1,024 characters. You can use the following formats individually or combined.
  • ?dna_service-property-key? (when referencing the value of a service property)
  • ?dna_reserved-property-key? (when referencing the value of a reserved property)
  • literal-string
Input
value1 Value1 Specify the value against which to compare the valueX property, using no more than 1,024 characters. You can use the following formats individually or together.
  • ?dna_service-property-key? (when referencing the value of a service property)
  • ?dna_reserved-property-key? (when referencing the value of a reserved property)
  • literal-string

The value is mapped to value1 in the condition property. The value in this property takes effect when value1 is specified in the condition property.

Input
value2 Value2 Specify the value against which to compare the valueX property, using no more than 1,024 characters. You can use the following formats individually or together.
  • ?dna_service-property-key? (when referencing the value of a service property)
  • ?dna_reserved-property-key? (when referencing the value of a reserved property)
  • literal-string
The value is mapped to value2 in the condition property.

The value in this property takes effect when value2 is specified in the condition property.

Input
defaultReturnCode R Default Return Code On Error This property specifies the value returned by the plug-in when a numerical comparison is specified in the condition property, and a value that cannot be compared on a numerical basis is specified in any of the valueX, value1, and value2 properties.
  • 0

    Specify 0 when using "The value matched the judgment condition." as the judgment result.

  • 1

    Specify 1 when using "The value did not match the judgment condition." as the judgment result.

  • 63

    Specify 63 for the step to end abnormally when the judgment gives a failed result.

    The plug-in ends abnormally without executing the branch destination step or the succeeding step.

The default value is 63.

Input
R: Required