Client

Now, we'll look at a sample of a client starting the process:

...
private final static string JOB_NAME = "PayrollJob";
public final static string INPUT_DATA_FILE_NAME = "payrollDataFileName";
private final static string INPUT_PROPERTIES = "src/main/resources/input.properties";
...
JobOperator jobOperator = getJobOperator();
Properties props = new Properties();
props.setProperty(INPUT_DATA_FILE_NAME, INPUT_PROPERTIES);
long executionId = jobOperator.start(JOB_NAME, props);
...

It's very simple. As seen in the Chunk reader section, the first thing we receive is the job operator. Then, we put the properties that will be used inside the process, and at the end, we use the start() method of the job operator to start the process passing the name of the process. In this case, it is PayrollJob as seen in the JSL descriptor and the properties. The start method returns the execution ID described earlier.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.192.3