Creating and using actions

Actions are used to deploy content and to configure channels:

  • Actions used to deploy content are identified by tasks configured within the activity libraries of processes (see Creating and managing processes and content process sets). The first time that a specific action is processed during a deployment, it is pulled into the package instance so that it is consistent throughout the lifetime of that instance. You can override this behavior at the system level by assigning the Store Actions In Instance system property (creating the store_actions_in_instance property, if necessary) the value of N (no). The result is that during a deployment, each time a process requests an action, the action comes from the actions repository and not from the stored instance.
  • Actions used to configure channels are identified by the Config Get and Config Set actions associated with individual packs. The Config Set actions are processed when a deployment process uses the Process Configuration library. The Config Get actions are processed for managed channels after the deployment of content, or during the processing of a channel template synchronization or a schedule.

The system categorizes scripts by interface type (pack) and platform, and provides a label to reference the script sets. This mechanism enables script references to become OS-independent. Because the system knows which operating system is processing a particular activity, it can use the action label to specify the appropriate action script for that platform.

Properties that are associated with a package are made available to deployment actions and commands. You can set or change the properties when you create a package instance, as well as for each deployment of an instance. The properties become environment variables that the actions or commands can access.

To create a new pack

  1. Click the Define tab.
  2. In the Manage box on the left, click Actions.
  3. Click New Pack on the right.
  4. Enter an appropriate name for the pack.
  5. Click the Submit checkmark icon.


    The new pack is not displayed on the Actions page until an action has been added to the pack.

To add an action to a pack

  1. Click the Define tab.
  2. In the Manage box on the left, click Actions.
  3. Click New Action.
  4. Enter an appropriate label for the action.
  5. From the Pack menu, select the pack to associate with the action.
    From the Platform menu, select an appropriate platform for the action.


    If the action you create is not platform-specific, you can use the default option "Any".

  6. Type or paste the content for the action. Properties are available to the script and can be tokenized in the script, using the following format: ${<PROPERTY NAME>}


    The #! sign, displayed at the beginning of the first row of the Content pane, is used in all the actions for both Windows and Unix. It indicates which interpreter to use in order to run the action. 
    The default action processor for Windows operating systems is cmd.exe. The default action processor for Unix operating systems is shell.

    You can specify the interpretator in one of the following ways:

    • Have the interpreter to run the action:
    • Run a file type as follows:
      Note: Inside the bracket is the file type that you create with the script.
    • Use the %% sign to pull in the script in a more comprehensive way :
      #![.py]cmd /c "%WAS_HOME%\bin\wsadmin.bat -user %WAS_ADMIN_USER% -password %WAS_ADMIN_PASSWORD% -lang jython -f %%"


    To ensure that actions complete with the correct status and return an exit code, add the following code lines to the action scripts:

    # if non-zero exit.
    if [ "$result" != "0" ] ; then
          echo "Error executing action on remote host" 1>&2
  7. Click Save or Save and Exit.

If you were adding an action to a newly created pack, the new pack now appears at the bottom of the list of packs on the Actions list.

To import an existing script as an action

  1. In the Manage box on the left, click Actions.
  2. Click New Action.

  3. On the right of the Label field, click Import.
  4. Browse to locate the script and select it to import for the action.
    The contents appear in the Content pane.
  5. Click Save or Save and Exit.
Was this page helpful? Yes No Submitting... Thank you