You are on page 1of 116

DRM WDK 11.1.

Oracle Hyperion
Data Relationship Management
Workflow Development Kit 11.1.2
Training
July 20-21, 2010

Atul Mohidekar Jeff Woodard


Senior Development Manager Software Developer

Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Announcements

Announcements
• Timings
• Breaks
• Food
• Hands-on labs prerequisites

2 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Agenda

• Day – 1: 9 AM – 6 PM
– Announcements & Introductions
– Training Objectives
– DRM WDK 11.1.2 Overview
— WDK SOA Integration Architecture
— WDK Components
— WDK Technologies & Tools
— DRM Request Overview
– WDK Organization
– Request App & Task Flow – Design and Code Overview
– WDK Build and Deployment
– Lunch break: 12:15 PM – 1:00 PM

3 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Agenda (cont.)

• Day – 1: 9 AM – 6 PM (cont.)
– Request Workflows – Design and Code Overview
– WDK Customizations using Stage Metadata Framework
– Break: 2:30 PM – 2:45 PM
– Hands-on Lab 1: Customize WDK for a New Node Type
— Configure the Request Application
— Configure the Workflows
— Configure the Request Processing Task Flow Application
— Testing

4 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Agenda

• Day – 2: 9 AM – 5 PM
– Finish Hands-on Lab 1: Customize WDK for a New Node
Type
— Configure the Request Application
— Configure the Workflows
— Configure the Request Processing Task Flow Application
— Testing
– Hands-on Lab 2: Add a New Node Action (Request Type)
— Customize the Request Application
— Customize the Task Flow Application
— Add a New Workflow
— Configure the Request Workflow Selection Process
— Testing
– Summary

5 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Introductions

Introductions
• Name
• Company
• Title and role
• The reason you are here - What do you want to get out of
WDK training?
• Have you used WDK?
• Have you used JDeveloper?
• Have you used JDeveloper to build ADF applications?
• Have you used JDeveloper to build workflows?

6 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Training Course Objectives

The focus of the training for the Workflow Development Kit


• Development – Understanding code & customizations
• Developer – a WDK technology user

After completing this DRM WDK 11.1.2 training, you should be


able to:
• Have a good understanding of WDK functionality
• Have a good understanding of DRM Request functionality
• Build, deploy and run WDK to perform out-of-box end-to-
end data governance scenarios (e.g. Add an Account)
• Understand and perform WDK customizations for widely
used business use cases

7 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Objectives (cont.)

After completing this DRM WDK 11.1.2 training, you should be


able to (cont.):
• Configure the display and behavior of human interaction UI
forms (Request Stages) using WDK Stage Metadata
– Configure the Request Application
– Configure the Request workflows
• Customize WDK for end-to-end implementation of a new
data governance scenario to support a new Node action –
Inactivate Node
– Customize Request Application
— Implement the new Node action UI
— Implement the Request creation for the new Node Action

8 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Objectives (cont.)

After completing this DRM WDK 11.1.2 training, you should be


able to (cont.):
• Customize WDK for end-to-end implementation of a new
data governance scenario to support a new Node action
(Inactivate Node) (cont.)
– Add a new workflow to WDK to process the new Node action
— Create a new workflow
— Add and configure a human task to the workflow
— Configure the human task display and behavior using the Stage
Metadata
— Invoke the Request Approval workflow
– Configure the workflow selection logic to invoke the new
workflow
— Configure the Request Workflow Selection process

9 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

Advantages of Using the DRM WDK

• Standards-based solution
• Leverages Oracle SOA Suite
• Use for human workflows and task orchestration
• Flexible to support complex processes and rules
• Define and share reusable components across workflows
• Incorporate DRM tasks into an enterprise business
process

10 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK

DRM WDK SOA Integration Architecture


Oracle SOA Server (WebLogic)

WDK Request Oracle Business Process Engine


App
Workflow:
DRM Service RequestWorkflowSelection
Library DRM
UpdateNode Web
Business Workflow AddEnrichNode MoveNode, UpdateNode
Service
Services InsertNode
Users
Human DRM
Task Workflow: Workflow:
Server
Service Request- Request-
AddEnrich- Update-
Worklist Node Node

Request DRM
Processing Workflow: Service
Task Flow Request- Library
DRM Service Approval
Library

WDK DRM SOA Course Grained Fine Grained


Component Component Component One-to-Many

11 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
DRM Workflow Integration: Components

• DRM WDK
– Request Application
– Request Processing Workflows
– Request Processing Task Flow Application

• DRM
– DRM Server
– DRM Web Service
– DRM Service Library

12 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
DRM Workflow Integration: Components

• DRM WDK
– Request Application
– Request Processing Workflows
– Request Processing Task Flow Application

• DRM
– DRM Server
– DRM Web Service
– DRM Service Library

13 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
DRM Workflow Integration: Components (cont.)

• SOA Suite
– Business Process Engine
– Human Task Services
— Workflow Human Task Services
— BPM Worklist
– Web Services Host (container)
– Human Task Flows Host (container)

14 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Components: Request Application

• Allows viewing of DRM Data


– Tree View
— Versions, Hierarchies, Nodes
– Node Details View
— Node Properties
• Creates DRM Request and saves it in DRM
– Request to Create and Enrich a new Node
– Request to Update an existing Node
– Request to Move an existing Node (within the same hier)
– Request to Insert an existing Node (into another hier)
• Launches a single workflow selection process for
configurable Request processing
– DrmRequestWorkflowSelection
• Ability to use DRM or SOA Worklist users for logging in

15 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Request Workflows: Input and Output

The Same Input and Output for all Request Workflows


Workflow input
• Request ID: integer (e.g. 193)
• Request Type: string (e.g. NODE_ADD_ENRICH)
• Request Content Type: string (e.g. ACCOUNT)
• Request Cause: string (e.g. MERGER)
• Request Priority: integer (e.g. 3)
Workflow output
• Request ID: integer (e.g. 193)
• Workflow Outcome: string (e.g. APPROVE)

16 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflows and Task Flow Application

Request Workflows
• DrmRequestWorkflowSelection
• DrmRequestAddEnrichNode
• DrmRequestUpdateNode
• DrmRequestApproval
• DrmRequestProcessing (optional)

Request Processing Task Flow Application


• DrmRequestProcessingTaskFlow

