Summary
Run Child Job
Description
Runs a child job inside a workflow.
Route
No Northbound API Available
Roles
Parameters
Details Example Schema
Name
Type
Required
Description
job_id
string
yes
The job ID
task
string
yes
The task name.
workflow
string
yes
The id of the workflow to start.
variables
object
yes
Job variables for the child workflow.
data_array
array
no
Array of items to loop over. Determines number of iterations child job loop has.
transformation
string
no
_id of transformation to run on each element of data_array to set the job variables required to start the each child job.
loopType
enum
no
Allowed values are: [ parallel, sequential ] - Child Job Loop execution type. Parallel child job loops execute all jobs in parallel. Sequential child job loops execute each iteration one at a time, advancing to the next iteration on finish (completion or cancel) of an iteration.
Copied to Clipboard
{
"job_id": "4321abcdef694aa79dae47ad",
"task": "12ab",
"workflow": "5cb7b531d06cceb89fd21b1c",
"data_array": [
null
],
"transformation": "voluptate",
"loopType": "sequential"
}
Copied to Clipboard
{
"type": "object",
"properties": {
"job_id": {
"$ref": "wfEngineCommon#/definitions/mongoObjectId"
},
"task": {
"$ref": "wfEngineCommon#/definitions/workflowTaskId"
},
"workflow": {
"$ref": "wfEngineCommon#/definitions/mongoObjectId"
},
"variables": {
"$ref": "jobsDocument#/definitions/variables"
},
"data_array": {
"title": "data_array",
"type": "array",
"items": [
{
"type": [
"string",
"number",
"integer",
"object",
"array",
"boolean",
"null"
]
}
]
},
"transformation": {
"title": "transformation",
"type": "string"
},
"loopType": {
"title": "loopType",
"type": "string",
"enum": [
"parallel",
"sequential"
]
}
},
"required": [
"job_id",
"task",
"workflow",
"variables"
],
"additionalProperties": false
}
Return
Details Example Schema
Name
Type
Description
job_details
object
Details of the finished child job(s) initiated by the task.
Copied to Clipboard
{
"status": "complete",
"loop": [
"id ullamco et aute qui",
"laboris",
"culpa adipisicing ex",
"id",
"incididunt proident quis eiusmod"
],
"additionalProperties": {
"description": "Output variables of child job for non-looping childJob."
}
}
Copied to Clipboard
{
"title": "job_details",
"type": "object",
"properties": {
"status": {
"const": "complete"
},
"loop": {
"type": "array",
"description": "ChildJob loop output variables.",
"items": {
"type": "string",
"description": "Child job _id reference containing output variables for iteration."
}
},
"additionalProperties": {
"description": "Output variables of child job for non-looping childJob."
}
},
"required": [
"status"
]
}