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

id

Required. The actor ID. This attribute is used for actor ordering.

name

Required. The name of the map entry. This can be a static or dynamic EL expression.

value

This attribute defines the value of the map entry, and can be a static or dynamic EL expression.

depends

This element defines actors that must be executed prior to the execution of the current actor. There can be multiple depends elements associated with an actor.

depends-if-present

This element defines actors that, if present, must be executed prior to the execution of the current actor. There can be multiple depends-if-present elements associated with an actor.

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.


Copyright © 1997, 2014 Oracle and/or its affiliates. All rights reserved. Legal Notices