Results 1 to 2 of 2

Thread: How to get a return value back from a steps routine..

  1. #1

    Default How to get a return value back from a steps routine..

    Hi guys, I have a job, and within the job is one of my steps:

    Code:
    <step id="stepTransferData">
            	<tasklet ref="processBatchTxnsTasklet"/>
            	<next on="COMPLETED" to="BatchValnStep"/>
    </step>
    This step eventually goes and executes my oracle plsql function PROCESS_DATA..

    Code:
    <bean id="processBatchTxnsTasklet" class="org.springframework.batch.core.step.tasklet.MethodInvokingTaskletAdapter">
        	<property name="targetObject">
            	<ref local="processTxnsBatch"/>
        	</property>
        	<property name="targetMethod" value="processBatch" />
    </bean>
    Code:
    <bean id="processTxnsBatch" class="com.fi.util.StoredProcWrapper">
            <constructor-arg value="ROOT_SCHEMA" index="0" />
            <constructor-arg value="PKG_STG" index="1" />
            <constructor-arg value="PROCESS_DATA" index="2" />
            <property name="dataSource" ref="dataSource" />
    </bean>
    This plsql PROCESS_DATA function has a return value of 1 or 0.. how can I get this return value back in my step? Because I want to another step if the value is 0, or to a different step if the value is 1

  2. #2
    Join Date
    Jun 2005
    Posts
    4,230

    Default

    Write your own Tasklet instead of using the POJO adapter?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •