Various PL/SQL APIs exist for the working of Oracle Workflow:
· WF_ENGINE
· WF_CORE
· WF_PURGE
· WF_MONITOR
· WF_QUEUE
· WF_NOTIFICATIONS
WF_ENGINE : The state of a workflow item is defined by the various states of all activities that are part of the process for that item. The engine changes activity states in response to an API call to update the activity family of calls.The Workflow Engine APIs can be called by an application program or a workflow function in the runtime phase to communicate with the engine and to change the status of each of the activities. These APIs are defined in a PL/SQL package called WF_ENGINE.
· These APIs are defined in a PL/SQL package called WF_ENGINE :
* SetItemAttrText, SetItemAttrNumber, SetItemAttrDate
Used for setting a text/number/Date attribute value of a workflow instance.
* GetItemAttrText => Used for getting a text attributr value of a workflow instance.
* CreateProcess => Create a new runtime process for an application item.
* SetitemUserKey
* GetItemUserKey
* Background => Runs a background engine for processing deferred and/or timed out activities using the parameters specified.
* SetItemOwner
* StartProcess
* LaunchProcess.
WF_CORE :
PL/SQL procedures called by function activities can use a set of core Oracle Workflow APIs to raise and catch errors.When a PL/SQL procedure called by a function activity either raises an unhandled exception, or returns a result beginning with 'ERROR:’, the Workflow Engine sets the function activity’s status to ERROR and sets the columns ERROR_NAME, ERROR_MESSAGE, and ERROR_STACK in the table WF_ITEM_ACTIVITY_STATUSES to reflect the error.The columns ERROR_NAME and ERROR_MESSAGE get set to either the values returned by a call to WF_CORE.RAISE( ), or to the SQL error name and message if no call to RAISE( ) is found. The column ERROR_STACK gets set to the contents set by a call to WF_CORE.CONTEXT( ), regardless of the error source.
WF_CORE Procedures :
· CLEAR
· GET_ERROR
· TOKEN
· RAISE
· CONTEXT
· TRANSLATE
WF_PURGE : WF_PURGE can be used to purge obsolete runtime data for completed items and processes, and to purge information for obsolete activity versions that are no longer in use. One may want to periodically purge this obsolete data from your system to increase performance.
WF_PURGE Procedures :
· Items
· Activities
· Notifications
· Total
· TotalPERM
· The WF_USER_ROLES view is an intersection of the users and roles in WF_USERS and WF_ROLES:
User_Name
User_Orig_System
User_Orig_System_id
Role_Name
Role_Orig_System
Role_Orig_System_id
· WF_ITEM_TYPES : It stores all the Item_type definitions
NAME
PROTECT_LEVEL
CUSTOM_LEVEL
PERSISTENCE_TYPE
PERSISTENCE_DAYS
WF_SELECTOR
· WF_ITEM_ATTRIBUTES : The WF_ITEM_ATTRIBUTES table stores definitions of attributes associated with a process. Each row includes the sequence in which the attribute is used as well as the format of the attribute data.
ITEM_TYPE
NAME
SEQUENCE
TYPE
PROTECT_LEVEL
CUSTOM_LEVEL
SUBTYPE
FORMAT
· WF_ITEMS : WF_ITEMS is the runtime table for workflow processes. Each row defines one work item within the system.
ITEM_TYPE
ITEM_KEY
ROOT_ACTIVITY
OWNER_ROLE
PARENT_ITEM_TYPE
PARENT_ITEM_KEY
BEGIN_DATE
END_DATE
USER_KEY
· WF_PROCESS_ACTIVITIES : WF_PROCESS_ACTIVITIES stores the data for an activity within a specific process. A process activity is a Modeled workflow process, which can be included as an activity in other processes to represent a sub–process
PROCESS_ITEM_TYPE
PROCESS_NAME
PROCESS_VERSION
ACTIVITY_ITEM_TYPE
ACTIVITY_NAME
· WF_ACTIVITIES : WF_ACTIVITIES table stores the definition of an activity.
ITEM_TYPE , NAME , VERSION , TYPE , RERUN , EXPAND_ROLE,
PROTECT_LEVEL , CUSTOM_LEVEL , BEGIN_DATE , END_DATE
· WF_ITEM_TYPES : It stores all the Item_type definitions
NAME
PROTECT_LEVEL
CUSTOM_LEVEL
PERSISTENCE_TYPE
PERSISTENCE_DAYS
WF_SELECTOR
WF_LOOKUPS -Workflow Lookups.
WF_LOOKUP_TYPES -Workflow lookup types.
WF_MESSAGES - Messages which r sent as notifications
WF_MESSAGE_ATRIBUTES : Message attributes(additional info to be sent to or received from an individual via notifications)
WF_NOTIFICATIONS , WF_NOTIFICATIONS_ATTRIBUTES.
Views Used in Workflow : Workflow uses views for effective querying of data. These views are de-normalized so as to provide a faster access to data over networks.Some of the important views are:
WF_ITEMS_V
WF_ITEM_ACTIVITY_STATUSES_V : WorkFlow Process activity results & error information.
WF_NOTIFICATIONS_VIEWS
WF_ROLES : Contains information on the roles of which users can be members like Role Name,Description,Language and territory.
WF_USERS : Contains Information on the user names, display names for the users, their notification preference and their e-mail addresses.
WF_USER_ROLES : Contains information on the association of the users to the roles.
No comments:
Post a Comment