Put

The Put activity is used to store tuples in a space.

General

In the General tab, you can specify the activity name, a space connection, and whether to enable the Compare And Put and Async Operation options.

The following table describes the fields in the General tab of the Put activity:

Field Module Property? Description
Name No Specifies the name to be displayed as the label for the activity in the process.
Space Connection Yes Click the icon to select a space connection that defines how the application joins the space.

Tuples are stored to the space with the defined distribution role of the selected space connection.

If no matching space connections are found, click Create Shared Resource to create one. See Creating a Metaspace Connection for details.

Compare And Put No Select this check box to enable the compareAndPut operation. This check box is not selected by default.

The compareAndPut operation is a conditional Put operation. In the Input tab, you have to provide a new tuple and an old tuple. If the old tuple exists in the space and the new tuple has the same key values as the old tuple, the compareAndPut operation identifies the tuples that contain the same key values as the old tuple, and overwrites them with the new tuple.

See TIBCO ActiveSpaces Developer's Guide for details.

Async Operation No Select this check box to enable the asynchronous operation. After this check box is selected, the SpaceResultHandler activity is triggered. This check box is not selected by default.

Description

In the Description tab, you can enter a short description for the Put activity.

Advanced

In the Advanced tab, you can specify the advanced configurations, such as the lock time, whether or not to lock the tuple, and so on.

The following table describes the fields in the Advanced tab of the Put activity:

Field Module Property? Description
Lock Wait(milliseconds) Yes Specifies the amount of time in milliseconds the Put operation waits for the lock to be cleared if the tuple has been locked.

The value of the Lock Wait(milliseconds) field overwrites the value in the Lock wait (milliseconds) field, which is specified in the Advanced tab of the Space shared resource. The default value of -2 or a null value indicates that the value set in the Lock wait (milliseconds) field is not overwritten.

Entry Time to Live(milliseconds) Yes Specifies the amount of time in milliseconds that must have elapsed since the tuple was stored before the tuple expired.

The value of the Entry Time to Live(milliseconds) field overwrites the value in the Entry Time to Live (milliseconds) field, which is specified in the Advanced tab of the Space shared resource. The default value of -2 or a null value indicates that the value set in the Entry Time to Live (milliseconds) field is not overwritten.

Forget Yes Indicates whether tuples are returned in the Output tab.
Note: If you select this check box, no tuples are returned in the Output tab.
Lock No Select this check box to lock tuples after they are stored by the Put activity.
When you select the UnLock check box, this check box is disabled.
Note: When you select the Lock check box, the expired tuples still exist.
UnLock No Select this check box to unlock the locked tuples before performing a Put operation on them.

When you select the Lock check box, this check box is disabled.

Route Yes Select this check box to update tuples to another site and receive a status message.

See TIBCO ActiveSpaces Developer's Guide for details.

Space Result Handler Key Yes Specifies the key of the SpaceResultHandler activity, which is used for the asynchronous operation.

This field is displayed only when you select the Async Operation check box in the General tab of the Put activity.

Input

In the Input tab, you have to provide the new tuple that you want to put in the space. If the compareAndPut operation is enabled, you also have to provide the old tuple that exists in the space and uses key values to identify the tuples to be overwritten by the new tuple in the space. For the compareAndPut operation, the new tuple must have the same key values as the old tuple.
Note: You have to input all the fields specified in the space. Nullable fields are optional.

The following table describes the fields in the Input tab of the Put activity:

Input Item Data Type Description
The following fields are the child fields of the PutOptions node.
lockWait Integer Indicates the amount of time in milliseconds that a Put operation waits for the lock to be cleared if the tuple has been locked. The value of the lockWait field overwrites the value in the Lock wait (milliseconds) field, which is specified in the Advanced tab of the Space shared resource.
Note: The default value of -2 or a null value indicates that the value set in the Lock wait (milliseconds) field is not overwritten.
ttl Integer Indicates the amount of time in milliseconds that must have elapsed since the tuple was stored before the tuple expired.

The value of the ttl field overwrites the value in the Entry Time to Live (milliseconds) field, which is specified in the Advanced tab of the Space shared resource.

Note: The default value of -2 or a null value indicates that the value set in the Entry Time to Live (milliseconds) field is not overwritten.
isForget Boolean Specifies whether to return tuples in the Output tab. The value is true or false.
isLock Boolean Specifies whether to lock tuples after they are stored by the Put activity. The value is true or false.
Note: The values of the isLock field and the isUnlock field cannot be set the same at the same time.
isUnlock Boolean Specifies whether to unlock tuples after they are stored by the Put activity. The value is true or false.
Note: The values of the isLock field and the isUnlock field cannot be set the same at the same time.
isRoute Boolean Specifies whether to update tuples to another site and receive a status message. The value is true or false.
spaceResultHandlerKey String Indicates the key of the Space Result Handler activity, which is used for the asynchronous operation. The value of the spaceResultHandlerKey field overwrites the value in the Space Result Handler Key field, which is specified in the Advanced tab of the Put activity.
Note: This field is displayed only when you select the Async Operation check box in the Configuration tab.
Closure Any of the following data types:
  • Boolean
  • Char
  • Short
  • Integer
  • Long
  • Float
  • Double
  • Blob
  • String
  • Datetime
Indicates the closed data transferred to the SpaceResultHandler activity during the asynchronous operation.
Note: This field is displayed only when you select the Async Operation check box in the Configuration tab of the Put activity.
Each tuple has its own PutOptions field. The values in the PutOptions field under a Tuple node overwrite the values under the PutOptions node.

Output

In the Output tab, you can find the operation results.

Note: If you select the Forget check box in the Advanced tab or set the value of the isForget field to true under the PutOptions node in the Input tab, no tuples are returned in the Output tab.

If you select the Async Operation check box in the Configuration tab, the Output tab is empty.

The following table describes fields in the Output tab of the Put activity:

Output Item Data Type Description
The ResultList node contains the following fields:
HasError Boolean Indicates whether the results have errors.
Note:

The value is true when one or more results have errors.

The value is false when no error occurs.

Result Any of the following data types:
  • Boolean
  • Char
  • Short
  • Integer
  • Long
  • Float
  • Double
  • Blob
  • String
  • Datetime
Indicates the results that contain the following items:
  • Status: the ActiveSpaces status code returned by TIBCO ActiveSpaces functions. See TIBCO ActiveSpaces Java API Reference for more information.
  • Tuple: the tuples that have been substituted in the associated space during the Put operation. A value of the Result field can contain one tuple or none.
  • HasError: (Boolean value) The value of true indicates that an error is returned. The value of false indicates that no error is returned.
  • Error: the error returned by TIBCO ActiveSpaces during the tuple processing.

Fault

In the Fault tab, you can find the error code and error message of the Put activity. See Error Codes for more detailed explanation of the errors.

The following table describes the errors in the Fault tab of the Put activity:

Error Schema Element Data Type Description
msg String The TIBCO ActiveMatrix BusinessWorks Plug-in for ActiveSpaces error message.
msgCode String The TIBCO ActiveMatrix BusinessWorks Plug-in for ActiveSpaces error code.
ASStatus String The status code returned by TIBCO ActiveSpaces functions.

See TIBCO ActiveSpaces Java API Reference for more information.