17 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow:
DrmRequestWorkflowSelection
• The only workflow (directly) called by Request App
• Enables configurable workflow selection
– Currently based on Request Type and Request Cause
— Request Type = NODE_ADD_ENRICH:
DrmRequestAddEnrichNode
— Request Type = NODE_UPDATE:
— Request Cause = ERP_UPDATE:
DrmRequestUpdateNode
— Request Cause = EPM_UPDATE:
DrmRequestApproval
— Request Type = NODE_MOVE or NODE_INSERT:
DrmRequestApproval
– May use any other input data in the conditional logic
— Defined in DrmRequestWorkflowTypes.xsd
– Throws an exception if none of the conditions in the workflow
selection logic select a workflow

18 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow:
DrmRequestWorkflowSelection (cont.)
• Enables configurable workflow selection
– May use Request data
— Retrieve the Request object using DRM Web Service and the
Request ID (an input parameter)

19 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow:
DrmRequestAddEnrichNode
• Invoked by
– DrmRequestWorkflowSelection Workflow
– Request Type = NODE_ADD_ENRICH
• Invokes a Human Task
– Workflow Stage = ENRICHMENT
– Assignment
— Single User: jcooper
— Dynamic Escalation Policy (escalation in minutes)
– Invokes a Human Task Flow
— DrmRequestProcessingTaskFlow
• Invokes another workflow for Request Approval
Processing
– DrmRequestApproval

20 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow:
DrmRequestUpdateNode
• Invoked by
– DrmRequestWorkflowSelection Workflow
– Request Type = NODE_UPDATE AND
Request Cause = ERP_UPDATE
• Invokes a Human Task
– Workflow Stage = UPDATE
– Assignment
— Single User: jcooper
— Dynamic Escalation Policy (escalation in days)
– Invokes a Human Task Flow
— DrmRequestProcessingTaskFlow
• Invokes another Workflow for Request Approval
Processing
– DrmRequestApproval

21 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow:
DrmRequestApproval (cont.)
• Invokes a Human Task
– Workflow Stage = APPROVAL
– Assignment
— Management Chain: Starting user – jstein
— Dynamic Approver Levels
– Invokes a Human Task Flow
— DrmRequestProcessingTaskFlow

22 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow:
DrmRequestApproval
• Invoked by
– DrmRequestAddEnrichNode Workflow
— When Request Type = NODE_ADD_ENRICH
– DrmRequestUpdateNode Workflow
— When Request Type = NODE_UPDATE AND
Request Cause = ERP_UPDATE
– DrmRequestWorkflowSelection Workflow
— When (Request Type = NODE_UPDATE AND
Request Cause = EPM_UPDATE) OR
Request Type = NODE_MOVE OR
Request Type = NODE_INSERT

23 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Task Flow Application:
DrmRequestProcessingTaskFlow
• Invoked by all human tasks included in all Request
processing workflows
– DrmRequestAddEnrichNode
– DrmRequestUpdateNode
– DrmRequestApproval
• Task Flow input
– Same as the human task input
– Described in detail in the following slides

24 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Task Flow Application:
DrmRequestProcessingTaskFlow (cont.)
• Accesses DRM functionality using DRM Service Library
– Retrieves DRM Request
– Updates (Saves) DRM Request
– Validates DRM Request, displays errors
– Approves DRM Request
– Creates audit history

25 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Organization
Directory Structure
The WDK contents directory structure
• DrmWdk
• docs
• sampleData
• source
• DrmWdkCore
• DrmWdkRequestApp
• ViewController
• WorklfowProxy
• Workflows
• DrmRequestAddEnrichNode
• DrmRequestApproval
• DrmRequestProcessing
• DrmRequestUpdateNode
• DrmRequestWorkflowSelection
• DrmWdkViewCommon

26 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Organization
JDeveloper Application Structure
The WDK JDeveloper applications and projects
• DrmWdkRequestApp
• DrmWdkCore
• ViewController
• WorklfowProxy
• Workflows
• DrmRequestAddEnrichNode
• DrmRequestApproval
• DrmRequestProcessing
• DrmReqeustProcessingTaskFlow
• DrmRequestUpdateNode
• DrmRequestWorkflowSelection
• DrmWdkCore
• DrmWdkViewCommon

27 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request App and Request Processing Task Flow
Design and Code Overview
ADF Concepts
• View
– UI Forms
— jspx and jsff files
— UI Controls
– Backing Beans
• Model
– Business objects that access data
– DRM objects accessed using DRM API, e.g. Node, Node
Type, Property, Property Definition, etc.
• Logical thread of processing user interactions
• Page flow – from one page to another
Review the code in JDeveloper

28 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflows
Design and Code Overview
Workflow concepts
• Process definition
• WSDL
• Variables
• Activities
• Partner Link
• Web service invocation
• Human Task
– Task definition
– Task input
Review the workflows in JDeveloper

29 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework
Why did we build it?
Design goals
• Substantially lower the learning curve and effort required to
implement widely used scenarios
• Make most commonly required customizations configurable
• Hide the ADF complexity
• Hide the task flow development complexity
• Provide high flexibility in the configurations

30 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework
Overview
What is a Stage?
• A logical step in Request processing that requires a human
input which typically results in modification of the Request
• A Stage could be present inside or outside of a workflow
(e.g. Request Application implements the initial “Request”
Stage for all Request processing scenarios)

What is Stage Metadata?


• The metadata associated with a Stage that customizes the
UI form and its behavior for the human interactions

31 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework
Overview (cont.)
What is Stage Metadata Framework?
• The framework
– Defines the specification for the Stage Metadata
– Uses the Stage Metadata to dynamically change the display
and behavior of the UI forms presented at each Request
processing Stage
• Stage Metadata Frameworks is built into both Request
Application and Request Processing Task Flow Application

32 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework
Stage Metadata
Stage Metadata
• Stage Name: string
• Page Fragments Title: string
• Page Fragment Files Selection Criteria: Text Selection
Criteria
• DRM Properties to be Displayed: Properties Selection
Criteria
• DRM Properties to be made Modifiable: Properties
Selection Criteria
• DRM Properties to be made Required: Properties
Selection Criteria
• DRM Validations to be applied: Text Selection Criteria
• Allow Validation Errors: boolean
• Final Approval: boolean

