You can get information about the runs of a workflow, such as the start and end dates, the state of the run, and the values for the input parameters. You can also get logs that are generated for a workflow run.

Prerequisites

Verify that you have imported the sample workflows package in Orchestrator. The package is included in the Orchestrator sample applications ZIP file that you can download from the Orchestrator documentation page.

Procedure

  1. Retrieve the definition of the workflow whose status you want to check by making a GET request at the URL of the workflow:
    GET https://{orchestrator_host}:{port}/vco/api/workflows/{workflowID}/

    You receive the definition of the workflow in the response body of the request. The workflow definition contains a link to the execution instances of the workflow.

  2. Retrieve the available execution instances of the workflow by making a GET request at their URL:
    GET https://{orchestrator_host}:{port}/vco/api/workflows/{workflowID}/executions/

    The response body of the request lists the available execution instances of the workflow where you can view the start and end dates of every workflow run as well their status and initiator.

  3. (Optional) : To get more details about a particular run of the workflow, make a GET request at the URL of that run:
    GET https://{orchestrator_host}:{port}/vco/api/workflows/{workflowID}/executions/{executionID}/

    In the response body of the request, you receive the XML representation of the particular workflow run. You can check the values of the input parameters that are passed for this run, the user who initiated the run, the start and end dates, as well as the state of the run.

  4. (Optional) : To retrieve the logs that are generated for the workflow run, make a GET request at the URL that holds the logs:
    GET https://{orchestrator_host}:{port}/vco/api/workflows/{workflowID}/executions/{executionID}/logs/
  5. (Optional) : To retrieve additional information about the state of the run, make a GET request at the URL that holds the state of the workflow:
    GET https://{orchestrator_host}:{port}/vco/api/workflows/{workflowID}/executions/{executionID}/state/

Get the Runs of the Send Hello Workflow and Check the State of a Particular Run

If you have run the Send Hello workflow, you can get the available execution objects and check details about them.

  1. Get the definition of the Send Hello workflow by making a GET request at the URL that holds the definition:

    GET https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/
  2. Get the available runs of the workflow by making a GET request at the URL that holds the execution objects for the workflow:

    GET https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/executions/
  3. From the response body of the request, select a workflow run and make a GET request to retrieve it:

    GET https://localhost:8281/vco/api/workflows/CF808080808080808080808080808080DA808080013086668236014a0614d16e1/executions/888080808080808080808080808080803A8080800132145338690643f66a027ec/

    The response body contains the XML representation of the workflow run with the specified ID, where you can check details about that run:

    .......
    <input-parameters>
       <parameter name="name" type="string">
          <string>John Smith</string>
       </parameter>
    </input-parameters>
    <output-parameters>
       <parameter name="message" type="string">
          <string>Hello, John Smith!</string>
       </parameter>
    </output-parameters>
    <start-date>2012-01-31T14:28:40.223+03:00</start-date>
    <end-date>2012-01-31T14:28:40.410+03:00</end-date>
    <started-by>vcoadmin</started-by>
    <name>Send Hello</name>
    ......