Invoking a business process

About this task

The application uses a Struts action or an invoker to invoke a business process in the application logic layer.

To invoke a business process, you need to generate a Web Service Proxy from the WSDL file or the business process. And then call the proxy to invoke the business process.

Below are the sample codes:
  • Using Local Context:
    Context ctx = …//a Local Context
    			BTTSystemData sd = new BTTSystemData();
    			sd.setContext(ctx.convertToByte());
    			LocalContextProcess bttProcess = new LocalContextProcessProxy().getLocalContextProcess();
    			BTTSystemData result = bttProcess.invoke(sd);
    			Context resultContext = Context. convertToContext (result.getContext());
  • Using Remote Context:
    Context ctx = …//a Remote Context
    			BTTSystemData sd = new BTTSystemData();
    			sd.setInstanceID(ctx.getInstanceID());
    			RemoteContextProcess bttProcess = new RemoteContextProcessProxy().getRemoteContextProcess ();
    			BTTSystemData result = bttProcess.invoke(sd);
    			Context resultContext = Context. getContextByInstanceID(result.getInstanceID());