lab 3: developing workflow - oracle€¦ · oracle proprietary - restricted to personal use in an...

156
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 )

Upload: others

Post on 07-Apr-2020

18 views

Category:

Documents


1 download

TRANSCRIPT

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)

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

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

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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

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

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

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

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

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

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

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

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

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

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>

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.

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.

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

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.

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

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.

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

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

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

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Add a Task parameter, catalogData

Save the Human Task

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Click Add to add a String parameter called FulfillementRole

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

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

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

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

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

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

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:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 2:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 3:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 4:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 5:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 6:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 7:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 8:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 9:

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Screen 10:

For selecting group parameter

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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:

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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>)

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Undeploy the existing DisconnectedProvisioning SOA Composite

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

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

14. Now copy the contents of xsd folder (Not the folder itself)

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

15. Paste it into JDeveloper Projects xsd folder

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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

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

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

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

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Click OK

Select the policy -> Click Edit button.

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Give key value as requestwskey.

Click Ok to save the WS Policy

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

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.

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.

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Right click AssignRequestInput to map the input of the InvokeRequestDetailsOperation

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Add an Invoke activity after the InvokeRequestDetailsOperation. Name the activity InvokeCatalogOperation.

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.

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

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.

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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.

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Specify the Input as catalogData

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Specify the Output as workflowstage

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Switch to the BPEL Process

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Map the catalogData variable to the input to the Rule

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Map the workflowtype variable to the output to the Rule

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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"

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Specify the stageType property

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Select the Switch activity and add two Switch Case steps

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Rename the conditions as Serial, Parallel, Manager and Auto as shown below

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Drag the OOTB Human Task into the Manager Switch Case

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Switch to the SOA Composite

Add two Human Tasks, SerialApproval and ParallelApproval

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.

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

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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

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

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

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

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

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

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Create the participant list rule as shown

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Configure the stage as shown

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Create a participant rule as shown

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Click Assignment

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Create a Participant list rule

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Map the Task parameters to the BPEL variable as shown below

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Click the Advanced tab

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]

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

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

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"/>

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>

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"

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Click the Advanced tab

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Map the Identification Key to the Request ID

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>

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"

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>

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"

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.

]

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Deploy Composite using Enterprise Manager

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.

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

24. Configure Approval Policies

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

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

o Grant Entitlement

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

o Heterogeneous Request

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

Create operational-level approval policies for

o Grant Application Instance

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

o Grant Role

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

o Grant Entitlement

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class

25. Test the Composite

Oracle Proprietary - Restricted to Personal Use in an Oracle partner training class