Summary
Start a Job with Options
Description
Initiate a job of a workflow with options.
Route
POST /workflow_engine/startJobWithOptions/:workflow
Roles
Parameters
Name | Type | Required | Description |
---|---|---|---|
workflow | string | yes | Name of the workflow from which to start the job. |
options | object | yes | Options for the job. |
{ "options": { "description": "Example job description", "type": "Automation", "groups": [ "4321abcdef694aa79dae47ad", "5cb7b531d06cceb89fd21b1c", "4321abcdef694aa79dae47ad", "4321abcdef694aa79dae47ad", "4321abcdef694aa79dae47ad" ] } }
{ "type": "object", "properties": { "options": { "type": "object", "description": "Options for the job.", "properties": { "description": { "type": "string", "description": "The description for the job to be started.", "examples": [ "Example job description" ] }, "type": { "type": "string", "examples": [ "Automation" ] }, "variables": { "$ref": "jobsDocument#/definitions/variables" }, "groups": { "type": "array", "description": "Groups available for job.", "items": { "$ref": "wfEngineCommon#/definitions/mongoObjectId" } } } } }, "required": [ "options" ], "additionalProperties": false }
Return
Name | Type | Description |
---|---|---|
save_data | object | Job which is started. |
{ "_id": "4321abcdef694aa79dae47ad", "name": "8917Test2", "tasks": { "workflow_start": { "name": "TestTask", "summary": "Test Task", "displayName": "WorkflowBuilder", "type": "automated", "x": 0.36142061281337046, "y": 0.502092050209205, "status": "complete", "groups": [], "metrics": { "owner": "Pronghorn", "start_time": 1555430149763, "end_time": 1555430169683, "run_time": 75069184, "finish_state": "canceled", "server_id": "ac:de:48:00:11:22:3000", "app": { "id": "WorkFlowEngine", "version": "1.2.3" } }, "description": "Test Task", "app": "WorkflowBuilder", "canvasName": "taskName1", "canvasTab": "taskName1", "view": "/workflow_builder/task/TestTask", "deprecated": false, "scheduled": false, "iterations": [ "5cb7b531d06cceb89fd21b1c" ], "variables": { "incoming": { "inputVariable": "inputValue" }, "outgoing": { "outputVariable": null }, "error": "" }, "childJobs": [ { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 }, { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 }, { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 }, { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 } ] }, "workflow_end": { "name": "TestTask", "summary": "Test Task", "displayName": "WorkflowBuilder", "type": "automated", "x": 0.36142061281337046, "y": 0.502092050209205, "status": "complete", "groups": [], "metrics": { "owner": "5a3496c64da02d9dfa0b2f91", "start_time": 1555430149763, "end_time": 1555430169683, "run_time": 75069184, "finish_state": "incomplete", "server_id": "ac:de:48:00:11:22:3000", "app": { "id": "WorkflowBuilder", "version": "1.2.3" } }, "description": "Test Task", "app": "WorkflowBuilder", "canvasName": "taskName1", "canvasTab": "taskName1", "view": "/workflow_builder/task/TestTask", "deprecated": false, "scheduled": false, "iterations": [ "5cb7b531d06cceb89fd21b1c" ], "variables": { "incoming": { "inputVariable": "inputValue" }, "outgoing": { "outputVariable": null }, "error": "" }, "childJobs": [ { "_id": "4321abcdef694aa79dae47ad", "name": "ChildJobRef", "iteration": 1 }, { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 } ] }, "error_handler": { "name": "TestTask", "summary": "Test Task", "description": "Test Task", "app": "WorkflowBuilder", "variables": { "incoming": { "inputVariable": "inputValue" }, "outgoing": { "outputVariable": null }, "error": "" }, "groups": [ "4b6d3dd9e098d58821e48885", "b9766501439e1e46256cd223", "921d2de88d85cf6841236be7" ], "x": 0.36142061281337046, "y": 0.502092050209205, "type": "automated", "displayName": "WorkflowBuilder", "status": "complete", "deprecated": false, "scheduled": false, "canvasName": "taskName1", "canvasTab": "taskName1", "view": "/workflow_builder/task/TestTask", "metrics": { "owner": "incididunt proident exercitation Ut ad", "start_time": 1555430149763, "end_time": 1555430169683, "run_time": 75069184, "finish_state": "success", "server_id": "ac:de:48:00:11:22:3000", "app": { "id": "WorkFlowEngine", "version": "1.2.3" } }, "iterations": [ "5cb7b531d06cceb89fd21b1c", "5cb7b531d06cceb89fd21b1c", "5cb7b531d06cceb89fd21b1c", "4321abcdef694aa79dae47ad" ], "childJobs": [ { "_id": "4321abcdef694aa79dae47ad", "name": "ChildJobRef", "iteration": 1 }, { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 }, { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 } ] }, "4b": { "name": "TestTask", "summary": "Test Task", "displayName": "WorkflowBuilder", "type": "automated", "x": 0.36142061281337046, "y": 0.502092050209205, "status": "complete", "description": "Test Task", "app": "WorkflowBuilder", "canvasName": "taskName1", "canvasTab": "taskName1", "view": "/workflow_builder/task/TestTask", "deprecated": false, "scheduled": false, "metrics": { "owner": "cupidatat nulla irure ad", "start_time": 1555430149763, "end_time": 1555430169683, "run_time": 75069184, "finish_state": "success", "server_id": "ac:de:48:00:11:22:3000", "app": { "id": "WorkFlowEngine", "version": "1.2.3" } }, "iterations": [ "4321abcdef694aa79dae47ad", "5cb7b531d06cceb89fd21b1c", "4321abcdef694aa79dae47ad" ], "variables": { "incoming": { "inputVariable": "inputValue" }, "outgoing": { "outputVariable": null }, "error": "" }, "childJobs": [ { "_id": "5cb7b531d06cceb89fd21b1c", "name": "ChildJobRef", "iteration": 1 } ] } }, "transitions": { "workflow_start": { "6a90": { "type": "standard", "state": "success" } }, "6a90": { "workflow_end": { "type": "standard", "state": "success" } } }, "font_size": 12, "created": "2018-07-26T19:37:05.000Z", "created_by": "admin@pronghorn", "last_updated": "2018-08-02T15:56:12.912Z", "last_updated_by": "5b3496d74da02e9dfa0b2e91", "groups": [], "type": "automation", "watchers": [ "4321abcdef694aa79dae47ad" ], "metrics": { "owner": "Pronghorn", "start_time": 1555430149763, "end_time": 1555430169683, "run_time": 75069184, "finish_state": "error", "server_id": "ac:de:48:00:11:22:3000", "app": { "id": "WorkflowBuilder", "version": "1.2.3" } }, "status": "running", "lastUpdatedVersion": "dolor exercitation", "canvasVersion": 1, "ancestors": [ "4321abcdef694aa79dae47ad", "4321abcdef694aa79dae47ad" ], "error": [ { "task": "job", "message": "No available transitions found from completed task(s)", "timestamp": 1555471643117 }, { "task": "job", "message": "No available transitions found from completed task(s)", "timestamp": 1555471643117 }, { "task": "job", "message": "No available transitions found from completed task(s)", "timestamp": 1555471643117 }, { "task": "job", "message": "No available transitions found from completed task(s)", "timestamp": 1555471643117 } ] }
{ "$ref": "jobsDocument" }