33 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow Human Task Input
Workflow Human Task Input
Request Workflow Input Request Workflow Stage Metadata

Request Workflow Input Request Workflow Stage Properties Selection Criteria


Metadata
•Request ID: int Property Categories
•Stage Name: string
•Request Type: string Selection Criteria
•Page Fragments Title: string
•Request Content Type: string
•Request Cause: string
Page Fragment Files Properties Selection
•Request Priority: int (1-5) Criteria
Selection Criteria

•Include Local Node Properties: boolean


Display Properties
Selection Criteria •Include DRM Modifiable Properties: boolean
•Include DRM Required Properties: boolean
•Include Request Modified Properties: boolean
Modifiable Properties
Selection Criteria •Combine Logic: string [union, intersection]

Legend
Required Properties
XSD Type Selection Criteria
Text Selection Criteria
Field Name (Type •Criteria: string
reference) Validations Selection
•Type: string [list, regex]
Criteria
•Usage: string [include, exclude]
•Element: data type •Allow Validation Errors: boolean •Case Sensitive: boolean
•Attribute: data type [v1,v2] •Final Approval: boolean •List Delimiter: string

34 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Request Workflow Human Task Input (cont.)

All Request workflow human tasks have the same input


• Workflow input – the same as the input to all Request
workflows
– Request ID: integer (e.g. 193)
– Request Type: string (e.g. NODE_ADD_ENRICH)
– Request Content Type: string (e.g. ACCOUNT)
– Request Cause: string (e.g. MERGER)
– Request Priority: integer (e.g. 3)
• Stage Metadata
– Described in detail in the following slides

35 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Text Selection Criteria
• Used to select objects using their names: Page Fragment
Files, Properties, Property Categories, Validations
• Contains the following fields
– Type: string (default: List)
— List – the text is a list of strings, e.g.
NameFirst,NameLast,Title,Position,Manager
— Regular Expression – the text is a regular expression, e.g.
^Name.*|.*Date$
– Usage: string (default: Include)
— Include – the specified criteria includes objects
— Exclude – the specified criteria to excludes objects
– Case Sensitive: boolean (default: false)
– List Delimiter: string (default: “,”)

36 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Properties Selection Criteria
• Used to select Properties for the following purpose
– To display Properties
– To make Properties modifiable
— Applied to the subset of Properties that already selected for
display
— Properties that are not-modifiable in DRM are automatically
excluded
– To make Properties required
— Applied to the subset of Properties that already selected for
display

37 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Properties Selection Criteria
• Multiple criteria may be combined to create the resultant
set of Properties
– Two complimentary options to combine different Properties
selection criteria
— Union: select the Properties by creating a superset of the
Properties selected by all selection criteria
— Intersection: select the Properties that are common to all
selection criteria
• Text Selection Criteria are either used for selecting
Properties by their names or by their Category names
• Boolean selection criteria include Properties based on
inherent logic (e.g. Properties that are modifiable in DRM)
– Setting the boolean selection criteria to false ignores it from
the property selection logic - it does not exclude the
Properties if they are selected by other selection criteria

38 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Properties Selection Criteria (cont.)
• Property Selection Criteria contains following fields
– The criteria
— Categories Selection Criteria: Text Selection Criteria
— Properties Selection Criteria: Text Selection Criteria
— Include Local Node Properties: boolean
— Include DRM Modifiable Properties: boolean
— Include DRM Modifiable Properties: boolean
— For future usage when DRM implements this functionality
— Include Request Modifiable Properties: boolean
– The field that specifies how the specified criteria are to be
combined
— Combine Logic: Union or Intersection

39 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Properties Selection Criteria
Union = {1-In/Ex} ∪ {2-In/Ex} ∪ {3} ∪ {4} ∪ {5} ∪ {6}
Property Request Request
Categories{1-In} Node {1-Ex} Properties
Node {2-Ex} Intersection = {1-In/Ex} ∩ {2-In/Ex} ∩ {3} ∩ {4} ∩ {5} ∩ {6}
Selection Selection{2-In}
Type Type
Criteria Criteria
Properties Properties

Include Request Include Request


Local {3} Node Selected DRM {4} Node
Node Type Properties for a Modifiable Type
Properties Properties Human Task Properties Properties
Properties Selection Criteria
Property Categories
{1-In/Ex}
Selection Criteria
Include Request Include Request
DRM Node Request Node
Properties Selection
Required {5} Type Modified {6} Type
Criteria {2-In/Ex}
Properties Properties Properties Properties

•Include Local Node Properties: boolean {3}


•Include DRM Modifiable Properties: boolean {4}
•Include DRM Required Properties: boolean {5}
•Include Request Modified Properties: boolean {6}
•Combine Logic: string [union, intersection]

40 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Properties Selection for a Workflow Human Task
Request Workflow Stage Info Selected Properties for a
•Page Fragments Title: string Human Task
•Page Fragment Files Selection
Criteria: string

Display Properties
Selection Criteria
Request
Node Type
Modifiable Properties
Selection Criteria
Properties

Page
Required Properties
Selection Criteria
Fragments Workflow
Properties Stage
Properties
Validations Selection
Criteria Selection
Criteria
•Allow Validation Errors: boolean
•Final Approval: boolean

41 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Properties Selection Logic for Workflow Human Task
For each page fragment file selected by the page fragment file
selection filter (specified in web.xml file)
If the page fragment file name is selected by the Page
Fragment Files Selection Criteria specified by the Stage
Metadata for the human task (specified in workflow bpel file)
For each Property specified in the page fragment file
If the Property belongs to the Node Type (specified in
DRM)
Apply the Properties Selection Criteria specified by the
Stage Metadata for the human task (specified in
workflow bpel file)
The Selected Property

42 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework
Request App Implementation
Request App Stage Metadata
• Subset of workflow Stage Metadata
• Specified in a configuration file:
stageConfig.properties
• Two main Stages:
– Navigation Stage (STAGE_NAVIGATION): Used to configure
properties to be displayed for the selected node in the
hierarchy tree
— This stage is not part of Request processing
– Request Stage (STAGE_REQUEST): The properties and
validations for the initial Request processing Stage
— The only Request processing Stage that is outside of any
workflow

