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": "cd34",
"workflow": "4321abcdef694aa79dae47ad",
"data_array": [
[]
],
"transformation": "in",
"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": [
"sunt exercitation laboris 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"
]
}