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
- Click the BMC Atrium Orchestrator Development Studio Activity Palette to open it, and drag an Assign activity to the design canvas.
- Connect the Assign activity to the workflow with the gray process line:
- Click the line to select it and highlight the green handles.
- Drag the handle closest to the End activity to the front (left side) of the Assign activity.
- 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
- Double-click the Assign activity to open its Property Panel.
To create the assign statement
- 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 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.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.
- In the Parameter type field, select XML.
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- Place the cursor inside the CDATA element in the command element (after [CDATA[ and before ]]), and click Insert Context/Config Element
.
- 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 - In the Local Context area of the Context Browser, click directory command, and then click Select.
- 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 - 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.
- On the Properties tab, enter information for the output context item for the assign statement:
- In the Context Type box, select Context Item.
- Click
to open the Context Browser.
- In the Context Browser, click New.
- In the Context Name field of the Create Context Data dialog box, type adapter request, and then click OK.
- 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
- 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
- On the Property Panel for the Assign activity, click OK to return to the design canvas.
- Click
to save the workflow.