43 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Stage Metadata Framework:
Request Processing Task Flow Implementation
Workflow human task Stage Metadata
• Specified as an input parameter to each human task
• Request Processing Task Flow Application gets the Stage
Metadata as input

44 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Training Day 2
Agenda
• Finish WDK build and deployment
• Run end-to-end Add Account scenario
• Hands-on Lab 1: Customize WDK for a new Node Type
• Hands-on Lab 2: Customize WDK for a new Node Action

45 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Prerequisites Verification
• Verify DRM connectivity
– DRM is installed and is working properly
— Log into DRM (as admin)
http://localhost/drm-web-client/
– DRM Web Service is installed and is working properly
— Access the following URL via an Internet browser
http://localhost:8001/DrmWebService/DrmWebServiceSoa
pHttpPort?WSDL
– Verify DRM API Adapter connectivity
— Access the following URL via an Internet browser
http://localhost:5240/Oracle/Drm/APIAdapter?wsdl
• Verify SOA Server status
– Log into the Oracle Enterprise Manager (as weblogic)
http://localhost:7001/em

46 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Prerequisites Verification (cont.)
• Verify SOA Demo User Community is seeded in SOA Suite
and BPM Worklist is working properly
– Log into Worklist (as jcooper)
http://localhost:8001/integration/worklistapp/faces/log
in.jspx

• Create JDeveloper Connection to external SOA Server

47 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Seed Sample Data: Metadata
WDK Documentation reference
• Section 4.3: Importing WDK Sample Data

Seed sample metadata


• Use DRM Migration Utility to load metadata data into DRM
• Log into Migration Utility: http://localhost/drm-migration-
client/
• Select Load option
• Select file: WDK-11_1_2-ApplicationTemplate.xml
• Select all objects
• Select default options
• Run the Load operation
• Verify: WDK Import Import is created in DRM

48 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Seed Sample Data: Master Data
Seed sample master data
• Use DRM Import to import master data in DRM
• Log in DRM: http://localhost/drm-web-client/
• Click on the Import option (on the left) and double click on
WDK Import to open the Import, view its definition and run it
• Select file: WDK-11_1_2-SampleData.txt
• Run the Import with default options
• Verify: WDK Import Version is created in DRM
• Important: Save the WDK Import Version

49 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
DRM Server Location
Configure WDK for DRM Server location used for invoking
• DRM Service Library API (by Request workflows)
• DRM Web Service API (by Request App and Task Flow)
• Fix in one place to avoid configuring all places where DRM
APIs are invoked
• Throughout WDK, DRM Server location is consistently
referenced in all configurations as drmServer
• Modify the hosts file located in the following directory
C:\WINDOWS\system32\drivers\etc
• Add drmServer entry to point to the DRM Server location
• E.g. 127.0.0.1 drmServer

50 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Workflows & Task Flow Application
WDK Documentation reference
• Section 4.4: WDK Deployment

Request Workflows
• DRM Web Service invocation – not required if drmServer
is set in the hosts file
• SOAP Header fields in BPEL files: serverUrl,
sessionParams, username and password
• Request Approval workflow invocation
• DrmRequestApprovalProcess.wsdl: the port
address located in the service element (at the bottom of
the WSDL file)
• Build & Deploy

51 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Workflows & Task Flow Application (cont.)
Request Processing Task Flow Application
• DRM Service Library invocation – not required if
drmServer is set in the hosts file
• Modify web.xml: DrmApiAdapterUrl
• Modify drmCredentials.properties: drmUsername
and drmPassword
• Build & Deploy

52 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Request Application
Request Application
• DRM Service Library invocation – not required if
drmServer is set in the hosts file
• Modify web.xml: DrmApiAdapterUrl
• Modify drmCredentials.properties: drmUsername
and drmPassword
• Request Workflow Selection process invocation
• Modify web.xml: WorkflowUrl
• Build & Deploy

53 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
WDK Deployment Verification
• Verify WDK is deployed and is working properly
– Log into the Request App (as wfaulk)
– Create a Request to add a new Account and submit it for
workflow processing
– Log into as jcooper and approve the Request
– Log into a jstein, claim the human task and approve it
– Log into DRM and verify the new Account is created and the
new Request is approved

54 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Labs: Preparation
Set up Training Directory
• Create a new directory for WDK training customizations
– Create a new directory
— DrmWdk-Training
– Copy DrmWdk directory from WDK installation to DrmWdk-
Training directory
– In JDeveloper
— Close the WDK Workflows application
— Close the WDK Request application
— Open Workflows application from the newly created DrmWdk-
Training directory
— Open the Request application from the newly created DrmWdk-
Training directory

55 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Labs: Preparation
Seed Sample Data: Metadata
Seed sample metadata
• Ensure the WDK metadata, that ships with WDK
installation, is already loaded into DRM
• Use DRM Migration Utility to load metadata data into DRM
• Log in Migration Utility: http://localhost/drm-migration-
client/
• Select Load option
• Select file: WDK-11_1_2-Training-ApplicationTemplate.xml
• Select all objects
• Select default options
• Run
• Verify: WDK Training Import is created in DRM

56 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
WDK Build and Deployment
Seed Sample Data: Master Data
Seed sample master data
• Use DRM Import to import master data in DRM
• Log in DRM: http://localhost/drm-web-client/
• Click on the Import option (on the left) and double click on
the WDK Training Import
• Select file: WDK-11_1_2-Training-Employees.txt
• Run the Import with default options
• Verify: WDK Training Version is created in DRM
– Open the WDK Training Version
– Navigate to the HR->Employees Hierarchy
– Assign the Employee hierarchy as the Controlling Hierarchy
for the Cost Center Global Property
– Important: Save the WDK Training Version

57 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Customize WDK for a New Node
Type – Objectives
After completing this hands-on lab, you should be able to:
• Configure the Request App to use the new Node Type
– Use the Stage Metadata properties file to configure the
Request Stage for the new Node Type
– Use the Stage Metadata properties file to configure the
Request Causes used for Request processing
• Configure workflow human tasks to use the new Node
Type using the Stage Metadata
– Configure the Stage Metadata for the new Node Type and
use it as the input to Human Task
• Configure the task flow application for processing the new
Node Type
– Create new page fragment files to display the new Node
Type Properties

