Академический Документы
Профессиональный Документы
Культура Документы
Oracle Workflow
Sunil Dev
Oracle GSD India
Oracle Workflow
• Oracle Workflow automates and streamlines business
processes contained within and outside of Oracle
Applications
• For example:
• Add personalized trading partner rules
• Validate self-service transactions
• Closed loop business intelligence
• Approve standard business documents
• Step through daily transaction flows
• Software implementation process
No Yes
Verify Authority Approve Re quisition Notify Re questor of End (Approve d)
Approva l
Approved
True
Re c ord Requisition
Forward Re je cte d
Sta rt Select Approve r True And Notify Approver Re je ct Requisition Notify Re questor of End (Re je c te d)
Re je ction
Notify Reque stor of
False Forward
• Looping
• Results-based
branching
• Parallel flows
• Rendezvous
Rule-Based Workflow Engine
• Voting
• Time-outs
• Escalation
• Automatic forwarding
• Sub-processes
• Unlimited hierarchy of sub-
processes
Rule-Based Workflow Engine
• Error processing
• Centralize process for error handling
• Administrator can fix and restart a process
• Effective version
• Multiple versions of a process can be active at the
same time
• Implement new practices without affecting active work
items
Rule-Based Workflow Engine
• Complete programmatic extensibility
• Express any complex business rule as a PL/SQL activity, and
allow Oracle Workflow to branch on the result
• Write custom code as a PL/SQL activity and have the workflow
engine execute your code
• PL/SQL API available for all engine operations
• Communicate with the workflow engine via any application
capable of making a remote procedure call to an Oracle server
Electronic Notifications
• Automatically Notify Users
• Alert users of exception conditions
• Respond to events that require human judgement
Internet-Enabled
• Use standard Web browser to review and respond
• Access from Self-Service / Business Intelligence home page
• Allows drill-down to any URL or Applications screen to research or
complete transaction
E-mail
• Standard Mail Protocols:
(Oracle Internet Messaging, MAPI, UNIX Sendmail)
• Detail and summary formats
• Template and direct response
• Plain text or HTML email
Notification System
Oracle Notification
Worklist
InterOffice
Developer 2000
Client
Various
Notifications
Mail SMTP
Applications
Notification
Worklist
• Lotus Notes
MAPI Web Client
• MS Exchange
• Oracle InterOffice
• Unix Sendmail
• Others
Respond Definition
Web Oracle
Process Application Forward Administration Workflow
Monitor Server Loader
Cancel Monitoring
Web
Analysis Query Query
Tools Workflow
Definition
Files
Mail
Applications Notification Oracle Workflow Enabled Application
Mailer
Data Model
Workflow Datamodel
WF_ITEM_TYPES
defined in Oracle
WF_ITEM_ATTRIBUTES Applications
} WF_ACTIVITIES
WF_MESSAGES
WF_LOOKUP_TYPES_TL
Item Type Properties
WF_ITEM_TYPES
NAME
PERSISTENCE_TYPE
PERSITIENCE_DAYS
WF_SELECTOR
Item Attribute Properties
WF_ITEM_ATTRIBUTES
NAME
TYPE
FORMAT
TEXT_DEFAULT…
Events
WF_ACTIVITIES
TYPE = ' EVENT'
DIRECTION
EVENT_NAME
COST
Processes – Activity Tab
WF_ACTIVITIES
TYPE = ' PROCESS'
RUNNABLE_FLAG
RESULT_TYPE
Processes – Details Tab
WF_ACTIVITIES
ERROR_ITEM_TYPE
ERROR_PROCESS
RERUN
VERSION
Functions – Activity Tab
WF_ACTIVITIES
TYPE = ‘FUNCTION’
FUNCTION_NAME
FUNCTION_TYPE
RESULT_TYPE
COST
Notifications – Activity Tab
WF_ACTIVITIES
TYPE = ‘NOTICE’
FUCNTION_NAME
RESULT_TYPE
MESSAGE
Messages – Message Tab
WF_MESSAGES
DEFAULT_PRIORITY
1 = High
50 = Normal
99 = Low
Messages – Body Tab
WF_MESSAGES_TL
SUBJECT
BODY
HTML_BODY
Uses the Translation table
Messages – Result Tab
WF_MESSAGES_ATTRIBUTES
Result Lookup Type
Default Type
Constant
Item Attribute
Default Value
Lookup Types
WF_LOOKUP_TYPES_TL
LOOKUP_TYPE
Only a Translation table exists
Lookup Codes
WF_LOOKUPS_TL
LOOKUP_TYPE
LOOKUP_CODE
Sub-Element of Lookup Types
Sub-Element - Attributes
WF_ACTIVITY_ATTRIBUTES
Defines Attributes specifically used
for Event, Function and Notification
Activities
Copied to another table when used
within a Process
(WF_ACTIVITY_ATTR_VALUES)
WF_MESSAGE_ATTRIBUTES
Defines Attributes specifically used
for Messages
Copied to
WF_ACTIVITY_ATTRIBUTES
when Message is copied to a
Notification
Data Model – See Handout
(Default)
ATR WF_ITEM_ATTRIBUTES(TL) FK
PK ITEM_TYPE TYP TYP WF_ITEM_TYPES(TL) FK
PK NAME PK NAME
DISPLAY_NAME LTY WF_LOOKUP_TYPES_TL FK
DISPLAY_NAME PK LOOKUP_TYPE
TYPE WF_SELECTOR
DATE_DEFAULT PK LANGUAGE
PERSISTENCE_TYPE ITEM_TYPE TYP
NUMBER_DEFAULT PERSISTENCE_DAYS
TEXT_DEFAULT DISPLAY_NAME
DESCRIPTION
FORMAT
SEQUENCE
(Default)
MSG WF_MESSAGES(TL) FK
MAT WF_MESSAGE_ATTRIBUTES(TL) FK PK TYPE TYP LKC WF_LOOKUPS_TL FK
PK MESSAGE_TYPE MSG PK NAME PK LOOKUP_TYPE LTY
PK MESSAGE_NAME MSG DISPLAY_NAME PK LOOKUP_CODE
PK NAME PRIORITY PK LANGUAGE
DISPLAY_NAME SUBJECT MEANING
TYPE BODY
VALUE_TYPE HTML_BODY
DATE_DEFAULT
NUMBER_DEFAULT
TEXT_DEFAULT
FORMAT
SEQUENCE
Data Model and the Process Window
WF_ACTIVITY_TRANSITIONS
WF_PROCESS_ACTIVITIES
Process Activities
WF_PROCESS_ACTIVITIES
Created by dragging an Activity onto the Process Window
Copies the Information from WF_ACTIVITY_ATTRIBUTES to
WF_ACTIVITY_ATTR_VALUES
Assigns it an INSTANCE_ID
Label is needed to uniquely identify Activity
Version Information is recorded for the Process.
For Notifications, the Performer is assigned here
Activity Attribute Values
WF_ACTIVITY_ATTR_VALUES
Activity Transitions
WF_ACTIVITY_TRANSITIONS
Represented by the Flow Arrow from one Activity to
Another
The Arrow may have a Result Code
Allows Multiple Arrows from a single Activity
A Default May be tied to the Flow Arrow (*)
Three Key pieces of information needed for a transition
FROM_PROCESS_ACTIVITY – Instance Id
RESULT_CODE
TO_PROCESS_ACTIVITY – Instance Id
Data Model
PRC WF_PROCESS_ACTIVITIES FK
AAV WF_ACTIVITY_ATTR_VALUES FK PK INSTANCE_ID
PK PROCESS_ACTIVITY_ID ACT INSTANCE_LABEL
PK NAME AAT PROCESS_ITEM_TYPE ACT
VALUE_TYPE PROCESS_NAME ACT
DATE_DEFAULT PROCESS_VERSION ACT
NUMBER_DEFAULT ACTIVITY_ITEM_TYPE ACT1
TEXT_DEFAULT ACTIVITY_NAME ACT1
START_END
DEFAULT_RESULT
PERFORM_ROLE
ACT1
PRO1
PRO
ACT
AAT WF_ACTIVITY_ATTRIBUTES(TL) FK ACT WF_ACTIVITIES(TL) FK
TRN WF_ACTIVITY_TRANSITIONS FK
PK ACTIVITY_ITEM_TYPE ACT PK ITEM_TYPE TYP
PK FROM_PROCESS_ACTIVITY PRO
PK ACTIVITY_NAME ACT PK NAME
PK VERSION PK RESULT_CODE
PK ACTIVITY_VERSION ACT
PK TO_PROCESS_ACTIVITY PRO1
PK NAME FUNCTION_TYPE
DISPLAY_NAME DISPLAY_NAME
TYPE RUNNABLE_FLAG
VALUE_TYPE RESULT_TYPE
DATE_DEFAULT RERUN
NUMBER_DEFAULT COST
TEXT_DEFAULT FUNCTION
FORMAT MESSAGE MSG
SEQUENCE EVENT_NAME
DIRECTION
(Default)
ATR WF_ITEM_ATTRIBUTES(TL) FK
PK ITEM_TYPE TYP TYP WF_ITEM_TYPES(TL) FK
PK NAME PK NAME
DISPLAY_NAME LTY WF_LOOKUP_TYPES_TL FK
DISPLAY_NAME PK LOOKUP_TYPE
TYPE WF_SELECTOR
DATE_DEFAULT PK LANGUAGE
PERSISTENCE_TYPE ITEM_TYPE TYP
NUMBER_DEFAULT PERSISTENCE_DAYS
TEXT_DEFAULT DISPLAY_NAME
DESCRIPTION
FORMAT
SEQUENCE
(Default)
MSG WF_MESSAGES(TL) FK
MAT WF_MESSAGE_ATTRIBUTES(TL) FK PK TYPE TYP LKC WF_LOOKUPS_TL FK
PK MESSAGE_TYPE MSG PK NAME PK LOOKUP_TYPE LTY
PK MESSAGE_NAME MSG DISPLAY_NAME PK LOOKUP_CODE
PK NAME PRIORITY PK LANGUAGE
DISPLAY_NAME SUBJECT MEANING
TYPE BODY
VALUE_TYPE HTML_BODY
DATE_DEFAULT
NUMBER_DEFAULT
TEXT_DEFAULT
FORMAT
SEQUENCE
Adobe Acrobat
Document
Workflow Transaction Tables
1 row selected.
Item Attribute Values
WF_ITEM_ACTIVITY_STATUSES_H
Keeps a history of Activities that are re-visited when
processing an Item
Primary Key Index WF_ITEM_ACTIVITY_STATUSES_PK is violated
when revisiting an activity
ITEM_TYPE
ITEM_KEY
PROCESS_ACTIVITY
Notifications
WF_NOTIFICATIONS
NOTIFICATION_ID
GROUP_ID
MESSAGE_TYPE
MESSAGE_NAME
STATUS
ACCESS_KEY
MAIL_STATUS
PRIORITY
RESPONDER
CALLBACK
ORIGINAL_RECIPIENT
Data Model
STH WF_ITEM_ACTIVITY_STATUSES_H FK
PK ITEM_TYPE ITM
ITM WF_ITEMS FK PK ITEM_KEY ITM
PK ITEM_TYPE TYP PK PROCESS_ACTIVITY PRC
ATV WF_ITEM_ATTRIBUTE_VALUES FK PK ITEM_KEY ACTIVITY_STATUS
PK ITEM_TYPE ITM ROOT_ACTIVITY ACT ACTIVITY_RESULT_CODE
PK ITEM_KEY ITM ROOT_ACTIVITY_VERSION ACT ERROR_NAME
PK NAME ATR OWNER_ROLE ERROR_MESSAGE
TEXT_VALUE PARENT_ITEM_TYPE TYP ERROR_STACK
NUMBER_VALUE PARENT_ITEM_KEY ASSIGNED_USER
DATE_VALUE PARENT_CONTEXT NOTIFICATION_ID NOT
EVENT_VALUE BEGIN_DATE END_DATE
END_DATE BEGIN_DATE
USER_KEY OUTBOUND_QUEUE_ID
DUE_DATE
EXECUTION_TIME
STA WF_ITEM_ACTIVITY_STATUSES FK
PK ITEM_TYPE ITM
PK ITEM_KEY ITM
PK PROCESS_ACTIVITY PRC
ACTIVITY_STATUS
ACTIVITY_RESULT_CODE
ERROR_NAME
ERROR_MESSAGE
ERROR_STACK
ASSIGNED_USER
NOTIFICATION_ID NOT
END_DATE
BEGIN_DATE
OUTBOUND_QUEUE_ID
DUE_DATE
EXECUTION_TIME
NOT WF_NOTIFICATIONS FK
PK NOTIFICATION_ID
GROUP_ID
MESSAGE_TYPE TYP
MESSAGE_NAME MSG
RECIPIENT_ROLE ROL
STATUS
ACCESS_KEY
MAIL_STATUS
PRIORITY
BEGIN_DATE
END_DATE
DUE_DATE
RESPONDER
USER_COMMENT
CALLBACK
CONTEXT
ORIGINAL_RECIPIENT
FROM_USER
TO_USER
SUBJECT
Directory Services
URL WF_USER_ROLES FK
USER_NAME
USER_ORIG_SYSTEM
USER_ORIG_SYSTEM_ID
ROLE_NAME
ROLE_ORIG_SYSTEM
ROLE_ORIG_SYSTEM_ID
Tables Referenced
PER_ALL_PEOPLE_F
FND_USER
HZ_PARTIES
PARTY_TYPE = PERSON
PARTY_TYPE = PARTY_RELATIONSHIP
WF_LOCAL_USERS
WF_ROLES
Tables Referenced
WF_USERS
PER_POSITIONS
ENG_ECN_APPROVAL_LISTS
FND_RESPONSIBILITY_TL
GHR_GROUPBOXES
AMV_C_CHANNELS_TL
HZ_PARTIES for PARTY_TYPE=GROUP
WF_LOCAL_ROLES
WF_USER_ROLES
Tables Referenced
PER_POSITIONS – PER_ALL_PEOPLE_F
ENG_ECN_APPROVAL_LISTS – PER_ALL_PEOPLE_F
FND_RESPONSIBILITY_TL - FND_USER
GHR_GROUPBOXES - FND_USER
AMV_C_CHANNELS_TL - PER_ALL_PEOPLE_F
HZ_PARTIES – HZ_PARTY_RELATIONSHIPS
WF_LOCAL_ROLES
Scripts – Note: 183643.1
BDE_Wf_DEF.sql
Workflow Definition Script
Use in addition to the workflow definition file (.wft)
BDE_WF_ITEM.sql
Use for investigating a single instance of a process
Similar to wfstat.sql and wfstatus.sql
$FND_TOP/sql
wfch…sql scripts change the name of workflow elements
wfstat.sql – Internal names
wfstatus.sql – Display names
wfrefchk.sql – Checks the integrity of Primary Keys