Thursday, September 1, 2011

PAPI and Web Service Integration

What is PAPI? PAPI is the API which allows external java code to communicate with the BPM Engine. OBPM also provides PAPI Web service for non-java clients.

PAPI api doc

To enable PAPI web service



This allow external call BPM functions by web services. The PAPI Web Service WSDL could be found here


The PAPI web service is a generic service. You can also create process-specific web service.

On the process, click menu “Process” >> “Process Web Service”




After start the engine, visit http://localhost:9000 (checkpoint for vpn is using port 9000, make sure you close that one before start the engine)



Click “here” will bring you to the WSDL and here is the url



The process inside obpm can also consume an external web service.

On one module, right click


Input the WSDL url: http://localhost:7001/cnscmservice_jaxws/CNSCMService?WSDL


obpm will generate the component based on the WSDL. Here is the sample code to use call the component

CNSCMService cnsCMService = new CNSCMService(); 
ChangeTicketComponents.CNSCMServiceWS.ChangeTicket changeTicket = new ChangeTicketComponents.CNSCMServiceWS.ChangeTicket(); = 888;
changeTicket.createdDate = new Java.Util.Date();
cnsCMService.addChangeTicket(changeTicket : changeTicket, out @return : args["externalIdArg"]);

No comments:

Post a Comment