A Use Case that I have commonly encountered during Oracle Business Process Management (BPM) projects involves exposing an initiable human task through a front-end portal. The User will click on a link that displays an initiable human task form from a process. Then, the User will enter some information and save/submit the form. The major advantage to this approach is that all interaction with the instance occurs within the context of the BPM engine. The biggest disadvantage is, perhaps, that this approach requires custom development. So how do we develop this solution?
The following steps detail how to create a BPM instance from an initiate task and display the human task form.
Below are the prerequisites to complete this solution with JDeveloper and BPM.
The process for obtaining a factory has changed slightly in BPM 220.127.116.11, as additional libraries are now necessary to make a connection to BPM. Specifically, a Case Management library and a Metadata library are necessary, else the code will throw a compile-time exception. Create a generic application and add the following references as dependencies:
Next, create an xml file called wf_client_config.xml in the Application Sources directory. The file must reside here. Expand the code below to see an example wf_client_config.xml.
The following code is an example implementation of programmatically creating a BPM instance, manipulating the payload values, and obtaining the URL for the human task associated with an initiable process activity.
A complete download of a working example including a process, a process UI, and the instance creation class, can be downloaded from bitBucket.