Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.2.14 Test value plug-in

Function

This plug-in compares the value of a service property, the value of a reserved property, a literal string, or any combination thereof against a specified value. If the judgment 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.

Figure 4‒9: Test value plug-in

[Figure]

Cautionary note

Version

01.10.01

Tag

Test Value Plug-in

Return codes

Return code

Description

0

The value matched the judgment condition.

Alternatively, 0 is specified in the defaultReturnCode property.#

1

The value did not match the judgment condition.

Alternatively, 1 is specified in the defaultReturnCode property.#

63

Judgment failed.

63 is specified in the defaultReturnCode property.#

65

The connection with the JP1/AO server failed. For example, the JP1/AO server might have stopped while the plug-in was being executed.

66

The following user is mapped to the JP1 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

There is no information about the target job execution ID.

69

An environment variable of the task-processing engine could not be acquired.

80

Task execution has stopped.

81

The plug-in was called in an invalid status.

82

The request message from the task-processing engine could not be correctly parsed.

83

The environment of the JP1/AO server is corrupted.

84

Information about the specified plug-in could not be obtained.

86

The specified property value is invalid.

127

Another error has occurred.

#

If 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, the plug-in returns the value specified in the defaultReturnCode property.

Property list

The following table describes the properties.

Property key

Property name

Description

Default value

I/O type

Required

condition

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).

valueX=value1

Input

R

valueX

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

R

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

O

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

O

defaultReturnCode

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 terminate abnormally.

63

Input

R

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 judgment 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 values matched to each judgment condition.

Figure 4‒10: Range of input values matched by each judgment condition

[Figure]

Related topics