@Component public class GlueEAISenderActivity extends GlueActivity<GlueContext>
- message : EAI로 전송할 메세지 - interface-type : interface type 지정, default tc. tc 또는 file 둘중의 하나만 허용함. - interface-id : interface id 지정다음은 activity 사용 예시 입니다.
<activity name="tc-send" class="com.poscoict.glueframework.ucube.activity.GlueEAISenderActivity">
<transition name="success" value="end" />
<property name="message" value="stringObj" />
<property name="interface-type" value="tc" />
<property name="interface-id" value="TEST-0001-01" />
</activity>
<activity name="file-send" class="com.poscoict.glueframework.ucube.activity.GlueEAISenderActivity">
<transition name="success" value="end" />
<property name="message" value="filePath" />
<property name="interface-type" value="file" />
<property name="interface-id" value="TEST-0001-11" />
</activity>
다음은 테스트 코드 일부입니다.
@Bean
public CommandLineRunner run( GlueEAISenderActivity activity )
{
return ( args -> {
String stringObj = "MSGFW00110HumanResource Pan-Gyo 001";
// List listObj = new ArrayList<>();
// listObj.add( "MSGFW00110HumanResource Pan-Gyo 002" );
// listObj.add( "MSGFW00110HumanResource Pan-Gyo 003" );
// Map> mapObj = new HashMap<>();
// mapObj.put( "MSGFW001", listObj );
Map props = new HashMap<>();
props.put( "interface-type", "tc" );
props.put( "interface-id", "TEST-0001-01" );
props.put( "message", "stringObj" );
GlueDefaultContext ctx = new GlueDefaultContext( "no-service" );
ctx.setActivityProperties( GlueEAISenderActivity.class, props );
ctx.put( "stringObj", stringObj );
// ctx.put( "listObj", listObj );
// ctx.put( "mapObj", mapObj );
activity.runActivity( ctx );
} );
}
@Bean
public CommandLineRunner run( GlueEAISenderActivity activity )
{
return ( args -> {
String stringObj = "/usr/local/MSGFW001.dat";
// List listObj = new ArrayList<>();
// listObj.add( "/usr/local/MSGFW002.dat" );
// listObj.add( "/usr/local/MSGFW003.dat" );
// Map> mapObj = new HashMap<>();
// mapObj.put( "MSGFW001", listObj );
Map props = new HashMap<>();
props.put( "interface-type", "file" );
props.put( "interface-id", "TEST-0001-01" );
props.put( "message", "stringObj" );
GlueDefaultContext ctx = new GlueDefaultContext( "no-service" );
ctx.setActivityProperties( GlueEAISenderActivity.class, props );
ctx.put( "stringObj", stringObj );
// ctx.put( "listObj", listObj );
// ctx.put( "mapObj", mapObj );
activity.runActivity( ctx );
} );
}
GlueUcubeManager| Modifier and Type | Field and Description |
|---|---|
protected static String |
INTERFACE_ID
property : interface-id
|
protected static String |
INTERFACE_TYPE
property : interface-type
|
protected static String |
MESSAGE
property : message
|
applicationContext, FAILURE, logger, RESULT_KEY, RESULT_KEY_POSTFIX, SUCCESS| Constructor and Description |
|---|
GlueEAISenderActivity() |
| Modifier and Type | Method and Description |
|---|---|
String |
runActivity(GlueContext ctx)
abstract method.
|
checkMethodName, destroy, getMethod, getParamCount, getRequiredType, getResultKey, init, makeMethodParamTypesprotected static final String INTERFACE_ID
protected static final String INTERFACE_TYPE
protected static final String MESSAGE
public String runActivity(GlueContext ctx)
GlueActivityrunActivity in class GlueActivity<GlueContext>Copyright © 2019 POSCOICT. All rights reserved.