Oracle WF Important
Oracle WF Important
Oracle WF Important
Oracle Workflow Builder is a graphical tool for creating, viewing, and modifying
workflow process definitions. It contains a Navigator window that you use to define the
activities and components of your business process. You then assemble the activities in a
process window to create a process diagram.
At any time you can add, remove, or change workflow activities, or set
up new prerequisite relationships among activities. Oracle Workflow manages business
processes according to rules that you define.
Workflow Engine:
The Workflow Engine embedded in the Oracle database server implements process
definitions at runtime. The Workflow Engine monitors workflow states and coordinates
the routing of activities for a process. The Workflow Engine supports sophisticated
workflow rules, including looping, branching, parallel flows, and sub flows.
Attributes—lists the attributes for the current item type. Item type attributes
describe features of an item type. For example, if an item type is a purchase order
requisition, then an item type Attribute can be the requisition amount or the
requisition ID.
Functions—lists the function activities associated with the current item type. A
function activity represents a PL/SQL stored procedure that the Workflow Engine
executes automatically. A function activity can also have activity attributes
associated with it
Events—lists the event activities associated with the current item type. An event
activity represents a business event that the process receives, raises, or sends
Access Level A numeric value ranging from 0 to 1000. Every workflow user operates at a
specific access level. The access level defines whether the user can modify certain
workflow data. You can only modify data that is protected at a level equal to or higher
than your access level.
Workflow Engine The Workflow Engine manages the state of all activities for an item,
automatically executes functions and sends notifications, maintains a history of
completed activities, and detects error conditions and starts error processes. The
Workflow Engine is implemented in server PL/SQL and activated when a call to an
engine API is made.
Lookup Type A predefined list of values. Each value in a lookup type has an internal and
a display name.
Item Type A grouping of all items of a particular category that share the same set of item
attributes. For example, PO Requisition is an item type used to group all requisitions
created by Oracle Internet Commerce’s Web Requisitions page. Item type is also used as
a high level grouping for processes.
A synchronous process is a process that can be executed without interruption from start to
finish.
The Workflow Engine executes a process synchronously when the process
includes activities that can be completed immediately, such as function activities
that are not deferred to the background engine.
With a synchronous process, you can immediately check for process results that
were written to item attributes or directly to the database. However, the user must
wait for the process to complete.
Item type: The internal name for the item type. Item types are defined in the Oracle
Workflow Builder.
Item key: The string uniquely identifies the item within an item type.
Actid : The ID number of the activity from which this procedure is called.
Funcmode : The execution mode of the activity. If the activity is a function activity, the
mode is either 'RUN' or 'CANCEL'. If the activity is a notification activity, with a post-
notification function, then the mode can be 'RESPOND', 'FORWARD', 'TRANSFER',
'TIMEOUT', or 'RUN'. Other execution modes may be added in the future.
Resultout: COMPLETE: activity completes with the indicated result code. The result
code must match one of the result codes specified in the result type of the function
activity.
Wf_engine.AddItemAttr(itemtype,
itemkey,
‘<new_attribute_name>’);
Wf_engine.SetItemAttrText( itemtype,
itemkey,
‘<new_attribute_name>’,
‘<New attribute value>’);
Procedure StartProcess
(itemtype in varchar2,
itemkey in varchar2);
Procedure LaunchProcess
(itemtype in varchar2,
itemkey in varchar2,
process in varchar2 default '',
userkey in varchar2 default '',
owner in varchar2 default '');
Procedure SetItemAttrText
(itemtype in varchar2,
itemkey in varchar2,
aname in varchar2,
avalue in varchar2);
Procedure SetItemAttrNumber
(itemtype in varchar2,
itemkey in varchar2,
aname in varchar2,
avalue in number);
Procedure SetItemAttrDate
(itemtype in varchar2,
itemkey in varchar2,
aname in varchar2,
avalue in date);
Function GetItemAttrText
(itemtype in varchar2,
itemkey in varchar2,
aname in varchar2) return varchar2;
Function GetItemAttrNumber
(itemtype in varchar2,
itemkey in varchar2,
aname in varchar2) return number;
Function GetItemAttrDate
(itemtype in varchar2,
itemkey in varchar2,
aname in varchar2) return date;
Procedure Background
(itemtype in varchar2,
minthreshold in number default null,
maxthreshold in number default null,
process_deferred in boolean default TRUE,
process_timeout in boolean default FALSE,
process_stuck in boolean default FALSE);
Procedure ItemStatus
(itemtype in varchar2,
itemkey in varchar2,
status out varchar2,
result out varchar2);
1) What are the major components of the workflow system?
Workflow Engine,
Business Event System,
The Notification Service,
He Workflow Builder,
And administrative and monitoring tools.
The Workflow Engine is a set of tables and PL/SQL stored procedures that manage the
execution of workflow processes and tracks work-in- process.
5) What electronic mail systems can I use in conjunction with Oracle Workflow
Notifications?
The Oracle Workflow Notification Mailer can be used (WFMAIL).
7) How do I select the 'File, Load Roles' option when it is grayed out?
To use the 'File, Load Roles' option you must store your workflow definition in
the database so that you have a database connection through which you can bring back
records from the database.
for example
WFLOAD apps/apps 0 Y UPGRADE @fnd:install/data/wferror.wft
WFLOAD apps/apps 0 Y UPLOAD @po:install/data/poreq.wft
WFLOAD apps/apps 0 Y DOWNLOAD myprocess.wft POREQ
WFLOAD apps/apps 0 Y UPGRADE c:\orant\wf20\res\US\wfstd.wft
16) How do I completely wipe out workflow definitions from the database?
There are scripts that directly delete workflow definition data from the database.
wfrmita.sql -- Delete all definitions for an ITem Attribute
wfrmitt.sql -- Delete all definitions for an ITem Type
wfrmall.sql -- Delete all definitions
The DOCUMENT type attribute permits you to execute a pl/sql package procedure
which you may use to build the message body dynamically at run time. For example, if
you have an unlimited number of lines to display, rather than hardcoding an attribute for
each line and setting a limit, use the DOCUMENT type. This allows you to call a
package with the following parameters
procedure MY_PROCEDURE
( document_id in varchar2, -- your parameter list
display_type in varchar2, -- either text/plain of text/HTML set by WF
document in out varchar2, -- out string inserted into mesage body by WF
document_type in out varchar2) -- usually set this equal to display_type
is ...
SetItemAttrText(item_type,item_key,
'NEW_ITEM_ATTR_NAME',
'plsql:my_package.my_procedure/'||item_type||':'||item_key);
21) How to identify what type of events are in the WF_DEFFERED queue?
select corrid,
decode(state,0, '0 = Ready',1, '1 = Delayed',2, '2 = Retained', 3, '3 = Exception',
to_char(state)) State,
count(*) COUNT
from WF_DEFERRED
group by corrid, state;
The next statements will show how many events of each type are in the
WF_DEFERRED queue:
column EVENT_NAME format a40;
22) How do you determine the WF Item Key value to run wfstatus.sql for Account
Generator workflows?
Select item_key, begin_date, end_date
from wf_items
where item_type = 'PAAPINVW'
and begin_date between '&low_start' and '&high_start';