uCosminexus Service Platform, Basic Development Guide
In the input column of the dialog boxes used for defining activities, you must specify an XPath. The following table describes the input column of dialog boxes used for defining activities and specifying the Xpath:
Table 5-15 Input column of dialog boxes used for defining activities and specifying the XPath
Item No. |
Activity name |
Input column of dialog boxes |
1 |
Assign activity |
Value of Copy source in the Assign Activity sub dialog box |
2 |
Switch activity |
Condition Expression of the Condition Setting dialog box (Switch activity) |
3 |
Flow Activity |
Condition Expression of the Condition Setting dialog box (Flow activity) |
4 |
While activity |
Condition Expression of the Condition Setting dialog box (While activity) |
5 |
Standby activity |
Expression of Standby time of Standby activity dialog box |
In the XPath, the information within a variable can be acquired either by using the extension function or by directly specifying the variable name. For details about the extension function, see 5.6.18(3) Extension function.
- Organization of this subsection
- (1) Acquiring the information within a variable using the extension function
- (2) Acquiring the information by directly specifying variable names
- (3) Extension function
(1) Acquiring the information within a variable using the extension function
The methods of acquiring the information within a variable using the extension function are as follows:
(a) Specifications in the Assign Activity sub dialog box
To acquire a value of the copy-source XML, specify the XPath in Value with the extension function.
- Acquiring the value of the propertyName attribute
- Acquire the value of the propertyName attribute using the extension function bpws:getVariableProperty. You can use this method when the variable type is message.
- Specification method
bpws:getVariableProperty('variableName','propertyName')
|
- variableName: Specify a variable name.
- propertyName: Specify the part name other than the messageType defined within the variable specified in variableName.
- Specification example
bpws:getVariableProperty('VariableX','PropertyY')
|
- Directly specifying the value of the variable
- Acquire the value of the propertyName attribute using the extension function csc:getVariableData. You can use this method when the variable type is message, string, numeric, or boolean.
- Specification method (When the variable type is message)
csc:getVariableData('variableName','locationPath')
|
- variableName: Specify a variable name.
- locationPath: Specify a path (acquired in Chooseed path of the Show Variables dialog box) that indicates the node of an XML schema.
- Specification example
csc:getVariableData('VariableX','input/forInvoke/depositData/id')
|
- Specification method (When the variable type is string, numeric, or boolean)
csc:getVariableData('variableName')
|
- variableName: Specify a variable name.
- Specification example
csc:getVariableData('VariableX')
|
- When acquiring the initialization status of header assigned variables
- Use the extension function csc:getMessageInitialize to acquire the initialization status of header assigned variable. You can use this function, when the variable type is message type (XML, non-XML or any).
- Specification method
csc:getMessageInitialize('variableName')
|
- variableName: Specify the header assigned variables.
- Specification example
csc:getMessageInitialize('VariableX')
|
-
- When acquiring the hexadecimal format character string of message type variable (non-XML)
- Use the extension function csc:getHexVariableData to acquire the hexadecimal format character string (single byte upper chase characters) of message type variable (non-XML or any).
- You can use the function when the variable type is message type (non-XML or any).
- Specification method
csc:getHexVariableData('variableName','beginIndex','compNumber')
|
- variableName: Specify the acquisition source variable name of message type (non-XML or any).
- beginIndex: Specify bytes count of acquisition start position.
- compNumber: Specify bytes count to be obtained.
- Specification example
csc:getHexVariableData('VariableX','2','1')
|
-
- When acquiring the character string in hexadecimal format
- Use the extension function csc:getHexString to acquire the character string (single byte upper case characters) in hexadecimal format.
- Specification method
csc:getHexString('convertString','characterCode')
|
- convertString: Specify a character string to be transformed to hexadecimal format.
- characterCode: Specify the character code to be used for encoding from character string to byte data. Character code that you can specify depends on the JavaVM of the environment in which this function is used.
- Specification example
csc:getHexString('PNG','UTF-8')
|
-
(b) Specifications in the Condition Setting dialog box
To set up the condition expression for judging a value of the variable, specify the expression that acts as a condition in Condition Expression with XPath.
- Setting the value of the propertyName attribute as the condition expression
- Use the extension function bpws:getVariableProperty and specify the condition statement from the value of the propertyName attribute. You can use this method when the variable type is message.
- Specification method
- Use one of the following specification methods:
- Method 1
bpws:getVariableProperty('variableName','propertyName') = "value-to-be-compared"
|
- Method 2
bpws:getVariableProperty('variableName','propertyName') = bpws:getVariableProperty('variableName','propertyName')
|
- variableName: Specify a variable name.
- propertyName: Specify the part name other than messageType defined within the variable specified in variableName.
- Specification example
bpws:getVariableProperty('VariableX','PropertyY') = "HITACHI"
|
- Setting the value of the variable as the condition expression
- Use the extension function csc:getVariableData and specify the condition statement from the value of the propertyName attribute. You can use this method when the variable type is message, string, numeric, or boolean.
- Specification method (When the variable type is message)
csc:getVariableData('variableName','locationPath') = "Value-to-be-compared"
|
- variableName: Specify a variable name.
- locationPath: Specify a path (acquired in Chooseed path of the Show Variables dialog box) that indicates the node of an XML schema.
- Specification example
csc:getVariableData('VariableX','input/forInvoke/depositData/userName/firstName') = "Taro"
|
- Specification method (When the variable type is string, numeric, or boolean)
csc:getVariableData('variableName')= "Value-to-be-compared"
|
- variableName: Specify a variable name.
- Specification example
csc:getVariableData('VariableX') = false()
|
- # When VariableX is a boolean type variable.
- When specifying the initialization status of header assigned variable in the condition expression
- Use the extension function csc:getMessageInitialize to specify the initialization status of header assigned variable, to the condition expression. You can use this function when the variable type is message type (XML, non-XML or any).
- Specification method
csc:getMessageInitialize('variableName') = "Comparison target value"
|
- variableName: Specify the header assigned variable name.
- Specification example
csc:getMessageInitialize('VariableX') = false()
|
-
- When specifying hexadecimal format character string of message type variable (non-XML), in the condition expression
- Use the extension function csc:getHexVariableData to acquire the hexadecimal format character string (single byte upper case characters) of message variable type (non-XML or any).
- You can use this function when variable type is message type (non-XML or any).
- Specification method
csc:getHexVariableData('variableName','beginIndex','compNumber') =
"hexadecimal expression of the comparison target value"
|
- variableName: Specify acquisition source variable name of message type (non-XML or any).
- beginIndex: Specify the bytes count of acquisition start position.
- compNumber: Specify bytes count to be acquired.
- Specification example 1 (when determining by acquiring value of third byte from the beginning)
csc: getHexVariableData ('VariableX','2','1') = "4e"
|
-
- Specification example 2 (when acquiring the value of third byte from the beginning and determining that character string by using the extension function csc:getHexString)
csc: getHexVariableData ('VariableX','0','3') =
csc:getHexString('PNG','UTF-8')
|
-
- When specifying the character acquired in hexadecimal format, in the condition expression
- Use the extension function csc:getHexString to specify the hexadecimal format character string (single byte upper case characters), in the condition expression.
- Specification method
csc:getHexString('convertString','characterCode') = "Hexadecimal expression of the comparison target value"
|
- convertString: Specify character string to be transformed to hexadecimal format.
- characterCode: Specify the character code to be used when encoding from character string to byte data. Character code that you can specify depends on JavaVM of the environment in which this function is used.
- Specification example
csc:getHexString('PNG','UTF-8') = "504E47"
|
-
(c) Specifying in the standby activity dialog box
In Expression of Standby time, specify XPath in the extension function.
- To acquire value of the propertyName attribute
- Acquire the propertyName attribute using the function namebpws:getVariableProperty. You can use this when the variable type is the message type.
- Specification method
bpws:getVariableProperty('variableName','propertyName')
|
- variableName: Specify the variable name.
- propertyName: Specify the part name other than the messageType type defined in variable specified by variableName.
- Example of specification
bpws:getVariableProperty('VariableX','PropertyY')
|
- To directly specify the value of the variable
- Acquire the value of the propertyName attribute using the extension function csc:getVariableData. You can use this when the variable type is message type or string type.
- Specification method (for message type)
csc:getVariableData('variableName','locationPath')
|
- variableName: Specify the variable name.
- locationPath: Specify the path showing the XML schema node (path acquired by Choose path of the Variable display dialog box).
- Example of specification
csc:getVariableData('VariableX','input/forInvoke/depositData/id')
|
- Specification method (for string type)
csc:getVariableData('variableName')
|
- variableName:Specify the variable name.
- Example of specification
csc:getVariableData('VariableX')
|
-
- When acquiring the initialization status of header assigned variable
- Use the extension function csc:getMessageInitialize to acquire the initialization status of the header assigned variable. You can use this function when the variable type is message type (XML, non-XML or any),
- Specification method
csc:getMessageInitialize('variableName')
|
- variableName: Specify the header assigned variable name.
- Specification example
csc:getMessageInitialize('VariableX')
|
-
- When acquiring the hexadecimal format character string of message type variable (non-XML)
- Use the extension function csc:getHexVariableData to acquire the hexadecimal format character string (single byte upper case characters) of message type variable (non-XML or any).
- You can use this function when the variable type is message type (non-XML or any).
- Specification method
csc:getHexVariableData('variableName','beginIndex','compNumber')
|
- variableName: Specify the acquisition source variable name of message type (non-XML or any).
- beginIndex: Specify bytes count of acquisition start position.
- compNumber: Specify the bytes count to be acquired.
- Specification example:
csc:getHexVariableData('VariableX','2','1')
|
-
- When acquiring the character string in hexadecimal format
- Use the extension function csc:getHexString to acquire the character string (single byte upper case character) of hexadecimal format.
- Specification method
csc:getHexString('convertString','characterCode')
|
- convertString: Specify the character string to be converted to hexadecimal format.
- characterCode: Specify the character code to be used when encoding from the character string to byte data. The character code that you can specify depends on JavaVM of the environment in which this function is used.
- Specification example
csc:getHexString('PNG','UTF-8')
|
- Note
- Note the following when specifying standby time:
- To specify Intervals in standby time
The character strings that can evaluate and acquire the XPath expression must conform to XML Schema type duration (xsd:duration).
- To specify Term in standby time
The character strings that can evaluate and acquire the XPath expression must conform to XML Schema type dateTime (xsd:dateTime).
- These specifications are fixed according to BPEL standard rules. Therefore, variables of numeric type and boolean type of the business process cannot be specified.
- Note that you can also specify intervals and terms directly by enclosing them in " or ' instead of specifying the XPath expression.
- For details, see 5.6.10(2) Character strings that can be specified as standby time.
(2) Acquiring the information by directly specifying variable names
The methods of acquiring information by directly specifying variable names are as follows:
(a) Specifications in the Assign Activity sub dialog box
Directly specify the XPath for acquiring Value of the copy source.
- Acquiring the value of the propertyName attribute
- Execute the method for acquiring the information within the variable using the extension function.
- Directly specifying the value of the variable
- Directly specify the variable name in $variableName. This method can be used when the variable type is message, string, numeric, or boolean.
- Specification method (When the variable type is message)
$variableName/locationPath
|
- variableName: Specify a variable name.
- locationPath: Specify a path (acquired in Chooseed path of the Show Variables dialog box) that indicates the node of an XML schema.
- Specification example
$VariableX/input/forInvoke/depositData/id
|
- Specification method (When the variable type is string, numeric, or boolean)
- variableName: Specify a variable name.
- Specification example
(b) Specifications in the Condition Setting dialog box
Directly specify the XPath of the Condition Expression.
- Setting the value of the propertyName attribute as the condition expression
- Execute the method for specifying the condition expression using the extension function.
- Setting the value of the variable as the condition expression
- Directly specify the variable name in $variableName. This method can be used when the variable type is message, string, numeric, or boolean.
- Specification method (When the variable type is message)
$variableName/locationPath
|
- variableName: Specify a variable name.
- locationPath: Specify a path (acquired in Chooseed path of the Show Variables dialog box) that indicates the node of an XML schema.
- Specification example
$VariableX/input/forInvoke/depositData/userName/firstName = "Taro"
|
- Specification method (When the variable type is string, numeric, or boolean)
- variableName: Specify a variable name.
- Specification example
- # When VariableX is a boolean type variable.
(c) Specifying in the standby activity dialog box
In Expression of Standby time, specify XPath in the extension function.
- To acquire value of the propertyName attribute
- Execute the method to acquire the information in the variable using the extension function.
- To directly specify the value of the variable
- To directly specify the variable name as $variableName. You can use this when the variable type is message type or string type.
- Specification method (for message type)
$variableName/locationPath
|
- variableName: Specify the variable name.
- locationPath: Specify the path showing the XML schema node (path acquired by Choose path of the Variable display dialog box).
- Example of specification
$VariableX/input/forInvoke/depositData/id
|
- Specification method (for string type)
- variableName: Specify the variable name.
- Example of specification
- Note
- Note the following when specifying standby time:
- To specify Intervals in standby time
The character strings that can evaluate and acquire the XPath expression must conform to XML Schema type duration (xsd:duration).
- To specify Term in standby time
The character strings that can evaluate and acquire the XPath expression must conform to XML Schema type dateTime (xsd:dateTime).
- These specifications are fixed according to BPEL standard rules. Variables of numeric type and boolean type of the business process cannot be specified.
- Note that you can also specify intervals and terms directly by enclosing them in " or ' instead of specifying the XPath expression.
- For details, see 5.6.10(2) Character strings that can be specified as standby time.
(d) Specifying in the repetition list settings dialog
Directly specify in Expression of repetition list, in XPath. You cannot use the extension function, when you use the list specification method.
- When specifying the node of repetition element
- Specification method
$variableName/locationPath
|
- variableName: Specify the variable name.
- locationPath: Specify path of repetition element (path acquired in selection path of display variable dialog) that shows the node of XML schema.
- Specification example
$VariableX/*[local-name()='loop-element' and namespace-uri()='http://example.com/sample']/*[local-name()='child-element' and namespace-uri()='http://example.com/sample']
|
-
- When specifying multiple nodes of repetition element
- Specification method
($variableName/locationPath | $variableName/locationPath)
|
- variableName: Specify the variable name.
- locationPath: Specify path of repetition element (path acquired in selection path of display variable dialog) that shows the node of XML schema.
- Specification example
($VariableX/*[local-name()='loop-element' and namespace-uri()='http://example.com/sample']/*[local-name()='child-element' and namespace-uri()='http://example.com/sample'][1] | $VariableX/*[local-name()='loop-element' and namespace-uri()='http://example.com/sample']/*[local-name()='child-element' and namespace-uri()='http://example.com/sample'][3])
|
-
- When specifying the node of repetition element in the specific range
- Specification method (range specification)
$variableName/locationPath[position()<10]
|
- variableName: Specify the variable name.
- locationPath: Specify path of repetition element (path acquired in selection path of display variable dialog) that shows the node of XML schema.
- Specification example
$VariableX/*[local-name()='loop-element' and namespace-uri()='http://example.com/sample']/*[local-name()='child-element' and namespace-uri()='http://example.com/sample'][position()<10]
|
-
There are two types of extension functions as shown in (i) and (ii). The format and arguments of the extension function and the notes when using an extension function are as follows:
- (i) bpws:getVariableProperty
- Format
- bpws:getVariableProperty('variableName','propertyName')
- Argument
- variableName
- Specifies a variable name.
- propertyName
- propertyName: Specifies the part name other than the messageType defined within the variable specified in variableName.
- (ii) csc:getVariableData
- Format
- csc:getVariableData('variableName','locationPath')
- Argument
- variableName
- Specifies a variable name.
- locationPath
- Specifies a path that indicates the node of an XML schema.
-
- Note:
- If the variable type is other than message, specify only variableName as the argument.
- If the variable type is other than message, the function returns a data type corresponding to the variable type.
- The result of evaluating the path specified in locationPath for the variable data specified in variableName is returned as a string type (mapped to java.lang.String).
- If locationPath contains ', enclose locationPath inside double quotation marks (").
-
(iii) getMessageInitialize
- Format
- csc:getMessageInitialize('variableName')
- Argument
- variableName
- Specify the variable name.
- Notes
- Define the variable element of the variable to be specified in variableName, with xml type.
- Initialization status of the variable specified in variableName is returned in boolean type.
In case of initialized status: true
In case of non-initialized: false
-
(iv) getHexVariableData
- Format
- csc:getHexVariableData('variableName','beginIndex','compNumber')
- Argument
- variableName
- Specify the variable name.
- beginIndex
- Specify the bytes count of acquisition start position.
- compNumber
- Specify the bytes count to be obtained.
- Notes
- In beginIndex you can specify value 0 or greater than 0 and in compNumber you can specify value 1 or greater than 1. However, specify such that total count of the value of beginIndex and value of compNumber is less than the bytes count of variable specified in variableName. If the total count of value of beginIndex and value of compNumber is greater than the bytes count of variables specified in variableName, XpathFunctionException occurs.
- When you specify a non-numeric value in beginIndex and compNumber, XpathFunctionException occurs.
- If you specify a value that cannot exist as variable, in variableName, XpathFunctionException occurs.
-
(v) getHexString
- Format
- csc:getHexString('convertString','characterCode')
- Argument
- convertString
- Specify the character string to be converted to hexadecimal format.
- characterCode
- Specify the character code to be used for acquiring the byte data from the character string.
- Notes
- When you specify blank character ( ) in convertString, blank character is returned as the process result.
- If you specify data other than character code corresponding to JavaVM of the environment, in which variable is used, in characterCode, XpathFunctionException occurs.
All Rights Reserved. Copyright (C) 2015, Hitachi, Ltd.