Batch Job Input Parameters

Batch input parameters are entered in the form of key=value together with the batch job ID at the time of batch job execution. They can be used as information to distinguish batch execution information or as information to configure the execution information of a step.

1. Using Execution Parameters in Batch Job XML

<step id="BMdpLoadCustData100" parent="parentStep">
    <tasklet>
        <chunk reader="RBMdpLoadCustData100" processor="MMdpCustMng01" writer="MMdpCustMng01"/>
    </tasklet>
</step>

<bean id="RBMdpCustDataFiletoFile100" parent="RFix" scope="step">
    <property name="resource" value="file:///datafiles/NbpMdp/#{jobParameters[inputFile]}.dat" />
    <property name="targetType" value="bxm.dps.mdp.bean.dto.MMdpCustMng05Dto" />
</bean>

(1) You can use the parameters passed at execution time by using the #{jobParameters[$key]} keyword. In the example, it is used in the form of specifying the input file path to be used by the "reader" using a parameter (e.g.: inputFile=CustDataFile).

2. Using Execution Parameters in Source Code

String startDate = DefaultBatchApplicationContext.getJobParameters().getString("startDate");
String startDate = DefaultBatchApplicationContext.getJobParameter("startDate");
SWLab Bankware Global
  • 전체
  • BXM
  • BXCM
  • BXCP
  • BXI
제품 선택 시 더 정확한 매뉴얼 가이드를 제공해드립니다.

Copyright© Bankwareglobal All Rights Reserved.