tRunJob example - Cloud - 8.0

Talend Job Script Reference Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend CommandLine
Talend Studio
Content
Design and Development > Designing Jobs
Last publication date
2024-02-22

The following example shows a parent Job in which a tRunJob component is configured to call dynamically one of two child Jobs named child_1 and child_2 respectively each time, based on a defined context variable named child. When the parent Job runs, a prompt message appears asking the user to enter the name of the child Job to be called.

DEFAULT_CONTEXT: Default,
ContextType {
	NAME: Default
	addContextParameter {
		NAME: child,
		TYPE: id_String,
		VALUE: "",
		PROMPT: "Specify the Job to run:",
		PROMPTNEEDED: true
	}
}
addComponent {
	setComponentDefinition {
		TYPE: "tRunJob",
		NAME: "tRunJob_1",
		POSITION: 256, 160
	}
	setSettings {
		USE_DYNAMIC_JOB : "true",
		CONTEXT_JOB : "context.child",
		PROCESS : "child_1;child_2",
		PROCESS:PROCESS_TYPE_PROCESS : "_YmHRUI78EeehN7VTh9zIVw;_dX3JEI78EeehN7VTh9zIVw"
	}
}