Creating the connection details concept

When you create the Copy File workflow, you will use the Invoke Command utility to execute the copy command. The Invoke Command utility requires that the information to execute the command be contained in a concept called connection details. A concept is a context item containing multiple values. In this task, you create a workflow to generate the connection details concept required by the Invoke Command utility.

The connection details concept specifies the adapter to execute the command and contains the information to enable the adapter to communicate with the target computer.
In this task, you will create a workflow, configure input parameters for the workflow, assign the input parameters to the connection details concept, and assign the connection details concept to an output parameter.

Before you begin

The AutoPilot-OA-Common-Utilities must have been imported into the  Development Studio workspace and unbundled, and must be active on the grid. For information on activating a module on the grid, see Activating modules.

To create the workflow

  1. In the  Development Studio Project Navigator tree, right-click Samples and select New Process.
  2. In the Create New Process dialog box, type Make connection details for Invoke Command in the Process Name field, ensure that none of the Expose Process options are selected, and then click OK.
    This workflow will be used only from within other workflows, so there is no reason to expose it to users.
    The new workflow name is added to the module in the Project Navigator, and the design canvas displays the new workflow. If the List directory workflow is still open, the Make connection details for Invoke Command workflow is on a tab separate from it.

To configure the input parameters

  1. On the design canvas, double-click the Start activity.
  2. In the Input Parameter Name field on the Properties tab of the Property Panel for the Start activity, type adapter.
  3. Press Tab and verify that the name in the corresponding Context Name field is the same as in the Input Parameter Name field and that the Required check box is selected.
  4. In the Input Parameter Name field on the next row, type working dir.
  5. Press Tab and verify that the name in the corresponding Context Name field is the same as in the Input Parameter Name field.
  6. Clear the Required check box.
  7. Repeat steps 4 to 6 to create the following input parameters, as shown in the following figure:
    • command dir
    • command encryption type
    • timeout

      Input parameters for the Start activity

      Note

      Only the adapter input parameter is required.

  8. Click OK.
  9. Save the workflow.

To create the connection details concept

  1. Click the Activity Palette to open it, and drag an Assign activity to the process canvas and connect it to the workflow.
  2. (optional) Click the activity's Assign label, delete it, and type Make connection details.

    Tip

    You can provide descriptive labels for any activity on the process canvas.

  3. Double-click the Assign activity.
  4. On the Properties tab of the Property Panel for the Assign activity, click to add a new assign statement.
  5. Select Context item as the input parameter type.
  6. Click to open the Context Browser.
  7. In the Context Browser, select the adapter context item.
  8. In the output parameter section, use the Context Browser to create a new context item called connection details:
    1. Click to open the Context Browser.
    2. In the Context Browser, click New.
    3. In the Context Name field of the Create Context Data dialog box, type connection details, and then click OK.
    4. In the Local Context area, ensure that connection details is highlighted and click Select.
  9. Select the Concept check box.
  10. In the Concept types field (to the right of the output parameter information), click to expand the AutoPilot-OA-Common-Utilities:ConnectionDetails concept.

    Note

    If AutoPilot-OA-Common-Utilities has not been imported into the Development Studio workspace and unbundled, it will not be available in the Concept types field.

  11. Select adapter-name as shown in the following figure.

    Properties tab for the first assign statement

  12. (optional) In the Description field, type adapter-name.

    Recommendation

    If you repeat the element name in the description field, you can see which parameter maps to which element without opening each assign statement.

  13. Click OK.
    The first assign statement is complete, and the adapter context item has been assigned as an element in the connection details concept, as shown in the following figure.

    First assign statement

  14. Repeat step 3 through step 13, except for step 8, to create the following elements in the connection details concept.
    Instead of repeating step 8, select the connection details as the output context name.

    Input context item

    Concept element

    working dir

    working-dir

    command dir

    command-dir

    command encryption type

    command-encryption-type

    timeout

    timeout

  15. On the Properties tab of the Property Panel for the Assign activity, click to add a new assign statement.
  16. Select String as the input parameter type, and type command-line in the text field.
  17. In the output parameter section, select the connection details concept as the output context name, and select Concept.
  18. Select the invocation-mechanism element in the AutoPilot-OA-Common-Utilities:ConnectionDetails concept.
  19. (optional) In the Description field, type invocation-mechanism.
  20. Click OK to return to the Properties tab for the Assign activity.
    The Assign activity creates the elements for the connection details concept, as shown in the following figure.

    Assign statements for the Assign activity

  21. Configure logging for the Assign activity:
    1. On the Property Panel, select the Logging tab, and then the After Execution tab.
    2. Select the Log check box and type After execution in the Log text entry field.
    3. Right-click in the Context Item field, and select Local Context Item> connection details.
  22. Click OK to close the Property Panel for the Assign activity.
  23. Save the workflow.

To configure the output parameters

  1. On the process canvas, double-click the End activity.
  2. On the Properties tab of the Property Panel for the End activity, double-click in the Context Name field.
  3. In the Context Browser, click connection details, and click Select.
  4. On the Properties tab of the Property Panel for the End activity, ensure that the context item is not marked as required.
  5. Click OK to return to the process canvas.
  6. Save the workflow.
Was this page helpful? Yes No Submitting... Thank you

Comments