Java API - Services.doInvoke

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.)

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.

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){
    }

You’re on the right track.

Is there a syntactical error?

The compiler will detect that better than I!

Okay. For some reason, the divisonNumber is not added to the pipeline object. Can someone tell me what I did incorrectly?

I’ve figured this out. In order to see the pipeline object, you would have to create the input variables for the invoking service.