58 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Customize WDK for a New Node
Type – Objectives (cont.)
After completing this hands-on lab, you should be able to
(cont.):
• Configure the Task Flow Application for processing the
new Node Type (cont.)
– Enable display of All Stage Metadata passed to the Human
Task (useful for troubleshooting)
• Build, deploy and test a business scenario, end-to-end, to
support a new Node Type in the following order:
– Request Application -> Workflows -> BPM Worklist ->
Request Processing Task Flow Application -> DRM

59 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Request App
• Configure Stage Metadata in the
stageConfig.properties file located in
ViewController project (in Web Content -> WEB-
INF folder)
– Refer to the WDK-11_1_2-Training-
StageMetadataSpec.txt file for the Stage Metadata
specifications for different Stages
– Configure the Display Properties for the selected Node and
parent Node in the tree view
— Add the Properties to the Navigation Stage
— STAGE_NAVIGATION and
— STAGE_NAVIGATION_PARENT_NODE
— Ensure the Properties are specified for both HR-Limb and HR-
Leaf Node Types

60 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Request App (cont.)
• Configure Stage Metadata in the
stageConfig.properties file (cont.)
– Create a set of Stage Metadata configuration properties for
each Node Type – HR-Limb and HR-Leaf (cont.)
— For training purpose, configure only for Update Node Request
Type (NODE_UPDATE)
— Shortcut
— Copy existing set of configuration properties
— Modify them
– Configure the Request Causes for each Node Type
— Node Types: HR-Limb and HR-Leaf
— Request Cause = HR_UPDATE
— Request Cause Display Name = HR Update

61 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Request App (cont.)
• Modify page fragment files to include Properties for each
Node Type
– Identify the data type for each Property
– Make modifications to one file and copy them to the other
files and change the backing bean name
— Modify nodeDetail.jspx
— Modify popupNodeDetail.jsff
— Modify selectNode.jspx
— Modify selectNodeTarget.jspx
– Shortcut
— Copy existing Property configurations – Make Sure the UI
control type for each Property matches with its data type (e.g.
inputText for a string, selectBooleanCheckbox for a
boolean, etc.)
— Modify them

62 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Request App Testing
• Log into Request App
• Select the WDK Training Version
• Navigate the Hierarchy
• Click on the Limb and Leaf Nodes
– Verify: Appropriate HR Properties are displayed on the right
pane as per the Stage Metadata configurations
• Click on the Update Node button
– Verify: appropriate HR Properties are displayed as per the
Stage Metadata configurations
– Verify: the Request Cause list box has a single Entry:
HR Update

63 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Task Flow App
• Configure jsff File(s) to display the new Node Type
Properties
• All jsff file are located in the Web Content folder in
DrmRequestProcessingTaskFlow Project
• Two options
– Add Properties for the new Node Type to the existing jsff file
that contains all Properties
— Modify the propsTemplate.jsff file that contains the
superset of all DRM Properties
— This File is also used by the Approval Workflow
— Shortcut
— Copy existing Property configurations – Make sure the UI control
type for each Property matches with its data type (e.g. inputText
for a string, selectBooleanCheckbox for a boolean, etc.)
— Modify them

64 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Task Flow App
• Two Options (cont.)
– Create New jsff files for the new Node Type Properties
— hrProps.jsff
— contactProps.jsff
— Shortcut
— Copy existing jsff files
— Modify them
– Conditionally include the new jsff files
— Create <if> – <include> section in nodeDetail.jsff file
for each new jsff file
— Shortcut
Copy an existing <if> – <include> section
Modify it
• Save All, Build and Deploy

65 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Workflow Selection Process
• Configure DrmRequestWorkflowSelection process
– Modify the condition that selects the Update Node Workflow
(DrmRequestUpdateNode)
— Existing condition (pseudo-code):
If (Request Type = ‘NODE_UPDATE’) and
(Request Cause = ‘ERP_UPDATE’)
workflow = DrmRequestUpdateNode
— New condition (pseudo-code):
If (Request Type = ‘NODE_UPDATE’) and
((Request Cause = ‘ERP_UPDATE’) or
(Request Cause = ‘HR_UPDATE’) )
workflow = DrmRequestUpdateNode
• Save All, Build and Deploy

66 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Human Tasks
• Configure the Stage Metadata for all Human Tasks in the
workflows that process the Requests for the new Node
Type
• Ideally, create new workflows to process the Requests for
the new Node Type and configure the Stage Metadata for
all Human Tasks included in the workflows
• For the training, modify only the Update Node Workflow
(DrmRequestUpdateNode)
– Detect the Request containing the new Node Type
— Two options
— Request Content Type = HR-Limb or HR-Leaf (preferred option)
— Request Cause = HR_UPDATE

67 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
Configure Human Tasks (cont.)
• For the training, modify only the Update Node workflow
(DrmRequestUpdateNode) (cont.)
– Conditionally assign different Stage Metadata
— Leave the existing Stage Metadata assignment unchanged
— Refer to the WDK-11_1_2-Training-
StageMetadataSpec.txt file for the Stage Metadata
specifications for different Stages
— Ensure the appropriate Page Fragment File Names are used as
specified in the Task Flow configuration (see earlier slides)
– Save All, Build and Deploy

68 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
End-To-End Testing
• Create a Request and submit it for workflow processing
– Log into Request App
– Select the WDK Training Version
– Select a Node and click on the Update Node button
– Create a Request and submit it for workflow processing
• Test Workflows and the Human Tasks
– Log into Worklist as jcooper
– Verify: a new Human Task instance has been created for the
new Node Type
– Click on the Human Task instance
— Verify: Appropriate HR Properties are displayed as per the
Stage Metadata configurations
— Note the two Property sections displayed for the HR Properties
correspond to two Page Fragment Files

69 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 1: Support a New Node Type
End-To-End Testing (cont.)
• Test workflows and the human tasks (cont.)
– Modify a Property value and add a comment
– Click on the Approve button
– Log out of the Worklist and log back in as jstein
– Verify: a new human task instance has been created for the
new Node Type
– Click on the Human Task instance
— Verify: appropriate HR Properties are displayed as per the
Stage Metadata configuration
— Note a single Property section is displayed for all HR Properties
— Note only the previously modified Properties are displayed and could
be overridden

