Page 1
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Lab 3: Developing Workflow Note: Please view the PDF version as “150%” for the clearest display of the screenshots.
Disclaimer: The Virtual Machine Image and other software are provided for use only during the workshop. Please note that you
are responsible for deleting them from your computers before you leave. If you would like to try out any of the Oracle products,
you may download them from the Oracle Technology Network (http://www.oracle.com/technology/index.html) or the Oracle E-
Delivery WebSite (http://edelivery.oracle.com)
Page 2
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Contents Lab 3: Developing Workflow ................................................................................................................................................................................................................. 1
1. Introduction ................................................................................................................................................................................................................................. 3
2. Configure Security for the Request Web Service ......................................................................................................................................................................... 3
2.1. Secure the Web Service ....................................................................................................................................................................................................... 3
3. Extract the Disconnected Provisioning workflow ........................................................................................................................................................................ 4
4. Configure Partner Links ................................................................................................................................................................................................................ 8
5. Expose Request and Catalog Data to the BPEL Process ............................................................................................................................................................. 17
6. Configure Human Tasks ............................................................................................................................................................................................................. 27
7. Configure Routing rules ............................................................................................................................................................................................................. 35
8. Deploy the Composite ................................................................................................................................................................................................................ 50
9. Summary .................................................................................................................................................................................................................................... 54
10. Create the Approval workflow ............................................................................................................................................................................................... 54
11. Copy the WSDL and XSDs ....................................................................................................................................................................................................... 55
17. Configure Partner Links .......................................................................................................................................................................................................... 60
18. Expose Request and Catalog Data to the BPEL Process ......................................................................................................................................................... 69
19. Configure Workflow Selection ............................................................................................................................................................................................... 77
20. Configure Human Tasks ....................................................................................................................................................................................................... 106
Configure Parallel Human Task .................................................................................................................................................................................................... 106
Configure the Serial Approval Task .............................................................................................................................................................................................. 112
Configure the OOTB Approval Task. ............................................................................................................................................................................................ 120
21. Configure Human Task – BPEL mappings ............................................................................................................................................................................. 125
Configure the Serial Approval Human Task ................................................................................................................................................................................. 125
Page 3
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Configure the Parallel Approval Human Task .............................................................................................................................................................................. 134
Configure the Auto Approve Human Task ................................................................................................................................................................................... 141
22. Deploy the Composite .......................................................................................................................................................................................................... 142
Select the composite from the local file system and follow the deployment step. ........................................................................................................................ 147
23. Configure Approval Policies ................................................................................................................................................................................................. 148
24. Test the Composite .............................................................................................................................................................................................................. 155
1. Introduction Oracle Identity Manager 11g R2 supports a new type of application which does not require Connectors. This application, called as Disconnected Application,
supports all features of access request, governance, auditing and reporting without the overhead of Connectors and their configuration. Disconnected
applications are on-boarded using a browser-based framework. When a user requests an account or an entitlement in a disconnected application, OIM assigns
the request for manual fulfillment after the appropriate approvals have been completed. Administrators/ Help Desk/ IT Provisioners access these tasks from the
same inbox as the approval tasks. The disconnected provisioning process uses SOA and a BPEL process to provide the same flexibility and functionality that is
available for approval processes.
This hands-on lab does not focus on the creation of a disconnected application instance. Instead, it focuses on modifying the disconnected provisioning process.
Specifically, you will learn how to make the workflow more flexible and declarative by making use of the data stored in the Catalog about the application being
requested.
2. Configure Security for the Request Web Service
2.1. Secure the Web Service
The Request Web Service OIM exposes must be secured so that when accessing the service credentials gets passed and only valid credentials wil l
provide access to this Service.
Follow the steps below to secure the Web Service
Login to the Fusion Middleware Control
Expand WebLogic Domain
Click the domain name
Click WebLogic Domain under the domain name, in the right pane
Page 4
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Security
Click Credentials
Select oracle.wsm.security
Click Create Key from the toolbar
Provide the following information in the Create Key form
Key Requestwskey
User Name xelsysadm
Password Password for the xelsysadm user
Confirm Password Password for the xelsysadm user
Description Optional
Click OK
3. Extract the Disconnected Provisioning workflow Pre-requisites
JDeveloper 11.1.1.6 with SOA Design Time extension
[Note:
1. You should shut down OIM, SOA and Admin Server to release memory for JDeveloper.
2. You can use JDeveloper installed locally in your host machine or you can use JDeveloper deployed in the VM.
]
Follow the steps below
The disconnected provisioning SOA composite, disconnectedprovisioning.zip, is located at OIM_HOME/workflows/composites.
Copy the zip file and extract it at a location accessible to JDeveloper
Copy the Request Web Service EAR, reqsvc.ear, from OIM_HOME/webapp/optional to the same location where you copied the SOA composite
Rename the EAR file to reqsvc.zip and extract it. Rename the file reqsvc.war to reqsvc.zip and extract it
Navigate to the wsdl directory of reqsvc.war
Page 5
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Wsdl directory has requestdataservice.wsdl copy that file
Paste the the wsdl into the JDeveloper project folder as shown below
Page 6
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 7
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Now copy the contents from xsd directory (Not the folder itself)
Now Paste the contents into JDeveloper xsd folder
Page 8
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
4. Configure Partner Links Follow the steps below
Open the Disconnected Provisioning JDeveloper Project
Page 9
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Double-click and open the SOA Composite
Double click the ManualProvisioning BPEL Process
Right click in the Partner Link swim lane to create a Partner Link
Page 10
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Give the name as RequestWSPartnerLink
For the WSDL url, use the SOA Resource Browser to select the requestdataservice.wsdl
Page 11
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Provide the following information to finish creating the Partner Link
Name RequestWSPartnerLink
WSDL URL Requestdataservice.wsdl
Partner Role RequestDataServiceProvider
Page 12
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Switch to the Composite view and right-click the newly created Partner Link and select Configure WS Policies
Page 13
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
In the Security section, click Add
Select oracle/wss_username_token_client_policy and click OK
Page 14
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click OK
Select the Policy that you just added to the Security section
Page 15
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Edit
In the Configure Override Properties window, select the CSF Key parameter
Page 16
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Enter requestwskey as the value and click OK.
You have finished configuring the Request Web Service
Page 17
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
5. Expose Request and Catalog Data to the BPEL Process Follow the steps given below
Add an assign activity and name it AssignRequestWSURL
Select the activity and open the BPEL Process in the Source view
Replace the activity with the snippet as shown below
<assign name="AssignRequestWSURL">
<copy>
<from><EndpointReference xmlns="http://www.w3.org/2005/08/addressing">
<Address/>
</EndpointReference></from>
Page 18
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
<to variable="partnerLink"/>
</copy>
<copy>
<from expression="concat('http://localhost:14000/','reqsvc/reqsvc')"/>
<to variable="partnerLink"
query="/ns1:EndpointReference/ns1:Address"/>
</copy>
<copy>
<from variable="partnerLink"/>
<to partnerLink="RequestWSPartnerLink"/>
</copy>
</assign>
Drag the Invoke activity from the Component Palette and drop it below the AssignRequestWSURL activity. Rename it to InvokeRequestDetailsOperation.
Right-click InvokeRequestDetailsOperation, and select Edit.
Select partner link from the Partner Link Chooser as RequestWSPartnerLink and operation as getRequestDetails.
Page 19
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click the plus (+) icon at Input and Output under Variables section to create the input and output variable. Name the input and output
variables as requestDetails_InputVariable and requestDetails_OutputVariable respectively, and then click Apply and OK.
Page 20
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Drag and drop an assign activity, rename it to AssignRequestInput, and place it above the InvokeRequestDetailsOperation invoke activity
Page 21
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Right click AssignRequestInput to map the input of the InvokeRequestDetailsOperation
Add an Invoke activity after the InvokeRequestDetailsOperation. Name the activity InvokeCatalogOperation.
Page 22
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Edit the InvokeCatalogOperation and configure it as shown
Add an Assign activity above InvokeCatalogOperation
Page 23
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Right click and edit the assign activity to map the input to the InvokeCatalogOperation.
Left Side , reach to ::: Variables -> Process -> Variables -> requestDetails_OutputVariable -> RequestData -> RequestData - BenificiaryData ->
Beneficiary and then see the screen shot.
Page 24
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Drag and drop an Invoke activity after the InvokeCatalogOperation activity
Rename the activity to GetRoleName
Page 25
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Right click and edit the GetRoleName invoke activity and select the RequestWSPartnerLink as the Partner Link, getRoleDetails as the Operation.
Create the input and output variables by clicking on the plus icon. Name the variables as roleDetails_InputVariable and roleDetailsOutputVariable for
the input and output variable respectively.
Click Apply and then click OK
Add an Assign activity before the GetRoleName Invoke activity
Rename the activity as AssignFulfillmentRoleKey
Page 26
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Now, you need to map the fulfillmentrole attribute from the catalog item details to the input variable for the GetRoleName activity
Edit the AssignFulfillmentRoleKey activity and add the copy rule as shown below
Page 27
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Apply and then click OK
6. Configure Human Tasks The Disconnected Provisioning SOA Composite has a single Human Task. We will do the following
Add a new input variable, catalogData, which represents the catalog item details for the disconnected application
Add a new input variable FulfillmentRole, which represents the name of Fulfillment Role.
Change the routing and make it based on rules using an Oracle Business Rules ruleset
Follow the steps below
Page 28
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Save and open the Composite file, composite.xml
Right click to edit the Human Task
Add a new Human Task parameter
Page 29
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Add a Task parameter, catalogData
Save the Human Task
Page 30
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Add to add a String parameter called FulfillementRole
Page 31
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Close the
Edit the BPEL Process
Select the ManualProvisioningTask Human Task and edit it
Map the catalogData and the FulfillmentRole Task Parametesr as shown below
Page 32
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Apply and then OK
Save and open the Composite file, composite.xml
Right click to edit the Human Task
Click Assignment
Delete the participant stage that is already defined
Page 33
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Edit the existing stage (you won’t be able to delete, since it is the only stage)
Define the Participant Type as Rule-based and specify the List Ruleset as Manual FulfillmentRuleset
Page 34
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Save the Task. It may take a few seconds as the OBR components are created.
Once the OBR components are created, you will be presented with the OBR design time window
Page 35
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
7. Configure Routing rules Follow the steps below to configure the routing rules
Click Create Rule to create a new rule
Create a rule called ManualProvisioningRule
Page 36
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click on variable and edit the rule as shown below
Create a list of approvers using the CreateResourceList call as shown below
Page 37
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
[Note: Please make sure to select and set all variable of CreateResourceList including lists as per the above screen.]
You can follow screens below to construct the rule.
Screen 1:
Page 38
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 2:
Page 39
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 3:
Page 40
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 4:
Page 41
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 5:
Page 42
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 6:
Page 43
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 7:
Page 44
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 8:
Page 45
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 9:
Page 46
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 10:
For selecting group parameter
Page 47
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 48
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Screen 11:
For the parameter ruleName
Screen 12:
For Parameter ResponseType
Screen 13:
Page 49
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
For Parameter list
Save and close the OBR designer
Save and close the Human Task
Page 50
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
8. Deploy the Composite Follow the instructions below to deploy the Composite
Start Admin Server and SOA Server. You do not need to start OIM server at this stage.
Right click on the Application and select Deploy
Follow the prompts to create a SAR file
Page 51
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 52
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
To deploy the SAR file, login to Fusion Middleware Control and select SOA and then soa-infra(<managed server>)
Page 53
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Undeploy the existing DisconnectedProvisioning SOA Composite
Page 54
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Deploy the SAR file, keeping the version number the same
9. Summary In this lab, you learn the following
How to deploy the Request Web Service
How to securely communicate with the Request Web Service using credentials stored in the Credential Store Framework (CSF)
How to configure the OOTB SOA Composite to retrieve data from OIM
How to pass the data to the Human Task
How to create rules using Oracle Business Rules to determine who the fulfillment person should be
10. Create the Approval workflow Follow the steps below to create a new workflow
Set JAVA_HOME to /app/jdk1.6.0_27
Set the ANT_HOME environment variable to Middleware Home/modules/org.apache.ant_1.7.1
Set the PATH environment variable to $JAVA_HOME/bin:$ANT_HOME/bin:$PATH
Navigate to OIM HOME/workflows/new_workflow
Run the comment ant-f new_project.xml
Give the Application Name as AddAccessApprovalApplication
Page 55
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Give the Project Name as AddAccessApproval
Give the Service Name as AddAccess
Wait for the utility to finish generating the new JDeveloper Workspace containing the Composite
The workspace will be generated in OIM Home/workflows/new-workflows/process_template
/app/Middleware/Oracle_IDM1/server/workflows/new-workflow/process-template
Copy the directory to a location accessible to JDeveloper
11. Copy the WSDL and XSDs Follow the steps below
Copy the Request Web Service EAR, reqsvc.ear, from OIM_HOME/webapp/optional to the same location where you copied the SOA composite
Rename the EAR file to reqsvc.zip and extract it. Rename the file reqsvc.war to reqsvc.zip and extract it
Navigate to the wsdl directory of reqsvc.war
Page 56
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
12. Copy the WSDL requestdataservice.wsdl
13. Paste the WSDL into the JDeveloper project folder as shown below
Page 57
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
14. Now copy the contents of xsd folder (Not the folder itself)
Page 58
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
15. Paste it into JDeveloper Projects xsd folder
Page 59
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 60
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
16. Using a text editor, create a new text file, BusinessRule.xsd in the xsd folder of the JDeveloper Project
Copy-paste the following in BusinessRule.xsd <?xml version="1.0" encoding="UTF-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://oracle.businessrule"
targetNamespace="http://oracle.businessrule"
elementFormDefault="qualified">
<xsd:complexType name="stage">
<xsd:sequence>
<xsd:element name="stageType" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="StageOutput" type="stage"/>
</xsd:schema>
17. Save and close BusinessRule.xsd
18. Configure Partner Links Follow the steps below
Open the AddAccessApproval JDeveloper Project
Double-click and open the SOA Composite
Page 61
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Double click the ApprovalProcess BPEL Process
Right click in the Partner Link swim lane to create a Partner Link
Page 62
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Give the name as RequestWSPartnerLink
For the WSDL url, use the SOA Resource Browser to select the requestdataservice.wsdl
Page 63
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Provide the following information to finish creating the Partner Link
Name RequestWSPartnerLink
WSDL URL Requestdataservice.wsdl
Partner Role RequestDataServiceProvider
Page 64
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Switch to the Composite view and right-click the newly created Partner Link and select Configure WS Policies
Page 65
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
In the Security section, click Add
Select oracle/wss_username_token_client_policy and click OK
Page 66
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click OK
Select the policy -> Click Edit button.
Page 67
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 68
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Give key value as requestwskey.
Click Ok to save the WS Policy
Page 69
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
You have finished configuring the Request Web Service
19. Expose Request and Catalog Data to the BPEL Process Follow the steps given below
Add an “Assign” activity and name it AssignRequestWSURL
Select the activity and open the BPEL Process in the Source view
Replace the activity with the snippet as shown below
Page 70
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
<assign name="AssignRequestWSURL">
<copy>
<from><EndpointReference xmlns="http://www.w3.org/2005/08/addressing"><Address/>
</EndpointReference>
</from>
<to variable="partnerLink"/>
</copy>
<copy>
<from expression="concat(substring-
before(bpws:getVariableData('inputVariable','payload','/ns3:process/ns4:url'),'workflowservice'),'reqsvc/reqsvc')
"/>
<to variable="partnerLink" query="/ns14:EndpointReference/ns14:Address"/>
</copy>
<copy>
<from variable="partnerLink"/>
<to partnerLink="RequestWSPartnerLink"/>
</copy>
</assign>
Drag the Invoke activity from the Component Palette and drop it below the AssignRequestWSURL activity. Rename it to InvokeRequestDetailsOperation.
Right-click InvokeRequestDetailsOperation, and select Edit.
Select partner link from the Partner Link Chooser as RequestWSPartnerLink and operation as getRequestDetails.
Page 71
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click the plus (+) icon at Input and Output under Variables section to create the input and output variable. Name the input and output
variables as requestDetails_InputVariable and requestDetails_OutputVariable respectively, and then click Apply and OK.
Page 72
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Drag and drop an assign activity, rename it to AssignRequestInput, and place it above the InvokeRequestDetailsOperation invoke activity
Page 73
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Right click AssignRequestInput to map the input of the InvokeRequestDetailsOperation
Page 74
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Add an Invoke activity after the InvokeRequestDetailsOperation. Name the activity InvokeCatalogOperation.
Page 75
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Edit the InvokeCatalogOperation and configure it as shown
Add an Assign activity above InvokeCatalogOperation. Name it as AssignCatalogInput.
Page 76
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Right click and edit the assign activity “AssignCatalogInput” to map the input to the InvokeCatalogOperation
Page 77
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
20. Configure Workflow Selection Follow the steps below to define workflow selection rules
Define a variable catalogData. This variable will contain the catalog details returned as an output of the InvokeCatalogDetails step.
Page 78
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 79
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 80
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Define a variable workflowtype. This variable will contain the type of workflow to be invoked.
Page 81
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 82
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Navigate to the SOA Composite view and add a Business Rule component
Specify the name of the Rule Dictionary as WorkflowSelection
Page 83
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Specify the Input as catalogData
Page 84
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Specify the Output as workflowstage
Page 85
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 86
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Switch to the BPEL Process
Page 87
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Expand SOA Components and add a Business Rule component
Edit the rule and rename it to WorkflowSelection
Page 88
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Apply
Click the Dictionary tab and select the WorkflowSelection dictionary defined earlier
Page 89
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Map the catalogData variable to the input to the Rule
Page 90
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 91
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Map the workflowtype variable to the output to the Rule
Page 92
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 93
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Add an Assign activity before the WorkflowSelection rule and rename it as AssignRuleInput
Click "OK"
Page 94
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 95
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Map the output of the InvokeCatalogOperation to the catalogData variable
Click “OK”
Switch to the Composite view
Edit the Business Rule component
Page 96
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Create Rule
Rename the Rule from Rule1 to AutoApprove
Edit the Rule
Page 97
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Specify the stageType property
Page 98
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 99
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
In a similar manner, create the Manager, Serial and Parallel approval rules
Switch to the BPEL Process
Add a Switch activity after the WorkflowSelection Rule
Page 100
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Select the Switch activity and add two Switch Case steps
Page 101
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Rename the conditions as Serial, Parallel, Manager and Auto as shown below
Page 102
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Drag the OOTB Human Task into the Manager Switch Case
Page 103
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 104
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Switch to the SOA Composite
Add two Human Tasks, SerialApproval and ParallelApproval
Page 105
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Switch to BPEL Process ApprovalProcess.bpel
Edit the Manager Approval Switch case and add the expression given below
Note: You are not done configuring the Human Tasks. We will first configure the newly added Tasks and then wire them to the BPEL Process.
Page 106
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
21. Configure Human Tasks
Configure Parallel Human Task
Edit the Parallel Approval Task
Click the Data Tab
Add the following attributes
Parameter Name Data Type
RequestID {http://www.w3.org/2001/XMLSchema}string
RequestModel {http://www.w3.org/2001/XMLSchema}string
RequestTarget {http://www.w3.org/2001/XMLSchema}string
RequesterDetails {http://xmlns.oracle.com/request/RequestDetails}RequesterDetails
BeneficiaryDetails {http://xmlns.oracle.com/request/RequestDetails}BeneficiaryDetails
ObjectDetails {http://xmlns.oracle.com/request/RequestDetails}ObjectDetails
OtherDetails {http://xmlns.oracle.com/request/RequestDetails}OtherDetails
url {http://xmlns.oracle.com/request/RequestDetails}url
Catalogdata {http://xmlns.oracle.com/RequestServiceApp/RequestDataService/CatalogData}CatalogData
RequesterDisplayName {http://www.w3.org/2001/XMLSchema}string
BeneficiaryDisplayName {http://www.w3.org/2001/XMLSchema}string
Requester {http://www.w3.org/2001/XMLSchema}string
Verify the Task Parameters
Page 107
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click the General Tab
Set the Task title to <%/task:task/task:payload/ns2:BeneficiaryDetails/ns2:DisplayName%> has submitted a request for approval
Set the Task Owner to Group and SYSTEM ADMINISTRATORS
Page 108
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Notification
Click Advanced
Check the Make notification actionable checkbox
Click Assignment
Add a Parallel stage
Page 109
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 110
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Select a stage and click Edit. Give it the name Manager
Select the other stage and give it the name Review Team
Edit the Manager stage
Set the Participant type to Single and build the participant list using Rules
Page 111
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Create a Rule as shown below
Similarly, configure the Review Team stage
Configure the stage as shown
Page 112
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Create a participant rule as shown
Configure the Serial Approval Task
Click the Data Tab
Add the following attributes
Parameter Name Data Type
RequestID {http://www.w3.org/2001/XMLSchema}string
RequestModel {http://www.w3.org/2001/XMLSchema}string
RequestTarget {http://www.w3.org/2001/XMLSchema}string
RequesterDetails {http://xmlns.oracle.com/request/RequestDetails}RequesterDetails
BeneficiaryDetails {http://xmlns.oracle.com/request/RequestDetails}BeneficiaryDetails
ObjectDetails {http://xmlns.oracle.com/request/RequestDetails}ObjectDetails
OtherDetails {http://xmlns.oracle.com/request/RequestDetails}OtherDetails
url {http://xmlns.oracle.com/request/RequestDetails}url
Catalogdata {http://xmlns.oracle.com/RequestServiceApp/RequestDataService/CatalogData}CatalogData
RequesterDisplayName {http://www.w3.org/2001/XMLSchema}string
BeneficiaryDisplayName {http://www.w3.org/2001/XMLSchema}string
Requester {http://www.w3.org/2001/XMLSchema}string
Verify the Task Parameters
Page 113
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click the General Tab
Set the Task title to <%/task:task/task:payload/ns2:BeneficiaryDetails/ns2:DisplayName%> has submitted a request for approval
Set the Task Owner to Group and SYSTEM ADMINISTRATORS
Page 114
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Notification
Click Advanced
Check the Make notification actionable checkbox
Click Assignment
Add a Serial stage and rename the stages as Manager and Review Team
Page 115
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Edit the Manager stage
Set the Participant type to Single and build the participant list using Rules
Page 116
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Create the participant list rule as shown below
Similarly, configure the Review Team stage
Page 117
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Create the participant list rule as shown
Page 118
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Configure the stage as shown
Page 119
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Create a participant rule as shown
Page 120
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Configure the OOTB Approval Task.
Set the Task title
Use the below screens to build the task Title
Page 121
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 122
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 123
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click Assignment
Page 124
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Create a Participant list rule
Page 125
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
22. Configure Human Task – BPEL mappings
Configure the Serial Approval Human Task
Add a condition to the Serial Approval switch as shown below
Drag and drop a Human Task activity from the SOA Components into the Serial Approval switch
Edit the Human Task and select the Serial Approval Human Task definition
Page 126
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Map the Task parameters to the BPEL variable as shown below
Page 127
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click the Advanced tab
Page 128
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Map the Identification Key to the Request ID
[Note: Use Screens below to configure Identification Key to the Request ID]
Page 129
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 130
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Select the Switch case for Task outcome is REJECT
Replace the existing script with the following
Page 131
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Select the Assign activity under Task outcome is REJECT
Delete all the copy rules except one (it can be any one, we just need one so that we can replace it in the Source view)
Save and click on Source tab
Select the copy activity
Replace the activity with the snippet below <assign>
<copy>
<from expression="string('rejected')"/>
<to variable="outputVariable"
part="payload"
query="/ns3:processResponse/ns3:result"/>
Page 132
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
</copy>
<copy>
<from expression="ora:getConversationId()"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg0"/>
</copy>
<copy>
<from expression="string('rejected')"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg1"/>
</copy>
</assign>
Repeat for the Task outcome is APPROVE. Select the Switch Case and copy the snippet below and paste it as in the previous step
Select the Assign activity under the Approve outcome and replace the copy rules with the following
<sequence>
Page 133
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
<assign>
<copy>
<from expression="string('approved')"/>
<to variable="outputVariable"
part="payload"
query="/ns3:processResponse/ns3:result"/>
</copy>
<copy>
<from expression="ora:getConversationId()"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg0"/>
</copy>
<copy>
<from expression="string('approved')"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg1"/>
</copy>
</assign>
</sequence>
Select the Assign activity under the Otherwise outcome and replace the copy rules with the following <sequence>
<assign>
<copy>
<from
expression="bpws:getVariableData('SerialApproval1_globalVariable','payload','/task:task/task:systemAttributes/task:stat
e')"/>
<to variable="outputVariable" part="payload"
query="/ns3:processResponse/ns3:result"/>
</copy>
<copy>
<from expression="ora:getConversationId()"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg0"/>
</copy>
<copy>
<from
expression="bpws:getVariableData('SerialApproval1_globalVariable','payload','/task:task/task:systemAttributes/task:stat
e')"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
Page 134
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
query="/ns1:callback/arg1"/>
</copy>
</assign>
</sequence>
Configure the Parallel Approval Human Task
Add a condition to the Parallel Approval switch as shown below
Drag and drop a Human Task activity from the SOA Components into the Parallel Approval switch
Edit the Human Task and select the Parallel Approval Human Task definition
Map the Task parameters to the BPEL variable as shown below
Page 135
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 136
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Click the Advanced tab
Page 137
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Map the Identification Key to the Request ID
Page 138
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Select the Switch case for Task outcome is REJECT
Replace the existing script with the following
Select the Assign activity under Task outcome is REJECT
Delete all the copy rules except one (it can be any one, we just need one so that we can replace it in the Source view)
Save and click on Source tab
Select the copy activity
Replace the activity with the snippet below
<sequence>
<assign>
<copy>
<from expression="string('rejected')"/>
<to variable="outputVariable"
part="payload" query="/ns3:processResponse/ns3:result"/>
</copy>
Page 139
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
<copy>
<from expression="ora:getConversationId()"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg0"/>
</copy>
<copy>
<from expression="string('rejected')"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg1"/>
</copy>
</assign>
</sequence>
Repeat for the Task outcome is APPROVE. Select the Switch Case and copy the snippet below and paste it as in the previous step
Select the Assign activity under the Approve outcome and replace the copy rules with the following
<sequence> <assign>
<copy>
<from expression="string('approved')"/>
<to variable="outputVariable"
part="payload"
query="/ns3:processResponse/ns3:result"/>
</copy>
<copy>
<from expression="ora:getConversationId()"/>
<to variable="Invoke_1_callback_InputVariable_1"
Page 140
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
part="parameters"
query="/ns1:callback/arg0"/>
</copy>
<copy>
<from expression="string('approved')"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg1"/>
</copy>
</assign>
</sequence>
Select the Assign activity under the Otherwise outcome and replace the copy rules with the following <sequence>
<assign>
<copy>
<from
expression="bpws:getVariableData('ParallelApproval1_globalVariable','payload','/task:task/task:systemAttributes/task:st
ate')"/>
<to variable="outputVariable" part="payload"
query="/ns3:processResponse/ns3:result"/>
</copy>
<copy>
<from expression="ora:getConversationId()"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg0"/>
</copy>
<copy>
<from
expression="bpws:getVariableData('ParallelApproval1_globalVariable','payload','/task:task/task:systemAttributes/task:st
ate')"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg1"/>
</copy>
</assign>
</sequence>
Page 141
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Configure the Auto Approve Human Task
Drag and drop an Assign activity
Select the Assign activity and click on Source view
Copy the snippet given below
<assign>
<copy>
<from expression="string('approved')"/>
<to variable="outputVariable"
part="payload"
Page 142
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
query="/ns3:processResponse/ns3:result"/>
</copy>
<copy>
<from expression="ora:getConversationId()"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg0"/>
</copy>
<copy>
<from expression="string('approved')"/>
<to variable="Invoke_1_callback_InputVariable_1"
part="parameters"
query="/ns1:callback/arg1"/>
</copy>
</assign>
23. Deploy the Composite Follow the steps below to deploy the composite
Compile the application and generate the Composite as a SOA Archive (SAR) file
[Note: Compile the composite by giving version anything above 4.0. Like 4.1 or 4.2 or 5.0 etc.
Do not compile the composite with version 4.0.
]
Page 143
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 144
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 145
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Page 146
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Deploy Composite using Enterprise Manager
Page 147
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Select the composite from the local file system and follow the deployment step.
Page 148
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
24. Configure Approval Policies
Page 149
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Login to the System Administration Console Approval Policies
Create request-level approval policies for
o Grant Application Instance
o Grant Role
Page 150
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
o Grant Entitlement
Page 151
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
o Heterogeneous Request
Page 152
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
Create operational-level approval policies for
o Grant Application Instance
Page 153
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
o Grant Role
Page 154
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
o Grant Entitlement
Page 155
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class
25. Test the Composite
Page 156
Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class