Oracle Workflow
Oracle Workflow
Components
Oracle Workflow is a series of tools designed to facilitate the creation and management of business process models. Oracle Workflow is comprised of:
Workflow engine implements the workflow process definitions at runtime monitoring the states and coordinating the routing of process activities
The workflow engine is a database package containing procedures run on a schedule. The workflow engine recognizes activities meeting specific criteria and only operates on those activities. Through the use of standard APIs, background engines can be scheduled to target activities meeting other specified criteria, such as deferred and stuck status activities.
Components (Cont.)
Business Event System utilizes Oracle Advanced Queuing infrastructure to communicate information between systems
Employs agents watching for subscriptions to user-defined events Event information propagated across systems via queues using specified payload (defined data structure).
Workflow Monitor allows monitoring and administration of defined workflows via standard web browser capable of supporting Java Workflow Builder - graphical tool that facilitates the modeling of business processes with simple drag-and-drop operations
Model sophisticated business processes that include looping, branching, parallel processing, rendezvous, and more Choose transitional paths based on the result of stored procedures (PL/SQL or Java)
Integrate the business process with the supporting business application through the use of standard APIs
Visualize the stage of the business process that has been reached, and the path taken to get there Help with gathering metrics on the activities comprising the business process Receive and respond to notifications via email
Item Type classification of the components that comprise the workflow process definition Attributes property associated with a given item type that acts as a global variable that can be referenced or updated by any activity within a process or externally through the use of standard APIs
Functions defined by the PL/SQL or external program it calls, usually performing fully automated process steps Events a business event from the Business Event System Messages defines the information conveyed in a notification Lookup Types a static list of values that can be used by messages and activity attributes
Define an item type and an initial process using the Quick Start Wizard from the File menu
Item type attributes can be defined as types such as text, number, date, role, lookup . The value item can be used to set a default value for the attribute
Right click on the Lookup Types node and select New from the menu After the lookup type has been created, select the lookup type, right click, and select New Lookup Code from the menu
Right click on the message node and select New After creating the message, go to the Body tab and enter the text (or HTML) desired Attributes are referenced within the body by using & Attributes referenced in the body must also be dragged from the attribute node and dropped in the message
Drag and drop the message onto the Notification node to initiate creation of a notification based on a specific message
Organize the activities Draw transitions as required by the necessary organization of the activities by pressing down the right mouse button on the beginning point of the transition and dragging the mouse to the next step then releasing the mouse button
Double click on the notification activities to add the performer (recipient) on the Node tab Hovering over an activity will display important information about the activity
Verify the workflow process definition by pressing the blue check mark icon on the toolbar Save the workflow process definition to the database by pressing the yellow disk icon on the toolbar and entering the Workflow Administrator account information
Workflow Monitoring
The Workflow Monitor can be used to test a workflow process definition
Open web browser and enter address for workflow monitor <webagent>/wfa_html.home Login to Oracle Workflow as
The Launch Process window will appear, showing a listing of all executable item types Click the item type link for the item type to be launched
The Initiate Workflow page appears, listing item type attributes that can be initialized when the workflow is executed Press OK to execute the worklow
Once the workflow is executed, the Activities List page is automatically displayed
Clicking on the activity link WH Demo will display the Item Type Definition page which shows process details Clicking on the View Diagram button will display our workflow
Press the Home icon to go back to the Workflow Monitoring home page Press the Find Notifications link to bring up the notification search page Enter search criteria and press OK Worklist page appears displaying matching notifications Select subject link to display a notification
The Reviewer notification that was sent as part of the workflow initiation requires a response The bottom frame of the notification contains response buttons based on the lookup type selected for the notification result The selected response will dictate the transition path taken from the Review notification activity
The workflow image at the top right is pre-approval The workflow image at the bottom right is post-approval
The Approve button was pressed on the Reviewer notification causing the approve transition path to be taken
Standard Functions
Oracle Workflow Builder comes equipped with several built-in worklows and demos, one of which is WF_STANDARD, a workflow process definition used to define standard functions usable within other workflow process definitions. WF_STANDARD includes functions such as:
And function facilitating the rendezvous of parallel threads, flow will not continue until all transitions to the function are completed Or function facilitating the rendezvous of parallel threads, flow will continue with completion of the first transition to the function Loop Counter function used to count the number of times a looping flow has transitioned through, allows continuation or exit of the looping flow based on counter Comparison operations functions used to compare date, text, and number values to corresponding item attribute types, allows branching based on the result of the comparison
Standard Functions
XML Get Tag Value function facilitating the retrieval of data from an event attribute and storage in another item attribute XML Comparison operations similar to regular comparison operations, except the comparisons utilize data retrieved from events for path determination Assign function allowing a value for an item attribute to be set within the worklfow process at run-time Wait function that will hold a transition from completion until a specified period or date has passed Defer Thread function used to force all following activities on the same thread to be deferred for the background engine to run
Standard APIs
There is an entire library of standard APIs, but here are a few examples
wf_engine.CreateProcess creates an instantiation of the specified workflow process wf_engine.StartProcess initiates the created workflow process (used in tandem with CreateProcess) wf_engine.background runs a one-time background engine wf_engine.SetItemAttrText used to set the value of a text item attribute within a workflow process externally from PL/SQL wf_engine.GetItemAttrText used to retrieve the value of a text item attribute from within a workflow process and return it to PL/SQL
Another type of standard API is the user-defined function/procedure having pre-defined parameters and return types (where applicable)
A procedure with the following parameter list can be called from within a workflow process and given a user specified name
(itemtype itemkey actid funcmode resultout IN VARCHAR2, IN VARCHAR2, IN NUMBER, IN VARCHAR2, IN OUT VARCHAR2)
Access Explanation
Checked value means workflow builder is operating in upload mode Unchecked value means workflow builder is operating in upgrade mode
NONE
Preserve Customizations
Only updatable by access level 100-1000, also by 0-99 if Allow modifications.. checked Updatable by access level 0-100 only
BOTH
Updatable by access level 100 only, also by 0-99 if Allow modifications.. checked