70 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Objectives
After completing this hands-on lab, you should be able to:
• Add a new Node action (Inactive Node) to Request App
– Make UI changes
– Make Request processing changes
• Create a new workflow for processing the new Node
Action
– Invoke DRM Web Service
— Retrieve DRM Request from DRM
— Set/Update DRM Request headers
– Add a human task for (first-level) Request approval
— Create a human task and configure it
— Configure the human behavior using Stage Metadata

71 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Objectives (cont.)
After completing this Hands-on Lab, you should be able to
(cont.):
• Invoke a workflow from another
– Invoke the Request Approval workflow (for second-level
approval) from the new workflow
• Configure the workflow selection logic to invoke the new
workflow
– Configure Request Workflow Selection process to implement
conditional invocation of the new workflow
• Test and troubleshoot workflows using Oracle Enterprise
Manager

72 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Objectives (cont.)
After completing this Hands-on Lab, you should be able to
(cont.):
• Build, deploy and test a business scenario, end-to-end, to
support a new Node action in the following order:
– Request Application -> Multiple Request Workflows -> BPM
Worklist -> Request Processing Task Flow Application ->
DRM Service Library -> DRM

73 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Java Code Modifications
• Functional code modifications
– UI processing code
— Button to invoke the new action
– Code that uses Request processing DRM API
— Create a Request with appropriate Request item
— Identify the Request Type based on Request item

• Code location
– Core code shared by both Request Application and Request
Processing Task Flow Application (DrmWdkCore)
– Request Application (ViewController)
– Request Processing Task Flow Application
(DrmWdkViewCommon)

74 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
DrmWdkCore Modifications
• Modify the
com.oracle.drm.wdk.core.RequestAction class
– Add a new enumeration constant for the new node action
— NODE_INACTIVATE
• Create a new NodeAction class for the new Node Action
– com.oracle.drm.wdk.core.NodeActionInactivate
— Shortcut
— Copy an existing NodeAction class
— Modify it

75 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
DrmWdkCore Modifications (cont.)
• Modify the
com.oracle.drm.wdk.core.AbstractNodeAction
class
– Add isInactivateAction convenience method
— Shortcut
— Copy an existing is<ActionName>Action method
— Modify it
• Modify the
com.oracle.drm.wdk.core.RequestUtil class
– Add createNodeInactivateRequestItem method for
creating Inactivate Node Request Item
— Shortcut
— Copy an existing createNode<ActionName>RequestItem
method
— Modify it

76 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
DrmWdkCore Modifications (cont.)
• Modify the
com.oracle.drm.wdk.core.RequestUtil class
(cont.)
– Modify getNodeActionRequestItem method for
supporting the new Node action
— Add NodeInactivateRequestItemType to the if condition

77 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Request App (ViewController) Modifications
• Modify the
com.oracle.drm.wdk.view.backing.NodeDetail
class
– Modify the submit method
— Add an else if clause to support the new Node action
— Shortcut
— Copy an Existing else if clause
— Modify it
– Add getCanInactivateNode method
— Shortcut
— Copy an existing else if clause
— Modify it
— For the training purpose, assume only a Leaf Node can be
inactivated

78 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Request App (ViewController) Mods. (cont.)
• Modify
com.oracle.drm.wdk.view.backing.SelectNode
class
– Add doInactivateNode method to support the new Node
action
— Shortcut
— Copy an existing do<ActionName>Node method
— Modify it – Ensure “props” is returned for correct page flow
– Add getCanInactivateNode method
— Shortcut
— Copy an existing getCan<ActionName>Node method
— Modify it
— For the training purpose, assume only a Leaf Node can be
inactivated

79 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Request App (ViewController) Mods. (cont.)
• Modify selectNode.jspx form (located in the Web
Content folder)
– Add Inactivate Node button and associate it with
doInactivateNode and getCanInactivateNode
methods added to the SelectNode class
– Shortcut
— Search and copy a definition of an existing Node Action button
— Modify it

80 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Request App (ViewController) Mods. (cont.)
• Modify the
com.oracle.drm.wdk.view.backing.NodeRendere
r class
– Make the appropriate changes to handle UI display for the
new Node action
— Shortcut
— Search for actionType (of type RequestType) and make the
appropriate modifications
— E.g. In the updateComponentNodeName method, if actionType
is not NODE_ADD_ENRICH, Node Name field is made read-Only
— For the training purpose, don’t make any changes

81 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Request App stageConfig.properties Mods.
• Modify the stageConfig.propeties configuration file
– Add Stage Metadata configuration properties to configure the
display form
— Show selected Properties
— No Modifiable Properties – Make all Properties read-only
— No Required Properties
— No Validations
— Shortcut
— Copy existing set of configuration Properties from another Node
Action
— Modify them

82 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Request App – Build, Deploy & Test
• Build the Request Application
• Deploy the Request Application
• Test the Request Application
– Use UI to create the Inactivate Node Request
– Ensure the Request contains the appropriate Request Item
— Verify the Request using DRM Audit UI

83 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Task Flow App (DrmWdkViewCommon) Mods.
• Modify the com.oracle.drm.wdk.app.DrmClient
class
– Modify the createNodeActionFromRequest method
— Add else if clause to support the new Node Action
— Shortcut
— Copy an existing else if clause
— Modify it

84 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Task Flow App (DrmWdkViewCommon) Mods.
• Modify
com.oracle.drm.wdk.view.backing.NodeRendere
r class (very similar to Request Application)
– Make the appropriate changes to handle UI display for the
new Node Action
— Shortcut
— Search for actionType (of type RequestType) and make the
appropriate modifications
— E.g. In the updateComponentNodeName method, if actionType
is not NODE_ADD_ENRICH, Node Name field is made read-only
— For the training purpose, don’t make any changes

85 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Task Flow App Configuration Modifications
• Register Request Processing Task Flow Application for the
human task Included in the new workflow
– Open DrmRequestProcessingTaskFlow project
– Modify the hwtaskflow.xml file (located in the
Application Resources folder)
— Add a task flow for the new human task
— Shortcut
Copy an existing task flow
Modify it

86 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Task Flow App Configuration Mods. (cont.)
• Register Request Processing Task Flow Application for the
human task Included in the New workflow (cont.)
– Modify the DataControls.dcx file (located in the
Application Resources->com.oracle.drm->wdk-
>wf folder) – Optional
— Add XSD data control
— Shortcut
Copy an existing XSD data control
Modify it

