Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Why
Workflow?
It
automates
&
streamlines
business
process.
What
Workflow
does?
It
routs
information
to
Roles
(User/Group
of
Users)
based
on
rules.
Rule 1
Rule 2
Routing
Information
Key:
Rules
Process
Activity
Rule 3
Rule 4
Procedures.
Routes.
Actions
Performed.
WF
Builder
WF
Engine
WF
Definition
Loader
Notification
Systems
WF
Monitor
WF
Builder:
WF
Engine:
Graphical
Interface.
Used
to
Modify
&
create
business
process.
2
Windows
available
[navigator,
process
Diagram].
WF
Definition
Loader:
- The
utility
program
that
moves
WF
definitions
b/w
DB
and
corresponding
flat
file
representation.
- Its
a
standalone
server
program.
- Integrated
into
WF
builder.
WF
Notification
System:
- Automatically
Notify
users.
- Send
Notification
to
individuals
or
roles.
- Automatic
Notification
forwarding.
When WF encounters notification activity, it calls notification system API to send a notification.
Notification
system
communicates
with
directory
services
to
get
roles
and
user
information
to
whom
the
Notification
to
be
sent.
Notification
system
communicates
with
mailer
and
web
agent
to
get
the
following
data.
Messages
&
message
Attributes.
Notification
preference
for
the
role.
Notification
system
communicates
with
Notification
viewer
to
display
messages
through
web
Browser.
WF
Monitor:
- Graphically
monitors
&
administrate
workflow
transactions.
- It
supports
the
below
features.
Java
Applet:
To
view
WF
Activity
diagrammatically.
View
Transaction
action
history.
Retry
/
Skip
Activity.
Resend
&
rerun
any
process.
- Action
Summary
of
Key
Activities.
Process
Function
Event
Notification
Message
Lookup
Types
Transactions
Description
Classification
of
components
that
makes
Workflow
process.
An
item
type
attribute
is
a
property
associated
with
a
given
item
type.
A
Global
variable
that
can
be
used
across
by
any
activity
inside
WF.
Manages
Business
Process
according
to
the
business
process
rules
defined.
It
derives
relationship
b/w
the
activities.
An
automated
unit
of
work
usually
defined
as
a
PLSQL
stored
procedures
&
functions.
An
event
activity
represents
a
business
event
from
the
Business
Event
System
within
a
workflow
process.
When
the
workflow
engine
reaches
a
notification
activity,
it
issues
a
Send
(
)
API
call
to
the
Notification
System
to
send
the
message
to
an
assigned
performer.
A
message
is
what
a
notification
activity
sends
to
a
role
in
a
workflow
process.
A
lookup
type
is
a
static
list
of
values.
These
lists
can
be
referenced
by
activities
and
by
item
type,
message
or
activity
attributes.
The
relationship
b/w
two
activities
represented
by
an
arrow
[transition].
Description
The
details
of
internal
names
of
item
types
will
be
stored.
WF_ITEM_TYPES_TL
WF_ITEM_ATTRIBUTES
WF_ACTIVITIES
WF_ACTIVITY_ATTRIBUTES
WF_ACTIVITY_TRANSITIONS
WF_PROCESS_ACTIVITIES
WF_MESSAGES
WF_MESSAGE_ATTRIBUTES
WF_LOOKUP_TYPES
WF_LOOKUPS
WF_NOTIFICATIONS
WF_NOTIFICATION_ATTRIBUTES
WF_ITEMS
WF_ITEM_ACTIVITY_STATUSES
WF_ITEM_ATTRIBUTE_VALUES
WF_ACTIVITY_ATTR_VALUES
WF_ROUTING_RULES
Synchronous
Asynchronous
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.
The
Workflow
Engine
does
not
return
control
to
the
calling
application
that
initiated
the
workflow
until
it
completes
the
process.
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.
An
asynchronous
process
is
a
process
that
the
Workflow
Engine
cannot
complete
immediately
because
it
contains
activities
that
interrupt
the
flow.
Examples
of
activities
that
force
an
asynchronous
process
include
deferred
activities,
notifications
with
responses,
blocking
activities,
and
wait
activities.
Rather
than
waiting
indefinitely
when
it
encounters
one
of
these
activities,
the
Workflow
Engine
sets
the
audit
tables
appropriately
and
returns
control
to
the
calling
application.
The
workflow
process
is
left
in
an
unfinished
state
until
it
is
started
again.
The
process
can
be
restarted
by
the
Notification
System,
such
as
when
a
user
responds
to
a
notification;
by
the
background
engine,
such
as
when
a
deferred
activity
is
executed;
or
by
the
Business
Event
System,
such
as
when
an
event
message
is
de-queued
from
an
inbound
queue
and
sent
to
the
workflow
process.
With
an
asynchronous
process,
the
user
does
not
have
to
wait
for
the
process
to
complete
to
continue
using
the
application.
However,
the
results
of
the
process
are
not
available
until
the
process
is
completed
at
a
later
time.
Activity
Cost:
Each
function
activity
and
event
activity
has
a
cost
associated
with
it.
The
cost
is
a
value
representing
the
number
of
seconds
it
takes
for
the
Workflow
Engine
to
execute
the
activity.
If
you
do
not
know
how
long
it
takes
for
the
Workflow
Engine
to
perform
the
activity,
you
can
enter
an
estimated
cost
and
update
it
later
as
you
accumulate
more
information
about
its
performance.
Generally,
you
should
assign
complex,
long
running
activities
a
high
cost.
The
valid
range
for
cost
is
0
to
1,000,000.
Note**
although
the
cost
is
entered
and
displayed
in
seconds
in
Oracle
Workflow
Builder,
it
is
actually
converted
and
stored
in
the
database
as
hundredths
of
a
second.
In
normal
processing,
the
Workflow
Engine
completes
the
execution
of
a
single
activity
before
continuing
to
a
subsequent
activity.
In
some
cases,
an
activity
might
take
so
long
to
process
that
background
processing
would
be
more
appropriate.
The
default
threshold
for
the
Workflow
Engine
is
50
hundredths
of
a
second.
Activities
with
a
cost
higher
than
this
are
deferred
to
background
engines.
Deferred
Processing:
The
engine
has
a
deferred
processing
feature
that
allows
long-running
tasks
to
be
handled
by
background
engines
instead
of
in
real
time.
Deferring
the
execution
of
activity
functions
to
background
engines
allows
the
Workflow
Engine
to
move
forward
to
process
other
activities
that
are
currently
active.
The
engine
can
be
set
up
to
operate
anywhere
on
a
continuum
between
processing
all
eligible
work
immediately,
to
processing
nothing
and
marking
all
transitions
as
deferred.
Each
activity
has
a
user-defined
processing
cost.
You
can
set
this
cost
to
be
small
if
the
activity
merely
sets
an
item
attribute,
or
you
may
set
it
to
be
very
high
if
the
activity
performs
a
resource-intensive
operation.
If
the
result
of
a
completed
activity
triggers
the
execution
of
a
costly
function,
you
might
want
to
defer
the
execution
of
that
costly
function
to
a
background
engine.
The
Workflow
Engine
integrates
with
Oracle
Advanced
Queues
to
carry
out
deferred
processing.
If
a
function
activity
has
a
cost
that
exceeds
the
main
threshold
cost,
the
Workflow
Engine
marks
that
activity
with
a
status
of
'DEFERRED'
in
the
workflow
status
tables
and
en-queues
the
deferred
activity
to
a
special
queue
for
deferred
activities.
A
special
queue
processor
called
the
background
engine
checks
and
processes
the
activities
in
the
'deferred'
queue.
The
order
in
which
the
deferred
activities
are
processed
are
based
on
the
first
in,
first
out
ordering
of
an
activity's
en-queue
time.
Deferred
Activity:
When
an
activity
is
deferred,
the
main
Workflow
Engine
can
then
continue
to
the
next
available
activity,
which
may
occur
on
some
other
parallel
branch
of
the
process.
If
no
other
activity
is
available
to
be
executed,
the
Workflow
Engine
returns
control
immediately
to
the
calling
application.
The
user
remains
unaware
that
processing
is
still
taking
place,
rendering
a
faster
execution
time.
To
defer
an
activity,
Activity
Cost
>
Threshold
Cost
The
threshold
cost
is
a
PL/SQL
package
variable
with
a
default
value
of
50
hundredths
of
a
second.
Set
a
cost
above
this
threshold
for
all
activities
that
you
don't
want
the
user
to
wait
for.
At
runtime,
the
Workflow
Engine
defers
any
thread
to
the
background
as
soon
as
it
encounters
an
activity
with
a
cost
higher
than
the
threshold.
Then
the
background
engine
later
identifies
the
process
as
deferred
and
continues
its
execution.
Access
protection
is
a
feature
that
prevents
workflow
seed
data
created
by
a
'seed
data
provider'
from
being
modified
by
a
'seed
data
consumer'.
'seed
data
provider'
-->
any
organization
that
creates
'seed
data'
for
other
organizations
('seed
data
consumers')
to
use
in
defining
and
customizing
a
workflow
process.
Scenario:
There
are
2
teams
in
my
organization
Global
Team
&
Regional
Team.
Global
Team
does
development
across
all
regions
where
as
regional
team
does
development
within
their
own
region
and
not
shared
by
other.
Consider
my
organization
Global
team
using
oracle
std.
item
type
in
my
workflow
in
a
custom
workflow
process.
Now
my
organization
wants
to
enable
below
protections,
Identify
certain
workflow
objects
in
its
custom
workflow
definition
as
corporate
standards
that
the
regional
teams
should
adhere
to
and
not
modify.
Designate
certain
objects
in
its
deployed
process
as
customizable
for
the
regional
offices
to
alter
to
their
offices'
needs.
The
combination
of
protection,
customization,
and
access
levels
make
up
the
access
protection
feature
and
determines
whether
a
user
can
modify
a
given
workflow
object.
The
level,
in
all
three
cases,
is
a
numeric
value
ranging
from
0
to
1000
that
indicates
the
relationship
between
different
organizations
as
providers
and
consumers
of
seed
data.
The
following
ranges
of
levels
are
presumed
by
Oracle
Workflow:
0-9
10-19
20-99
100-999
Oracle
Workflow
Oracle
Application
Object
Library
Oracle
Applications
development
Customer
organization.
You
can
determine
how
you
want
this
range
to
be
interpreted.
For
example,
100
can
represent
headquarters,
while
101
can
represent
a
regional
office,
and
so
on.
Public
1000
Access
Level:
A
"user
of
Oracle
Workflow"
in
this
case,
represents
someone
who
is
operating
Oracle
Workflow
Builder,
or
the
Workflow
Definitions
Loader
program,
which
loads
workflow
process
definitions
from
a
file
into
a
database.
As
a
seed
data
provider,
you
should
always
operate
Oracle
Workflow
Builder
at
the
same
consistent
access
level
because
the
level
you
work
at
affects
the
protection
level
of
the
seed
data
you
create.
You
can
view
your
access
level
as
follows:
In Oracle Workflow Builder, select About Workflow from the Help menu.
If
you
are
going
to
run
the
Workflow
Definitions
Loader
program
to
download
workflow
process
definitions
from
the
database
to
a
file,
check
the
value
for
the
environment
variable
WF_ACCESS_LEVEL
on
your
workflow
server.
Protection
Level:
Whenever
you
create
a
workflow
object
in
Oracle
Workflow
Builder,
you
have
the
option
of
protecting
the
object
at
a
certain
level.
An
object's
protection
level
helps
control
whether
other
users
can
modify
the
object
based
on
their
access
levels,
by
allowing
only
users
with
an
access
level
equal
to
or
lower
than
the
object's
protection
level
to
modify
the
object.
The
protection
level
that
you
set
for
an
object
is
dependent
on
the
setting
of
the
Lock
at
this
Access
Level
check
box
and
on
your
current
access
level.
If
you
check
the
Lock
at
this
Access
Level
check
box,
the
protection
level
for
the
object
is
set
to
your
current
access
level.
Users
with
an
access
level
higher
than
your
current
access
level
will
not
be
able
to
modify
the
object.
These
users
will
see
a
small
lock
on
the
workflow
object's
icon,
indicating
that
the
object
can
be
used
but
not
modified.
For
users
with
an
access
level
equal
to
or
lower
than
your
current
access
level,
the
customization
level
for
the
object
will
determine
whether
they
can
modify
the
object.
If
you
do
not
check
the
Lock
at
this
Access
Level
check
box,
the
protection
level
for
the
object
is
set
to
1000.
In
this
case
all
users
who
are
not
restricted
by
the
customization
level
can
modify
the
object.
Customization
Level:
Every
workflow
object,
in
addition
to
having
a
protection
level,
also
records
a
customization
level
when
you
modify
the
object
and
save
it
to
a
database
or
file.
An
object's
customization
level
helps
control
whether
other
users
can
modify
the
object
based
on
their
access
levels,
by
allowing
only
users
with
an
access
level
equal
to
or
higher
than
the
object's
customization
level
to
modify
the
object.
Setting
the
customization
level
ensures
that
a
customizable
object
that
has
been
customized
never
gets
overwritten
during
a
seed
data
upgrade,
because
the
upgrade
always
occurs
with
the
Workflow
Definitions
Loader
operating
at
an
access
level
below
the
customized
object's
customization
level.
We
use
the
Workflow
Definitions
Loader
to
save
or
load
process
definitions
from
a
database
or
flat
file.
We
can
also
define
as
it
is
a
utility
that
moves
workflow
data
between
a
file
and
a
database
and
it
is
also
used
to
upgrade,
upload
and
download
the
workflow
data.
Usage:
Normally
when
we
upgrade
our
database,
we
use
the
Workflow
Definitions
Loader
to
preserve
and
back
up
our
process
definitions
to
a
flat
file.
When
the
database
upgrade
is
completed,
we
use
the
Loader
program
again
to
upload
the
definitions
back
into
your
database.
We
can
also
use
the
Loader
program
to
upgrade
our
database
with
a
newer
version
of
a
process
definition
or
to
transfer
process
definitions
to
other
databases.
Modes:
The
Workflow
Definitions
Loader
automatically
validates
the
process
definition
to
ensure
that
it
conforms
to
specific
process
design
rules.
There
are
four
modes
available
with
WFLOAD.These
are
as
follows:
1)
2)
3)
4)
WFLOAD
Username/password
<access_level>
Y
<Mode>
<File_name>.wft
<Item_Type>
For
Example,
WFLOAD
apps/apps
0
Y
DOWNLOAD
poxwfrqa.wft
POAPWF
Workflow APIs:
Below
are
some
important
APIs
frequently
used
in
workflow
development
/
customizations.
WF_ENGINE
APIs
WF_ENGINE.
CreateProcess
WF_ENGINE. SetItemUserKey
WF_ENGINE. GetItemUserKey
WF_ENGINE. SetItemOwner
WF_ENGINE. StartProcess
WF_ENGINE. LaunchProcess
WF_ENGINE. SuspendProcess
WF_ENGINE. AbortProcess
WF_ENGINE. AddItemAttr
WF_DIRECTORY.
IsPerformer
WF_DIRECTORY.
GetRoleName
WF_DIRECTORY. SetAdHocUserStatus
WF_DIRECTORY. SetAdHocRoleStatus
WF_DIRECTORY. CreateAdHocUser
WF_DIRECTORY. CreateAdHocRole
WF_DIRECTORY.
AddUsersToAdHocRole
WF_DIRECTORY.
RemoveUsersFromAdHocRole
Sample Workflow 1
Step
2:
New
Attributes
Creation
Right
Click
Attribute
create
new
attribute.
PO_NUMS
ORG_NUM
Step
3:
Creating
New
Process.
Step
4:
Define
Process
Details.
Step
5:
Creating
functions
inside
root
process.
Below
are
the
functions
we
will
be
using
in
our
workflow.
Function
1:
Start
[Oracle
Standard]
Function
2:
End
[Oracle
Standard]
Function
3:
PO_DTLS
Notification:
NOTIFY_PO
Note**
we
will
be
creating
Roles
using
oracle
standard
API
WF_DIRECTORY.
Add
User
to
Role:
To
add
users
to
role
use
the
below
API.
ROLE_NAME
DEMO_ROLE4
USERS
User_1
Users
successfully
added
into
the
Role.
Note**
Email_Address
of
the
User
should
be
in
CAPS.
Email
Styles:
Style
DISABLE
QUERY
MAILHTM2
MAILHTML
SUMHTML
MAILTEXT
MAILATTH
SUMMARY
Description
Disabled
Do
not
send
me
mail
HTML
mail
HTML
mail
with
attachments
HTML
summary
mail
Plain
text
mail
Plain
text
mail
with
HTML
attachments
Plain
text
summary
mail
Method
2:
Setting
Global
Preference.
Responsibility:
Workflow
Administrator
Web
(New)
Navigation:
Workflow
Administrator
Web
(New)
Administration
Step
5.4:
PO_DETAILS
(Function)
Create
a
new
procedure
and
set
the
Role
ATTRIBUTE
with
ROLE
Name.
Procedure
Details:
D_GETPO_DTLS
Note**
When
assigning
a
Procedure
(or)
Function
to
a
WF
Function
the
following
parameters
to
be
defined
mandatorily
[Itemtype,
itemkey,
actid,
funcmode,
resultout]
Step
5.5:
Create
Message
&
Assign
to
Notification
Step
5.5.1:
Create
Message
Use
the
attributes
valid
for
that
message.
Note**
Remember
the
following
assignments.
In
Node
tab
the
performer
details
should
be
setup.
Since
the
roles
are
assigned
to
role
attribute
we
will
be
using
the
same.
Step
7:
Save
the
Workflow
Navigation:
File
Save
As
This
step
is
to
compile
the
Workflow.
Provide
User,
Password
&
Host
string
to
connect
to
database
and
save
the
workflow.
Now
the
workflow
will
be
compiled
using
database
connection
and
shows
error
if
exists.
1) Navigate
to
the
Submit
Requests
form
in
Oracle
Applications
to
submit
the
Workflow
Definitions
Loader
concurrent
program.
When
you
install
and
set
up
Oracle
Applications
and
Oracle
Workflow,
your
system
administrator
needs
to
add
this
concurrent
program
to
a
request
security
group
for
the
responsibility
that
you
want
to
run
this
program
from.
See:
Overview
of
Concurrent
Programs
and
Requests,
Oracle
Applications
System
Administrator's
Guide.
2) Submit
the
Workflow
Definitions
Loader
concurrent
program
as
a
request.
See:
Submitting
a
Request,
Oracle
Applications
User's
Guide.
3) In
the
Parameters
window,
enter
values
for
the
following
parameters:
Fields
Mode
File
Upload
Specify
"Upload"
to
load
a
process
definition
from
a
flat
file
into
the
database.
The
upload
mode
is
useful
to
someone
who
is
developing
a
workflow
process.
It
allows
the
developer
to
save
definitions
to
the
database
without
concern
that
accidental
customizations
to
existing
objects
might
prevent
the
upload
of
some
process
definition
elements.
The
Workflow
Definitions
Loader
uses
the
access
level
defined
by
the
input
file
to
upload
the
process
definitions
from
the
file
and
therefore
will
overwrite
objects
in
the
database
that
are
protected
at
a
level
equal
to
or
higher
than
that
file's
access
level.
Force
Specify
"Force"
to
force
an
upload
of
the
process
definitions
from
an
input
file
to
a
database
regardless
of
an
object's
protection
level
You
should
be
certain
that
the
process
definition
in
the
file
is
correct
as
it
overwrites
the
entire
process
stored
in
the
database.
The
Force
mode
is
useful
for
fixing
data
integrity
problems
in
a
database
with
a
known,
reliable
file
backup.
--
Specify
the
full
path
and
name
of
the
file
that
you
want
to
download
a
process
definition
to,
or
upgrade
or
upload
a
process
definition
from.
If
you
set
Mode
to
"Download",
use
the
List
button
to
choose
the
item
type
for
the
process
definition
you
want
to
download.
Item Type --
Description
Honors
both
protection
and
customization
levels
of
data
Honors
only
protection
level
of
data
[No
respect
of
Customization
Level]
Force
upload
regardless
of
protection
or
customization
level
Example:
WFLOAD
apps/pwd@<connect_string>
0
Y
UPLOAD
DEMO1.wft
Syntax
for
DOWNLAOD:
WFLOAD
<apps_user_name>/<password>@db
0
Y
DOWNLOAD
file_name.wft
<Item_Type>
The
access
levels
are
defined
as
follows:
0-9
:
Reserved
for
Oracle
Workflow
10-19
:
Reserved
for
Oracle
Application
Object
Library
20-99
:
Reserved
for
Oracle
E-Business
Suite
100-999
:
Reserved
for
customer
organizations
1000
:
Public
SUMMARY:
To
upgrade
-
WFLOAD
apps/pwd
0
Y
UPGRADE
filename.wft
To
upload
-
WFLOAD
apps/pwd
0
Y
UPLOAD
filename.wft
To
force
-
WFLOAD
apps/pwd
0
Y
FORCE
filename.wft
To
download
-
WFLOAD
apps/pwd
0
Y
DOWNLOAD
filename.wft
ITEMTYPE1
Step
8.2:
Submit
the
Request
Workflow
Definition
Loader
Log
into
System
Administrator
responsibility
to
submit
the
request.
Request
Name
Parameters
Mode
File
Item
Type
Request
executed
successfully.
Now
you
can
check
the
whether
the
item
type
is
uploaded
into
database
or
not.
Submit
the
same
request
&
in
parameter
window
try
to
select
the
Item_type
if
it
is
populated
in
LOV
the
WF
definitions
is
successfully
loaded
into
database.
Description
Internal
Name
of
the
Item
type
in
workflow.
Unique
identifier
of
specific
workflow
instance.
Internal
Name
of
process
where
workflow
should
begin
ProcessName
Aname
UserKey
Owner
Useful
API
Information
-
Summary:
Description
Launching
a
WF
from
its
root
process.
Creates
a
new
runtime
process
for
Item_type
For
executing
a
specific
Process/Sub-process
within
a
WF.
Setting
Workflow
Item
Owner.
Setting
the
Usekey
for
the
WF.
If
we
want
to
initiate
a
sub-process
from
another
WF
this
API
can
be
used.
Returns
user
identifier
assigned
to
an
item.
Receives
an
event
into
WF
Process
from
Business
Event
sys.
To
process
deferred
&
timed
out
activities
stuck
in
a
process.
Creating
a
new
process
which
is
copy
of
original.
Begins
execution
of
new
fork
process.
Procedure/Function
Description
SetItemAttrText
SetItemAttrNumber
SetItemAttrDate
SetItemAttrEvent
SetItemAttrTextArray
SetItemAttrNumberArray
SetItemAttrDateArray
GetItemAttrText
GetItemAttrNumber
GetItemAttrDate
GetItemAttrEvent
WF_ENGINE
GetItemAttrInfo
AddItemAttr
GetActivityAttrInfo
AddItemAttrTextArray
AddItemAttrNumberArray
AddItemAttrDateArray
GetActivityAttrTex
GetActivityAttrNumber
GetActivityAttrDate
GetActivityAttrEvent
Procedure/Function
CompleteActivity
CompleteActivityInternalName
BeginActivity
AssignActivity
GetActivityLabel
WF_ENGINE
AbortProcess
SuspendProcess
ResumeProcess
HandleError
ItemStatus
Description
Informs
WF
engine
a
specific
activity[identify
by
node
name]
is
completed
for
item.
Informs
WF
engine
a
specific
activity[identify
by
internal
name]
is
completed
for
item.
To
perform
an
activity
&
raises
an
exception
if
it
is
not.
Assigning
activity
to
a
performer.
Returns
the
label
info.
An
activity
by
activity
instance
identification.
It
aborts
a
process
executing
&
its
related
notifications.
Suspends
a
process
so
that
user
cannot
transition
current
items
to
any
other
activity.
Re-executes
a
suspended
process.
Error
Handling
tasks
for
an
Activity.
Also
used
for
rollback
operation
for
a
process
in
an
activity.
returns
the
status
for
a
root
process
of
specific
item
instance.
Parameter
information:
itemtype
-
A
valid
item
type
itemkey
-
A
string
generated
from
the
application
object's
primary
key.
process
-
A
valid
root
process
for
this
item
type
(Or
null
to
use
the
item's
selector
function)
userkey
-
User
key
to
be
set
owner
-
Role
designated
as
owner
of
the
item
Method
2:
CreateProcess
+
StartProcess
API
The
following
steps
to
be
followed
in
coding,
1) Create
a
workflow
Process
Instance.
2) Set
the
UserKey
for
the
WF.
3) Set
the
workflow
Item
Owner.
4) Set
initial
values
for
Process
Attributes.
5) Kick-Off
the
Workflow.
Important
Question:
Why
we
have
two
methods
to
launch
a
workflow
from
PLSQL
procedure?
Method
1
will
be
used
when
we
are
going
to
kick
a
WF
from
its
ROOT
/
TOP
Process
[One
scenario
for
understanding].
Method
2
will
be
used
when
we
want
to
want
to
initiate
a
sub-Process
within
an
item
type
of
from
another
item
type
this
method
will
be
used.
[One
scenario
for
understanding]
For
Knowledge
base
we
will
go
with
method
2.
Step
10:
Run
the
Procedure
to
Kick-off
the
workflow.
Checking
the
status
of
Workflow:
Go
to
Home.
You
can
view
the
notification.
Notification:
Worklist:
Status
Diagram:
Activity
History:
Sample Workflow 2
Description:
- Send
PO
Details
to
user
[Role].
.
- Standard
Lookup_Type
usage
for
a
function.
Note**
We
will
be
Modifying
the
existing
Workflow
File
and
update
the
same
package.
But
pls.
change
the
Package
Name,
WF
objects
name.
Procedure
Details:
D_GETPO_DTLS
Add
the
below
code
in
the
existing
package.
Note**
two
methods
you
can
set
result
out.
Method
1:
Using
wf_engine.eng_completed
Method
2:
Above
method.
Follow
Step
5.5
from
Sample
workflow-1
to
define
Message
&
notification.
Step
6:
Defining
Transitions
[Activity
Flow
Arrows]
Right
Click
the
source
&
drag
it
to
destination
node.
While
defining
transition
from
node
PO_DTLS
to
NOTIFY_PO
we
need
to
select
Lookup_type
code,
based
on
that
next
activity
will
be
performed.
Note**
If
you
have
any
default
(or)
any
activity
to
perform
we
can
use
even
<Default>
(or)
<Any>
transition.
Similarly
create
transition
for
lookup_code
NO.
Note**
If
a
lookup_type
for
example
Lookup_type:
PO_STATUS_TYPE
Lookup_code:
Approved
Rejected
Incomplete
Follow
Step
7
to
Step
10
from
sample
workflow-1
to
save,
load
definitions,
launch
and
kick-off
workflow.
Sample Workflow 3
Description:
- Using
Standard
Lookup
Type
for
END
activity.
- Using
NOOP
Activity.
Note**
We
will
be
Modifying
the
existing
Workflow
File
and
update
the
same
package.
But
pls.
change
the
Package
Name,
WF
objects
name.
Noop
Activity
The
NOOP
activity
acts
as
a
place
holder
activity
that
performs
no
action.
You
can
use
this
activity
anywhere
you
want
to
place
a
node
without
performing
an
action.
You
can
change
the
display
name
of
this
activity
to
something
meaningful
when
you
include
it
in
a
process,
so
that
it
reminds
you
of
what
you
want
this
activity
to
do
in
the
future.
This
activity
calls
the
PL/SQL
procedure
named
WF_STANDARD.NOOP.
Refer:
http://docs.oracle.com/cd/B19306_01/workflow.102/b15853/T361836T362090.htm#I_sanoop
Note**
END
Activity
can
be
associated
with
Lookup
Type
only
when
the
Process
in
which
the
end
activity
belongs
should
also
have
result
type
set
with
standard
or
custom
Lookup
type.
To
do
this
workflow,
the
following
changes
to
be
done
in
the
existing
workflow.
1) Creating
a
Root
Process.
2) Creating
a
NOOP
Activity.
Now
the
ROOT_PROCESS
have
the
sub-process
PO_DETAILS6.
Inside
Sub
Process:
Creating
NOOP:
Right
Click
New
Function
Now
Follow
Step
7
to
Step
10
from
Sample
Workflow
1
to
Save,
Load
Definitions
&
launch
the
WF.
Sample Workflow 4
Description:
- Using
Standard
Lookup
Type
for
END
activity.
- Using
NOOP
Activity.
- Using
AND
Activity.
- Checking
PO
Created
using
Requisition
or
Directly
Created.
Note**
We
will
be
Modifying
the
existing
Workflow
File
and
update
the
same
package.
But
pls.
change
the
Package
Name,
WF
objects
name.
Object
Type
Process
Attributes
Notification
Object Name
Description
ROOT_PROCESS2
PO_DETAILS7
WF_ITEMTYPE
WF_ITEMKEY
ASSIGN_ROLE7
PO_NUMS7
ORG_NUM7
NOTIFY_PO7
Message
NOTIFY_PO7
Top/Root
Process
Sub
process
inside
top
process.
Holds
Item
Type
Name
Holds
Item
Key
Data
Role
Attribute
to
hold
role
data
PO
Number
Organization
Number
Send
Notification
to
users
in
ASSIGN_ROLE7.
Contains
Message
Template/Body.
Message
Attributes:
PO_NUMS7
ORG_NUM7
ROOT_PROCESS2:
PO_DETAILS7:
Flow
Description:
1]
PO_DTLS7:
Checks
PO
is
valid.
IF
PO
Valid
THEN
Send
notification
to
User
(AND)
Check
PO
created
from
Requisition
or
Not.
ELSE
Performs
a
DUMMY
Activity
[NOOP]
and
Ends
with
Failure.
END;
2]
CHK_REQ:
Checks
PO
created
using
Requisition
or
without
requisition.
IF
PO
without
REQ
THEN
Note**
Now
Both
Activity
[NOTIFY_PO7
&
CHK_REQ]
are
completed
so
it
satisfies
AND
Activity
and
Ends
with
Success.
ELSE
Activity
Ends
with
Failure.
END;
PO_DTLS7:
NOTIFY_PO7:
CHK_REQ:
Standard
Activities:
NOOP:
AND:
Sample
Workflow
5(a)
Description:
- Notification
Timeout
functionality
Note**
We
will
be
Modifying
the
existing
Workflow
File
(Exercise
1)
and
update
the
same
package.
But
pls.
change
the
Package
Name,
WF
objects
name.
We
can
set
a
timeout
to
a
WF
notification
at
Notification
properties.
Along
with
timeout
functionality
if
case
of
any
business
requirement
we
can
enable
reminder
notification
to
the
user.
Even
after
sending
reminder
notification
if
the
user
didnt
approve,
it
can
be
escalated
to
its
supervisor.
We
are
going
to
use
the
existing
sample
workflow
1
for
modifying
the
notification
timeout
property.
Double
Click
NOTIFY_PO.
Go
to
Node
Tab.
Timeout
Types:
Item
Attribute:
Choose
Item
Attribute
if
you
want
the
activity
to
be
completed
by
some
relative
time
that
is
computed
dynamically
at
runtime.
Note
that
you
must
first
create
an
item
attribute
of
type
number
to
store
the
computed
timeout
value
and
reference
that
predefined
item
attribute
here.
Note**
the
dynamic
timeout
value
stored
in
this
attribute
is
interpreted
as
a
relative
offset
from
the
begin
date
of
the
activity,
in
the
unit
of
MINUTES.
A
null
timeout
value
or
a
value
of
zero
means
no
timeout.
Relative
time:
Choose
Relative
Time
if
you
want
the
activity
to
be
completed
by
some
constant
relative
time.
You
can
enter
any
combination
of
days,
hours
and
minutes
to
specify
when
the
activity
times
out.
The
value
you
enter
is
interpreted
as
a
relative
offset
from
the
begin
date
of
the
activity,
in
the
unit
of
MINUTES.
A
relative
timeout
value
of
zero
means
no
timeout.
Priority
type:
For
a
notification
activity
node,
or
for
an
event
activity
node
with
an
event
action
of
Send,
you
can
override
the
priority
assigned
to
the
activitys
message.
There
are
3
types,
1. Default
2. Item
Attribute
3. Constant
Default:
Choose
Default
to
keep
the
default
priority
of
the
message.
Item
Attribute:
Choose
Item
Attribute
to
override
the
default
priority
with
a
new
priority
level
that
is
dynamically
determined
at
runtime.
Note
that
you
must
first
create
an
item
attribute
of
type
number
to
store
the
Computed
priority
value
and
reference
that
predefined
item
attribute
here.
Constant:
Choose
Constant
to
override
the
default
priority
with
the
new
specified
priority
level.
Sample
Workflow
5(b)
Description:
- Create
Custom
Result
Type
in
a
Notification
Note**
We
will
be
modifying
the
same
Workflow
File
used
in
5(a).
Now
assign
this
lookup
code
to
Notification
Result
type.
Note**
when
you
open
the
workflow
notification
the
below
two
custom
action
buttons
will
be
displayed.
OK_BUDDY
NO_BUDDY
Sample
Workflow
6
Description:
- Create
Business
Events
Note**
The
event
will
be
raised
from
Standard
Apps
Screen.
The
Oracle
Workflow
Business
Event
System
is
an
application
service
that
leverages
the
Oracle
Advanced
Queuing
(AQ)
infrastructure
to
communicate
business
events
between
systems.
The
Business
Event
System
consists
of,
Event
Manager
Workflow
process
event
activities.
Event
Manager:
o
The
Event
Manager
contains
a
registry
of
business
events,
systems,
named
communication
agents
within
those
systems,
and
subscriptions
indicating
that
an
event
is
significant
to
a
particular
system.
Events
can
be
raised
locally
or
received
from
an
external
system
or
the
local
system
through
AQ.
When
a
local
event
occurs,
the
subscribing
code
is
executed
in
the
same
transaction
as
the
code
that
raised
the
event,
unless
the
subscriptions
are
deferred.
Subscriptions
can
include
the
following
types
of
processing:
Event
Activities:
o
Business
events
are
represented
within
workflow
processes
by
event
activities.
By
including
event
activities
in
a
workflow
process,
you
can
model
complex
processing
or
routing
logic
for
business
events
beyond
the
options
of
directly
running
a
predefined
function
or
sending
the
event
to
a
predefined
recipient.
Step
1:
Create
Table
Step
2:
Create
a
Package/Procedure/function
to
insert
the
data
captured
when
business
event
is
triggered.
Note**
for
this
example
Im
creating
a
global
function
in
APPS
Schema.
Step
3:
Create
Business
Event
Step
4:
Create
Subscription
Now
enter
Action
Type.
Click
the
LOV.
Click
Next
and
enter
the
PL/SQL
function
name
details.
Click
Apply
and
confirmation
message
will
be
displayed.
Step
5:
Test
the
Business
Event
Query
for
the
Business
event.
Event
has
been
raised
successfully.
Step
6:
Query
for
the
table.