uCosminexus Service Platform, Basic Development Guide

[Contents][Glossary][Index][Back][Next]

5.6.7 Assign Activity

This activity creates definitions for executing the following processes:

You define the details of assign activities in the Assign Activity dialog box.

When assigning a value to a variable, the format can be automatically converted and the value can be assigned even if the variable has a different format. The following table shows data convertibility and the conversion rules.

Table 5-13 Conversion rules for an assigned value

Data format of the value to be assigned Data format after conversion
Boolean Numeric string Message
XML non-XML any
Boolean -- Y#1 Y#2 N N N
Numeric Y#3 -- Y#4 N N N
string Y#5 P#6 -- N N N
Message XML N N N -- N Y
non-XML N N N N -- Y
any N N N Y Y --

Legend:
--: No conversion is needed.
N: Cannot be converted and assigned.
Y: Can be converted and assigned.
P: Can be converted and assigned in some cases.

#1
If true, 1 is assigned; if false, 0 is assigned.

#2
true or false is assigned.

#3
If 0, false is assigned. In all other cases, true is assigned.

#4
The value obtained by the toString(double) method of the java.lang.Double class is assigned.

#5
The value obtained by the parseBoolean(String) method of the java.lang.Boolean class is assigned.

#6
The value obtained by the parseDouble(String) method of the java.lang.Double class is assigned.

 

In assign activities, there are some combinations that cannot be specified for the copy source and copy destination. The following figure shows copy source and copy destination combinations.

Table 5-14 Copy source and copy destination combinations

Copy source Copy destination
Variable (message type) Variable (basic type) Part of a variable (message type)# Part of a variable (basic type)#
XML non-XML any XML non-XML XML non-XML
Variable (message type) XML Y N Y N Y N N N
non-XML N Y Y N N N N N
any Y Y Y N N N N N
Variable (basic type) N N N Y N N Y N
Part of a variable (message type) XML Y N N N Y N N N
non-XML N N N N N N N N
Part of a variable (basic type) XML N N N Y N N Y N
non-XML N N N Y N N Y N
Expression N N N Y N N Y N

Legend:
Y: Can be specified.
N: Cannot be specified.

#
Cannot be copied if the copy-destination variable has not been initialized.

Organization of this subsection
(1) Definition procedure
(2) Process when system exception occurs in the activity
(3) Notes on definition

(1) Definition procedure

To define a receive activity:

  1. Deploy an assign activity on the canvas.
    For details about how to deploy activities, see 5.4.1 Deploying Activities.
  2. Use one of the following methods to open the Assign Activity dialog box:
    • Double-click an assign activity on the canvas.
    • Choose and right-click an assign activity on the canvas, and choose Setting.
    The Assign Activity dialog box opens.
  3. Enter the necessary information in the Assign Activity dialog box.
    For details about the display and input contents of the Assign Activity dialog box, see the manual Cosminexus Service Platform Reference.
    To add or edit data in Copy source or Copy destination, click Add or Edit. In the Assign Activity sub dialog box that opens, you can add or edit data in Copy source or Copy destination. If the value to be specified is a variable and you wish to edit its contents, click Edit in the Assign Activity sub dialog box. The Variable-Correlation Set dialog box opens. In this dialog box, you can edit the contents of the variable.
    For details about the Assign Activity sub dialog box and Variable and Correlation Set List dialog box, see the manual Cosminexus Service Platform Reference.
  4. Click OK.

(2) Process when system exception occurs in the activity

You can send the system exception occurring in the activity, by transforming to general fault. For details, see "4.7 General fault for transforming the system exception to fault" in the manual "Service Platform Function Guide".

(3) Notes on definition