OutputAttribute is used by the state to store output resulting from processing the state.
public class OutputAttribute
All public members of the OutputAttribute class, including all inherited members.
Name | Description |
---|---|
Default value (if provided) | |
Constructor. | |
Detailed description of the attribute. | |
The holdValue pending to bulk save. | |
Attribute Id. | |
The text that was entered in the input field on the state editor. | |
Reset the holdValue to null. | |
Sets the processing engine context. | |
Detailed description of the attribute. | |
Set the holdValue to the given string. | |
Attribute Id. | |
Set the value to this output attribute, and also persist the value to the session variable using the name specified in the output textbox field. |
All protected members of the OutputAttribute class, including all inherited members.
Name | Description |
---|---|
Sets the processing engine context. | |
Description that will be displayed on the state editor for user consumption. | |
Unique Id of the attribute. |
This could be the results from external web service call, status code, error message, error code, etc. The value set to the output attribute will be automatically saved to the session variable so that it can be used even when the state is out of scope, or no longer in the processing mode.
On the State Editor, the OutputAttribute is referred to as "Output Variable" and is represented with the following UI components:
A checkbox. Checked and not editable.
Textbox field for specifying the session variable name to store the output value. By default, it is set to this output attribute ID.
A description of the output attribute
Mouse-hover showing the description, and the default session variable name
The output attribute has only one type, the InputType#SESSION type.
There are two mechanisms to set value on the output attribute: "<i>set and persist</i>", and "<i>set and hold</i>". The "set and persist" using one of the setValue() methods will set the value and immediately persist it to the session variable. This is good if there are only a few output attributes to set, because each calls will result in an independent call to the datasource.
If there are many output attributes to set, the later mechanism (set and hold) is more efficient because the value is temporarily held in the output attribute until an explicit bulk save is called by the state implementation as shown on the following. outAttrib1.setHoldValue("value1"); outAttrib2.setHoldValue("value2"); outAttrib3.setHoldValue("value3"); // The following helper method belongs to the SmappStatePlugin // This method will also call the resetHoldValue() method // of each output attributes, after a successful save. saveOutputAttributes(); |
OutputAttribute constructor
getHoldValue method
resetHoldValue method
setHoldValue method
setValue method
![]() |
Discuss this page in DocCommentXchange.
|
Copyright © 2012, Sybase, Inc. - Brand Mobiliser API 1.3.0 - October 24, 2012 |