Creating and configuring the first Assign activity

This task tells how to use assign statements to convert the input information context items into a form that the adapter can use.

In the preceding tasks, you created a module and a workflow, and configured the Start activity to define context items as the input parameters. The design canvas had only a Start and an End activity, connected by the gray process line, as shown in the following figure:

Design canvas with Start and End activities


In this task, you create an Assign activity with an assign statement. The statement has an input and an output parameter. The output parameter is an adapter request, which is an XML file that communicates with the adapter.

To create the first Assign activity

  1. Click the BMC Atrium Orchestrator Development Studio Activity Palette to open it, and drag an Assign activity to the design canvas.
  2. Connect the Assign activity to the workflow with the gray process line:
    1. Click the line to select it and highlight the green handles.
    2. Drag the handle closest to the End activity to the front (left side) of the Assign activity.
    3. Click the back (right side) of the Assign activity and draw a new line to the front (left side) of the End activity. The result appears as shown in the following figure:

      Design canvas with an Assign activity added to the workflow

      Recommendation

      Always connect a new activity to the workflow as soon as you place the activity on the design canvas.

  3. Double-click the Assign activity to open its Property Panel.

To create the assign statement

  1. On the Properties tab of the Property Panel for the Assign activity, click to add a new assign statement.
    The Properties tab is redisplayed in a different format. It is now the Properties tab for the assign statement, as shown in the following figure:

    Assign statement Properties tab


  2. On the Properties tab, enter information for the input parameter for the assign statement.
    This assign statement transforms the input parameter information into the adapter request for the Command Line adapter.

    Tip

    The information about BMC Atrium Orchestrator base adapters contains sample XML for you to use with the adapters. When you create the adapter request in BMC Atrium Orchestrator Development Studio, you can copy the sample XML and paste it in the text box, and then revise it to meet the needs of your workflow. When you use the sample XML, you must enclose it in <request-data> tags.


    The instructions for this task provide the required XML so you do not need to consult the BMC Atrium Orchestrator Base Adapters space to complete the task.
    1. In the Parameter type field, select XML.
    2. Type the following XML code in the text box. The result appears as shown in the following figure.
      <request-data>
      <command-request>
      <commands>
      <command><![CDATA[ ]]></command>
      </commands>
      </command-request>
      </request-data>


      Input parameter XML text


    3. Place the cursor inside the CDATA element in the command element (after [CDATA[ and before ]]), and click Insert Context/Config Element .

      Recommendation

      Place the command text inside the CDATA element to prevent any special characters from being interpreted as XML codes.

    4. In the Insert Context/Configuration Element dialog box, click to open the Context Browser.
      The top part of the Context Browser dialog box contains global context items, and the bottom part contains local context items (that is, context items that are specific to the workflow on the design canvas). The Context Browser dialog box contains the local context items that you defined in the Start activity-adapter name, directory command, and directory name-as shown in the following figure.

      Local context items


    5. In the Local Context area of the Context Browser, click directory command, and then click Select.
    6. In the Insert Context/Configuration Element dialog box, click OK.
      The Properties tab is redisplayed, showing the syntax for the input parameter for the assign statement, including the directory command context item, as shown in the following figure.

      Input parameter with one context item


    7. Type a space after the context item, and then repeat steps d through f to add the directory name context item.
      The Properties tab is redisplayed, showing the syntax for the input parameter for the assign statement, including the context items.
  3. On the Properties tab, enter information for the output context item for the assign statement:
    1. In the Context Type box, select Context Item.
    2. Click to open the Context Browser.
    3. In the Context Browser, click New.
    4. In the Context Name field of the Create Context Data dialog box, type adapter request, and then click OK.
    5. In the Local Context area, click adapter request and click Select.
      The Properties tab of the Property Panel for the assign statement is redisplayed as shown in the following figure. The output context name is adapter request.

      Input and output parameters


  4. On the Properties tab of the Property Panel for the assign statement, click OK.
    The Properties tab of the Property Panel for the Assign activity is redisplayed as shown in the following figure. It shows that one assign statement has been created.

    Information about the adapter request assign statement

To finish creating the first Assign activity

  1. On the Property Panel for the Assign activity, click OK to return to the design canvas.
  2. Click to save the workflow.