Testing the workflow

In this task, you verify all tasks that you have completed and verify that the workflow produces the expected results.

Before you begin

To test the workflow, you must know the name that was assigned to the ro-adapter-command-line adapter when it was configured on the grid. If you do not know the name, you can use the Grid Manager Manage> Adapters tab to find the name.

Note

Adapter names are case-sensitive. Ensure that you know the exact name that was used when the adapter was configured.

To test the workflow

  1. In the toolbar below the menu bar, click ExecuteProcessAction .
  2. In the Execution Mode dialog box, select Test as if triggered by a rule, schedule or SOAP, and then click OK.
  3. In the Job Input Parameters dialog box, double-click in the Value field for the adapter name parameter and type the name that was assigned to the ro-adapter-command-line adapter when it was configured on the grid.

    Note

    If you have not closed the workflow since you ran the previous test, the Value fields might already be populated with the input values.

  4. Double-click in the Value field for the directory command parameter, and type the appropriate command for your operating system.
    For this example, type dir in the Value field.
  5. Double-click in the Value field for the directory name parameter, and type the name of the directory that you want to list.
    For this example, type c:\ .
  6. Click OK.
     Development Studio runs the List directory workflow. The console window opens below the design canvas, and the Process Log tab displays the results of the execution. These are the same results that are posted to the processes.log file when the workflow is run on the grid. On the design canvas, the Assign activities and the Call Adapter activity have brown boxes around them to indicate that they have been executed.
  7. Review the contents of the console window and verify that the last line in the console window is The process terminated in the completed state.
    This message indicates that the process that you created ran to completion.
  8. (optional) Repeat steps 1 to 6 using an invalid directory name. Verify that the last line in the console window is The process terminated in the completed state.
    This message indicates that the process that you created ran to completion. However, error messages regarding the invalid directory are displayed as shown in the following sample:

    After output parsing
    [status=error] 
    [error=Exit code indicates error] 
    [directory list=
    <result>
      <line index="1">The system cannot find the path specified.</line>
    </result>] 
    INFO - [Current Time=Thu Jul 29 14:29:04 CDT 2010] 
    [Process Name=:Samples:List directory] 
    [Root Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431744093] 
    [Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431744093] 
    The process terminated in the completed state.
    
  9. (optional) Repeat steps 1 to 6 using a misspelled adapter name. Verify that the last line in the console window is The process terminated in the compensated state.
    This message indicates that the process that you created could not run to completion as shown in the following sample:

    ERROR - [Current Time=Thu Jul 29 14:31:28 CDT 2010] [Process Name=:Samples:List directory] 
    [Root Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431888363] 
    [Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431888363] 
    An error occurred that triggered compensation:
      Summary: Execution failed.
     Caused by:
       Summary: no peer with a running instance of commandLineadapter found
    INFO - [Current Time=Thu Jul 29 14:31:28 CDT 2010] 
    [Process Name=:Samples:List directory] 
    [Root Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431888363] 
    [Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431888363] 
    Stack Trace:
    procdef:Samples:List directory:start:call-adapter[1]
    INFO - [Current Time=Thu Jul 29 14:31:28 CDT 2010] 
    [Process Name=:Samples:List directory] 
    [Root Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431888363] 
    [Job Id=a43aa4c65dd03689:4ec77ace:12a1f409a1d:-80001-1280431888363] 
    The process terminated in the compensated state.
  10. In the console window, click Clear and then click Close.
  11. Click File> Exit to close the   Development Studio.
Was this page helpful? Yes No Submitting... Thank you

Comments