Hi,
i am using the REST API for workflows, as documented here:
I need to:
- GET a workflow invocation
- scrape its parameter values
- fire off a new run of that workflow based on those parameter values. (Please don't ask why....)
- (I don't know in advance which workflow or invocation to use, so i can't hard-code anything)
This entails matching the steps in the invocation with the steps in the workflow, which is what I am having trouble with.
In the JSON returned by the api/workflow/{workflow_id} endpoint, i get a bunch of steps, each with what looks like a "step index", such as 1909417:
"steps": {
"1909417": {
"tool_id": "Cut1",
"tool_version": "1.0.2",
"id": 1909417,
"input_steps": { },
"tool_inputs": {
"columnList": "{\"__class__\": \"RuntimeValue\"}",
"input": "null",
"delimiter": "\"T\""
},
"type": "tool",
"annotation": null
},
...
The JSON to run a workflow looks like this:
{
"workflow_id" :"ba06423ff18d37cc",
"history" : "groovy",
"parameters" : {"1909417" : {"columnList" : "C1,C2"}},
"ds_map":{"1909417" : {"src" : "hda", "id": "bbd44e69cb8906b587c210f637326cca"}}
}
The parameters and ds_map are keyed with the step index from the workflow:
My problem is that when I look at a workflow invocation, or its steps in detail, or its jobs in detail, i never see that step index.
This is what the JSON for an invocation looks like (for the step above):
"steps": [
{
"workflow_step_uuid": "f2498dae-6e41-4dba-b1c2-74e984661980",
"update_time": "2015-11-12T15:07:08.602957",
"job_id": "bbd44e69cb8906b57a8032d7e2c63780",
"state": "ok",
"workflow_step_label": null,
"order_index": 0,
"action": null,
"model_class": "WorkflowInvocationStep",
"workflow_step_id": "925f0024d97df8bb",
"id": "7965aefdfdc0734d"
}
]
And here is the associated job:
{
"tool_id": "Cut1",
"update_time": "2015-11-12T15:08:28.150810",
"inputs":
{
"input":
{
"src": "hda",
"id": "bbd44e69cb8906b587c210f637326cca",
"uuid": "acf3626f-c89d-4c55-918c-b1a2c746ef54"
}
},
"outputs":
{
"out_file1":
{
"src": "hda",
"id": "bbd44e69cb8906b5f9839f2acf8a48d6",
"uuid": "464c5960-3ec9-44db-9141-85f22c9b9f35"
}
},
"exit_code": 0,
"state": "ok",
"create_time": "2015-11-12T15:07:07.576559",
"params":
{
"__workflow_invocation_uuid__": "\"09b2c6e0894f11e5a641005056a52a46\"",
"delimiter": "\"T\"",
"dbkey": "\"?\"",
"columnList": "\"c1,c2\"",
"chromInfo": "\"/galaxy-repl/localdata/chrom/?.len\""
},
"model_class": "Job",
"id": "bbd44e69cb8906b57a8032d7e2c63780"
MY QUESTION IS: how can i correlate a step in a workflow invocation with a step in its workflow?
Thanks,
Steve
