Class GlueJobCall
java.lang.Object
com.poscoict.glueframework.biz.activity.GlueActivity<GlueContext>
com.poscoict.glueframework.scheduling.activity.GlueJobCall
원격에 위치한 스케줄러 서버(com.poscoict.glueframework.scheduling.server.GlueSchedulerHttpServer)로 Job 기동을 요청하는 Activity이다.
Activity Property
- sender : (필수) applicationContext.xml(1)의 eventSender id.
- job-name : (필수) applicationContext.xml(2)의 JOB(PosJobDetail) 이름을 갖는 Context Key
- server-address : (필수) scheduler server ip, port를 갖는 Context Key
http://{server-address}/glue-scheduler 의 url 생성.
- job-log-no : (선택) request id를 갖는 Context Key
GLUE_SCH_FIRED_TRIGGER_HISTORY의 REQUEST_ID에 해당하는 값으로
Job 수행실적이 DB에 logging되는 경우의 Key.
- job-params : (선택) job parameter( name=ctxName[|name=ctxName] ).
- result-key : (선택) Context에 담기는 Job 호출 여부. Job 기동 성공시 SUCCESS 값이 담김.
[ default ] : {job-name}_result
예제
사용 예# 1
<activity name="FireJob" class="com.poscoict.glueframework.scheduling.activity.GlueJobCall">
<transition name="success" value="end" />
<property name="sender" value="eventSender" />
<property name="server-address" value="schedulerServer" />
<property name="job-name" value="jobName" />
<property name="result-key" value="jobName_call_result" />
</activity>
사용 예#2
<activity name="FireJob" class="com.poscoict.glueframework.scheduling.activity.GlueJobCall">
<transition name="success" value="end" />
<property name="sender" value="eventSender" />
<property name="server-address" value="schedulerServer" />
<property name="job-name" value="jobName" />
<property name="job-log-no" value="historyId" />
<property name="result-key" value="jobName_call_result" />
</activity>
사용 예#3
<activity name="FireJob" class="com.poscoict.glueframework.scheduling.activity.GlueJobCall">
<transition name="success" value="end" />
<property name="sender" value="eventSender" />
<property name="server-address" value="schedulerServer" />
<property name="job-name" value="jobName" />
<property name="job-params" value="ID=ServiceName|EVENT=event" />
<property name="result-key" value="jobName_call_result" />
</activity>
참고 : applicationContext.xml
<bean id="sender" class="com.poscoict.glueframework.scheduling.remote.GlueHttpJobEventSender"/>
-
Field Summary
Fields inherited from class com.poscoict.glueframework.biz.activity.GlueActivity
dynamicProperties, logger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionrunActivity
(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
-
Constructor Details
-
GlueJobCall
public GlueJobCall()
-
-
Method Details
-
runActivity
Description copied from class:GlueActivity
Sub Class에서 반드시 구현하여야 하는 Abstract Method 이며 이 Method는 F/W에서 호출한다. 결과 값은 GlueContext에 담아서 다음 Activity 또는 F/W에 전달하게 된다. 필요한 모든 Data는 GlueContext에서 호출하여 사용하게 된다.예) <transition name="success" value="BizLogic"/> <transition name="failure" value="ErrorHandle"/> ==> return "success"이면 BizLogic Activity 를 실행함.
- Specified by:
runActivity
in classGlueActivity<GlueContext>
- Parameters:
ctx
- GlueContext- Returns:
- String 정상적이면 "success"를 Return 하고 비정상 처리를 원하면 "failure"를 Return 한다.
-