Hi all,
Im trying to invoke specific flow service based on the input.
And this is the logic :
if the partner is A then execute flow service A.
and if the partner is B then execute flow service B.
But I want to avoid using branch if else.
The partner variables will be stored in the database.
There will be a flow service that call it base on the partner name input and will throw the flow service that need to be executed.
Is there any built in flow service that I can use?
Or should I use java service for this?
I have tried to use this java service : (contextInvoke)
"
String host = (String) ValuesEmulator.get(pipeline, “host”);
String user = (String) ValuesEmulator.get(pipeline, “user”);
String pass = (String) ValuesEmulator.get(pipeline, “pass”);
String ifc = (String) ValuesEmulator.get(pipeline, “ifc”);
String svc = (String) ValuesEmulator.get(pipeline, “svc”);
IDataCursor idcPipeline = pipeline.getCursor();
if (host == null || pass == null || ifc == null || svc == null)
throw new ServiceException(“Missing or Invalid Parameters!”);
Context c = null;
try {
c = new Context();
c.connect(host, user, pass);
ValuesEmulator.put(pipeline, “result”, c.invoke(ifc, svc, pipeline));
c.disconnect();
} catch (Exception e) {
if (c != null) {
try {
c.disconnect();
} catch (Exception ee) {
// ignore this…
}
}
// throw new ServiceException("Error during invoke: " + e.getMessage());
IDataUtil.put( idcPipeline, “Exception”, "Error during invoke: " + e.getMessage());
}
"
But the problem using it is cannot invoke flow service that contain input and output (return value).
Need somebody expert on this matter.
Thank you.
#Integration-Server-and-ESB#Flow-and-Java-services#webMethods