pth30041
(pth30041)
October 21, 2011, 11:02pm
1
I’m trying to create a custom java service which will perform the doInvoke method. It’ll basically invoke another IS flow service. The input signature of the IS flow services has two input parameters (IS document and string). Is the below java code correct?
Service.doInvoke(“Package.folder”,“IS_flow_svc”,input1,input2, input3, etc.)
reamon
(reamon)
October 22, 2011, 5:34am
2
No. You need to create a pipeline object, populate with the vars the called service needs and pass that. The API docs have the details.
pth30041
(pth30041)
October 22, 2011, 6:27am
3
Reamon,
Let me know if this is correct. In my input2 pipeline object, it contains an IData object and a string variable to be pass to the second invoke flow service.
String divisionNumber = “40E”;
IData output = IDataFactory.create();
try
{
output = Service.doInvoke( "NSName", "flow_svc", input );
IData input2 = IDataFactory.create();
IDataCursor input2cursor = input2.getCursor();
IDataUtil.put ( input2cursor, "output", output );
IDataUtil.put ( input2cursor, "divisionNumber", divisionNumber );
}catch(Exception e){
}
try
{
Service.doInvoke( "NSName" , "flow_svc" , input2);
}catch(Exception e){
}
reamon
(reamon)
October 22, 2011, 6:48am
4
You’re on the right track.
pth30041
(pth30041)
October 22, 2011, 8:09am
5
Is there a syntactical error?
reamon
(reamon)
October 22, 2011, 8:46pm
6
The compiler will detect that better than I!
pth30041
(pth30041)
October 24, 2011, 5:37pm
7
Okay. For some reason, the divisonNumber is not added to the pipeline object. Can someone tell me what I did incorrectly?
pth30041
(pth30041)
October 24, 2011, 6:38pm
8
I’ve figured this out. In order to see the pipeline object, you would have to create the input variables for the invoking service.