Set the JobId as value in an Out-parameter

Sometimes it is required that a job in a JobChain can access information about a previous job in the Chain. An example is a generated csv-file which should be processed by a job. You cannot trust on the sequence of Jobids.

The following steps should be taken to achieve this:

    1. Add an Out-parameter (P_JOBID) to the JobDefinition
      Add an PreRunningAction to the JobDefinition and add the following code
  •       {  
              String jobId = jcsJob.getJobId().toString() ; 
              jcsJob.getJobParameterByName("P_JOBID").setOutValueString(jobId);
            
          }