87 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Task Flow App – Build & Deploy
• Build the Request Processing Task Flow Application
• Deploy the Request Processing Task Flow Application
• Defer testing until the workflow processing for Inactivate
Node action is implemented

88 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Add New Workflow
Add a new workflow to process the new node action
• Create a new JDeveloper project
– Create a new workflow
• Invoke DRM Web Service
– Update DRM Request headers
• Add and configure a human task
– First-level approval
• Configure Stage Metadata for the human task
– Configure DRM Properties to be displayed
• Invoke the Request Approval workflow
– Second-level approval

89 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action
Add New Workflow
• Create a workflow
– Create a new JDeveloper project
— SOA Project
— Name: DrmRequestInactivateNode
— Composite Name: DrmRequestInactivateNodeComposite
— Composite Template: Composite With BPEL
— Create a New BPEL Process
— Name: DrmRequestInactivateNodeProcess
— Namespace:
http://xmlns.oracle.com/drm/wdk/wf/RequestInactiva
teNodeProcess
— Template: Asynchronous BPEL Process

90 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Create a JDeveloper project (cont.)
— Create a BPEL process (cont.)
— Input (cont.)
Type Chooser->Import Schema File:
DrmRequestWorkflowTypes.xsd
Check Copy to Project
Check Maintain original directory structure for
imported files
Type Chooser:
Type Explorer ->Project Schema Files->
DrmRequestWorkflowTypes.xsd->
requestWorkflowInput

91 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Create a JDeveloper project (cont.)
— Create a BPEL process (cont.)
— Output
Type Chooser:
Type Explorer ->Project Schema Files->
DrmRequestWorkflowTypes.xsd->
requestWorkflowResponse
— Save All

92 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Modify WSDL File
— Add a binding element for the Process Port Type
— Add a binding element for the Callback Port Type
— Add a service element for the process
— Shortcut
— Copy binding elements from another WDK workflow
— Copy service element from another WDK workflow
— Save All

93 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Invoke DRM Web Service
— Create a Partner Link
— Name: automatically populated when WSDL is selected
— WSDL URL
SOA Resource Lookup
DrmWebService.wsdl
Check Maintain original directory structure
for imported files
— Partner Role: DrmWebServiceProvider
— Save All

94 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Invoke DRM Web Service (cont.)
— Create DRM Web Service invocation
— Shortcut
Copy and paste from another WDK workflow
Namespaces
Variables
Activities
— Set Request External Status (externalStatus):
PENDING_INACTIVATE_NODE_APPROVAL
— Set Display Properties Selection Criteria
(displayPropsSelCriteria): Display all Properties
— Set Modifiable Properties Selection Criteria
(modifiablePropsSelCriteria): Make all Properties read-only
— Modify Partner Link Type (partnerLinkType) namespace prefix
for DRM Web Service
— Save All and rebuild

95 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Invoke DRM Web Service (cont.)
— Test DRM Web Service invocation
— Comment out the Request Update invocation
— Save All
— Rebuild
— Deploy
— Verify deployment
— Get a valid Request ID from DRM
If Requests don’t exist in DRM:
Create a new Request using WDK Request App
— Test using Oracle Enterprise Manager
Use the valid Request ID

96 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task
— First-level approval
— Create new variable for human task input
— Shortcut
Copy variable from another WDK workflow
Modify variable name:
DrmRequestInactivateNodeHumanTask_1_globalVariable
— Drag and drop a human task
— Create new task definition
— Name: DrmRequestInactivateNodeHumanTask
— Namespace:
http://xmlns.oracle.com/drm/wdk/wf/RequestInactiva
teNode/RequestInactivateNodeHumanTask
— Title: leave it empty (will set it later dynamically using XPath)

97 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Create new task definition (cont.)
— Parameters
Add parameter
Source: Variables
Variables->Process->Variables->
DrmRequestInactivateNodeHumanTask_1_globalVariable
Element: Type Chooser
Type Explorer->Project Schema Files->
DrmRequestWorkflowTypes.xsd->
requestWorkflowHumanTaskInput

98 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Configure the human task
— Title
Shortcut
Copy XPath from another WDK workflow task definition
Modify Fixed Text to Include “Inactivate Node”
— Assignment
Stage: INACTIVATE_NODE_APPROVAL
Participant
Type: Single
Label: INACTIVATE_NODE_APPROVAL.APPROVER
Add User
Application Sever: <SOA Server name>
Realm: jazn.com
User: jcooper

99 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.


DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Configure the human task input – Stage Metadata
— Shortcut
Copy from another WDK workflow
Variable
Activities
Modify Stage Metadata

100 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Configure the human task input – Stage Metadata (cont.)
— Modify the assign activity:
Assign_requestWfHumanTaskInputVariable

<!-- Stage name -->


<copy>
<from expression="'INACTIVATE_NODE_APPROVAL'"/>
<to variable="requestWfHumanTaskInputVariable"

query="/rwfty:requestWorkflowHumanTaskInput/rwfty:requestWorkflowStageMetadata/rwfty:stageN
ame"/>
</copy>

101 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Configure the human task input – Stage Metadata (cont.)
— Modify the assign activity:
Assign_requestWfHumanTaskInputVariable

<!-- Page fragments title -->


<copy>
<from variable="inputVariable" part="payload"
query="/rwfty:requestWorkflowInput/rwfty:requestContentType"/>
<to variable="requestWfHumanTaskInputVariable"

query="/rwfty:requestWorkflowHumanTaskInput/rwfty:requestWorkflowStageMetadata/rwfty:pageFr
agmentsTitle"/>
</copy>

102 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Configure the human task input – Stage Metadata (cont.)
— Modify the assign activity:
Assign_requestWfHumanTaskInputVariable

<!-- Page fragment files -->


<copy>
<from expression="'propsTemplate.jsff'"/>
<to variable="requestWfHumanTaskInputVariable"

query="/rwfty:requestWorkflowHumanTaskInput/rwfty:requestWorkflowStageMetadata/rwfty:pageFr
agmentFilesSelCriteria/rwfty:criteria"/>
</copy>

103 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Configure the human task input – Stage Metadata (cont.)
— Modify the assign activity:
Assign_requestWfHumanTaskInputVariable

<!-- Display properties selection criteria: Categories -->


