com.poscoict.glueframework.batch.activity
Class GlueJobLaunch

java.lang.Object
  extended by com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
      extended by com.poscoict.glueframework.batch.activity.GlueJobLaunch

public class GlueJobLaunch
extends GlueActivity<GlueContext>

JobLaunch Activity.

 Activity Property
 
 - job-key : (¼±ÅÃ) 
          [ default ] : spring-batch-job
 
 - launcher-key : (¼±ÅÃ)
          [ default ] : spring-batch-job-launcher
 
 
 
 ¿¹Á¦
 »ç¿ë ¿¹# 1
 
     <activity name="JobLauncher" class="com.poscoict.glueframework.batch.activity.GlueJobLaunch">
         <transition name="success" value="end" />
     </activity>
 
 
 »ç¿ë ¿¹# 2
 
     <activity name="JobLauncher" class="com.poscoict.glueframework.batch.activity.GlueJobLaunch">
         <property name="job" value="spring-batch-job" />
         <transition name="success" value="end" />
     </activity>
 
 
 »ç¿ë ¿¹# 3
 
     <activity name="JobLauncher" class="com.poscoict.glueframework.batch.activity.GlueJobLaunch">
         <property name="job" value="spring-batch-job" />
         <property name="launcher" value="spring-batch-job-launcher" />
         <transition name="success" value="end" />
     </activity>
 
 
 
 Âü°í : {view}.jsp
 
     <form ...>
         <input type=text name="spring-batch-job" value="biz-job">
         <input type=text name="spring-batch-job-launcher" value="jobLauncher">
     </form>
 
 
 Âü°í : applicationContext.xml
 
     <import resource="spring_batch.xml"/>
     <bean id="serviceManager" .../>
 
 
 Âü°í : spring_batch.xml
 
     <bean id="jobLauncher" class="org.springframework.batch.core.launch.support.SimpleJobLauncher">
         <property name="jobRepository" ref="jobRepository"/>
     </bean>
     <bean id="jobRepository" .../>
     ...
     <batch:job id="biz-job">
         <batch:step id="step-1"  next="step-2">
             <batch:tasklet>
                 <batch:chunk reader="reader-1" processor="biz-processor-1" writer="writer-1" commit-interval="1000" />
             </batch:tasklet>
         </batch:step>
         <batch:step id="step-2">
             <batch:tasklet>
                 <batch:chunk reader="reader-2" processor="biz-processor-2" writer="writer-2" commit-interval="1000" />
             </batch:tasklet>
         </batch:step>
     </batch:job>
     <bean id="transactionManager" .../>
     <bean id="biz-processor-1" .../>
     <bean id="biz-processor-2" .../>
     <bean id="reader-1" .../>
     <bean id="reader-2" .../>
     <bean id="writer-1" .../>
     <bean id="writer-2" .../>
 


Field Summary
 
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
 
Constructor Summary
GlueJobLaunch()
           
 
Method Summary
 String runActivity(GlueContext ctx)
          Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù.
 
Methods inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
commitTransaction, commitTransaction, getDao, getEventList, getName, getProperty, getPropertyNames, getTransition, rollbackTransaction, rollbackTransaction, setEventList, setName, setProperty, setTransition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GlueJobLaunch

public GlueJobLaunch()
Method Detail

runActivity

public String runActivity(GlueContext ctx)
Description copied from class: GlueActivity
Sub Class¿¡¼­ ¹Ýµå½Ã ±¸ÇöÇÏ¿©¾ß ÇÏ´Â Abstract Method À̸ç ÀÌ Method´Â F/W¿¡¼­ È£ÃâÇÑ´Ù. °á°ú °ªÀº GlueContext¿¡ ´ã¾Æ¼­ ´ÙÀ½ Activity ¶Ç´Â F/W¿¡ Àü´ÞÇÏ°Ô µÈ´Ù. ÇÊ¿äÇÑ ¸ðµç Data´Â GlueContext¿¡¼­ È£ÃâÇÏ¿© »ç¿ëÇÏ°Ô µÈ´Ù.

Specified by:
runActivity in class GlueActivity<GlueContext>
Parameters:
ctx - GlueContext
Returns:
String Á¤»óÀûÀ̸é "success"¸¦ Return ÇÏ°í ºñÁ¤»ó 󸮸¦ ¿øÇϸé "failure"¸¦ Return ÇÑ´Ù.
 ¿¹) 
 <transition name="success" value="BizLogic"/>
 <transition name="failure" value="ErrorHandle"/>
 ==> return "success"À̸é BizLogic Activity ¸¦ ½ÇÇàÇÔ.
 


Copyright © 2013–2018 POSCO ICT. All rights reserved.