Reset a Work Step

Description:

This API method is used to reset a work order from a particular work step. For example, if a work order has four steps and you would like to reset the work order from the third step and not repeat the first two steps, you would call this API with the work step ID of the third step.

The following example shows how to reset a work order from a work step with ID 549781.

XML Request:

http://localhost:5000/aspera/orchestrator/api/workstep_reset/549781?login=admin&password=admin
XML Response:
<?xml version="1.0" encoding="UTF-8"?>
<WorkStep_Reset>
  <workstep_reset>true</workstep_reset>

  <work_steps>
    <workOrder_id>69312</workOrder_id>
    <timeout />
    <running_as />
    <preProcessing />
    <journaling />
    <group />

    <completion_date />
    <activation_time />
    <updated_at>Tue Jan 17 21:47:00 UTC 2017</updated_at>
    <id>549780</id>
    <attempt />
    <activable_date />
    <weight />
    <step_type>WorkOrderEnd</step_type>
    <activation_date />
    <workflow_id>59</workflow_id>
    <status>Inactive</status>
    <workStepName>Error Encountered</workStepName>
    <percent_complete />
    <action_id />
    <step_id>-3</step_id>
    <stepName />
    <statusDetails>Work-order manually restarted from 'step2' on</statusDetails>
    <rank>1000020</rank>
    <postProcessing />
    <original_activation_date />
    <synch_filter>0</synch_filter>
    <episteps>--- []</episteps>
    <prerequisites>--- []</prerequisites>
    <on_timeout />
    <executionTimeout />
    <created_at>Tue Jan 17 21:46:36 UTC 2017</created_at>
  </work_steps>
  <work_steps>
    <workOrder_id>69312</workOrder_id>
    <timeout />
    <running_as />
    <preProcessing />
    <journaling>---
</journaling>

    .  .  .
JSON Request:
http://localhost:5000/aspera/orchestrator/api/workstep_reset/549781?format=json&login=admin&password=admin
JSON Response:
{
    "work_order": {
        "branchedFrom": null,
        "branchedFromOrder": null,
        "cleanup_after_days": null,
        "comments": "",
        "completion_date": null,
        "created_at": "2017-01-17T21:46:36Z",
        "derivedFrom": null,
        "exec_priority": 0.666666666666667,
        "forkedAt": null,
        "higherPriority": null,
        "id": 69312,
        "initiate_date": "2017-01-17T21:46:36Z",
        "initiatedBy": 1,
        "label": null,
        "launched_by": 1,
        "master_id": 69312,
        "max_running": 0,
        "monitor_id": null,
        "name": "activities test",
        "priority": 2,
        "purge_after_days": null,
        "running_as": 2,
        "status": "In Progress",
        "statusDetails": "Work-order restarting from 'step2' on",
        "tags": "||",
        "updated_at": "2017-01-17T22:25:36Z",
        "workflowName": "activities test",
        "workflow_id": 59,
        "workflow_revision_id": 35
    },
   "work_steps": [
   {
            "action_id": null,
            "activable_date": null,
            "activation_date": null,
            "activation_time": null,
            "attempt": null,
            "completion_date": "2017-01-17T21:51:49Z",
            "created_at": "2017-01-17T21:46:36Z",
            "episteps": "--- []\n\n",
            "executionTimeout": null,
            "group": null,
            "id": 549777,
            "journaling": null,
            "on_timeout": null,
            "original_activation_date": null,
            "percent_complete": null,
            "postProcessing": null,
            "preProcessing": null,
           
   "prerequisites": "---",
            "rank": 1000000,
            "running_as": null,
            "status": "Inactive",
            "statusDetails": "Work-order manually restarted from 'step2' on",
            "stepName": null,
            "step_id": -1,
            "step_type": "WorkOrderEnd",
            "synch_filter": 0,
            "timeout": null,
            "updated_at": "2017-01-17T22:25:26Z",
            "weight": null,
            "workOrder_id": 69312,
            "workStepName": "Workflow End",
            "workflow_id": 59
        },

     .  .  .