Monday, 30 October 2017

Oracle PCS- Integration with SOAP Webservice


Oracle PCS- Integration with SOAP Webservice

UseCase: A User enters an IP into a form and submit it then a public webservice is invoked to get the CountryName based on the IP and the result is displayed in human task for submission.

PCS Version: 17.2.3

On the left upper corner Click Create button and select New Application.

I have already created Space before with Name DirectionSpace.


Create a process and select a pattern start with form.


Add Service task and Submit task( human) from right panel.


Configure Start field and create a new web form so that user can enter the form.



Provide the name as CountryForm.


Drag and Drop two textArea and rename it using name and label properties on the left side.
Rename textArea1 --> IP and textArea2-->Country.



We are going to hide Country filde so select hide property present at left side. Now IP Field will be visible to User at the start of the form launch.



Now click on new Presentation + Icon and provide the name.



Select the based on field as Main Presentation as we are going to change the presentation using Main Presentation.



Deselect hide property for Country.So once Country Name is fetched from Service call. It will be visible on the webform.



Webform is created.

Now we will create Integration for the process.

Go to Application home and select Integrations. Click on + icon, select External-->SOAP.

Select Use URL and Provide WSDL URL.

http://www.webservicex.com/geoipservice.asmx?WSDL


Click Next


Click Next


Click Create.

Now we will browse the integration created just now.

Go back to the process and open properties of service call.



Select Service Call and click on pencil.




Select Webservice and browse the integration.




Open data Association of Service task.



Do the Input-Output mapping of Service call.




Open properties of View Country task and browse the CountryForm and ResPresentation that we created before.



Open data Association of ViewCountryHumantask and do the below mapping.

Input Mapping:



Output Mapping:


Process is created, now publish the changes.



Click on Test button on top right side and click on deploy.



Once Application is deployed.Click on Play button.



Click on play button at Start.




Enter IP : 192.166.1.2 and submit the form.





Click play button at ViewCountry.

Country Name is fetched from Service call.


Click Submit Process will end.

Note that at the start Form Country field was hidden as we selected the hide property in Main Presentation.
At View Country Human task Country field is visible as for this presentation we have deselected the hide properties.


Wednesday, 25 October 2017

Oracle PCS- Process Cloud Service


Oracle Process Cloud Service(PCS)

Oracle Process Cloud Service is a subscription-based cloud service for process automation.
It is a bpmPaaS that is integrated with other Oracle Cloud Services.

Features of PCS:

1. It provides high availability and scalability with less dependence on IT developers and operations and maintenance (O&M) staff. 

2. Applications built on the cloud service can be migrated to the on-premises version of the product.

3. The cloud enables PCS to be more scalable and infrastructure, security and server management are all managed by Oracle. This reduces the amount of expertise required by the IT organization. Upgrades and patches of PCS will also be executed by Oracle. So you will get ‘free’ extra functionality every three months.

4. Development of screens and dashboards has been standardized and moved into the product

5. PCS requires less technical knowledge and can be done by one person 

6. PCS the focus is really on non-technical development of processes. Most things like creating forms, webservices mappings and processes are done with drag-and-dropping.


Today we will be creating a basic process for PCS.

UseCase:

A User will enter Travel Details in Form for approval.
Level1 Approver will review the form and approve it.
Based on Destination city, purpose of visit and budget, BusinessRules will decide whether PM approval is required or not.
If it is required then PM will take an action, if not the process will end.

 Login in to your PCS Composer.

https://hostname:port/bpm/composer/faces/app/designer/homePage.jspx

On the left upper corner Click Create button and select New Application.



I have already created Space before with Name DirectionSpace.

If you want to create a new Space  then select newspace from Space dropdown and provide a name for your Space.



Application will look like below image.



Create a process and select a pattern start with form.






Select and add human task (Approve) from BPM components 




Your Process will look like below




Create a webform for Enduser to enter data.



Provide Name of the form.



Now drag and drop 2 Text Area fields in a same row.Two Date fields in a same 2nd row.
Money field in third row.Again Text Area field  in 4th row.




Rename the Name and Labels and change the currency to INR.



Browse the same form in Human task (Level1Approver)


Add Exclusive gateway from right side BPM components and add the flow condition.




Map the input and output of Level1Approver.



Input is auto mapped as we browsed the same form in this human task


 Output Mapping is shown below.


Create decisions.Go to decisions tab and click + to create new Rule



Rule creation:



Now Create Input and Output DataObject for Rule.

Input:destinationCity



Input: businessJustification
Input: travelCost


Output:projectManagerReview


Click create, below rule page will open.


Now Create valueset.




1. City value set 
    Click on + icon and add values



2.Purpose Value Set
    Click on + icon and add values



3. Cost value set (range value set).

Click on + icon and add endpoint 1000,3000,7000.




 Now Go to decision properties.


Select TravelRule.out


Select Boolean value let's say I have selected false.


Now add condition in Rules.




Select Business Justification and click on pencil of Local value set.



Select Purpose value set which we created before.



Likewise we have to follow same steps for city value set and cost value set.





Add rule.






Now create rules as below




Add action based on input condition

Click on green + Icon and select add action- modify.





Now decision table will look like below.
Change the false to true according to the case.



Go back to the process and add Business rule activity in the process as below.




Click on open Properties and browse the TravelRule which we have created.


Now map the Input and Output of BusinessRules.






Create data object to store the output of Business Rules.




Add the Exclusive Gateway and  human task (PM Approval)






   Add the condition for PM Approval


Browse the same Travelform for PM Approval Human task.


 We are done with development, now publish the Application.


Click on the globe icon which is present in between of save and delete.





Click on Deploy to deploy application.

Now Play button is active to test the flow.




Click on process Name to test the flow.


Play button is appeared at start for end user to test the process.



Click on play icon.


Webform page is Launched.


Fill the form to test the flow and click on submit.


Now the flow is waiting for level1Approval. Click on the play icon.


Click on Execute icon.


You will see the same Entry in form which we have filled at the start.



As the Business Rules outcome is false so in this case PM approval is not required. The Process flow will end now.


Now we will test Other scenario in which the TravelProcess required PM Approval.


Click on ApplicationPlayer and then click on process name to again start the testing.

Fill below details and submit the form.



Flow will reach to level1Approval. Launch the form and approve the same.


In this case the outcome of Business Rules is true, that's why flow goes to PM Approval.


Launch the form and approve it.


The process flow will end.


Hope the above simple Example is helpful for you to understand the basic of PCS.

Please comment below in case of any queries.