1. Set up the web application to talk to the Oracle BPM. This is done by pointing to the directory.xml file of your BPM install.
2. Getting hold of the jars that expose these APIs.
Details
1. directory.xml file is present under the
2. The required jars to build your custom PAPI client application are:
fuegopapi-client,jar, b1oracle.jar, b1base.jar and b1util.jar
Once you have the jars configured for your project, you can initialize the papi session using the code below:
import fuego.papi.*;
public ProcessServiceSession initializeOracleBPMPapi() {
Properties configuration = new Properties();
String bpmDirConfigName = “custom”
String bpmDirPath = “C:\\OraBPMwlHome\\conf\\directory.xml";
configuration.setProperty(ProcessService.DIRECTORY_ID, bpmDirConfigName);
configuration.setProperty(ProcessService.DIRECTORY_PROPERTIES_FILE, bpmDirPath);
ProcessServiceSession papisession = null;
try{
ProcessService processService = ProcessService.create(configuration);
String user = "userForBPM";
String passA = "passwordIsConfidential";
papisession = processService.createSession(user, pass, hostname);
return papisession;
}
catch (CommunicationException e) {
log.log(Level.SEVERE, "Error initializing PAPI", e);
}
catch (OperationException e) {
log.log(Level.SEVERE, "Error initializing PAPI", e);
}
}
Points to Note

2. String user = "userForBPM"; The user should have access to log into Oracle BPM. The best practice would be to configure the Oracle BPM and your external web application to the same LDAP.
No comments:
Post a Comment