The set-var element sets a variable as an attribute in the actor context within the scope of the actor-chain. This element can be used only within the input, output, or oparam elements.
This element contains the following:
Attribute/Element | Description |
|---|---|
| Required. The actor ID. This attribute is used for actor ordering. |
| Required. The name of the map entry. This can be a static or dynamic EL expression. |
| This attribute defines the value of the map entry, and can be a static or dynamic EL expression. |
| This element defines actors that must be executed prior to the execution of the current actor. There can be multiple |
| This element defines actors that, if present, must be executed prior to the execution of the current actor. There can be multiple |
The following is an example of the set-var element:
<component id="fh" name="/atg/agent/userprofiling/EnvironmentLogoutFormHandler"
component-var="fh">
<output id="allWarnings" name="allWarnings"
value="${environmentChangeState.allWarnings}">
<set-var name="environmentChangeState" value="${fh.environmentChangeState}" />
</output>
<output id="isActiveTicketDisposition" name="activeTicketDisposition"
value="${environmentChangeState.processActiveTicketDisposition}" />
</component>In this example, the set-var element sets the environmentChangeState variable in the actor context while executing the first output.

