04-BPM as a Web Service

Exposing BPM as Web Service

Most often in real life scenario it would not be practical to have tasks initiated from with the BPM Composer using User Task Initiator component , so what we would do is expose the Student Admission BPM Process as a web service , remove the task initiator activity, and using the WSDL we can create Web UI using ADF, Creating ADF Front end is done with in couple of mins as its all about creating web service data control and drag n drop the data control on a ADF jspx page, this would not only tie our ADF front end to BPM process as a service but also exposes this services to any other Processes with in the Organization. Go to start activity in the implementation setting change from None to Message, In the Argument Definition add Student Form BO

Check Use Association and drag n drop Student Form DO into output

Delete the Task initiator activity in the BPM Process, go back to composite.xml and remove Task Initiator activity from there too …

So this reduces the swim lane to 1 , and we have just admin officer , and student swim lane is removed

Save All and Deploy , go to EM , test the website , note down the WSDL url

If everything works as expected in the use case , then its time to use the WSDL url to create Web UI


Implementing Web Application

In the JDeveloper create New ADF Project, Add web service data control , give the WSDL url, this would generate Data control

Refer this for wsdl urls

Create JSPX page , drag n drop the data control as Form, drag n drop process as Submit Button

Run the JSPX page , Fill the form and submit data, the BPM process gets invoked

Login as jstein in the BPM workspace , and approve it ( since the student has over 70% its reached admin officer  else the rejected application would have been written into file system)