Test Value Plug-in

Ops Center Automator Service Builder User Guide

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

The Test Value Plug-in compares service property values and returns 0 if the values match the conditions.

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. If the condition is met, the plug-in returns 0.

By using this plug-in together with a Branch by ReturnCode Plug-in, you can select the steps in a flow based on a character string.

The following figure shows how the Test Value Plug-in is used.


Test Value Plug in usage flow chart.

Cautionary notes

  • If a task is stopped while a plug-in is running, the task enters Completed status after the Test Value Plug-in finishes processing.

Return codes

The Test Value Plug-in generates the following return codes:

Return Code Description
0 The value matched the condition. Alternatively, 0 is specified in the defaultReturnCode property.
1 The value did not match the condition. Alternatively, 1 is specified in the defaultReturnCode property.
63 Condition failed. 63 is specified in the defaultReturnCode property.
65 The connection with the Ops Center Automator server failed. For example, the Ops Center Automator server might have stopped while the plug-in was running.
66 The following user is mapped to the Ops Center Automator user:
  • A user who does not belong to the Administrators group.
  • A user other than the built-in Administrator who belongs to the Administrators group, in an environment with UAC enabled.
68 No information about the target job execution ID exists.
69 An environment variable of the task-processing engine cannot be acquired.
80 Task execution has stopped.
81 The plug-in was called in a status that is not valid.
82 The request message from the task-processing engine cannot be correctly parsed.
83 The environment of the Ops Center Automator server is corrupted.
84 Information about the specified plug-in cannot be obtained.
86 The specified property value is not valid.
127 Another error has occurred.

Property list

The following properties are available for the Test Value Plug-in:

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

    ValueX and Value1 are equal (numerical comparison).

  • valueX!=value1

    ValueX and Value1 are not equal (numerical comparison).

  • valueX<value1

    ValueX is less than Value1 (numerical comparison).

  • valueX>value1

    ValueX is greater than Value1 (numerical comparison).

  • valueX<=value1

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

  • 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. Values are case sensitive (character string comparison).

  • valueX not equals value1

    ValueX and Value1 are not equal. Values are case sensitive (character string comparison).

  • valueX contains value1

    ValueX contains Value1. Values are case sensitive (character string comparison).

  • valueX not contains value1

    ValueX does not contain Value1. Values are 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.
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 when using "Judgment failed" as the judgment result to make the step end abnormally.

The default value is 63.

Input
R: Required

Example of property specification

A test value plug-in determines whether an input value is within a specified range of values.

The following describes the range of valid condition values, using the following values of the condition, value1, and value2 properties as examples.

A. The input value is greater than or equal to 25 and less than 75

condition (Condition): ReturnCode>=value1 AND ReturnCode<value2

value1 (Value1): 25

value2 (Value2): 75

B. The input value is less than 25, or 75 or greater

condition (Condition): ReturnCode<value1 OR ReturnCode>=value2

value1 (Value1): 25

value2 (Value2): 75

The following figure shows the range of return codes that match each condition.


Range of return codes that match each condition.