<copy>
<from expression="'System'"/>
<to variable="requestWfHumanTaskInputVariable"

query="/rwfty:requestWorkflowHumanTaskInput/rwfty:requestWorkflowStageMetadata/rwfty:displa
yPropsSelCriteria/rwfty:propCategoriesSelCriteria/rwfty:criteria"/>
</copy>

104 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Configure the human task input – Stage Metadata (cont.)
— Modify the assign activity:
Assign_requestWfHumanTaskInputVariable

<!-- Modifiable properties selection criteria: Properties -->


<copy>
<from expression="'.*'"/>
<to variable="requestWfHumanTaskInputVariable"

query="/rwfty:requestWorkflowHumanTaskInput/rwfty:requestWorkflowStageMetadata/rwfty:modifi
ablePropsSelCriteria/rwfty:propsSelCriteria/rwfty:criteria"/>
</copy>
<copy>
<from expression="'regex'"/>
<to variable="requestWfHumanTaskInputVariable"

query="/rwfty:requestWorkflowHumanTaskInput/rwfty:requestWorkflowStageMetadata/rwfty:modifi
ablePropsSelCriteria/rwfty:propsSelCriteria/@typ"/>
</copy>

105 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Add a human task (cont.)
— Modify post processing
— Set workflow output variable – Prepare Response
— Modify the conditional processing within switch activity
Remove all processing for all cases
Look at another WDK workflow (will add the Request Approval
workflow invocation later for the APPROVE case)
– Save All and rebuild
– Deploy
– Test
— Use the same Request ID
— Verify: human task should display the appropriate Properties in
read-only state as per the Stage Metadata configuration

106 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Invoke the Request Approval workflow
— Second-level approval
— Create a Partner Link for the workflow invocation
— Name: automatically populated when WSDL is selected
— WSDL URL
SOA Resource Lookup
DrmRequestApprovalProcess.wsdl
Check Maintain original directory structure
for imported files
Uncheck Rename duplicate files
— Partner Role: DrmRequestApprovalProcessProvider
— My Role: DrmRequestApprovalProcessRequester
— Save All

107 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Add New Workflow (cont.)
• Create a workflow (cont.)
– Invoke the Request Approval workflow (cont.)
— Shortcut
— Copy and paste from another WDK workflow
Namespaces
Variables
Activities: In the APPROVE branch
— Save All and rebuild

108 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Configure Request Workflow Selection
• Configure the Request Workflow Selection process to
invoke the new workflow
– Open DrmRequestWorkflowSelectionProcess.bpel
– Create a Partner Link for the workflow invocation
— Name: automatically populated when WSDL is selected
— WSDL URL
SOA Resource Lookup
DrmRequestInactivateNodeProcess.wsdl
Check Maintain original directory structure
for imported files
Uncheck Rename duplicate files
— Partner Role:
DrmRequestInactivateNodeProcessProvider
— My Role: DrmRequestInactivateNodeProcessRequester
— Save All

109 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Configure Request Workflow Selection (cont.)
• Configure the Request Workflow Selection process to
invoke the new workflow (cont.)
– Rename the auto-generated namespace prefix for the new
workflow
– Add a conditional invocation of the workflow
— Create input and output variables for the new workflow
invocation
— Shortcut
Copy a set of existing input and output variables
Modify them
— Create a conditional invocation of the new workflow
— Shortcut
Copy an existing case clause
Modify it

110 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Hands-on Lab 2: Add New Node Action (cont.)
Testing
• Log into Request App as wfaulk
• Click on a leaf node and click Inactivate Node
• Fill out DRM Properties to create a DRM Request
• Submit the Request for workflow processing
• Log into BPM Worklist as jcooper
• Approve the Request
• Log into BPM Worklist as jstein
• Approve the Request
• Log into DRM web client and ensure the selected node
has been inactivated

111 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Resources

• DRM 11.1.2 WDK


http://www.oracle.com/technology/software/products/bi/perf
ormance-
management/1112/hyperion_data_relationship_1112.html
• DRM 11.1.2 WDK Support
http://forums.oracle.com/forums/forum.jspa?forumID=474
• Data Relationship Management 11.1.2 User’s Guide
http://download.oracle.com/docs/cd/E17236_01/epm.1112/drm_
user.pdf
• Data Relationship Management Web Service 11.1.2 API
Documentation
http://download.oracle.com/docs/cd/E17236_01/epm.1112/drm_
api.pdf

112 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
localhost URLs

• DRM WDK Request App


http://localhost:8001/DrmWdkRequestApp
• DRM Web Client
http://localhost/drm-web-client/
• DRM Migration Utility (Metadata Load and Extract)
http://localhost/drm-migration-client/
• DRM API Adapter WSDL
http://localhost:5240/Oracle/Drm/APIAdapter?wsdl
• Oracle Enterprise Manager (EM)
http://localhost:7001/em
• WebLogic Administration Console
http://localhost:7001/console

113 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
localhost URLs (cont.)

• BPM Worklist
http://localhost:8001/integration/worklistapp/faces/login.
jspx
• SOA Demo User Community: Seed and Unseed
http://localhost:8001/integration/SOADemoCommunity/DemoCom
munitySeedServlet

114 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Resources (cont.)

• Oracle SOA Suite (including download and Installation


Guide)
http://www.oracle.com/technology/products/soa/soasuite/col
lateral/documentation.html
• Oracle SOA Samples
http://www.oracle.com/technology/sample_code/products/soa/
index.html
• Oracle Human Workflow (including documentation and
samples)
http://www.oracle.com/technology/products/soa/hw/index.htm
l
• Oracle BPM Worklist
http://download.oracle.com/docs/cd/E12839_01/integration.1
111/e10224/bp_worklist.htm

115 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.
DRM 11.1.2 WDK
Resources (cont.)

• Oracle Enterprise Manager Documentation


http://www.oracle.com/technology/documentation/oem.html
• Oracle JDeveloper Tutorials (including SOA Composite
Application)
http://www.oracle.com/technology/products/jdev/11/cuecards
111/index.html
• Tutorial for Building a Sample Application with Oracle SOA
Suite
http://download.oracle.com/docs/cd/E12839_01/integration.1
111/e10223/tutorial_build.htm

116 Copyright © 2010, Oracle and/or its affiliates. All rights reserved.

You might also like