Oracle Apps - Workflow
Oracle Apps - Workflow
Oracle Apps - Workflow
Guide
RELEASE 2.6.2
VOLUME 1
October 2001
Oracle Workflow Guide Volume 1, Release 2.6.2
The part number for this volume is A95276–01 . To reorder this book, please use the set part
number, A95265–01 .
Copyright E 1996, 2001, Oracle Corporation. All rights reserved.
Primary Authors: Siu Chang, Clara Jaeckel
Major Contributors: George Buzsaki, John Cordes, Mark Craig, Kevin Hudson, George
Kellner, David Lam, Jin Liu, Kenneth Ma, Steve Mayze, Tim Roveda, Robin Seiden,
Sheryl Sheh, Susan Stratton
The Programs (which include both the software and documentation) contain proprietary information
of Oracle Corporation; they are provided under a license agreement containing restrictions on use and
disclosure and are also protected by copyright, patent and other intellectual and industrial property
laws. Reverse engineering, disassembly or decompilation of the Programs, except to the extent
required to obtain interoperability with other independently created software or as specified by law, is
prohibited.
The information contained in this document is subject to change without notice. If you find any
problems in the documentation, please report them to us in writing. Oracle Corporation does not
warrant that this document is error–free. Except as may be expressly permitted in your license
agreement for these Programs, no part of these Programs may be reproduced or transmitted in any
form or by any means, electronic or mechanical, for any purpose, without the express written
permission of Oracle Corporation.
If the Programs are delivered to the US Government or anyone licensing or using the Programs on
behalf of the US Government, the following notice is applicable:
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other
inherently dangerous applications. It shall be licensee’s responsibility to take all appropriate fail–safe,
back up, redundancy and other measures to ensure the safe use of such applications if the Programs
are used for such purposes, and Oracle disclaims liability for any damages caused by such use of the
Programs.
Oracle is a registered trademark, and Oracle8, Oracle8i, Oracle9i, Oracle Financials, OracleMetaLink,
PL/SQL, and SQL*Plus are trademarks or registered trademarks of Oracle Corporation. Other names
may be trademarks of their respective owners.
Contents
VOLUME 1Volume 1 . . . . . . . . . . . . . . . . . . . . . . . . . . i
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Audience for This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
How To Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Documentation Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Other Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Online Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Related User’s Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Guides Related to All Products . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
User Guides Related to This Product . . . . . . . . . . . . . . . . . . . . xxiv
Installation and System Administration . . . . . . . . . . . . . . . . . xxv
Other Implementation Documentation . . . . . . . . . . . . . . . . . . xxvi
Training and Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviii
Do Not Use Database Tools to Modify Oracle
Applications Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
About Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Your Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxx
Contents iii
Chapter 2 Setting Up Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1
Oracle Workflow Hardware and Software Requirements . . . . . . 2–2
Overview of Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Overview of Required Set Up Steps for the Standalone
Version of Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Overview of Required Set Up Steps for the Version of
Oracle Workflow Embedded in Oracle Applications . . . . . . 2–6
Optional Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6
Other Workflow Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–7
Identifying the Version of Your Oracle Workflow Server . . . 2–8
Setup Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–9
Setup Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 10
Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 11
Overview of Oracle Workflow Access Protection . . . . . . . . . . . . . 2 – 94
Setting Up a Default Access Level . . . . . . . . . . . . . . . . . . . . . . 2 – 98
Using the Workflow Definitions Loader . . . . . . . . . . . . . . . . . . . . . 2 – 100
Using the Workflow XML Loader . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 105
Contents v
System: Error Item Type and Item Attributes . . . . . . . . . . . . . 6 – 27
Default Error Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 28
Retry–only Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 32
Default Event Error Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 34
Contents vii
CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 101
GET_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 102
TOKEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 103
RAISE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 104
CONTEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 107
TRANSLATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 109
Workflow Purge APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 110
Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 112
Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 113
Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 114
Total . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 115
TotalPERM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 116
AdHocDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 117
Purge Obsolete Workflow Runtime Data Concurrent
Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 118
Workflow Directory Service APIs . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 120
GetRoleUsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 121
GetUserRoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 122
GetRoleInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 123
GetRoleInfo2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 124
IsPerformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 125
UserActive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 126
GetUserName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 127
GetRoleName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 128
GetRoleDisplayName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 129
SetAdHocUserStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 130
SetAdHocRoleStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 131
CreateAdHocUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 132
CreateAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 134
AddUsersToAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 136
SetAdHocUserExpiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 137
SetAdHocRoleExpiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 138
SetAdHocUserAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 139
SetAdHocRoleAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 140
RemoveUsersFromAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 141
Workflow Preferences API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 142
get_pref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 142
Workflow Monitor APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 143
GetAccessKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 144
GetDiagramURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 145
GetEnvelopeURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 147
GetAdvancedEnvelopeURL . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 149
Contents ix
OpenNotificationsExist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 208
Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 209
AddAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 210
SetAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 211
GetAttrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 213
GetInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 214
GetText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 215
GetShortText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 216
GetAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 217
GetAttrDoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 219
GetSubject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 220
GetBody . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 221
GetShortBody . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 222
TestContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 223
AccessCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 224
WorkCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 225
getNotifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 226
getNotificationAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 227
WriteToClob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 228
Overview of the Oracle Workflow Business Event System . . . . . 8 – 229
Business Event System Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 230
Agent Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 231
getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 231
getSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 231
setName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 232
setSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 232
Parameter Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 233
getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 233
getValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 233
setName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 234
setValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 234
Parameter List Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 235
Event Message Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 236
Initialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 239
getPriority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 239
getSendDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 239
getReceiveDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getCorrelationID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getParameterList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getEventName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getEventKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 241
getEventData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 241
Contents xi
Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 277
Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 278
Success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 279
Workflow_Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 280
Error_Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 281
SetParametersIntoParameterList . . . . . . . . . . . . . . . . . . . . . . . . 8 – 282
Event Function APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 283
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 284
SubscriptionParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 286
AddCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 287
Generate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 289
Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 291
Business Event System Replication APIs . . . . . . . . . . . . . . . . . . . . 8 – 293
WF_EVENTS Document Type Definition . . . . . . . . . . . . . . . . 8 – 295
WF_EVENTS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 296
WF_EVENTS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 297
WF_EVENT_GROUPS Document Type Definition . . . . . . . . 8 – 298
WF_EVENT_GROUPS_PKG.Generate . . . . . . . . . . . . . . . . . . 8 – 299
WF_EVENT_GROUPS_PKG.Receive . . . . . . . . . . . . . . . . . . . 8 – 300
WF_SYSTEMS Document Type Definition . . . . . . . . . . . . . . . 8 – 301
WF_SYSTEMS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 302
WF_SYSTEMS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 303
WF_AGENTS Document Type Definition . . . . . . . . . . . . . . . . 8 – 304
WF_AGENTS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 305
WF_AGENTS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 306
WF_EVENT_SUBSCRIPTIONS Document Type
Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 307
WF_EVENT_SUBSCRIPTIONS_PKG.Generate . . . . . . . . . . . 8 – 308
WF_EVENT_SUBSCRIPTIONS_PKG.Receive . . . . . . . . . . . . 8 – 309
Index
VOLUME 2Volume 2 . . . . . . . . . . . . . . . . . . . . . . . . . . i
Contents xiii
System Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 4
Agent Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 4
Event Subscription Definition Events . . . . . . . . . . . . . . . . . . . 14 – 5
Synchronize Event Systems Event . . . . . . . . . . . . . . . . . . . . . . 14 – 5
Seed Event Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 6
Ping Agent Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 8
System Signup Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 9
Any Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 10
Unexpected Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 12
Workflow Send Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 16
The Workflow Send Protocol Item Type . . . . . . . . . . . . . . . . . 14 – 17
Summary of the Workflow Event Protocol Process . . . . . . . . 14 – 19
Workflow Event Protocol Process Activities . . . . . . . . . . . . . . 14 – 20
Workflow Send Protocol Events . . . . . . . . . . . . . . . . . . . . . . . . 14 – 23
Contents xv
Supplier: Send Supplier Invoice Subprocess Activities . . . . . 15 – 101
B2B Purchase Order Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 – 102
B2B Purchase Order Acknowledgement Event . . . . . . . . . . . 15 – 105
B2B Advanced Shipment Notice Event . . . . . . . . . . . . . . . . . . 15 – 106
B2B Invoice Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 – 107
Glossary
Index
Contents xvii
xviii Oracle Workflow Guide
Preface
Preface xix
Audience for This Guide
Welcome to the Oracle Workflow Guide.
This guide assumes you have a working knowledge of the following:
• The principles and customary practices of your business area.
• Oracle Workflow
If you have never used Oracle Workflow, Oracle suggests you
attend one or more of the Oracle Workflow training classes
available through Oracle University.
See Other Information Sources for more information about Oracle
Applications product information.
The Oracle Workflow Guide also assumes you have a basic
understanding of operating system concepts and familiarity with
Oracle database server, PL/SQL, and Oracle9i Application Server
technology. If you have not yet been introduced to any of these
systems, Oracle suggests you attend one or more of the training classes
available through Oracle University.
Documentation Accessibility
Our goal is to make Oracle products, services, and supporting
documentation accessible, with good usability, to the disabled
community. To that end, our documentation includes features that
make information available to users of assistive technology. This
documentation is available in HTML format, and contains markup to
facilitate access by the disabled community. Standards will continue to
evolve over time, and Oracle Corporation is actively engaged with
other market–leading technology vendors to address technical
obstacles so that our documentation can be accessible to all of our
customers. For additional information, visit the Oracle Accessibility
Program Web site at http://www.oracle.com/accessibility/.
Preface xxi
Accessibility of Code Examples in Documentation
JAWS, a Windows screen reader, may not always correctly read the
code examples in this document. The conventions for writing code
require that closing braces should appear on an otherwise empty line;
however, JAWS may not always read a line of text that consists solely
of a bracket or brace.
Online Documentation
If you are using the version of Oracle Workflow embedded in Oracle
Applications, note that all Oracle Applications documentation is
available online (HTML or PDF).
• Online Help – The new features section in the HTML help
describes new features in 11i. This information is updated for
each new release of Oracle Workflow. The new features section
also includes information about any features that were not yet
available when this guide was printed. For example, if your
administrator has installed software from a mini–pack or an
upgrade, this document describes the new features. Online help
patches are available on MetaLink.
• 11i Features Matrix – This document lists new features available
by patch and identifies any associated new documentation. The
new features matrix document is available on MetaLink.
Preface xxiii
User Guides Related to This Product
Preface xxv
Maintaining Oracle Applications
Use this guide to help you run the various AD utilities, such as
AutoUpgrade, AutoPatch, AD Administration, AD Controller, AD
Relink, License Manager, and others. It contains how–to steps,
screenshots, and other information that you need to run the AD
utilities. This guide also provides information on maintaining the
Oracle applications file system and database.
Preface xxvii
Oracle Order Management Suite APIs and Open Interfaces Manual
This manual contains up–to–date information about integrating with
other Oracle Manufacturing applications and with your other systems.
This documentation includes APIs and open interfaces found in Oracle
Order Management Suite.
Training
Oracle offers a complete set of training courses to help you and your
staff master Oracle Workflow and reach full productivity quickly. These
courses are organized into functional learning paths, so you take only
those courses appropriate to your job or area of responsibility.
You have a choice of educational environments. You can attend courses
offered by Oracle University at any one of our many Education
Centers, you can arrange for our trainers to teach at your facility, or
you can use Oracle Learning Network (OLN), Oracle University’s
online education utility. In addition, Oracle training professionals can
tailor standard courses or develop custom courses to meet your needs.
For example, you may want to use your organization structure,
terminology, and data as examples in a customized training session
delivered at your own facility.
Support
From on–site support to central support, our team of experienced
professionals provides the help and information you need to keep
Oracle Workflow working for you. This team includes your Technical
Representative and Account Manager, and Oracle’s large staff of
consultants and support specialists with expertise in your business
area, managing an Oracle database server, and your hardware and
software environment.
About Oracle
Oracle Corporation develops and markets an integrated line of
software products for database management, applications
development, decision support, and office automation, as well as
Oracle Applications, an integrated suite of more than 160 software
modules for financial management, supply chain management,
manufacturing, project systems, human resources, and customer
relationship management.
Oracle products are available for mainframes, minicomputers, personal
computers, network computers and personal digital assistants,
allowing organizations to integrate different computers, different
operating systems, different networks, and even different database
management systems, into a single, unified computing and information
resource.
Preface xxix
Oracle is the world’s leading supplier of software for information
management, and the world’s second largest software company. Oracle
offers its database, tools, and applications products, along with related
consulting, education, and support services, in over 145 countries
around the world.
Your Feedback
Thank you for using Oracle Workflow and this guide.
Oracle values your comments and feedback. At the end of this guide is
a Reader’s Comment Form you can use to explain what you like or
dislike about Oracle Workflow or this guide. Mail your comments to
the following address or call us directly at (650) 506–7000.
Oracle Applications Documentation Manager
Oracle Corporation
500 Oracle Parkway
Redwood Shores, CA 94065
U.S.A.
Or, send electronic mail to [email protected].
1 Overview of Oracle
Workflow
Routing Information
With so much information available, and in so many different forms,
how do you get the right information to the right people? Oracle
Workflow lets you provide each person with all the information they
need to take action. Oracle Workflow can route supporting information
to each decision maker in a business process.
Workflow Engine
The Workflow Engine embedded in the Oracle database server monitors
workflow states and coordinates the routing of activities for a process.
Changes in workflow state, such as the completion of workflow
activities, are signaled to the engine via a PL/SQL API or a Java API.
Based on flexibly–defined workflow rules, the engine determines which
activities are eligible to run, and then runs them. The Workflow Engine
supports sophisticated workflow rules, including looping, branching,
parallel flows, and subflows.
Electronic Notifications
Oracle Workflow lets you include users in your workflows to handle
activities that cannot be automated, such as approvals for requisitions or
sales orders. Electronic notifications are routed to a role, which can be
an individual user or a group of users. Any user associated with that
role can act on the notification.
Each notification includes a message that contains all the information a
user needs to make a decision. The information may be embedded in
the message body or attached as a separate document. Oracle Workflow
interprets each notification activity response to decide how to move on
to the next workflow activity.
Internet–Enabled Workflow
Any user with access to a standard Web browser can be included in a
workflow. Web users can access a Notification Web page to see their
outstanding work items, then navigate to additional pages to see more
details or provide a response.
2 Setting Up Oracle
Workflow
Standalone/
Step
Required Step Embedded/
No. Both
Step 1 Optional Partitioning Workflow Tables: page 2 – 11 Embedded
Step 2 Required Setting Global User Preferences: page 2 – 13 Both
Step 3 Required Setting Up an Oracle Workflow Directory Service: page Standalone
2 – 20
Step 4 Required Creating the WF_LANGUAGES View: page 2 – 28 Standalone
Step 5 Required Setting the Socket Listener Profile Options: page 2 – 30 Embedded
Step 6 Required Setting the WF_RESOURCES Environment Variable: Standalone
page 2 – 32
Step 7 Optional Defining Document Management Repositories: page Both
2 – 33
Step 8 Required Setting Up Background Workflow Engines: page 2 – 36 Both
Step 9 Optional Implementing the Notification Mailer: page 2 – 41 Both
Step 10 Optional Modifying Your Message Templates: page 2 – 62 Both
Step 11 Optional Customizing the Logo on Oracle Workflow’s Web Pages: Both
page 2 – 77
Step 12 Optional Adding Custom Icons to Oracle Workflow: page 2 – 78 Both
Step 13 Optional Setting Up the Java Function Activity Agent: page 2 – 79 Standalone
Step 14 Optional Setting Up the Business Event System: page 2 – 89 Both
Step 15 Optional Setting Up the WF_EVENT_OMB_QH Queue Handler: Both
page 2 – 93
Table Index
WF_ITEM_ACTIVITY_STATUSES WF_ITEM_ACTIVITY_STATUSES_PK
WF_ITEM_ACTIVITY_STATUSES_N1
WF_ITEM_ACTIVITY_STATUSES_N2
WF_ITEM_ACTIVITY_STATUSES_H WF_ITEM_ACTIVITY_STATUSES_H_N1
WF_ITEM_ACTIVITY_STATUSES_H_N2
WF_ITEM_ATTRIBUTE_VALUES WF_ITEM_ATTRIBUTE_VALUES_PK
WF_ITEMS WF_ITEMS_PK
WF_ITEMS_N1
WF_ITEMS_N2
WF_ITEMS_N3
Table 2 – 1 (Page 1 of 1)
For example:
sqlplus apps/apps @wfupartb applsys apps apps apps
If the script fails, you must perform any necessary cleanup manually.
Since the script’s operations are DDL operations running in nologging
mode, rollback is not possible.
Context: You need to perform this step only once.
WF_USERS
The WF_USERS view should reference information about all the
individuals in your organization who may receive workflow
notifications. Create this view, making sure it contains the following
columns:
• Name—The internal name of the user as referenced by the
Workflow Engine and Notification System. For example, an
internal name for a user can be mbeech or 009, where 009
represents the user’s employee ID.
WF_ROLES
The WF_ROLES view should reference information about all the roles in
your organization who may receive workflow notifications. Create this
view, making sure it contains the following columns pertaining to the
roles in your repository. Those columns that are preceded by an
asterisk (*) are similar to the matching column described for the
WF_USERS view:
WF_USER_ROLES
The WF_USER_ROLES view is an intersection of the users and roles in
WF_USERS and WF_ROLES. Create this view, making sure it contains
the following columns:
• User_Name—The internal name of the user as listed in the view
WF_USERS.
• User_Orig_System—A code that you assign to the user directory
repository as listed in the view WF_USERS.
• User_Orig_System_ID—The primary key that identifies the user
in the user directory repository as listed in the view WF_USERS.
• Role_Name—The internal name of the role as listed in the view
WF_ROLES.
• Role_Orig_System—A code that you assign to the role directory
repository as listed in the view WF_ROLES.
• Role_Orig_System_ID—The primary key that identifies the role
in the role directory repository as listed in the view WF_ROLES.
For Windows NT, run the regedit32 command and locate the
NLS_LANG setting under the
HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE hierarchy. Double
click on NLS_LANG, then set the variable to the new value and
save your edit.
6. Create a translated version of your workflow process definition
and save it as a flat file (.wft).
7. Load the translated .wft file to your workflow database, making
sure that the current NLS_LANG setting is correct.
Note: To determine the language to load, the Workflow
Definitions Loader uses the language specified in the .wft file,
while the Workflow Resource Generator accepts a language
parameter. If you do not specify a language parameter, the
Workflow Resource Generator defaults to the current setting of
NLS_LANG.
See Also
Notification Preferences
Oracle Workflow allows you to determine how you view notifications
by setting a notification preference in the User Preferences web page.
See: Setting User Preferences: page 9 – 5.
Often times, the functionality of a user’s mail reader determines what
the user’s notification preference should be. Some mail readers can
only display plain text, others can display HTML formatting, while still
others can only display HTML formatting in an attachment. Five
notification preferences are available:
• Plain text mail (MAILTEXT)—The notification message appears
as plain text, with no attachments. See: Plain Text E–mail: page
2 – 43.
• HTML mail (MAILHTML)—The notification message appears as
HTML–formatted text, with at least one other attachment that is
a link to the notification in the Notifications web page. If the
notification message has ’Content–Attached’ message attributes,
these attributes appear as additional attachments to the message.
See: HTML–Formatted E–mail: page 2 – 44.
HTML–Formatted E–mail
If the performer of a notification has a notification preference of HTML
mail (MAILHTML), the notification is flagged as such in the Workflow
Notification table. When the Notification Mailer polls the Notification
table and identifies that flag, it generates an HTML–formatted e–mail
notification from the information in the table and sends it to the
performer role. The performer role should use an e–mail reader that
can interpret and display HTML content within a message body.
Note: If your e–mail reader cannot interpret HTML formatting
in a message body, you should set your notification preference
to plain text mail with HTML Attachments (MAILATTH).
The Notification Mailer uses the HTML Body defined for the message
in the Message Body property page to generate the HTML e–mail. If
no HTML Body is defined, it uses the Text Body to generate the HTML
mail. The Notification Mailer token replaces all message attributes
referenced in the message body with HTML–formatted values. For
example:
• PL/SQL and PL/SQL CLOB document attributes are token
replaced with HTML text or plain text between <pre>...</pre>
HTML tags.
• Document Management document attributes are token replaced
with an HTML anchor. When you select such an anchor, your
e–mail reader takes you to the target document management
integration screen to display the referenced document. (This
functionality will be supported in a future release.)
Replace <xxx> with snd to use the UNIX Sendmail version of the
Notification Mailer. Replace <config_file> with the full path and
name of the configuration file that contains the parameters you
want to run with the Notification Mailer.
2. Alternatively, you can specify the parameters for the Notification
Mailer as arguments on the command line rather than in a
configuration file, by typing the following command:
wfmail.<xxx> <arg1> <arg2> ...
or
<native path>
Response Processing
You must create three folders or files in your response mail account
before starting the Notification Mailer to process responses. The three
folders or files serve to hold discarded, unprocessed, and processed
messages.
The Notification Mailer does the following to check for response
messages:
• Logs into the response mail account.
• Checks for messages. If a message exists, it reads the message,
checking for the notification ID and node identifier.
• If the message is not a notification, it moves it to the discard
folder.
&RESPONSE
____________End of Response Template_____________
Notification Details:
&BODY
&RESPONSE
____________________________________________________
Notification Details:
&BODY
Notification Details:
&BODY
–––––––––––––––––––––––––––––––––––––––––––
&BODY
<HR WIDTH=”100%”>
<BR>
&URLLIST
<BR>
<HR WIDTH=”100%”>
<BR>
</BODY>
</HTML>
––––––––––––––––––––––––––––––––––––––––––––
&BODY
&RESPONSE
–––––––––––––––––––––––––––––––––––––––––––
Notification Details:
&BODY
––––––––––––––––––––––––––––––––––––––––––––
&BODY
&SUMMARY
&SUMMARY
</BODY>
</HTML>
&UBODY
<P>&UBODY
</body></html>
For example:
CREATE DATABASE LINK wf817.us.oracle.com CONNECT TO
wfuser IDENTIFIED BY welcome
USING ’wf817’;
To verify the names of your database links, use the following syntax:
SELECT db_link FROM all_db_links
You can also use the Check Setup web page to verify that your database
links are set up. See: Checking the Business Event System Setup: page
13 – 51.
See Also
Setting Up Queues
The Business Event System uses Oracle Advanced Queuing (AQ) to
communicate event messages between systems. You must associate a
queue with each agent you define in the Event Manager.
When you install Oracle Workflow, four standard queues are created
automatically for the four standard Workflow agents. These queues all
use the standard WF_EVENT_T structure as their payload type. See:
Agents: page 13 – 22 and Event Message Structure: page 8 – 236.
The following table lists the standard queues.
Table 2 – 2 (Page 1 of 1)
You must not change the setup of these queues. However, you must
schedule listeners for WF_DEFERRED and WF_ERROR to enable
deferred subscription processing and error handling for the Business
Event System, respectively. Also, if you want to use WF_IN and
WF_OUT for event message propagation, schedule a listener for
WF_IN and propagations for WF_OUT as well. See: Scheduling
Listeners for Local Inbound Agents: page 13 – 54 and Scheduling
Propagations for Local Outbound Agents: page 13 – 54.
You can also set up your own queues for event message propagation.
To set up a queue, you must create the queue table, create the queue,
and start the queue.
• To create a queue table, use the PL/SQL procedure
DBMS_AQADM.Create_Queue_Table. Use the following syntax:
DBMS_AQADM.Create_Queue_Table (
queue_table => ’<queue table name>’,
queue_payload_type => ’<queue payload type>’,
sort_list => ’PRIORITY,ENQ_TIME’,
multiple_consumers => TRUE
compatible => ’8.1’);
For queues that you want use the standard Workflow format,
specify the queue payload type as WF_EVENT_T. These queues can
use the standard queue handler provided with Oracle Workflow,
WF_EVENT_QH. If you define a queue with a different payload
type, you must create a queue handler to translate between the
standard Workflow format and the format required by the
queue. See: Standard APIs for a Queue Handler: page 7 – 23.
You can also use the storage_clause parameter to specify the
tablespace where you want to create the queue table. You may
want to specify a tablespace if you expect a queue to be very
large.
See Also
See Also
Access Level
Each user of Oracle Workflow operates the system at a certain access
level according to the range of levels listed above. 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. See: Using the
Workflow Definitions Loader: page 2 – 100.
Note: The Workflow Definitions Loader program references
the access level stored in the environment variable called
WF_ACCESS_LEVEL, which you must define when you install
Oracle Workflow on your server. If you do not define this
environment variable, the Workflow Definitions Loader simply
assumes a default access level of 100.
Note: When you install the version of Oracle Workflow
embedded in Oracle Applications, you need to define this
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 controls whether other users can modify the
object based on their access levels.
To change the protection level of an object, display the Access tab of the
object’s property page. The protection level that you set for an object is
dependent on your current access level. You can control access to an
object in one of four ways:
• Allow access to everyone—By default, all users are allowed
access to an object if both ”Preserve Customizations’ and ’Lock
at this Access Level’ are unchecked in the Access tab, that is the
protection level is equal to 1000.
• Limit access to users with access levels equal to your own or
higher—If you check ’Preserve Customizations’ in the Options
region of the Access tab, you designate the object as being
customizable by anyone with an access level equal to or higher
than your current access level. You should only mark objects as
customizable if you are sure that you will not be providing
upgraded versions of this object in the future that would
overwrite other user’s customizations to it.
• Limit access to users with access levels equal to your own or
lower—If you check ’Lock at this Access Level’, you protect the
object and ensure that the object may only be modified by users
with an access level equal to or lower than your current access
level. Users operating at a higher access level will see a small
lock on the workflow object’s icon, indicating that the object can
be used but not modified. Protect any objects that you want to
define as standard components that will not change unless you
provide a global upgrade. For this reason, it is important that
you always operate at the same consistent access level.
• Limit access to users with access levels equal to your own—If
you check both ’Lock at this Level’ and ’Preserve
Customizations’ you ensure that the object cannot be modified
Table 2 – 3 (Page 1 of 1)
<input_file> represents the name and full path of the input file
you want to upload from. When using the force option, 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 option is useful for fixing data integrity problems in a
database with a known, reliable file backup. The force option is
" To run the Workflow Definitions Loader for the version of Oracle
Workflow embedded in Oracle Applications
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.
or
<native path>
See Also
If you are using the standalone version of Oracle Workflow, you can
use sample scripts called wfxload for UNIX or wfxload.bat for
Windows NT to run the Workflow XML Loader. These scripts are
located on your server in the Oracle Workflow admin subdirectory. For
example, on UNIX, use the following command:
wfxload –d[e] <user> <password> <connect_string> <protocol>
<lang> <output_file> <object> <key>
When running the Workflow XML Loader, use either the –d option or
the –de option to specify the download mode that you want.
• –d —Normal download mode. The loader converts
system–specific data within the object definitions to tokens
prefixed with #, where appropriate.
• –de —Exact download mode. The loader copies the object
definitions exactly and does not convert any data to tokens.
Additionally, replace the variables in the download command with
your parameters as follows:
• <user>—The user name of your database account.
• <password>—The password for your database account.
• <connect_string>—The connect string for the database. The
format of the connect string depends on the JDBC driver type.
– For a JDBC OCI8 driver, the connect string should be the
database name as specified in its TNSNAMES entry, in the
following format:
<database_name>
– For a JDBC THIN driver, you can use two different types of
connect string. For the first type, the connect string should
include the host name, port number, and database system
identifier (SID) in the following format:
<host_name>:<port_number>:<database_SID>
For the second type, the connect string should include an
Oracle Net name–value pair with the host name, protocol,
port number, and SID in the following format:
(description=(address=(host=<host_name>)(protocol=
<protocol>)(port=<port_number>))(connect_data=(sid=
<database_SID>)))
• <protocol>—The JDBC driver type you want to use to connect
to the database. The JDBC driver type can be either oci8 or thin.
• <lang>—The abbreviation for the language of the XML file. This
parameter is case insensitive. Use the standard language
abbreviations for the Oracle database server, such as US for
American or JA for Japanese. For a list of the standard language
If you are using the standalone version of Oracle Workflow, you can
use sample scripts called wfxload for UNIX or wfxload.bat for
Windows NT to run the Workflow XML Loader. These scripts are
located on your server in the Oracle Workflow admin subdirectory. For
example, on UNIX, use the following command:
wfxload –u <user> <password> <connect_string> <protocol>
<lang> <source_file>
When running the Workflow XML Loader, use the –u option to specify
that you want to run the loader in upload mode. Additionally, replace
the variables with your parameters as follows:
• <user>—The user name of your database account.
• <password>—The password for your database account.
• <connect_string>—The connect string for the database. The
format of the connect string depends on the JDBC driver type.
– For a JDBC OCI8 driver, the connect string should be the
database name as specified in its TNSNAMES entry, in the
following format:
<database_name>
– For a JDBC THIN driver, the connect string should include
the host name, port number, and database system identifier
(SID) in the following format:
<host_name>:<port_number>:<database_SID>
• <protocol>—The JDBC driver type you want to use to connect
to the database. The JDBC driver type can be either oci8 or thin.
• <lang>—The abbreviation for the language of the XML file. This
parameter is case insensitive. Use the standard language
abbreviations for the Oracle database server, such as US for
American or JA for Japanese. For a list of the standard language
abbreviations, see: Locale Data, Oracle National Language Support
Guide.
• <source_file>—The name and full path of the source file from
which you want to upload definitions.
3 Defining a Workflow
Process
1. Choose Find... from the Edit menu to display a Search window that
lets you specify search criteria to find an object in the navigator
tree.
2. Enter the text to search for in the Search Text field. The search is
case insensitive and looks for the text pattern that you specify in
the field that you specify.
3. Specify to search for this text in the object’s Display Name or
Internal Name.
4. Specify the object type to restrict this search to or check All Objects
to search for the text within the property pages of all objects.
5. Choose Search.
6. You can choose Find Again from the Edit menu to repeat the search
using the search criteria previously defined in the Search window.
See Also
See Also
See Also
See Also
See Also
☞ Attention: The Close Store and Exit options from the File
menu are enabled only when the Navigator window is the
current window.
See Also
Using the Release 2.6.1 Oracle Workflow Builder with a Release 2.6
Embedded Server or a Release 2.6.1 Standalone Server
If you are using the Oracle Workflow Builder with Oracle Workflow
Server Release 2.6 embedded in Oracle Applications, or with the
standalone version of the Oracle Workflow Server Release 2.6.1, you
can use all currently available features in your workflow processes. You
can save these process definitions to the database and open process
definitions from the database to view or modify them.
You can also open existing process definitions that were created with
the Release 2.5 Oracle Workflow Builder or with the base Release 2.6
Oracle Workflow Builder and save these process definitions to a
database with Oracle Workflow Server Release 2.6 embedded in Oracle
Applications, or with standalone Oracle Workflow Server Release 2.6.1.
4 Defining Workflow
Process Components
Item Types
An item type is a classification of the components that make up a
workflow process. You must associate any component that you create
for a process, such as a function activity or a message, with a particular
item type. Often it makes sense to define an item type so that it
describes the item being managed by your workflow process. For
example, purchase order requisition can be an item type while a
purchase order requisition identified by a particular ID number is an
item of that item type. See: To Create an Item Type: page 4 – 7.
Attribute Types
There are ten attribute types, as shown below. The type determines
what values are acceptable and how the attribute is used.
• Text—The attribute value is a string of text.
• Number—The attribute value is a number with the optional
format mask you specify.
• Date—The attribute value is a date with the optional format
mask you specify.
• Lookup—The attribute value is one of the lookup code values in
a specified lookup type.
• Form—The attribute value is an Oracle Applications internal
form function name and its optional form function parameters.
This attribute type is not relevant for the standalone version of
Oracle Workflow.
If you include a form–type attribute in a notification message as
a message attribute, the notification, when viewed from the
Notification Details web page, displays an attached form icon
that lets users drill down to the referenced form. See: Overview
of Menus and Function Security, Oracle Applications Developer’s
Guide.
• URL—The attribute value is a Universal Resource Locator (URL)
to a network location. If you reference a URL attribute in a
notification message as a message attribute, the notification,
when viewed from the Notification Details web page or as an
HTML–formatted e–mail, displays an anchor to the URL
specified by the URL attribute. The user can complete an
activity or see additional information related to the activity by
accessing that URL.
• Document—The attribute value is an attached document. You
can specify the following types of documents in the default value
field:
– PL/SQL document—a document representing data from the
database as a character string, generated from a PL/SQL
procedure.
Persistence Type
When you define an item type, you must also specify its persistence
type. The persistence type controls how long a status audit trail is
maintained for each instance of the item type. If you set Persistence to
Permanent, the runtime status information is maintained indefinitely
until you specifically purge the information by calling the procedure
WF_PURGE.TotalPerm( ).
If you set an item type’s Persistence to Temporary, you must also
specify the number of days of persistence. The status audit trail for
each instance of a Temporary item type is maintained for at least ’n’
days of persistence after its completion date. After the ’n’ days of
persistence, you can then use any of the WF_PURGE APIs to purge the
item type’s runtime status information. See: WF_PURGE: page 8 – 110.
1. If you do not already have a data store open, select New from the
File menu to create a new data store to define this new item type.
Then define a new item type in the navigator tree by choosing New
Item Type from the Edit menu. An Item Type property page
appears.
2. Every item type has an all–uppercase internal name, which is a
maximum of eight characters long. All Oracle Workflow APIs, SQL
scripts, and PL/SQL procedures refer to the internal name when
identifying an item type.
See Also
See Also
See Also
In the Access tab page, the ’Range of Editable Access Levels’ indicator
bar provides a relative indication of the range of access levels that can
edit the object. The shaded area represents the access levels that can
edit the object, while the vertical bar represents your current access
level. See: Overview of Oracle Workflow Access Protection: page
2 – 94.
The indicator bar can be shaded solid green, or shaded with any
combination of solid green and crosshatch grey. If the ”Allow
Table 4 – 1 (Page 1 of 1)
Lookup Types
A lookup type is a static list of values. These lists can be referenced by
activities and by item type, message or activity attributes. For
example, an activity can reference a lookup type for its possible result
values, while a message attribute can reference a lookup type as a
means of providing a list of possible responses to the performer of a
notification.
1. Select an item type from the navigator tree and choose New
Lookup Type from the Edit menu. A Lookup Type property page
appears.
2. Lookup types have an all–uppercase Internal Name with no
leading/trailing spaces and a translatable Display Name. All
Oracle Workflow APIs, SQL scripts, and PL/SQL procedures refer
to the internal name when identifying a lookup type.
1. Select a lookup type from the navigator tree and choose New
Lookup Code from the Edit menu. A Lookup Code property page
appears.
2. Enter an Internal Name with no leading/trailing spaces and a
Display Name for the lookup code. You can also enter an optional
description. All Oracle Workflow APIs, SQL scripts, and PL/SQL
procedures refer to the internal name when identifying a lookup
code.
Messages
The Messages branch of the navigator tree lists all available workflow
messages for the current item type.
A message is what a notification activity sends to a role in a workflow
process. A message can prompt a user for a reply or an action to take
that determines what the next activity in the process should be. The
recipient of a workflow message is called the performer.
Each message is associated with a particular item type. This allows the
message to reference the item type’s attributes for token replacement at
runtime when the message is delivered.
When you define a message, you can specify that the message prompts
a recipient for a special response value that the Workflow Engine then
uses to determine how to branch to the next eligible activity in the
process. You can create a message with context–sensitive content by
including message attribute tokens in the message subject and body
that reference item type attributes. A message function lets you include
a formatted table of message attributes or a notification history table in
the message body. You can also attach message attributes that
represent entire documents or URLs to a notification message. In
addition, you can create message attributes that generate a response
section that is unique to the message.
You can drag a message onto the Notifications branch to create a new
notification activity that sends that message. You can also drag a
Message Result
When you create a message for a notification activity, you should make
note of whether the notification activity has a Result Type specified. If
it does, then the message you create needs to prompt the notification
recipient for a special response that is interpreted as the result of the
notification activity. The Workflow Engine uses that result to
determine how it should branch to the next eligible activity in the
process.
To create a message that prompts for this special response, complete
the Result tab in the message’s property page. The information you
enter creates a special ’Respond’ message attribute for the message that
has an internal name of RESULT. The RESULT message attribute has a
data type of Lookup and must be set to the same lookup type as the
notification activity’s Result Type. This ensures that the performer of
the notification can choose from a list of possible response values that
matches the list of possible results that the notification activity is
expecting. See: Send and Respond Message Attributes: page 4 – 24.
#HIDE_REASSIGN Attribute
You can use a special message attribute or notification attribute with
the internal name #HIDE_REASSIGN to hide the Reassign button in
the Notification Detail web page. When users view a notification from
their Worklist web page, the response frame in the Notification Detail
page includes the Reassign button by default. If you want to prevent
users from reassigning a notification, you can add the
#HIDE_REASSIGN attribute to control whether the Reassign button is
displayed or hidden.
The #HIDE_REASSIGN attribute must be of type text. To hide the
Reassign button, set the value of this attribute to Y. To display the
Reassign button, set the value to N.
• If you always want to hide the Reassign button for notifications
using a particular message, specify the value Y as a constant.
• If you only want to hide the Reassign button in certain cases,
specify an item type attribute as the value. Then include logic in
your workflow process that dynamically determines at runtime
whether the button should be hidden or displayed and sets the
item type attribute to Y or N, respectively.
See Also
#FROM_ROLE Attribute
You can use a special message attribute with the internal name
#FROM_ROLE to specify the role that is the source of a notification.
See Also
1. Select the item type that you want to create a message for in the
navigator tree, and choose New Message from the Edit menu. A
Message property page appears.
2. Provide an internal name for the message that is all uppercase with
no leading/trailing spaces, and provide a display name. You may
also enter an optional description. All Oracle Workflow APIs, SQL
scripts, and PL/SQL procedures refer to the internal name when
identifying a message.
5. Select the Body tab to display the Body property page of the
message.
6. The subject gets its default value from the display name that you
entered in the Message tab. You can choose to keep the default
subject or enter a new subject for the message. The subject can
include message attributes that get token replaced with runtime
values when the message is delivered. To include a message
attribute in the subject, use an ampersand (&) followed by the
message attribute’s internal name. See: Send and Respond
Message Attributes: page 4 – 24 and To Define a Message Attribute:
page 4 – 34.
Suggestion: For clarity, you can assign a message attribute the
same name as the item type attribute it references.
See Also
Table 4 – 2 (Page 1 of 1)
Do you approve?
Action: ” ”
Approve
Reject
Review Comments: ” ”
Required Date: ” ”
Maximum Amount: ” ”
For the direct response method, the following boilerplate text is used to
generate the Response section of an e–mail notification:
Enter the <Display Name> on line <Sequence>. <Description>
<Type_Hint>
Enter the Action on line 1. Do you approve? Value must be one of the following:
Approve
Reject
Enter the Review Comments on line 2. Value must be 2000 bytes or less.
Enter the Required Date on line 3. If there is no required date, leave this blank. Value
must be a date in the form ”DD–MON–YYYY”.
Enter the Maximum Amount on line 4. This is the maximum approved amount. Value
must be a number.
Activities
An activity is a unit of work that contributes toward the
accomplishment of a process. An activity can be a notification, a
function, an event, or a process. A notification activity sends a message
to a workflow user. The message may simply provide the user with
information or request the user to take some action. A function activity
calls a PL/SQL stored procedure or some external program to perform
an automated function. An event activity receives, raises, or sends a
business event. A process activity is a modelled workflow process,
which can be included as an activity in another process to represent a
sub–process.
Activities are organized beneath their respective Processes,
Notifications, Functions, or Events headings in the navigator tree. You
can create, edit, and delete activity definitions in the navigator tree, and
drag an activity from the tree into a Process window to create a new
usage of that activity in a process diagram. Each activity is depicted as
an icon in a process diagram
Oracle Workflow provides an item type called Standard that includes
generic activities you can use in any process you define. For example,
some of the activities perform standard functions such as comparing
two values. See: Standard Activities: page 6 – 2.
Oracle Workflow also provides an item type called System:Error that
includes a standard error process and activities you can use to create a
custom error process. You can assign an error process to a process
Notification Activity
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. You define the message that the notification sends.
The message can be an informative note or it can prompt the performer
for a response. When a performer responds to a notification activity,
the Notification System processes the response and informs the
workflow engine that the notification activity is complete so that it can
continue processing the next eligible activity. See: To Create a
Notification Activity: page 4 – 47.
You specify the performer of a notification activity when you include
the notification activity as a node in the process. You can either
designate the performer to be a specific role or an item type attribute
that dynamically returns the name of a role. See: To Define Nodes:
page 5 – 8 and Roles: page 5 – 24.
When you define a notification activity, you can also optionally:
• Check Expand Roles to send an individual copy of the
notification message to each user in the role. The notification
remains in a user’s notification queue until the user responds or
closes the notification.
Function Activity
A function activity is defined by the PL/SQL stored procedure or
external program that it calls. Function activities are typically used to
perform fully automated steps in the process. As a PL/SQL stored
procedure, a function activity accepts standard arguments and can
return a completion result.
If you pass a parameter for the stored procedure, you can expose that
parameter as an activity attribute. The activity attribute’s value can be
set when you define that activity as a node in your process. Note that
these activity attributes are available only to the current activity and
are not global like item type attributes. See: To Define Activity
Attribute Values: page 5 – 17.
As an external program, a function activity is able to enqueue payload
information into an Oracle Advanced Queuing outbound queue for
some external agent to dequeue and consume. The external agent can
similarly enqueue updated attributes and a completion result into an
inbound queue that the Workflow Engine consumes and processes.
As an external Java program, a function activity is able to enqueue
payload information into an Oracle Advanced Queuing outbound
queue for the Java Function Activity Agent to dequeue and consume.
The results of the Java program are enqueued into an inbound queue
that the Workflow Engine consumes and processes. This functionality is
Event Activity
An event activity represents a business event from the Business Event
System within a workflow process. Include event activities in workflow
processes to model complex processing or routing logic for business
events beyond the standard event subscription options of running a
function or sending the event to a predefined agent. See: Managing
Business Events: page 13 – 2.
An event activity can either receive, raise, or send a business event.
• A Receive event activity can be marked as a Start activity for a
process, meaning it is always enabled to receive events.
Alternatively, a Receive event activity can be placed within the
process, so that it is only enabled to receive events after the
process transitions to that activity.
When the activity receives an event, the Workflow Engine stores
the event name, event key, and event message in item type
attributes, as specified in the node’s event details, and then
continues the thread of execution from the event activity. If that
activity has already received an event, then the On Revisit flag
for the activity determines whether the Workflow Engine
reexecutes the activity. See: To Define Optional Activity Details:
page 4 – 58.
If the event was originally raised by a Raise event activity in
another workflow process, the item type and item key for that
process are included in the parameter list within the event
message. In this case, the Workflow Engine automatically sets
the specified process as the parent for the process that receives
the event, overriding any existing parent setting. See:
SetItemParent: page 8 – 78.
• A Raise event activity retrieves information about the event and
raises the event to the Business Event System, which will then
execute subscriptions to the event. The activity retrieves the
event name, event key, and event data as specified in the node’s
event details. The event details can be dynamically determined
at runtime using item type attributes. You can also specify the
event name as a predefined constant for the event activity node.
Additionally, the activity retrieves the names and values of any
activity attributes defined for it and sets these attributes as
Process Activity
A process activity represents a collection of activities in a specific
relationship. When a process activity is contained in another process it
is called a sub–process. In other words, activities in a process can also
be processes themselves. There is no restriction on the depth of this
hierarchy. See: To Create a Process Activity: page 4 – 56.
Caution: Oracle Workflow does not support using a
subprocess activity multiple times within a process hierarchy.
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
1. Select the item type that you want to create a function for in the
navigator tree, then choose New Function from the Edit menu.
Define your function activity in the Activity property page that
appears.
2. A function activity must have an Internal Name (all uppercase and
no leading/trailing spaces) and a Display Name, which is the
translatable name that appears in your process diagram. Use the
description to provide an explanation about this activity.
See Also
1. Select the item type that you want to create an event for in the
navigator tree, then choose New Event from the Edit menu. Define
your event activity in the Activity property page that appears.
See Also
Voting Activity
You can create a voting activity that lets you send a notification to a
group of users in a role and tally the responses from those users. The
results of the tally determine the activity that the process transitions to
next.
A voting activity is a notification activity that first sends a notification
message to a group of users and then performs a PL/SQL
post–notification function to tally the users’ responses (votes).
The activity attributes you define and the following four fields in the
property pages of the notification activity determine its voting
behavior:
• Message field
• Result Type field
• Expand Roles check box
• Function field
See Also
A 50
B 50
C 50
Table 4 – 3 (Page 1 of 1)
The result is any response that gets more than fifty percent of the
votes. If no response gets more than fifty percent, the result is that
no match is found (#NOMATCH).
2. Simple Majority with Default
The following table shows the custom response activity attribute
value assigned to each response for a simple majority with default
voting method.
A 50
B 50
C blank
Table 4 – 4 (Page 1 of 1)
A 50
B blank
C blank
Table 4 – 5 (Page 1 of 1)
A blank
B blank
C blank
Table 4 – 6 (Page 1 of 1)
The result is the response that gets the highest number of votes.
5. Black Ball
The following table shows the custom response activity attribute
value assigned to each response for a black ball voting method.
YES 100
NO 0
Table 4 – 7 (Page 1 of 1)
GUILTY 100
NOT_GUILTY 100
Table 4 – 8 (Page 1 of 1)
See Also
Table 4 – 9 (Page 1 of 1)
When you modify a Workflow object that supports versioning, both the
original version and the new version exist in the database. Any active
work items that reference that object will continue to completion still
using the same version that was in effect when the work items were
initiated. Only new work items initiated after the change will use the
new version.
In the above example, work items that are initiated between January 1,
1998 and December 31, 1998 will send the message Vote Message with
result options of Yes or No, whether the work items are completed
before January 1, 1999 or not. Only work items that are initiated on or
after January 1, 1999 will send the message New Vote Message with
result options of Approve or Reject.
Note: All process definition information is versioned.
When you modify a Workflow object that does not support versioning,
however, the previous definition of the object is updated and only the
modified definition exists in the database. Any active work items that
reference that object will use the modified object after the change.
If the modified object is no longer compatible with the rest of the
workflow definition used by the work item, errors may arise. To avoid
such errors, you must take all references to the object into consideration
Item Attributes
When a work item is initiated, Oracle Workflow creates a runtime copy
of each item attribute that is defined for that item type. The Workflow
Engine refers to these runtime copies whenever an item attribute is
referenced in the PL/SQL code for a function activity in the workflow
process.
Adding a new item attribute after work items have been initiated will
not affect the active work items. However, these work items will not
Messages
When the Workflow Engine requests the Notification System to send a
message, the Notification System creates a notification attribute in the
notification tables for every message attribute. The notification
attribute rows contain the variable data that will be token–replaced into
the message body, including the subject line and body text, at runtime.
The message body, however, is not copied into the notification tables.
Instead, the message body is referenced by the various Notification
System APIs at runtime, when the notification is displayed to the user.
As a result, any modifications to a message body will affect
notifications in active work items that were sent before the change, as
well as notifications that are sent after the change.
You can make certain types of modifications to a message body without
risking incompatibility errors. These modifications include:
• Adding static text
• Editing static text
• Removing static text
• Removing message attribute tokens
PL/SQL Code
Although function activities support versioning, the underlying
PL/SQL code does not support versioning, unless you implement
versioning for your code yourself. Modifying PL/SQL code without
versioning changes the business flow for active work items that
reference that code. Inappropriate modifications may cause these work
items to fail.
To prevent changes in the PL/SQL API for a function activity from
affecting active work items, you should implement the changes by
creating a new API rather than by modifying the existing API. You can
attach the new API to your existing function activity without affecting
active work items, since function activities support versioning.
If you need to modify an existing API and you cannot create a new API
instead, you should plan your changes carefully to ensure that the
changes do not cause any backward incompatibility.
begin
––
–– RUN mode – normal process execution
––
if (funcmode = ’RUN’) then
–– your run code goes here
null;
wf_engine.SetItemAttrText(itemtype,
itemkey,
’<existing_attribute_name>’,
’<Existing attribute value>’);
begin
wf_engine.SetItemAttrText(itemtype,
itemkey,
’<new_attribute_name>’,
’<New attribute value>’);
––
–– CANCEL mode – activity ’compensation’
––
–– This is in the event that the activity must be undone,
–– for example when a process is reset to an earlier point
–– due to a loop back.
––
if (funcmode = ’CANCEL’) then
–– your cancel code goes here
null;
–– no result needed
result := ’COMPLETE’;
return;
end if;
––
–– Other execution modes may be created in the future. Your
–– activity will indicate that it does not implement a mode
–– by returning null
––
result := ’’;
return;
exception
when others then
See Also
5 Defining a Workflow
Process Diagram
Transitions
Transitions appear as arrows in your diagram and represent the
completion of one activity and the activation of another. For an activity
that completes with a result type of <None>, any transition that you
draw from it simply appears as an arrow to the next activity, indicating
that as long as the originating activity completes, the process
transitions to the next activity.
For an activity that has a defined result type, you must associate the
transition arrow that you create with one of the activity’s possible
results. The result that the activity returns when it completes then
determines what the next eligible activity is, as defined by the
results–based transitions that originate from the completed activity.
For example, ”Notify Approver” with a result of ’REJECTED’
transitions to ”Reject Requisition.” See: Requisition Process Activities:
page 15 – 15.
You can also create a <Default>, <Any>, or <Timeout> transition for an
activity that has a defined result type. The Workflow Engine follows a
<Default> transition if no other transition matching the completion
result exists. The Workflow Engine follows an <Any> transition
regardless of what completion result the activity returns. This allows
you to include a generic activity in the process that the Workflow
Engine executes in parallel with the result–specific activity. The
Workflow Engine follows a <Timeout> transition if the notification
Timeout Transitions
Draw a <Timeout> transition from a notification activity to some other
activity to force the process to perform the other activity if the
notification activity does not complete by a specified period of time.
See: To Define Nodes in a Process: page 5 – 8.
When an activity times out, Oracle Workflow marks the activity as
timed out and then cancels any notification associated with the timed
out activity. The Notification System sends a cancellation message to
the performer only if the cancelled notification was expecting a
response and the performer’s notification preference is to receive
e–mail.
Processing then continues along the <Timeout> transition as indicated
by your process definition. If a timed out activity does not have a
<Timeout> transition originating from it, Oracle Workflow executes the
error process associated with the timed out activity or its parent
process(es). See: To Define Optional Activity Details: page 4 – 58.
Note: You must have a background engine set up to process
timed out activities. See: Setting Up Background Workflow
Engines: page 2 – 36.
Initiating a Process
A workflow process begins when an application calls the Workflow
Engine CreateProcess( ) and StartProcess( ) APIs or when a Business
Event System subscription sends an event to launch the process. A
subprocess is started when the Workflow Engine transitions to a
process activity that represents the subprocess.
To launch a workflow process using the Business Event System, follow
these steps:
1. Define a business event.
See Also
Diagramming a Process
This section discusses how to draw and define a workflow process in
the Process window:
• To Add Nodes to a Workflow Process: page 5 – 6
• To Define Nodes: page 5 – 8
• To Define Event Details for an Event Node: page 5 – 12
• To Define Activity Attribute Values: page 5 – 17
• To Create and Edit a Transition: page 5 – 18
• To Display a Process Overview: page 5 – 19
• To Print a Process: page 5 – 20
• To Copy a Process Diagram to the Clipboard: page 5 – 20
• To Validate a Process Definition: page 5 – 21
See Also
See Also
2. For an activity with the event action Receive, enter the following
event details:
• Event Name—Optionally select an item type attribute of type
text where you want to store the event name that the node
receives.
Note: The event activity can only receive events that match the
event name specified as the event filter. See: To Create an Event
Activity: page 4 – 53.
• Event Key—Optionally select an item type attribute of type text
where you want to store the event key that the node receives.
• Event Message—Optionally select an item type attribute of type
event where you want to store the event message that the node
receives.
4. For an activity with the event action Send, enter the following
event details:
• Event Message—Select the item type attribute of type event that
contains the event message that the node sends.
• Event Name—Optionally enter the name of the event that the
node sends. You can either specify a constant event name or
select an item type attribute of type text that dynamically
determines the event name at runtime. The event name that you
enter here overrides the previous event name value in the event
message.
• Event Key—Optionally select an item type attribute of type text
that contains the event key of the event that the node sends. The
event key that you enter here overrides the previous event key
value in the event message.
See Also
See Also
3. Select the roles you want to load from the Query Results list and
choose Add to add them to the Loaded Roles list. Alternatively,
just choose Add All to add all the roles in the Query Results list to
the Loaded Roles list. Choose OK to load the selected roles into
Oracle Workflow Builder and make them available to the workflow
objects in your open item type.
The workflow objects that need to reference role information
contain specific fields in their property pages. These fields are
poplist fields that display the list of roles you loaded from the
database, as shown in the following Node property page example.
6 Predefined Workflow
Activities
And/Or Activities
In cases where multiple parallel branches transition to a single node,
you can decide whether that node should transition forward when any
of those parallel branches complete or when all of the parallel branches
complete. Use the And activity as the node for several converging
branches to ensure that all branches complete before continuing. Use
the Or activity as the node for several converging branches to allow the
process to continue whenever any one of the branches completes.
And Completes when the activities from all converging
branches complete. Calls a PL/SQL procedure
named WF_STANDARD.ANDJOIN.
Comparison Activities
The comparison activities provide a standard way to compare two
numbers, dates, or text strings.
Compare Date Use to compare the value of an item type attribute
of type Date with a constant date.
Compare Use to compare the value of an item type attribute
Number of type Number with a constant number.
Compare Text Use to compare the value of two item type
attributes of type Text.
All the Comparison activities call a PL/SQL procedure named
WF_STANDARD.COMPARE.
Activity Attributes
Each comparison activity has two activity attributes:
• Test Value—a constant number, date, or text string which to
compare to a reference value.
• Reference Value—an item type attribute of type Number, Date,
or Text.
The comparison activities use the Comparison lookup type for a result
code. Possible values are ”Greater Than,” ”Less Than,” ”Equal,” or
”Null,” if the item type attribute is null. You can guide your workflow
process based on how the value of an item type attribute compares to a
given value that you set. See: To Define Activity Attribute Values: page
5 – 17.
Activity Attributes
The Compare Execution Time activity has two activity attributes:
• Test Execution Time—the time, in seconds with which to
compare the elapsed execution time.
• Parent Type—takes as its value, the lookup codes, ”Root” or
”Parent”. A value of ”Root” compares the test time with the
elapsed execution time of the current root process. A value of
”Parent” compares the test time with the elapsed execution time
of just the immediate parent process, which can be a subprocess.
The activity uses the Comparison lookup type for a result code.
Possible values are ”Greater Than,” ”Less Than,” ”Equal,” or ”Null,” if
the test time is null. See: To Define Activity Attribute Values: page
5 – 17.
Wait Activity
The Wait activity pauses the process for the time you specify. You can
either wait until:
• a specific date
• a given day of the month
• a given day of the week
• a period of time after this activity is encountered
This activity calls the PL/SQL procedure named
WF_STANDARD.WAIT.
Activity Attributes
The Wait activity has six activity attributes:
• Wait Mode—use this attribute to specify how to calculate the
wait. You can choose one of the following wait modes:
– Absolute Date—to pause the activity until the date specified
in the Absolute Date activity attribute is reached.
– Relative Time—to pause the activity until the number of
days specified in the Relative Time activity attribute passes.
Block Activity
The Block activity lets you pause a process until some external program
or manual step completes and makes a call to the CompleteActivity
Workflow Engine API. Use the Block activity to delay a process until
some condition is met, such as the completion of a concurrent program.
Make sure your program issues a CompleteActivity call when it
completes to resume the process at the Block activity. See:
CompleteActivity: page 8 – 68
This activity calls the PL/SQL procedure named
WF_STANDARD.BLOCK.
Activity Attributes
The Launch Process activity has six activity attributes:
• Item Type—the item type of the process to launch. Specify the
item type’s internal name. This activity attribute requires a
value.
• Item Key—an item key for the process to launch. If you do not
specify a value, the item key defaults to
<current_item_type>:<current_item_key>–<n>, where
current_item_type and current_item_key identify the current
process instance, and n is the number of processes launched by
the current process instance, starting at 1.
• Process name—the internal name of the process to launch. If a
process name is not specified, the activity will check the item
type selector function of the process to launch for a process
name.
• User Key—a user defined key for the process to launch.
• Owner—a role designated as the owner of the process to launch.
• Defer immediate—choose between YES or NO to determine
whether the process to launch should be immediately deferred to
the background engine. The default is NO, so once the process is
launched, it continues to execute until completion or until one of
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.
Activity Attribute
The Loop Counter activity has an activity attribute called Loop Limit.
If the number of times that the Workflow Engine transitions to the
Loop Counter activity is less than the value specified in Loop Limit, the
Loop Counter activity will complete with a result of Loop and the
engine will take the ’Loop’ transition to the next activity. If the number
of times that the Workflow Engine transitions to the Loop Counter
activity exceeds the value of Loop Limit, the activity will complete with
a result of Exit and the engine will take the ’Exit’ transition to an
alternative activity.
For example, as shown in the diagram below, you can include a Loop
Counter activity as the initial activity in a loop. The value you specify
for the Loop Limit activity attribute will designate the number of times
the engine is allowed to traverse through the loop. If the number of
visits to the Loop Counter activity exceeds the value set in Loop Limit,
then the process moves along the ’Exit’ transition to the designated
activity. See: To Define Activity Attribute Values: page 5 – 17.
Start Activity
The Start activity marks the start of a process and does not perform any
action. Although it is not necessary, you may include it in your process
diagram to visually mark the start of a process as a separate node. This
activity calls the PL/SQL procedure named WF_STANDARD.NOOP.
End Activity
The End activity marks the end of a process and does not perform any
action. You can use it to return a result for a completed process by
specifying a Result Type for the activity. Although it is not necessary,
you may include it in your process diagram to visually mark the end of
Activity Attributes
Use the Method activity attribute in the Role Resolution activity to
specify how you want to resolve the role. A value of ”Load Balance”
compares how many open notifications from that activity each
qualified user has and selects the user with the fewest open
notifications from that activity. A value of ”Sequential” selects a user
from the role sequentially by determining the user that experienced the
longest interval of time since last receiving a notification from that
activity. See: To Define Activity Attribute Values: page 5 – 17.
Notify Activity
The Notify function activity lets you send a notification, where the
message being sent is determined dynamically at runtime by a prior
function activity. To use the Notify activity, you must model a
prerequisite function activity into the process that selects one of several
predefined messages for the Notify activity to send.
Activity Attributes
The Notify activity has two activity attributes:
• Message Name—the name of the predefined message to send.
The prerequisite function activity that determines which message
to send should store the name of that message in an item
attribute. The Message Name activity attribute should reference
that item attribute to determine the name of the message to send.
• Performer—the name of the role to which to send the notification
message. If you load the roles from your database, you can
select a constant role as the performer. Alternatively, you can set
the performer to an item attribute that returns the name of a role
at runtime.
• Expand Roles—takes as its value, the lookup codes ”Yes” or
”No”. Set Expand Roles to Yes if you wish to send an individual
copy of the notification message to every user in the role. See: To
Define Activity Attribute Values: page 5 – 17.
See Also
Activity Attributes
The Wait for Flow activity contains two activity attributes:
• Continuation Flow—specify whether this activity is waiting for a
corresponding ”Master” or ”Detail” process to complete.
• Continuation Activity—specify the label of the activity node that
must complete in the corresponding process before the current
process continues. The default value is CONTINUEFLOW. See:
To Define Activity Attribute Values: page 5 – 17.
Example
The following figures show an example of how these coordination
activities can be used. In the master process example, after the process
begins with the Start activity, the Start Detail Flows activity initiates
several detail processes. The master process then completes Activity 1
before it pauses at the Wait For Flow activity. Wait For Flow is defined
to wait for all its detail processes to complete a Continue Flow activity
before allowing the master process to transition to Activity 2 and
finally end. An example of one of the detail processes below shows
that after the detail process begins with the Start activity, it completes
Activity A. When it reaches the Continue Flow activity, it signals to the
Workflow Engine that the master process can now continue from the
Wait For Flow activity. The detail process itself then transitions to
Activity B and finally ends.
Master Process
Detail Process
Assign Activity
The Assign activity lets you assign a value to an item attribute. This
activity calls the PL/SQL procedure named WF_STANDARD.ASSIGN.
Activity Attributes
The Assign activity has an activity attribute called Item Attribute. Use
Item Attribute to choose the item attribute that you want to assign a
value to. Depending on the item attribute’s format type, use the Date
Value, Numeric Value, or Text Value activity attribute to specify the
value that you want to assign to the item attribute.
Activity Attributes
The Get Monitor URL activity has two activity attributes:
• Item Attribute—choose the name of the item attribute that you
want to use to store the URL for the Workflow Monitor window.
• Administration Mode—determine how the URL displays the
Workflow Monitor window. If you set Administration Mode to
Activity Attributes
The Get Event Property activity has four activity attributes:
• Event—choose the item attribute of type event that contains the
event message from which you want to retrieve a property.
• Property—the event property whose value you want to retrieve.
This attribute takes as its value a lookup code from the Event
Property lookup type. Possible values are ”Priority,” ”Send
Date,” ”Receive Date,” ”Correlation ID,” ”Event Parameter,”
”Event Name,” ”Event Key,” ”From Agent,” ”From Agent
Name,” ”From Agent System,” ”To Agent,” ”To Agent Name,”
and ”To Agent System.” See: Event Message Structure: page
8 – 236.
• Event Parameter—if you choose the Event Parameter property in
the Property attribute, enter the name of the parameter whose
value you want to retrieve. Oracle Workflow uses this name to
identify the parameter within the event message’s parameter list.
If you choose any property other than Event Parameter, leave
this attribute blank.
• Item Attribute—the item attribute where you want to store the
event property value. See: To Define Activity Attribute Values:
page 5 – 17.
Activity Attributes
The Set Event Property activity has six activity attributes:
• Event—choose the item attribute of type event that contains the
event message whose property you want to set.
• Property—the event property whose value you want to set. This
attribute takes as its value a lookup code from the Event
Property lookup type. Possible values are ”Priority,” ”Send
Date,” ”Receive Date,” ”Correlation ID,” ”Event Parameter,”
”Event Name,” ”Event Key,” ”From Agent,” ”From Agent
Name,” ”From Agent System,” ”To Agent,” ”To Agent Name,”
and ”To Agent System.” See: Event Message Structure: page
8 – 236.
• Event Parameter—if you choose the Event Parameter property in
the Property attribute, enter the name of the parameter whose
value you want to set. Oracle Workflow uses this name to
identify the parameter within the event message’s parameter list.
If you choose any property other than Event Parameter, leave
this attribute blank.
• Date Value—the value of type date that you want to set for the
event property, if you choose the Send Date or Receive Date
property.
• Numeric Value—the value of type number that you want to set
for the event property, if you choose the Priority property.
• Text Value—the value of type text that you want to set for the
event property, if you choose the Correlation ID, Event
Parameter, Event Name, Event Key, From Agent Name, From
Agent System, To Agent Name, or To Agent System property.
See: To Define Activity Attribute Values: page 5 – 17.
Note: You must enter the value to set in the activity attribute
that matches the data type of the event property you choose.
Activity Attributes
The Compare Event Property activity has six activity attributes:
• Event—choose the item attribute of type event that contains the
event message whose property you want to compare to a test
value.
• Property—the event property whose value you want to compare
to a test value. This attribute takes as its value a lookup code
from the Event Property lookup type. Possible values are
”Priority,” ”Send Date,” ”Receive Date,” ”Correlation ID,”
”Event Parameter,” ”Event Name,” ”Event Key,” ”From Agent,”
”From Agent Name,” ”From Agent System,” ”To Agent,” ”To
Agent Name,” and ”To Agent System.” See: Event Message
Structure: page 8 – 236.
• Event Parameter—if you choose the Event Parameter property in
the Property attribute, enter the name of the parameter whose
value you want to compare to a test value. Oracle Workflow uses
this name to identify the parameter within the event message’s
parameter list. If you choose any property other than Event
Parameter, leave this attribute blank.
• Date Value—the test value of type date with which to compare
the event property value, if you choose the Send Date or Receive
Date property.
• Numeric Value—the test value of type number with which to
compare the event property value, if you choose the Priority
property.
• Text Value—the test value of type text with which to compare the
event property value, if you choose the Correlation ID, Event
Parameter, Event Name, Event Key, From Agent Name, From
Agent System, To Agent Name, or To Agent System property.
The Compare Event Property activity uses the Comparison lookup type
for a result code. Possible values are ”Greater Than,” ”Less Than,”
”Equal,” or ”Null,” if the test activity attribute value is null. You can
guide your workflow process based on how the event property value
compares to the test value. See: To Define Activity Attribute Values:
page 5 – 17.
Note: You must enter the test value in the activity attribute
that matches the data type of the event property you choose. If
Activity Attributes
The XML Get Tag Value activity has three activity attributes:
• Event—choose the item attribute of type event that contains the
event message from which you want to retrieve data.
• Tag—the tag set within the event message from which you want
to retrieve data. Specify the tag set in XPath notation. For
example, for an XML document containing a purchase order, the
XML path for the order number tag could be specified in the
following format:
/order/header/ordernumber
Activity Attributes
The XML Transform activity has three activity attributes:
• Event—choose the item attribute of type event that contains the
event message you want to transform.
• Stylesheet—a reference to the location of the style sheet that you
want to apply. Specify this reference as a URL.
• New Document—choose the item attribute of type event where
you want to store the new document produced by applying the
style sheet. See: To Define Activity Attribute Values: page 5 – 17.
Activity Attributes
The Execute Concurrent Program activity has the following activity
attributes:
• Application Short Name—Short name of the application to
which the concurrent program is registered.
• Program Short Name—Short name of the concurrent program to
run.
• Number of Arguments—Number of arguments required for the
concurrent program.
• Item Attribute Name—Optional name of the item attribute to
store the concurrent program request ID.
• Argument1, Argument2,...Argument100—Value of each
concurrent program argument, ordered to match the correct
syntax of the concurrent program. Up to 100 arguments are
allowed, but you should only specify as many argument values
as you define in the Number of Arguments activity attribute.
See: To Define Activity Attribute Values: page 5 – 17.
Activity Attributes
The Submit Concurrent Program activity has the following activity
attributes:
• Application Short Name—Short name of the application to
which the concurrent program is registered.
• Program Short Name—Short name of the concurrent program to
run.
• Number of Arguments—Number of arguments required for the
concurrent program.
• Item Attribute Name—Name of the item attribute to store the
concurrent program request ID.
• Argument1, Argument2,...Argument100—Value of each
concurrent program argument, ordered to match the correct
syntax of the concurrent program. Up to 100 arguments are
allowed, but you should only specify as many argument values
as you define in the Number of Arguments activity attribute.
See: To Define Activity Attribute Values: page 5 – 17.
Activity Attributes
The Wait for Concurrent Program activity has one activity attribute
called Request ID, which should be set to the concurrent program
request ID that you are waiting for to complete. See: To Define Activity
Attribute Values: page 5 – 17.
Activity Id = &ERROR_ACTIVITY_ID
Activity Label = &ERROR_ACTIVITY_LABEL
Result Code = &ERROR_RESULT_CODE
Notification Id = &ERROR_NOTIFICATION_ID
Assigned User = &ERROR_ASSIGNED_USER
&MONITOR
See Also
Activity Id = &ERROR_ACTIVITY_ID
Activity Label = &ERROR_ACTIVITY_LABEL
Result Code = &ERROR_RESULT_CODE
Notification Id = &ERROR_NOTIFICATION_ID
Assigned User = &ERROR_ASSIGNED_USER
&MONITOR
The NTF with RETRY Only notification activity has a dynamic timeout
value assigned to it. It checks the item type of the process in error for
an item attribute that has an internal name called ERROR_TIMEOUT.
ERROR_TIMEOUT must be an attribute of type NUMBER. The
See Also
See Also
7 Defining Procedures
and Functions for
Oracle Workflow
NOTIFIED:<notification_id>:<assigned_user>—a
n external entity is notified that an action must be
performed. A notification ID and an assigned user
can optionally be returned with this result. Note
that the external entity must call CompleteActivity( )
to inform the Workflow Engine when the action
completes.
ERROR:<error_code>—activity encounters an
error and returns the indicated error code.
2⇒ This section declares any local arguments that are used within the
procedure.
3⇒ The procedure body begins in this section with an IF statement.
This section contains one or more executable statements that run if the
value of funcmode is ’RUN’. One of the executable statements can
import oracle.apps.fnd.common.*;
import oracle.apps.fnd.wf.engine.*;
import oracle.apps.fnd.wf.*;
7⇒ loadActivityAttributes(pWCtx);
loadItemAttributes(pWCtx);
8⇒ lAAttr = getActivityAttr(”AATTR”);
lIAttr = getItemAttr(”IATTR”);
11⇒ }
catch (Exception e)
{
es.addMessage(”WF”,”WF_FN_ERROR”);
es.addToken(”MODULE”,this.getClass().getName());
es.addToken(”ITEMTYPE”,itemType);
es.addToken(”ITEMKEY”,itemKey);
es.addToken(”ACTID”,actID.toString());
es.addToken(”FUNCMODE”,funcMode);
es.addToken(”ERRMESSAGE”,e.getMessage());
return false;
}
12⇒ return true;
}
}
”PL/SQL” Documents
The PL/SQL procedure that generates a PL/SQL document must have
the following standard API:
procedure <procedure name> (document_id in varchar2,
display_type in varchar2,
document in out varchar2,
document_type in out varchar2)
See Also
See Also
See Also
Enqueue
The Enqueue procedure in a queue handler package must enqueue an
event message onto a queue associated with an outbound agent. You
can optionally specify an override agent where you want to enqueue
the event message. Otherwise, the event message is enqueued on the
From Agent specified within the message. The Enqueue procedure
transforms the event message’s header information if necessary to
enqueue the message in the format required by the queue.
When an event message is being sent, the generic WF_EVENT.Enqueue
procedure determines which queue handler is associated with the
specified outbound agent and calls the Enqueue procedure in that
queue handler to enqueue the message.
Dequeue
The Dequeue procedure in a queue handler package must dequeue an
event message from the queue associated with the specified inbound
agent, selecting the message to dequeue by the message priority. The
procedure transforms the event message’s header information if
necessary and returns the event message in the standard
WF_EVENT_T structure. Additionally, the Dequeue procedure can set
the date and time when the message is dequeued into the
RECEIVE_DATE attribute of the event message.
When an event message is being received, the WF_EVENT.Listen
procedure determines which queue handler to use with the specified
inbound agent and calls the Dequeue procedure in that queue handler
to dequeue the message.
The PL/SQL Dequeue procedure must have the following standard
API:
procedure dequeue (p_agent_guid in raw,
p_event out WF_EVENT_T);
1⇒ When the Event Manager calls the rule function, it passes two
parameters to the function and expects a return code when the function
completes. The parameters are defined here:
p_subscription_ The globally unique identifier for the subscription.
guid
p_event The event message.
The function must return one of the following status codes:
• SUCCESS—The rule function completed successfully.
• WARNING—A warning condition occurred. The rule function
reports a warning message using the Workflow Core error APIs
and sets the warning information into the event message. The
Event Manager places a copy of the event message on the
WF_ERROR queue, but subscription processing continues.
• ERROR—An error occurred. The rule function reports an error
message using the Workflow Core error APIs and sets the error
information into the event message. The Event Manager halts
subscription processing for this event, rolls back any
subscriptions already executed for the event, and places the
event message on the WF_ERROR queue.
2⇒ This section declares any local arguments that are used within the
function.
3⇒ The procedure body begins in this section with one or more
executable statements that make up your rule function.
4⇒ This optional section calls WF_CORE.CONTEXT( ) if a warning
condition occurs, so that you can include context information in the
error stack to help you locate the source of an error. It also sets the
warning information into the event message and returns the status
code ’WARNING’. See: CONTEXT: page 8 – 107.
5⇒ This section returns the status code ’SUCCESS’ when the rule
function’s normal processing completes successfully.
6⇒ This section calls WF_CORE.CONTEXT( ) if an exception occurs, so
that you can include context information in the error stack to help you
locate the source of an error. It also sets the error information into the
event message and returns the status code ’ERROR’. See: CONTEXT:
page 8 – 107.
See Also
T his chapter describes the APIs for Oracle Workflow. The APIs
consist of views and PL/SQL and Java functions and procedures that
you can use to access the Workflow Engine, the Notification System,
the Business Event System, and workflow data.
import oracle.sql.*;
import oracle.jdbc.driver.*;
import oracle.apps.fnd.common.*;
import oracle.apps.fnd.wf.engine.*;
import oracle.apps.fnd.wf.*;
try {
ctx = new WFContext(myDB, m_charSet);
// m_charSet is ’UTF8’ by default
if (ctx.getDB().getConnection() == null) {
// connection failed
return;
}
catch (Exception e) {
// exit Message for this exception
}
If you have already established a JDBC connection, you can simply set
that connection into the WFContext object, as shown in the following
example:
WFContext ctx;
m_charSet = System.getProperty(”CHARSET”);
if (m_charSet == null) { // cannot be null
m_charSet = ”UTF8”;
}
ctx.setJDBCConnection(m_conn);
// m_conn is a pre–established JDBC connection
The source file for this program is also included in your Oracle
Workflow installation so that you can view the sample code. The source
file is named WFTest.java and is located in the
<ORACLE_HOME>/wf/java/oracle/apps/fnd/wf/ directory.
Completion Processing
Engine processing is triggered whenever a process activity completes
and calls the Workflow Engine API. The engine then attempts to
execute (or mark for deferred execution) all activities that are
dependent on the completed activity.
Note: A process as a whole can complete but still contain
activities that were visited but not yet completed. For example,
a completed process may contain a standard Wait activity that
is not complete because the designated length of time to wait
has not yet elapsed. When the process as a whole completes,
the Workflow Engine marks these incomplete activities as
having a status of COMPLETE and a result of #FORCE. This
distinction is important when you review your process status
through the Workflow Monitor.
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.
Error Processing
Errors that occur during workflow execution cannot be directly
returned to the caller, since the caller generally does not know how to
respond to the error (in fact, the caller may be a background engine
with no human operator). You can use Oracle Workflow Builder to
define the processing you want to occur in case of an error. Use Oracle
Workflow Builder to modify the Default Error Process associated with
the System:Error item type or create your own custom error process.
See: Default Error Process: page 6 – 26.
The error process can include branches based on error codes, send
notifications, and attempt to deal with the error using automated rules
for resetting, retrying, or skipping the failed activity. Once you define
an error process, you can associate it with any activity. The error
process is then initiated whenever an error occurs for that activity. See:
To Define Optional Activity Details: page 4 – 58.
The Workflow Engine traps errors produced by function activities by
setting a savepoint before each function activity. If an activity produces
an unhandled exception, the engine performs a rollback to the
savepoint, and sets the activity to the ERROR status.
Note: For this reason, you should never commit within the
PL/SQL procedure of a function activity. The Workflow
Engine never issues a commit as it is the responsibility of the
calling application to commit.
The Workflow Engine then attempts to locate an error process to run by
starting with the activity which caused the error, and then checking
each parent process activity until an associated error process is located.
Post–Notification Functions
You can associate a post–notification function with a notification
activity. The Workflow Engine executes the post–notification function
in response to an update of the notification’s state after the notification
is delivered. For example, you can specify a post–notification function
that executes when the notification recipient forwards or transfers the
notification. The post–notification function could perform back–end
logic to either validate the legitimacy of the forward/transfer or
execute some other supporting logic.
The post–notification function should be a PL/SQL procedure written
to the same API standards required for function activities. See:
Standard API for PL/SQL Procedures Called by Function Activities:
page 7 – 3.
When you specify a post–notification function, the Workflow Engine
first sets the context information to use with the function via the
following two global engine variables:
See Also
Business Events
Events from the Business Event System are represented within
workflow processes as event activities. An event activity can either
raise, send, or receive a business event.
A Raise event activity raises an event to the Event Manager, triggering
any subscriptions to that event. The Workflow Engine calls the
WF_EVENT.Raise API to raise the event. See: Raise: page 8 – 255.
A Send event activity sends an event directly to a Business Event
System agent without raising the event to the Event Manager. The
Workflow Engine calls the WF_EVENT.Send API to send the event. See:
Send: page 8 – 259.
A Receive event activity receives an event from the Event Manager into
a workflow process, which then continues the thread of execution from
that activity. The Workflow Engine can receive an event into an activity
in an existing process instance that is waiting for the event, using the
correlation ID in the event message to match the event with the process
to which it belongs. The Workflow Engine can also receive an event
into a Receive event activity that is marked as a Start activity to launch
a new workflow process. The WF_ENGINE.Event API is used to
receive an event into a workflow process. See: Event: page 8 – 74.
Note: If the event received by a Receive event activity was
originally raised by a Raise event activity in another workflow
process, the item type and item key for that process are
included in the parameter list within the event message. In this
case, the Workflow Engine automatically sets the specified
See Also
See Also
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type. Item types are defined in the
Workflow Builder.
itemkey A string derived usually from the application
object’s primary key. The string uniquely identifies
the item within an item type. The item type and
key together identify the new process and must be
passed to all subsequent API calls for that process.
Note: You can pass #SYNCH as the itemkey to create a forced
synchronous process. See: Forced Synchronous Processes: page
8 – 14.
process An optional argument that allows the selection of a
particular process for that item. Provide the
process internal name. If process is null, the item
type’s selector function is used to determine the
top level process to run. If you do not specify a
Description Lets you set a user–friendly identifier for an item in a process, which is
initially identified by an item type and item key. The user key is
intended to be a user–friendly identifier to locate items in the Workflow
Monitor and other user interface components of Oracle Workflow.
Arguments (input)
itemtype A valid item type.
itemkey A string generated usually from the application
object’s primary key. The string uniquely identifies
the item within an item type. The item type and
key together identify the item in a process. See:
CreateProcess: page 8 – 20.
userkey The user key to assign to the item identified by the
specified item type and item key.
Arguments (input)
itemtype A valid item type.
itemkey A string generated usually from the application
object’s primary key. The string uniquely identifies
the item within an item type. The item type and
key together identify the item in a process. See:
CreateProcess: page 8 – 20.
Description Returns the instance label of an activity, given the internal activity
instance ID. The label returned has the following format, which is
suitable for passing to other Workflow Engine APIs, such as
CompleteActivity and HandleError, that accept activity labels as
arguments:
<process_name>:<instance_label>
Arguments (input)
actid An activity instance ID.
Description A procedure to set the owner of existing items. The owner must be a
valid role. Typically, the role that initiates a transaction is assigned as
the process owner, so that any participant in that role can find and view
the status of that process instance in the Workflow Monitor.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type. Item types are defined in the
Workflow Builder.
itemkey A string derived from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the new process and must be
passed to all subsequent API calls for that process.
owner A valid role.
Description Begins execution of the specified process. The engine locates the
activity marked as START and then executes it. CreateProcess( ) must
first be called to define the itemtype and itemkey before calling
StartProcess( ).
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string derived from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
Caution: Although you can make a call to CreateProcess( ) and
StartProcess( ) from a trigger to initiate a workflow process, you
should avoid doing so in certain circumstances. For example,
if a database entity has headers, lines and details, and you
initiate a workflow process from an AFTER INSERT trigger at
the header–level of that entity, your workflow process may fail
because some subsequent activity in the process may require
information from the entity’s lines or details level that is not yet
populated.
Caution: The Workflow Engine always issues a savepoint
before executing each activity so that it can rollback to the
previous activity in case an error occurs. Because of this
feature, you should avoid initiating a workflow process from a
database trigger because savepoints and rollbacks are not
allowed in a database trigger.
Description Launches a specified process by creating the new runtime process and
beginning its execution. This is a wrapper that combines CreateProcess
and StartProcess.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string derived from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the new process and must be
passed to all subsequent API calls for that process.
Note: You can pass #SYNCH as the itemkey to create a forced
synchronous process. See: Forced Synchronous Processes: page
8 – 14.
process An optional argument that allows the selection of a
particular process for that item. Provide the
process internal name. If process is null, the item
type’s selector function is used to determine the
top level process to run. This argument defaults to
null.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
process An optional argument that allows the selection of a
particular subprocess for that item. Provide the
process activity’s label name. If the process
activity label name does not uniquely identify the
subprocess you can precede the label name with
the internal name of its parent process. For
example,
<parent_process_internal_name>:<label_name>. If this
argument is null, the top level process for the item
is suspended. This argument defaults to null.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
process An optional argument that allows the selection of a
particular subprocess for that item type. Provide
the process activity’s label name. If the process
activity label name does not uniquely identify the
subprocess you can precede the label name with
the internal name of its parent process. For
example,
<parent_process_internal_name>:<label_name>. If this
argument is null, the top level process for the item
is resumed. This argument defaults to null.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
process An optional argument that allows the selection of a
particular subprocess for that item type. Provide
the process activity’s label name. If the process
activity label name does not uniquely identify the
subprocess you can precede the label name with
the internal name of its parent process. For
example,
<parent_process_internal_name>:<label_name>. If this
argument is null, the top level process for the item
is aborted. This argument defaults to null.
Description Forks a runtime process by creating a new process that is a copy of the
original. After calling CreateForkProcess(), you can call APIs such as
SetItemOwner(), SetItemUserKey(), or the SetItemAttribute APIs to reset
any item properties or modify any item attributes that you want for the
new process. Then you must call StartForkProcess() to start the new
process.
Use CreateForkProcess() when you need to change item specific
attributes during the course of a process. For example, if an order
cannot be met due to insufficient inventory stock, you can use
CreateForkProcess() to fork a new transaction for the backorder quantity.
Note that any approval notification will be copied. The result is as if
two items were created for this transaction.
Arguments (input)
copy_itemtype A valid item type for the original process to be
copied. The new process will have the same item
type.
copy_itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The copy item type and
key together identify the original process to be
copied.
new_itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and new
item key together identify the new process.
same_version Specify TRUE or FALSE to indicate whether the
new runtime process uses the same version as the
original or the latest version. If you specify TRUE,
CreateForkProcess() copies the item attributes and
status of the original process to the new process. If
you specify FALSE, CreateForkProcess() copies the
item attributes of the original process to the new
Description Begins execution of the new forked process that you specify. Before
you call StartForkProcess( ), you must first call CreateForkProcess( ) to
create the new process. You can modify the item attributes of the new
process before calling StartForkProcess().
If the new process uses the same version as the original,
StartForkProcess() copies the status and history of each activity in the
forked process, activity by activity. If the new process uses the latest
version, then StartForkProcess() executes StartProcess().
If you call StartForkProcess() from within a process, any function
activity in the process that had a status of ’Active’ is updated to have a
status of ’Notified.’ You must call CompleteActivity() afterwards to
continue the process.
StartForkProcess() automatically refreshes any notification attributes that
are based on item attributes. Any open notifications in the original
process are copied and sent again in the new process. Closed
notifications are copied but not resent; their status remains remains
’Complete.’
Any Wait activities in the new process are activated at the same time as
the original activities. For example, if a 24 hour Wait activity in the
original process is due to be eligible in two hours, the new Wait activity
is also eligible in two hours.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process.
Caution: Do not call CreateForkProcess() and StartForkProcess()
from within a parallel branch in a process. These APIs do not
copy any branches parallel to their own branch that are not
active.
Description Runs a background engine for processing deferred activities, timed out
activities, and stuck processes using the parameters specified. The
background engine executes all activities that satisfy the given
arguments at the time that the background engine is invoked. This
procedure does not remain running long term, so you must restart this
procedure periodically. Any activities that are newly deferred or timed
out or processes that become stuck after the current background engine
starts are processed by the next background engine that is invoked.
You may run a script called wfbkgchk.sql to get a list of the activities
waiting to be processed by the next background engine run. See:
Wfbkgchk.sql: page 16 – 6.
If you are using the standalone version of Oracle Workflow, you can
use one of the sample background engine looping scripts described
below or create your own script to make the background engine
procedure loop indefinitely. If you are using the version of Oracle
Workflow embedded in Oracle Applications, you can use the
concurrent program version of this procedure and take advantage of
the concurrent manager to schedule the background engine to run
periodically. To Schedule Background Engines: page 2 – 38
Arguments (input)
itemtype A valid item type. If the item type is null the
Workflow engine will run for all item types.
minthreshold Optional minimum cost threshold for an activity
that this background engine processes, in
hundredths of a second. There is no minimum cost
threshold if this parameter is null.
maxthreshold Optional maximum cost threshold for an activity
that this background engine processes in
hundredths of a second. There is no maximum
cost threshold if this parameter is null.
Example Background For the standalone version of Oracle Workflow you can use one of two
Engine Looping example scripts to repeatedly run the background engine regularly.
Scripts
The first example is a sql script stored in a file called wfbkg.sql and is
available on your server in the Oracle Workflow admin/sql subdirectory.
To run this script, go to the directory where the file is located and type
the following command at your operating system prompt:
sqlplus <username/password> @wfbkg <min> <sec>
Description Adds a new item type attribute variable to the process. Although most
item type attributes are defined at design time, you can create new
attributes at runtime for a specific process. You can optionally set a
default text, number, or date value for a new item type attribute when
the attribute is created.
Arguments (input)
wCtx Workflow context information. Required for the
Java methods only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
aname The internal name of the item type attribute.
text_value The default text value for the item type attribute.
Required for the PL/SQL procedure only. Defaults
to null.
number_value The default number value for the item type
attribute. Required for the PL/SQL procedure only.
Defaults to null.
date_value The default date value for the item type attribute.
Required for the PL/SQL procedure only. Defaults
to null.
aValue The default value for the item type attribute.
Required for the addItemAttrText(),
addItemAttrNumber(), and addItemAttrDate() Java
methods only.
Example The following example shows how API calls can be simplified by using
AddItemAttr() to set the default value of a new item type attribute at the
time of creation.
Using AddItemAttr() to create the new attribute and SetItemAttrText() to
set the value of the attribute, the following calls are required:
Using AddItemAttr() both to create the new attribute and to set its
value, only the following call is required:
AddItemAttr(’ITYPE’, ’IKEY’, ’NEWCHAR_VAR’,
’new text values’);
procedure AddItemAttrNumberArray
(itemtype in varchar2,
itemkey in varchar2,
aname in Wf_Engine.NameTabTyp,
avalue in Wf_Engine.NumTabTyp);
procedure AddItemAttrDateArray
(itemtype in varchar2,
itemkey in varchar2,
aname in Wf_Engine.NameTabTyp,
avalue in Wf_Engine.DateTabTyp);
Description Adds an array of new item type attributes to the process. Although
most item type attributes are defined at design time, you can create
new attributes at runtime for a specific process. Use the
AddItemAttributeArray APIs rather than the AddItemAttribute APIs for
improved performance when you need to add large numbers of item
type attributes at once.
Use the correct procedure for your attribute type. All attribute types
except number and date use AddItemAttrTextArray.
Note: The AddItemAttributeArray APIs use PL/SQL table
composite datatypes defined in the WF_ENGINE package. The
following table shows the column datatype definition for each
PL/SQL table type.
NameTabTyp Wf_Item_Attribute_Values.NAME%TYPE
TextTabTyp Wf_Item_Attribute_Values.TEXT_VALUE%TYPE
Table 8 – 1 (Page 1 of 2)
NumTabTyp Wf_Item_Attribute_Values.NUMBER_VALUE%TYPE
DateTabTyp Wf_Item_Attribute_Values.DATE_VALUE%TYPE
Table 8 – 1 (Page 2 of 2)
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
aname An array of the internal names of the new item
type attributes.
avalue An array of the values for the new item type
attributes.
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);
procedure SetItemAttrEvent
(itemtype in varchar2,
itemkey in varchar2,
name in varchar2,
event in wf_event_t);
Description Sets the value of an item type attribute in a process. Use the correct
procedure for your attribute type. All attribute types except number,
date, and event use SetItemAttrText.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
Note: You can pass #SYNCH as the itemkey to create a forced
synchronous process. See: Forced Synchronous Processes: page
8 – 14.
aname or name The internal name of the item type attribute.
avalue or event The value for the item type attribute.
WF_ENGINE.SetItemAttrText(’<item_type>’, ’<item_key>’,
’EVENTDATAURL’, l_eventdataurl);
See Also
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
Note: You can pass #SYNCH as the itemkey to create a forced
synchronous process. See: Forced Synchronous Processes: page
8 – 14.
aname The internal name of the item type attribute.
documentid The value for the item type attribute as a fully
concatenated string of the following values:
DM:<node_id>:<doc_id>:<version>
<node_id> is the node ID assigned to the document
management system node as defined in the
procedure SetItemAttrNumberArray
(itemtype in varchar2,
itemkey in varchar2,
aname in Wf_Engine.NameTabTyp,
avalue in Wf_Engine.NumTabTyp);
procedure SetItemAttrDateArray
(itemtype in varchar2,
itemkey in varchar2,
aname in Wf_Engine.NameTabTyp,
avalue in Wf_Engine.DateTabTyp);
Description Sets the values of an array of item type attributes in a process. Use the
SetItemAttributeArray APIs rather than the SetItemAttribute APIs for
improved performance when you need to set the values of large
numbers of item type attributes at once.
Use the correct procedure for your attribute type. All attribute types
except number and date use SetItemAttrTextArray.
Note: The SetItemAttributeArray APIs use PL/SQL table
composite datatypes defined in the WF_ENGINE package. The
following table shows the column datatype definition for each
PL/SQL table type.
NameTabTyp Wf_Item_Attribute_Values.NAME%TYPE
TextTabTyp Wf_Item_Attribute_Values.TEXT_VALUE%TYPE
NumTabTyp Wf_Item_Attribute_Values.NUMBER_VALUE%TYPE
DateTabTyp Wf_Item_Attribute_Values.DATE_VALUE%TYPE
Table 8 – 2 (Page 1 of 1)
Example The following example shows how using the SetItemAttributeArray APIs
rather than the SetItemAttribute APIs can help reduce the number of
calls to the database.
Using SetItemAttrText():
SetItemAttrText(’ITYPE’, ’IKEY’, ’VAR1’, ’value1’);
SetItemAttrText(’ITYPE’, ’IKEY’, ’VAR2’, ’value2’);
SetItemAttrText(’ITYPE’, ’IKEY’, ’VAR3’, ’value3’);
Using SetItemAttrTextArray():
declare
varname Wf_Engine.NameTabTyp;
varval Wf_Engine.TextTabTyp;
begin
varname(1) := ’VAR1’;
varval(1) := ’value1’;
varname(2) := ’VAR2’;
varval(2) := ’value2’;
varname(3) := ’VAR3’;
varval(3) := ’value3’;
Wf_Engine.SetItemAttrTextArray(’ITYPE’, ’IKEY’, varname,
varval);
exception
when OTHERS then
// handle your errors here
raise;
end;
Description Returns a list of all the item types defined in the Oracle Workflow
database as a two dimensional data object.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
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;
function GetItemAttrEvent
(itemtype in varchar2,
itemkey in varchar2,
name in varchar2) return wf_event_t;
Description Returns the value of an item type attribute in a process. Use the correct
function for your attribute type. All attribute types except number,
date, and event use GetItemAttrText.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
Note: Pass #SYNCH as the itemkey to create a forced
synchronous process. See: Forced Synchronous Processes: page
8 – 14.
aname The internal name of an item type attribute, for
GetItemAttrText(), GetItemAttrNumber(), and
GetItemAttrDate().
name The internal name of an item type attribute, for
GetItemAttrEvent().
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
Note: Pass #SYNCH as the itemkey to create a forced
synchronous process. See: Forced Synchronous Processes: page
8 – 14.
aname The internal name of the item type attribute.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
aname The internal name of an item type attribute.
Description Returns a list of all the item attributes, their types, and their values for
the specified item type instance as a two dimensional data object.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
Description Returns information about an item type attribute, such as its type and
format, if any is specified. Currently, subtype information is not
available for item type attributes
Arguments (input)
itemtype A valid item type.
aname The internal name of a item type attribute.
Description Returns information about an activity attribute, such as its type and
format, if any is specified. This procedure currently does not return
any subtype information for activity attributes.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
actid The activity ID for a particular usage of an activity
in a process definition. Also referred to as the
activity ID of the node
aname The internal name of an activity attribute.
function GetActivityAttrNumber
(itemtype in varchar2,
itemkey in varchar2,
actid in number,
aname in varchar2) return number;
function GetActivityAttrDate
(itemtype in varchar2,
itemkey in varchar2,
actid in number,
aname in varchar2) return date;
function GetActivityAttrEvent
(itemtype in varchar2,
itemkey in varchar2,
actid in number,
name in varchar2) return wf_event_t;
Description Returns the value of an activity attribute in a process. Use the correct
function for your attribute type. If the attribute is a Number or Date
type, then the appropriate function translates the number/date value to
a text–string representation using the attribute format.
Note: Use GetActivityAttrText() for Form, URLs, lookups and
document attribute types.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
See Also
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
actid The activity ID for a particular usage of an activity
in a process definition. Also referred to as the
activity ID of the node.
aname The internal name of an activity attribute.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process.
activity The activity node to perform on the process.
Provide the activity node’s label name. If the
activity node label name does not uniquely identify
the activity node you can precede the label name
with the internal name of its parent process. For
example,
<parent_process_internal_name>:<label_name>.
Description Notifies the Workflow Engine that the specified activity has been
completed for a particular item. This procedure can be called for the
following situations:
• To indicate a completed activity with an optional result—This
signals the Workflow Engine that an asynchronous activity has
been completed. This procedure requires that the activity
currently has a status of ’Notified’. An optional activity
completion result can also be passed. The result can determine
what transition the process takes next.
• To create and start an item—You can call CompleteActivity() for a
’Start’ activity to implicitly create and start a new item. ’Start’
activities are designated as the beginning of a process in the
Workflow Builder. The item type and key specified in this call
must be passed to all subsequent calls that operate on this item.
Use CompleteActivity() if you cannot use CreateProcess() and
StartProcess() to start your process. For example, call
CompleteActivity() if you need to start a process with an activity
node that is mid–stream in a process thread and not at the
beginning of a process thread. The activity node you specify as
the beginning of the process must be set to ’Start’ in the Node tab
of its property page or else an error will be raised.
Note: Starting a process using CompleteActivity() differs from
starting a process using CreateProcess() and StartProcess() in
these ways:
– The ’Start’ activity called with CompleteActivity() may or
may not have incoming transitions. StartProcess() executes
only ’Start’ activities that do not have any incoming
transitions.
– CompleteActivity() only completes the single ’Start’ activity
with which it is called. Other ’Start’ activities in the process
are not completed. StartProcess(), however, executes every
activity in the process that is marked as a ’Start’ activity and
does not have any incoming transitions.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process.
activity The name of the activity node that is completed.
Provide the activity node’s label name. If the
activity node label name does not uniquely identify
the subprocess you can precede the label name
with the internal name of its parent process. For
example,
<parent_process_internal_name>:<label_name>. This
activity node must be marked as a ’Start’ activity.
result_code An optional activity completion result. Possible
values are determined by the process activity’s
Result Type, or one of the engine standard results.
See: AbortProcess: page 8 – 35.
Description Notifies the Workflow Engine that the specified activity has been
completed for a particular item. This procedure requires that the
activity currently has a status of ’Notified’. An optional activity
completion result can also be passed. The result can determine what
transition the process takes next.
CompleteActivityInternalName() is similar to CompleteActivity() except
that CompleteActivityInternalName() identifies the activity to be
completed by the activity’s internal name, while CompleteActivity()
identifies the activity by the activity node label name. You should only
use CompleteActivityInternalName() when you do not know the activity
node label name. If you do know the activity node label name, use
CompleteActivity() instead. See: CompleteActivity: page 8 – 68.
Note: Unlike CompleteActivity(), you cannot use
CompleteActivityInternalName() to start a process. Also, you
cannot use CompleteActivityInternalName() with a synchronous
process.
When CompleteActivityInternalName() is executed, there must be exactly
one instance of the specified activity with a status of ’Notified’. If there
are multiple instances of the activity with ’Notified’ statuses, the
process enters an ’ERROR’ state.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process.
activity The internal name of the activity that is completed.
If the activity internal name does not uniquely
identify the subprocess you can precede the
activity internal name with the internal name of its
parent process. For example,
<parent_process_internal_name>:<activity_internal_
name>.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process.
activity The label name of the activity node. If the activity
node label name does not uniquely identify the
activity node you can precede the label name with
the internal name of its parent process. For
example,
<parent_process_internal_name>:<label_name>.
performer The name of the user who will perform the activity
(the user who receives the notification). The name
should be a role name from the Oracle Workflow
directory services.
Description Receives an event from the Business Event System into a workflow
process.
If the specified item key already exists, the event is received into that
item. If the item key does not already exist, but the specified process
includes an eligible Receive event activity marked as a Start activity, the
Workflow Engine creates a new item running that process.
Within the workflow process that receives the event, the procedure
searches for eligible Receive event activities. An activity is only eligible
to receive an event if its event filter is either blank or set to that
particular event. Additionally, the activity must have an appropriate
status.
• An activity marked as a Start activity can only receive an event if
it has never been executed.
• A normal activity can only receive an event if its activity status is
NOTIFIED, meaning the process has transitioned to that activity
and is waiting to receive the event.
For each eligible Receive event activity, Event() stores the event name,
event key, and event message in the item type attributes specified in the
event activity node, if they have been defined. Then the Workflow
Engine begins a thread of execution from the event activity.
If no eligible Receive event activity exists for a received event, the
procedure returns an exception and an error message.
Note: If the event received by a Receive event activity was
originally raised by a Raise event activity in another workflow
process, the item type and item key for that process are
included in the parameter list within the event message. In this
case, the Workflow Engine automatically sets the specified
process as the parent for the process that receives the event,
overriding any existing parent setting. See: SetItemParent: page
8 – 78.
Arguments (input)
itemtype A valid item type.
You can also call this procedure for any arbitrary activity in a process,
to rollback part of your process to that activity. The activity that you
call this procedure with can have any status and does not have to have
been executed. The activity can also be in a subprocess, if the activity
node label is not unique within the process you may precede the
activity node label name with the internal name of its parent process.
For example, <parent_process_internal_name>:<label_name>.
If the On_Revisit flag is set to Reset, this procedure clears the activity
specified and all activities following it that have already been
transitioned to by reexecuting each activity in ’Cancel’ mode. See:
Looping: page 8 – 10. For an activity in the ’Error’ state, there are no
other executed activities following it, so the procedure simply clears
the errored activity.
Once the activities are cleared, this procedure resets any parent
processes of the specified activity to a status of ’Active’, if they are not
already active.
The procedure then handles the specified activity based on the
command you provide: SKIP or RETRY.
Arguments (input)
item_type A valid item type.
item_key A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process.
activity The activity node that encountered the error or that
you want to undo. Provide the label name of the
activity node. If the activity node label name does
not uniquely identify the subprocess you can
Description Defines the parent/child relationship for a master process and a detail
process. This API must be called by any detail process spawned from a
master process to define the parent/child relationship between the two
processes. You make a call to this API after you call the CreateProcess
API, but before you call the StartProcess API for the detail process.
Arguments (input)
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the child process.
parent_itemtype A valid item type for the parent process.
parent_itemkey A string generated from the application object’s
primary key to uniquely identify the item within
the parent item type. The parent item type and key
together identify the parent process.
parent_context Context information about the parent.
Description Returns the status and result for the root process of the specified item
instance. Possible values returned for the status are: ACTIVE,
COMPLETE, ERROR, or SUSPENDED. If the root process does not
exist, then the item key does not exist and will thus cause the
procedure to raise an exception.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemtype A valid item type.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the item instance.
Description Returns the process status for the given item type instance as a two
dimensional data object.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemType A valid item type.
itemKey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
process A process instance ID for the item type. If the
instance ID is unknown, you can simply provide
any negative number and the method will return
the process status for the root process.
See Also
Description Retrieves the item attributes from the database for the item type from
which the external Java function was called. The item attributes are not
loaded by default due to the performance impact that could occur if the
item type contains a large number of item attributes. You can use this
method to load the item attributes explicitly before accessing them in
your function.
If a database access error occurs, this method throws a SQLException.
Arguments (input)
pWCtx Workflow context information. See: Oracle
Workflow Context: page 8 – 5.
Description Retrieves the activity attributes from the database for the specified
activity. This method is called by default when the function activity is
instantiated and before the execute() function is called.
If a database access error occurs, this method throws a SQLException.
Arguments (input)
pWCtx Workflow context information. See: Oracle
Workflow Context: page 8 – 5.
iType A valid item type.
iKey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process. See: CreateProcess:
page 8 – 20.
actid An activity instance ID.
Description Returns the item attribute information for the specified item attribute.
Arguments (input)
aName The internal name of an item attribute.
Description Sets the value of the specified item attribute in the database.
This method throws a NumberFormatException if it cannot convert the
value to the appropriate format for an attribute of type number or date.
The method throws a WFException if it encounters an error while
setting an attribute of type document or text.
Arguments (input)
pWCtx Workflow context information. See: Oracle
Workflow Context: page 8 – 5.
pAttr The attribute information for an item attribute.
Description This abstract method is implemented by the extending class and forms
the main entry point function of the external Java function activity
being implemented. See: Standard API for Java Procedures Called by
Function Activities: page 7 – 8.
Arguments (input)
pWCtx Workflow context information. See: Oracle
Workflow Context: page 8 – 5.
See Also
Table 8 – 3 (Page 1 of 1)
The following table shows the constants that can be used to represent
the type of the default value for an attribute. The default value can be
either a constant or, for an activity attribute, a reference to an item type
attribute.
Table 8 – 4 (Page 1 of 1)
Description There are two constructor methods for the WFAttribute class. The first
constructor creates a new WFAttribute object. The second constructor
creates a new WFAttribute object and initializes it with the specified
attribute name, attribute type, value, and value type.
Arguments (input)
pName The internal name of an item or activity attribute.
Required for the second method only.
pType The data type of the attribute. Required for the
second method only.
pValue The attribute value. Required for the second
method only.
pValueType The type of the default value for the attribute. The
default value can be either a constant or, for an
activity attribute, a reference to an item type
attribute. Required for the second method only.
Description Sets the value of the item or activity attribute within a WFAttribute
object. The value must be cast to the Object type.
Arguments (input)
pValue The attribute value.
Description Returns the value of the item or activity attribute as type Object.
Description Returns the data type of the item or activity attribute. See: Attribute
Types: page 4 – 3.
Description Returns the format string for the item or activity attribute, such as the
length for an attribute of type text or the format mask for an attribute
of type number or date. See: To Define an Item Type or Activity
Attribute: page 4 – 8.
Description Returns the type of the default value for the item or activity attribute.
The default value can be either a constant or, for an activity attribute, a
reference to an item type attribute. See: To Define an Item Type or
Activity Attribute: page 4 – 8.
Description Returns the internal name and the value of the item or activity attribute
as a string in the following format:
<name>=<value>
Description Compares the value of the item or activity attribute with the specified
value. compareTo() returns 0 if the two values are equal, –1 if the
attribute value is less than the specified value, or 1 if the attribute value
is greater than the specified value.
This method throws an Exception if it cannot convert the specified
value to the appropriate format for an attribute of type number or date.
Arguments (input)
pValue The test value to compare to the attribute value.
See Also
See Also
Description Returns the name of a current error message and the token substituted
error message. Also clears the error stack. Returns null if there is no
current error.
See Also
Arguments (input)
token_name Name of the token.
token_value Value to substitute for the token.
See Also
Arguments (input)
name Internal name of the error message as stored in the
table WF_RESOURCES.
See Also
or
<native path>
Description Adds an entry to the error stack to provide context information that
helps locate the source of an error. Use this procedure with predefined
errors raised by calls to TOKEN( ) and RAISE( ), with custom–defined
exceptions, or even without exceptions whenever an error condition is
detected.
Arguments (input)
pkg_name Name of the procedure package.
proc_name Procedure or function name.
arg1 First IN argument.
argn nth IN argument.
procedure MySubFunction(
arg1 in varchar2,
arg2 in varchar2)
is
...
begin
if (<error condition>) then
Wf_Core.Token(’ARG1’, arg1);
Wf_Core.Token(’ARG2’, arg2);
Wf_Core.Raise(’ERROR_NAME’);
end if;
...
exception
when others then
See Also
Description Translates the string value of a token by returning the value for the
token as defined in WF_RESOURCES for your language setting.
Arguments (input)
tkn_name Token name.
See Also
Description Deletes all items for the specified item type, and/or item key, and end
date, including process status and notification information. Deletes
from the tables WF_NOTIFICATIONS,
WF_ITEM_ACTIVITY_STATUSES, WF_ITEM_ATTRIBUTE_VALUES
and WF_ITEMS.
Arguments (input)
itemtype Item type to delete. Leave this argument null to
delete all item types.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. If null, the procedure
purges all items in the specified itemtype.
enddate Specified date to delete up to.
docommit Specify TRUE or FALSE to indicate whether to
commit data while purging. If you want Items() to
commit data as it purges to reduce rollback
segments and improve performance, specify TRUE.
If you do not want to perform automatic commits,
specify FALSE. Defaults to TRUE.
Arguments (input)
itemtype Item type associated with the activities you want to
delete. Leave this argument null to delete activities
for all item types.
name Internal name of activity to delete. Leave this
argument null to delete all activities for the
specified item type.
enddate Specified date to delete up to.
Arguments (input)
itemtype Item type associated with the notifications you
want to delete. Leave this argument null to delete
notifications for all item types.
enddate Specified date to delete up to.
Description Deletes all eligible obsolete runtime item type and activity data that is
associated with the specified item type and has an END_DATE less
than or equal to the specified end date. Total() also deletes ad hoc roles
and users that are no longer in use by calling AdHocDirectory(). See:
AdHocDirectory: page 8 – 117.
Because Total() purges all activities and ad hoc role information, it is
more costly in performance than Items(). If you want to purge a specific
item key, use Items(). Use Total() as part of your routine maintenance
during periods of low activity. See: Items: page 8 – 112.
Arguments (input)
itemtype Item type associated with the obsolete runtime
data you want to delete. Leave this argument null
to delete obsolete runtime data for all item types.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. If null, the procedure
purges all items in the specified itemtype.
enddate Specified date to delete up to.
docommit Specify TRUE or FALSE to indicate whether to
commit data while purging. If you want Total() to
commit data as it purges to reduce rollback
segments and improve performance, specify TRUE.
If you do not want to perform automatic commits,
specify FALSE. Defaults to TRUE.
Description Deletes all eligible obsolete runtime data that is of persistence type
’PERM’ (Permanent) and that is associated with the specified item type
and has an END_DATE less than or equal to the specified end date.
TotalPERM() is similar to Total() except that TotalPERM() deletes only
items with a persistence type of ’PERM’. See: Total: page 8 – 115.
Arguments (input)
itemtype Item type associated with the obsolete runtime
data you want to delete. Leave this argument null
to delete obsolete runtime data for all item types.
itemkey A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. If null, the procedure
purges all items in the specified itemtype.
enddate Specified date to delete up to.
docommit Specify TRUE or FALSE to indicate whether to
commit data while purging. If you want
TotalPERM() to commit data as it purges to reduce
rollback segments and improve performance,
specify TRUE. If you do not want to perform
automatic commits, specify FALSE. Defaults to
TRUE.
Description Purges all users and roles in the WF_LOCAL_* tables whose expiration
date is less than or equal to the specified end_date and that are not
referenced in any notification.
Arguments (input)
end_date Date to purge to.
See Also
Arguments (input)
role A valid role name.
Arguments (input)
user A valid username.
Arguments (input)
role A valid role name.
Arguments (input)
role A valid role name.
Arguments (input)
user A valid username.
role A valid role name.
Arguments (input)
username A valid username.
Description Returns a Workflow display name and username for a user given the
system information from the original user and roles repository.
Arguments (input)
p_orig_system Code that identifies the original repository table.
p_orig_system_id ID of a row in the original repository table.
Description Returns a Workflow display name and role name for a role given the
system information from the original user and roles repository.
Arguments (input)
p_orig_system Code that identifies the original repository table.
p_orig_system_id ID of a row in the original repository table.
Description Returns a Workflow role’s display name given the role’s internal name.
Arguments (input)
p_role_name The internal name of the role.
Arguments (input)
user_name The internal name of the user.
status A status of ’ACTIVE’ or ’INACTIVE’ to set for the
user. If null, the status is ’ACTIVE’.
Arguments (input)
role_name The internal name of the role.
status A status of ’ACTIVE’ or ’INACTIVE’ to set for the
role. If null, the status is ’ACTIVE’.
Arguments (input)
name An internal name for the user. The name must less
than 30 characters long and is all uppercase. This
procedure checks that the name provided does not
already exist in WF_USERS and returns an error if
the name already exists. If you do not provide an
internal name, the system generates an internal
name for you where the name contains a prefix of
’~WF_ADHOC–’ followed by a sequence number.
display_name The display name of the user. This procedure
checks that the display name provided does not
already exist in WF_USERS and returns an error if
the display name already exists. If you do not
provide an display name, the system generates one
for you where the display name contains a prefix of
’~WF_ADHOC–’ followed by a sequence number.
language The value of the database NLS_LANGUAGE
initialization parameter that specifies the default
language–dependent behavior of the user’s
notification session. If null, the procedure resolves
this to the language setting of your current session.
territory The value of the database NLS_TERRITORY
initialization parameter that specifies the default
territory–dependant date and numeric formatting
See Also
Arguments (input)
role_name An internal name for the role. The name must less
than 30 characters long and is all uppercase. This
procedure checks that the name provided does not
already exist in WF_ROLES and returns an error if
the name already exists. If you do not provide an
internal name, the system generates an internal
name for you where the name contains a prefix of
’~WF_ADHOC–’ followed by a sequence number.
role_display_ The display name of the role. This procedure
name checks that the display name provided does not
already exist in WF_ROLES and returns an error if
the display name already exists. If you do not
provide an display name, the system generates one
for you where the display name contains a prefix of
’~WF_ADHOC–’ followed by a sequence number.
language The value of the database NLS_LANGUAGE
initialization parameter that specifies the default
language–dependent behavior of the user’s
notification session. If null, the procedure resolves
this to the language setting of your current session.
territory The value of the database NLS_TERRITORY
initialization parameter that specifies the default
See Also
Arguments (input)
role_name The internal name of the ad hoc role.
role_users List of users delimited by spaces or commas.
Users can be ad hoc users or users defined in an
application, but they must already be defined in
the Oracle Workflow directory service.
Arguments (input)
user_name The internal name of the ad hoc user.
expiration_date New expiration date. If null, the procedure
defaults the expiration date to sysdate.
Arguments (input)
role_name The internal name of the ad hoc role.
expiration_date New expiration date. If null, the procedure
defaults the expiration date to sysdate.
Arguments (input)
user_name The internal name of the ad hoc user to update.
display_name A new display name for the ad hoc user. If null,
the display name is not updated.
notification_ A new notification preference of ’MAILTEXT’,
preference ’MAILHTML’, ’MAILATTH’, ’QUERY’ or
’SUMMARY’. If null, the notification preference is
not updated.
language A new value of the database NLS_LANGUAGE
initialization parameter for the ad hoc user. If null,
the language setting is not updated.
territory A new value of the database NLS_TERRITORY
initialization parameter for the ad hoc user. If null,
the territory setting is not updated.
email_address A new valid electronic mail address for the ad hoc
user. If null, the electronic mail address is not
updated.
fax A new fax number for the ad hoc user. If null, the
fax number is not updated.
Arguments (input)
role_name The internal name of the ad hoc role to update.
display_name A new display name for the ad hoc role. If null, the
display name is not updated.
notification_ A new notification preference of ’MAILTEXT’,
preference ’MAILHTML’, ’QUERY’ or ’SUMMARY’. If null,
the notification preference is not updated.
language A new value of the database NLS_LANGUAGE
initialization parameter for the ad hoc role. If null,
the language setting is not updated.
territory A new value of the database NLS_TERRITORY
initialization parameter for the ad hoc role. If null,
the territory setting is not updated.
email_address A new valid electronic mail address for the ad hoc
role. If null, the electronic mail address is not
updated.
fax A new fax number for the ad hoc role. If null, the
fax number is not updated.
Arguments (input)
role_name The internal name of the ad hoc role.
role_users List of users to remove from the ad hoc role. The
users are delimited by commas or spaces. If null,
all users are removed from the role.
get_pref
Syntax function get_pref
(p_user_name in varchar2,
p_preference_name in varchar2)
return varchar2;
Description Retrieves the value of the specified preference for the specified user.
Arguments (input)
p_user_name The internal name of the user. To retrieve the value
for a global preference, specify the user as
–WF_DEFAULT–.
p_preference_ The name of the user preference whose value you
name wish to retrieve. Valid preference names are:
LANGUAGE
TERRITORY
MAILTYPE
DMHOME
DATEFORMAT
Description Retrieves the access key password that controls access to the Workflow
Monitor. Each process instance has separate access keys for running the
Workflow Monitor in ’ADMIN’ mode or ’USER’ mode.
Arguments (input)
x_item_type A valid item type.
x_item_key A string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process to report on.
x_admin_mode A value of YES or NO. YES directs the function to
retrieve the access key password that runs the
monitor in ’ADMIN’ mode. NO retrieves the
access key password that runs the monitor in
’USER’ mode.
<webagent>/wf_monitor.html?x_item_type=<item_type>&x_item_ke
y=<item_key>&x_admin_mode=<YES or
NO>&x_access_key=<access_key>
<webagent> represents the base URL of the web agent configured for
Oracle Workflow in your Web server. See: Setting Global User
Preferences: page 2 – 13.
Arguments (input)
x_agent The base web agent string defined for Oracle
Workflow or Oracle Self–Service Web Applications
in your Web server. The base web agent string
should be stored in the WF_RESOURCES table,
and looks something like:
http://<server.com:portID>/<PLSQL_agent_path>
Example Following is an example of how you can call the GetDiagramUrl. This
example returns a URL that displays the Workflow Monitor diagram
for a process instance identified by the item type WFDEMO and item
key 10022, in ’USER’ mode:
URL := WF_MONITOR.GetDiagramURL
(WF_CORE.Translate(’WF_WEB_AGENT’),
’WFDEMO’,
’10022’,
’NO’);
See Also
<webagent>/wf_monitor.envelope?x_item_type=<item_type>&x_ite
m_key=<item_key>&x_admin_mode=<YES or
NO>&x_access_key=<access_key>
<webagent> represents the base URL of the web agent configured for
Oracle Workflow in your Web server. See: Setting Global User
Preferences: page 2 – 13.
Arguments (input)
x_agent The base web agent string defined for Oracle
Workflow or Oracle Self–Service Web Applications
in your Web server. The base web agent string
should be stored in the WF_RESOURCES table,
and looks something like:
http://<server.com:portID>/<PLSQL_agent_path>
When calling this function, your application must
first retrieve the web agent string from the
WF_RESOURCES token WF_WEB_AGENT by
calling WF_CORE.TRANSLATE( ). See: Setting
Global User Preferences: page 2 – 13.
x_item_type A valid item type.
See Also
Example <webagent>/wf_monitor.envelope?x_item_type=<item_type>&x_ite
m_key=<item_key>&x_admin_mode=<YES or
NO>&x_access_key=<access_key>&x_advanced=TRUE
<webagent> represents the base URL of the web agent configured for
Oracle Workflow in your Web server. See: Setting Global User
Preferences: page 2 – 13.
Arguments (input)
x_agent The base web agent string defined for Oracle
Workflow or Oracle Self–Service Web Applications
in your Web server. The base web agent string
should be stored in the WF_RESOURCES table,
and looks something like:
http://<server.com:portID>/<PLSQL_agent_path>
When calling this function, your application must
first retrieve the web agent string from the
WF_RESOURCES token WF_WEB_AGENT by
See Also
WF_ITEM_ACTIVITY_STATUSES_V
This view contains denormalized information about a workflow
process and its activities’ statuses. Use this view to create custom
queries and reports on the status of a particular item or process. The
column descriptions of the view are as follows:
Name Null? Type
––––––––––––––––––––––––––––––– –––––––– ––––
ROW_ID ROWID
SOURCE CHAR(1)
ITEM_TYPE VARCHAR2(8)
ITEM_TYPE_DISPLAY_NAME VARCHAR2(80)
ITEM_TYPE_DESCRIPTION VARCHAR2(240)
ITEM_KEY VARCHAR2(240)
USER_KEY VARCHAR2(240)
ITEM_BEGIN_DATE DATE
ITEM_END_DATE DATE
ACTIVITY_ID NUMBER
ACTIVITY_LABEL VARCHAR2(30)
ACTIVITY_NAME VARCHAR2(30)
ACTIVITY_DISPLAY_NAME VARCHAR2(80)
ACTIVITY_DESCRIPTION VARCHAR2(240)
ACTIVITY_TYPE_CODE VARCHAR2(8)
ACTIVITY_TYPE_DISPLAY_NAME VARCHAR2(80)
Payload Structure
Oracle Workflow queues use the datatype system.wf_payload_t to
define the payload for any given message. The payload contains all the
information that is required about the event. The following table lists
the attributes of system.wf_payload_t.
Table 8 – 5 (Page 1 of 2)
Table 8 – 5 (Page 2 of 2)
See Also
Description Enqueues the result from an outbound event onto the inbound queue.
An outbound event is defined by an outbound queue message that is
consumed by some agent.
Oracle Workflow marks the external function activity as complete with
the specified result when it processes the inbound queue. The result
value is only effective for successful completion, however. If you
specify an external program error in the error_stack parameter, Oracle
Workflow marks the external function activity as complete with an
ERROR status, overriding the result value. Additionally, if a
corresponding error process is defined in the item type, Oracle
Workflow launches that error process.
Arguments (input)
itemtype The item type of the event.
itemkey The item key of the event. An item key is a string
generated from the application object’s primary
key. The string uniquely identifies the item within
an item type. The item type and key together
identify the process instance.
actid The function activity instance ID that this event is
associated with.
result An optional activity completion result. Possible
values are determined by the function activity’s
Result Type.
attrlist A longlist of ”value name=value” pairs that you
want to pass back as item attributes and item
attribute values. Each pair must be delimited by
the caret character (^), as in the example,
”ATTR1=A^ATTR2=B^ATTR3=C”. If a specified
value name does not exist as an item attribute,
Description Dequeues a message from the outbound queue for some agent to
consume.
Arguments (input)
dequeuemode A value of DBMS_AQ.BROWSE,
DBMS_AQ.LOCKED, or DBMS_AQ.REMOVE,
corresponding to the numbers 1, 2 and 3
respectively, to represent the locking behavior of
the dequeue. A mode of DBMS_AQ.BROWSE
means to read the message from the queue without
acquiring a lock on the message. A mode of
DBMS_AQ.LOCKED means to read and obtain a
write lock on the message, where the lock lasts for
the duration of the transaction. A mode of
DBMS_AQ.REMOVE means read the message and
delete it.
navigation Specify DBMS_AQ.FIRST_MESSAGE or
DBMS_AQ.NEXT_MESSAGE, corresponding to
the number 1 or 2 respectively, to indicate the
position of the message that will be retrieved. A
value of DBMS_AQ.FIRST_MESSAGE retrieves the
first message that is available and matches the
correlation criteria. The first message is inherently
the beginning of the queue. A value of
DBMS_AQ.NEXT_MESSAGE retrieves the next
message that is available and matches the
event system.wf_payload_t;
i number;
msg_id raw(16);
queuename varchar2(30);
navigation_mode number;
end_of_queue boolean;
begin
queuename:=wf_queue.OUTBOUNDQUEUE;
i:=0;
LOOP
i:=i+1;
wf_queue.DequeueOutbound(
dequeuemode => dbms_aq.BROWSE,
payload => event,
navigation => navigation_mode,
message_handle => msg_id,
timeout => end_of_queue);
if end_of_queue then
exit;
end if;
end;
/
Description Dequeue from the outbound queue, the full event details for a given
message. This API is similar to DequeueOutbound except it does not
reference the payload type. Instead, it outputs itemkey, actid,
function_name, and param_list, which are part of the payload.
Arguments (input)
dequeuemode A value of DBMS_AQ.BROWSE,
DBMS_AQ.LOCKED, or DBMS_AQ.REMOVE,
corresponding to the numbers 1, 2 and 3
respectively, to represent the locking behavior of
the dequeue. A mode of DBMS_AQ.BROWSE
means to read the message from the queue without
acquiring a lock on the message. A mode of
DBMS_AQ.LOCKED means to read and obtain a
write lock on the message, where the lock lasts for
the duration of the transaction. A mode of
DBMS_AQ.REMOVE means read the message and
update or delete it.
navigation Specify DBMS_AQ.FIRSTMESSAGE or
DBMS_AQ.NEXTMESSAGE, corresponding to the
number 1 or 2 respectively, to indicate the position
of the message that will be retrieved. A value of
DBMS_AQ.FIRSTMESSAGE retrieves the first
message that is available and matches the
Arguments (input)
queuename The name of the queue from which to purge the
event.
message_handle The message handle ID for the specific event to
purge.
Description Removes all events belonging to a specific item type from a specified
queue without further processing.
Arguments (input)
queuename The name of the queue from which to purge the
events.
itemtype An optional item type of the events to purge.
correlation Specify an optional correlation identifier for the
message to be purged. Oracle Advanced Queues
allow you to search a queue for messages based on
a specific correlation value. You can use the Like
comparison operator, ’%’, to specify the identifier
string. If null, the Workflow Engine creates a
correlation identifier based on the Workflow
schema name and the item type.
Description Reads every message off the inbound queue and records each message
as a completed event. The result of the completed event and the list of
item attributes that are updated as a consequence of the completed
event are specified by each message in the inbound queue. See:
EnqueueInbound: page 8 – 159.
Arguments (input)
itemtype An optional item type of the events to process.
correlation If you wish to process only messages with a
specific correlation, enter a correlation identifier. If
correlation is null, the Workflow Engine creates a
correlation identifier based on the Workflow
schema name and the item type.
Arguments (input)
queuename The name of the queue from which to retrieve the
message handle.
itemtype The item type of the message.
itemkey The item key of the message. An item key is a
string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process instance.
actid The function activity instance ID that this message
is associated with.
correlation Specify an optional correlation identifier for the
message. If the correlation is null, the Workflow
Engine creates a correlation identifier based on the
Workflow schema name and the item type.
Description Dequeues all messages from an exception queue and places the
messages on the standard Business Event System WF_ERROR queue
with the error message ’Message Expired.’ When the messages are
dequeued from WF_ERROR, a predefined subscription is triggered that
launches the Default Event Error process.
Arguments (input)
queuename The name of the exception queue that has been
enabled for dequeue.
See Also
Description Returns the name of the queue and schema used by the background
engine for deferred processing.
Description Returns the name of the inbound queue and schema. The inbound
queue contains messages for the Workflow Engine to consume.
Description Returns the name of the outbound queue and schema. The outbound
queue contains messages for external agents to consume.
Description Clears the internal stack. See: Developer APIs for the Inbound Queue:
page 8 – 157.
Description Creates a new message in the internal stack if it doesn’t already exist.
See: Developer APIs for the Inbound Queue: page 8 – 157.
Arguments (input)
itemtype The item type of the message.
itemkey The item key of the message. An item key is a
string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process instance.
actid The function activity instance ID that this message
is associated with.
Description Writes a message from the internal stack to the inbound queue. See:
Developer APIs for the Inbound Queue: page 8 – 157.
Arguments (input)
itemtype The item type of the message.
itemkey The item key of the message. An item key is a
string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process.
actid The function activity instance ID that this message
is associated with.
Description Appends an item attribute to the message in the internal stack. See:
Developer APIs for the Inbound Queue: page 8 – 157.
Arguments (input)
itemtype The item type of the message.
itemkey The item key of the message. An item key is a
string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process instance.
actid The function activity instance ID that this message
is associated with.
attrName The internal name of the item attribute you wish to
append to the message.
attrValue The value of the item attribute you wish to append.
Description Sets a result to the message written in the internal stack. See:
Developer APIs for the Inbound Queue: page 8 – 157.
Arguments (input)
itemtype The item type of the message.
itemkey The item key of the message. An item key is a
string generated from the application object’s
primary key. The string uniquely identifies the
item within an item type. The item type and key
together identify the process instance.
actid The function activity instance ID that this message
is associated with.
result The completion result for the message. Possible
values are determined by the activity’s Result
Type.
See Also
Arguments (input)
username The username of the person accessing the
document management system.
document_ The document identifier for the document you
identifier wish to display. The document identifier should be
stored as a value in an item attribute of type
document. You can retrieve the document
identifier using the GetItemAttrDocument API. See:
GetItemAttrDocument: page 8 – 58 and
SetItemAttrDocument: page 8 – 50.
display_icon True or False. True tells the procedure to return the
URL with the paper clip attachment icon and
translated prompt name, whereas False tells the
procedure to return only the URL. This argument
provides you the flexibility needed when you call
this procedure from a form– or HTML–based UI
agent.
Arguments (input)
username The username of the person accessing the
document management system.
callback_ The URL you would like to invoke after the user
function selects a document to attach. This callback
function should be the callback_url syntax that is
returned from the set_document_id_html API.
display_icon True or False. True tells the procedure to return the
URL with the paper clip attachment icon and
translated prompt name, whereas False tells the
procedure to return only the URL. This argument
provides you the flexibility needed when you call
this procedure from a form– or HTML–based UI
agent.
Description Returns a callback URL that gets executed when a user selects a
document from the DM system. Use this procedure to set the
document that is selected from the document management Search
function to the specified destination field of an HTML page. The
destination field is the field from which the user launches the DM
integration screen to attach a document. Pass the returned callback
URL as an argument to the get_launch_attach_url API.
Arguments (input)
frame_name The name of the HTML frame that you wish to
interact with in the current UI.
form_name The name of the HTML form that you wish to
interact with in the current UI.
document_id_ The name of the HTML field in the current UI that
field_name you would like to write the resulting document
identifier to. The resulting document identifier is
determined by the document the user selects from
the document management Search function. The
document identifier is a concatenation of the
following values:
DM:<node_id>:<document_id>:<version>
<nodeid> is the node ID assigned to the document
management system node as defined in the
Document Management Nodes web page. See: To
Define a Document Node: page 2 – 33.
<documentid> is the document ID of the document,
as assigned by the document management system
where the document resides.
<version> is the version of the document. If a
version is not specified, the latest version is
assumed.
Notification Model
A notification activity in a workflow process consists of a design–time
message and a list of message attributes. In addition, there may be a
number of runtime named values called item type attributes from
which the message attributes draw their values.
The Workflow Engine moves through the workflow process, evaluating
each activity in turn. Once it encounters a notification activity, the
engine makes a call to the Notification System Send( ) or SendGroup( )
API to send the notification.
Forwarding a Notification
If a recipient forwards a notification to another role, the Notifications
web page calls the Notification System’s Forward( ) API.
Note: The Notification System is not able to track notifications
that are forwarded via e–mail. It records only the eventual
responder’s e–mail address and any Respond message
attributes values included in the response.
The Forward( ) API validates the role, then calls a notification callback
function to execute the notification activity’s post–notification function
(if it has one) in FORWARD mode. As an example, the
post–notification function may verify whether the role that the
notification is being forwarded to has appropriate authority to view
and respond to the notification. If it doesn’t, the post–notification
function may return an error and prevent the Forward operation from
proceeding. See: Post–notification Functions: page 8 – 12.
Transferring a Notification
If a recipient transfers the ownership of a notification to another role,
the Notification web page calls the Notification System’s Transfer( ) API.
Example 2 When the user responds to the notification, the callback is called again,
once for each RESPOND attribute.
Example 3 Then finally the Notification System calls the ’COMPLETE’ command
to indicate the response is complete.
your_callback(’COMPLETE’, context, attrname, attrtype,
textval, numval, dateval);
Description This function sends a separate notification to all the users assigned to a
specific role and returns a number called a notification group ID, if
successful. The notification group ID identifies that group of users and
the notification they each received.
If your message has message attributes, the procedure looks up the
values of the attributes from the message attribute table or it can use an
optionally supplied callback interface function to get the value from the
item type attributes table. A callback function can also be used when a
notification is responded to.
Note: If you are using the Oracle Workflow Notification
System and its e–mail–based or web–based notification client,
the Send procedure implicitly calls the WF_ENGINE.CB
callback function. If you are using your own custom
notification system, then you must define your own callback
function following a standard format and specify its name for
the callback argument. See: Custom Callback Function: page
8 – 194.
Arguments (input)
role The role name assigned as the performer of the
notification activity.
msg_type The item type associated with the message.
msg_name The message internal name.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
new_role or The role name of the person the note is reassigned
newRole to.
forward_comment An optional forwarding comment.
or comment
Example The following code excerpt shows an example of how to call forward()
in a Java program. The example code is from the WFTest.java program.
// forward to MBEECH
System.out.println(”Delegate Test”);
count = WFNotificationAPI.workCount(ctx, ”MBEECH”);
System.out.println(”There are ” + count +
” open notification(s) for” + ” MBEECH”);
System.out.println(”Delegate nid ” + myNid +
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
new_role or The role name of the person the note is transferred
newRole to.
forward_comment An optional comment to append to notification.
or comment
Example The following code excerpt shows an example of how to call transfer()
in a Java program. The example code is from the WFTest.java program.
// transfer to MBEECH
System.out.println(”Transfer Test”);
System.out.println(”Transfer nid ” + myNid +
” from BLEWIS to MBEECH”);
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
cancel_comment An optional comment on the cancellation.
or comment
Arguments (input)
gid The notification group id.
cancel_comment An optional comment on the cancellation.
This procedure also accepts the name of the individual who actually
responded to the notification. This may be useful to know especially if
the notification is assigned to a multi–user role. The information is
stored in the RESPONDER column of the WF_NOTIFICATIONS table.
The value stored in this column depends on how the user responds to
the notification. The following table shows the value that is stored for
each response mechanism.
Table 8 – 6 (Page 1 of 1)
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id
comment An optional comment on the response
responder The user who responded to the notification.
If the notification was closed using the Web Notification interface the
value returned will be a valid role defined in the view WF_ROLES. If
the Notification was closed using the e–mail interface then the value
returned will be an e–mail address. See: Respond: page 8 – 205.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id
Use this procedure only if you are writing your own custom Voting
activity. See: Voting Activity: page 4 – 60.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
gid The notification group id.
ResultCode Result code to be tallied.
Description This function returns ’TRUE’ if any notification associated with the
specified notification group ID is ’OPEN’, otherwise it returns ’FALSE’.
Use this procedure only if you are writing your own custom Voting
activity. See: Voting Activity: page 4 – 60.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
gid The notification group id.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
responder The user or role who responded to the notification.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
aname The attribute name.
avalue The attribute value.
Example The following code excerpt shows an example of how to call addAttr()
in a Java program. The example code is from the WFTest.java program.
if (WFNotificationAPI.addAttr(ctx, myNid, myAttr) == false)
{
System.out.println(”Add attribute ” + myAttr + ” failed.”);
}
procedure SetAttrNumber
(nid in number,
aname in varchar2,
avalue in number);
procedure SetAttrDate
(nid in number,
aname in varchar2,
avalue in date);
Description Used at both send and respond time to set the value of notification
attributes. The notification agent (sender) may set the value of SEND
attributes. The performer (responder) may set the value of RESPOND
attributes.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
aname The attribute name.
Description Returns the role that the notification is sent to, the item type of the
message, the name of the message, the notification priority, the due
date and the status for the specified notification.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
Example The following code excerpt shows an example of how to call getInfo() in
a Java program. The example code is from the WFTest.java program.
// Notification Info
System.out.println(”Notification Info for nid ” + myNid);
dataSource = WFNotificationAPI.getInfo(ctx, myNid);
displayDataSource(ctx, dataSource);
Description Substitutes tokens in an arbitrary text string using token values from a
particular notification. This function may return up to 32K characters.
You cannot use this function in a view definition or in an Oracle Forms
Developer form. For views and forms, use GetShortText( ) which
truncates values at 1950 characters.
Arguments (input)
some_text Text to be substituted.
nid Notification ID of notification to use for token
values.
disptype The display type of the message body that you are
token substituting the text into. Valid display types
are:
• wf_notification.doc_text, which returns
text/plain
• wf_notification.doc_html, which returns
text/html
• wf_notification.doc_attach, which returns null
The default is null.
Description Substitutes tokens in an arbitrary text string using token values from a
particular notification. This function may return up to 1950 characters.
This function is meant for use in view definitions and Oracle Forms
Developer forms, where the field size is limited to 1950 characters. Use
GetText( ) in other situations where you need to retrieve up to 32K
characters.
Arguments (input)
some_text Text to be substituted.
nid Notification ID of notification to use for token
values.
function GetAttrNumber
(nid in number,
aname in varchar2)
return number;
function GetAttrDate
(nid in number,
aname in varchar2)
return date;
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
aname The message attribute name.
System.out.println(myAttr.toString() + ” = ’” + value +
”’”);
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
aname The message attribute name.
disptype The display type of the document you wish to
return. Valid display types are:
• wf_notification.doc_text, which returns
text/plain
• wf_notification.doc_html, which returns
text/html
• wf_notification.doc_attach, which returns null
Description Returns the subject line for the notification message. Any message
attribute in the subject is token substituted with the value of the
corresponding message attribute.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
Description Returns the HTML or plain text message body for the notification,
depending on the message body type specified. Any message attribute
in the body is token substituted with the value of the corresponding
notification attribute. This function may return up to 32K characters.
You cannot use this function in a view definition or in an Oracle
Applications form. For views and forms, use GetShortBody( ) which
truncates values at 1950 characters.
Note that the returned plain text message body is not formatted; it
should be wordwrapped as appropriate for the output device. Body
text may contain tabs (which indicate indentation) and newlines (which
indicate paragraph termination).
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification id.
disptype The display type of the message body you wish to
fetch. Valid display types are:
• wf_notification.doc_text, which returns
text/plain
• wf_notification.doc_html, which returns
text/html
• wf_notification.doc_attach, which returns null
The default is null.
Description Returns the message body for the notification. Any message attribute
in the body is token substituted with the value of the corresponding
notification attribute. This function may return up to 1950 characters.
This function is meant for use in view definitions and Oracle Forms
Developer forms, where the field size is limited to 1950 characters. Use
GetBody( ) in other situations where you need to retrieve up to 32K
characters.
Note that the returned plain text message body is not formatted; it
should be wordwrapped as appropriate for the output device. Body
text may contain tabs (which indicate indentation) and newlines (which
indicate paragraph termination).
Arguments (input)
nid The notification id.
Description Tests if the current context is correct by calling the Item Type
Selector/Callback function. This function returns TRUE if the context
check is OK, or if no Selector/Callback function is implemented. It
returns FALSE if the context check fails.
Arguments (input)
nid The notification id.
Description Returns a username if the notification access string is valid and the
notification is open, otherwise it returns null. The access string is
automatically generated by the Notification Mailer and is used to verify
the authenticity of both text and HTML versions of e–mail
notifications.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
access_str or The access string, in the format: nid/nkey where nid
accessString is the notification ID and nkey is the notification
key.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
username The internal name of a role.
Description Returns a list of notifications for the specified item type and item key.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
itemType The internal name of the item type.
itemKey A string derived from the application object’s
primary key. The string uniquely identifies the
item within the item type. The item type and key
together identify the process instance.
Arguments (input)
wCtx Workflow context information. Required for the
Java method only. See: Oracle Workflow Context:
page 8 – 5.
nid The notification ID.
Arguments (input)
clob_loc The CLOB to which the string should be added.
msg_string A string of character data.
See Also
See Also
See Also
Table 8 – 7 (Page 1 of 1)
getName
PL/SQL Syntax MEMBER FUNCTION getName
return varchar2
getSystem
PL/SQL Syntax MEMBER FUNCTION getSystem
return varchar2
Arguments (input)
pName The value for the NAME attribute.
setSystem
PL/SQL Syntax MEMBER PROCEDURE setSystem
(pSystem in varchar2)
Arguments (input)
pSystem The value for the SYSTEM attribute.
See Also
Agents: page 13 – 22
Table 8 – 8 (Page 1 of 1)
getName
PL/SQL Syntax MEMBER FUNCTION getName
return varchar2
getValue
PL/SQL Syntax MEMBER FUNCTION getValue
return varchar2
setName
PL/SQL Syntax MEMBER PROCEDURE setName
(pName in varchar2)
Arguments (input)
pName The value for the NAME attribute.
setValue
PL/SQL Syntax MEMBER PROCEDURE setValue
(pValue in varchar2)
Arguments (input)
pValue The value for the VALUE attribute.
RECEIVE_DATE DATE The date and time when the message is de-
queued by an agent listener.
FROM_AGENT WF_AGENT_T The agent from which the event is sent. For
locally raised events, this attribute is ini-
tially null.
Table 8 – 9 (Page 2 of 2)
Initialize
PL/SQL Syntax STATIC PROCEDURE initialize
(new_wf_event_t in out wf_event_t)
☞ Attention: You must call the Initialize method before you can
perform any further manipulation on a new WF_EVENT_T
object.
Arguments (input)
new_wf_event_t The WF_EVENT_T object to initialize.
getPriority
PL/SQL Syntax MEMBER FUNCTION getPriority
return number
getSendDate
PL/SQL Syntax MEMBER FUNCTION getSendDate
return date
getReceiveDate
PL/SQL Syntax MEMBER FUNCTION getReceiveDate
return date
getCorrelationID
PL/SQL Syntax MEMBER FUNCTION getCorrelationID
return varchar2
getParameterList
PL/SQL Syntax MEMBER FUNCTION getParameterList
return wf_parameter_list_t
getEventName
PL/SQL Syntax MEMBER FUNCTION getEventName
return varchar2
getEventData
PL/SQL Syntax MEMBER FUNCTION getEventData
return clob
getFromAgent
PL/SQL Syntax MEMBER FUNCTION getFromAgent
return wf_agent_t
getToAgent
PL/SQL Syntax MEMBER FUNCTION getToAgent
return wf_agent_t
getErrorSubscription
PL/SQL Syntax MEMBER FUNCTION getErrorSubscription
getErrorMessage
PL/SQL Syntax MEMBER FUNCTION getErrorMessage
return varchar2
getErrorStack
PL/SQL Syntax MEMBER FUNCTION getErrorStack
return varchar2
setPriority
PL/SQL Syntax MEMBER PROCEDURE setPriority
(pPriority in number)
Arguments (input)
pPriority The value for the PRIORITY attribute.
setSendDate
PL/SQL Syntax MEMBER PROCEDURE setSendDate
Arguments (input)
pSendDate The value for the SEND_DATE attribute.
setReceiveDate
PL/SQL Syntax MEMBER PROCEDURE setReceiveDate
(pReceiveDate in date default sysdate)
Arguments (input)
pReceiveDate The value for the RECEIVE_DATE attribute.
setCorrelationID
PL/SQL Syntax MEMBER PROCEDURE setCorrelationID
(pCorrelationID in varchar2)
Arguments (input)
pCorrelationID The value for the CORRELATION_ID attribute.
setParameterList
PL/SQL Syntax MEMBER PROCEDURE setParameterList
(pParameterList in wf_parameter_list_t)
setEventName
PL/SQL Syntax MEMBER PROCEDURE setEventName
(pEventName in varchar2)
Arguments (input)
pEventName The value for the EVENT_NAME attribute.
setEventKey
PL/SQL Syntax MEMBER PROCEDURE setEventKey
(pEventKey in varchar2)
Arguments (input)
pEventKey The value for the EVENT_KEY attribute.
setEventData
PL/SQL Syntax MEMBER PROCEDURE setEventData
(pEventData in clob)
Arguments (input)
pEventData The value for the EVENT_DATA attribute.
Arguments (input)
pFromAgent The value for the FROM_AGENT attribute.
setToAgent
PL/SQL Syntax MEMBER PROCEDURE setToAgent
(pToAgent in wf_agent_t)
Arguments (input)
pToAgent The value for the TO_AGENT attribute.
setErrorSubscription
PL/SQL Syntax MEMBER PROCEDURE setErrorSubscription
(pErrorSubscription in raw)
Arguments (input)
pErrorSubscrip– The value for the ERROR_SUBSCRIPTION
tion attribute.
setErrorMessage
PL/SQL Syntax MEMBER PROCEDURE setErrorMessage
Arguments (input)
pErrorMessage The value for the ERROR_MESSAGE attribute.
setErrorStack
PL/SQL Syntax MEMBER PROCEDURE setErrorStack
(pErrorStack in varchar2)
Arguments (input)
pErrorStack The value for the ERROR_STACK attribute.
Content
PL/SQL Syntax MEMBER PROCEDURE Content
(pName in varchar2,
pKey in varchar2,
pData in clob)
Description Sets the values of all the event content attributes in a WF_EVENT_T
object, including EVENT_NAME, EVENT_KEY, and EVENT_DATA.
Arguments (input)
pName The value for the EVENT_NAME attribute.
pKey The value for the EVENT_KEY attribute.
pData The value for the EVENT_DATA attribute.
Description Sets the values of the all address attributes in a WF_EVENT_T object,
including FROM_AGENT, TO_AGENT, PRIORITY, and SEND_DATE.
Arguments (input)
pOutAgent The value for the FROM_AGENT attribute.
pToAgent The value for the TO_AGENT attribute.
pPriority The value for the PRIORITY attribute.
pSendDate The value for the SEND_DATE attribute.
AddParameterToList
PL/SQL Syntax MEMBER PROCEDURE AddParameterToList
(pName in varchar2,
pValue in varchar2)
Description Adds a new parameter name and value pair to the list stored in the
PARAMETER_LIST attribute of a WF_EVENT_T object. If a parameter
with the specified name already exists in the parameter list, then the
previous value of that parameter is overwritten with the specified
value.
Arguments (input)
pName The parameter name.
pValue The parameter value.
GetValueForParameter
PL/SQL Syntax MEMBER FUNCTION GetValueForParameter
Description Returns the value of the specified parameter from the list stored in the
PARAMETER_LIST attribute of a WF_EVENT_T object. This method
begins at the end of the parameter list and searches backwards through
the list. If no parameter with the specified name is found in the
parameter list, then the GetValueForParameter method returns NULL.
Arguments (input)
pName The parameter name.
☞ Attention: You must call the Initialize method before you can
perform any further manipulation on a new WF_EVENT_T
object.
• Initializing a CLOB locator
• Writing a text variable into a CLOB variable
• Setting the content attributes of the event message structure with
the Content method
• Setting the address attributes of the event message structure
with the Address method
The example code is from the script wfevtenq.sql, which enqueues an
event message on a queue using an override agent. See: Wfevtenq.sql:
page 16 – 10.
declare
l_overrideagent varchar2(30) := ’&overrideagent’;
l_overridesystem varchar2(30) := ’&overridesystem’;
l_fromagent varchar2(30) := ’&fromagent’;
l_fromsystem varchar2(30) := ’&fromsystem’;
l_toagent varchar2(30) := ’&toagent’;
l_tosystem varchar2(30) := ’&tosystem’;
l_eventname varchar2(100) := ’&eventname’;
l_eventkey varchar2(100) := ’&eventkey’;
l_msg varchar2(200) := ’&message’;
l_clob clob;
l_overrideagent_t wf_agent_t;
l_toagent_t wf_agent_t;
l_fromagent_t wf_agent_t;
l_event_t wf_event_t;
begin
wf_event.enqueue(l_event_t, l_overrideagent_t);
end;
WF_EVENT_T OMBAQ_TEXT_MSG
WF_EVENT_T.PRIORITY ombaq_properties(5).str_value
[name = PRIORITY]
WF_EVENT_T.SEND_DATE ombaq_properties(6).str_value
[name = SENDDATE]
WF_EVENT_T.RECEIVE_DATE ombaq_properties(7).str_value
[name = RECEIVEDATE]
WF_EVENT_T.CORRELATION_ID ombaq_properties(8).str_value
[name = CORRELATIONID]
WF_EVENT_T.EVENT_NAME ombaq_properties(9).str_value
[name = EVENTNAME]
WF_EVENT_T.EVENT_KEY ombaq_properties(10).str_value
[name = EVENTKEY]
Table 8 – 10 (Page 1 of 2)
WF_EVENT_T.FROM_AGENT.NAME ombaq_properties(1).str_value
[name = FROMAGENTNAME]
WF_EVENT_T.FROM_AGENT.SYSTEM ombaq_properties(2).str_value
[name = FROMAGENTSYSTEM]
WF_EVENT_T.TO_AGENT.NAME ombaq_properties(3).str_value
[name = TOAGENTNAME]
WF_EVENT_T.TO_AGENT.SYSTEM ombaq_properties(4).str_value
[name = TOAGENTSYSTEM]
WF_EVENT_T.ERROR_SUBSCRIPTION ombaq_properties(11).str_value
[name = ERRORSUBSCRIPTION]
WF_EVENT_T.ERROR_MESSAGE ombaq_properties(12).str_value
[name = ERRORMESSAGE1]
WF_EVENT_T.ERROR_MESSAGE ombaq_properties(13).str_value
[name = ERRORMESSAGE2]
WF_EVENT_T.ERROR_STACK ombaq_properties(14).str_value
[name = ERRORSTACK1]
WF_EVENT_T.ERROR_STACK ombaq_properties(15).str_value
[name = ERRORSTACK2]
WF_EVENT_T.PARAMETER_LIST ombaq_properties(16).str_value
[name = <first_parameter_name>]
... ...
WF_EVENT_T.PARAMETER_LIST ombaq_properties(115).str_value
[name = <hundredth_parameter_name>]
Table 8 – 10 (Page 2 of 2)
Note: You can use any names you choose for the parameters in
the parameter list for an event, except the reserved words that
are used for the other event properties. The reserved words
are:
PRIORITY, SENDDATE, RECEIVEDATE, CORRELATIONID,
EVENTNAME, EVENTKEY, FROMAGENTNAME,
FROMAGENTSYSTEM, TOAGENTNAME, TOAGENTSYSTEM,
ERRORSUBSCRIPTION, ERRORMESSAGE1, ERRORMESSAGE2,
ERRORSTACK1, ERRORSTACK2
See Also
Arguments (input)
p_event_name The internal name of the event.
p_event_key A string generated when the event occurs within a
program or application. The event key uniquely
identifies a specific instance of the event.
p_event_data An optional set of information about the event that
describes what occurred. The Event Manager
checks each subscription before executing it to
determine whether the subscription requires the
event data. If the event data is required but is not
already provided, the Event Manager calls the
Generate function for the event to produce the
event data. See: Events: page 13 – 4 and Standard
API for an Event Data Generate Function: page
7 – 21.
p_parameters An optional list of additional parameter name and
value pairs.
p_send_date An optional date to indicate when the event should
become available for subscription processing.
Example declare
l_xmldocument varchar2(32000);
/*
** If the complete event data is easily available, we can
** optionally test if any subscriptions to this event
** require it (rule data = Message).
*/
l_message := wf_event.test(’<EVENT_NAME>’);
/*
** If we do require a message, and we have the message now,
** set it; else we can just rely on the Event Generate
** Function callback code. Then Raise the Event with the
** required parameters.
*/
if l_message = ’MESSAGE’ then
if l_xmldocument is not null then
dbms_lob.createtemporary(l_eventdata, FALSE,
DBMS_LOB.CALL);
dbms_lob.write(l_eventdata, length(l_xmldocument), 1 ,
l_xmldocument);
–– Raise the Event with the message
wf_event.raise( p_event_name => ’<EVENT_NAME>’,
p_event_key => ’<EVENT_KEY>’,
p_event_data => l_eventdata,
p_parameters => l_parameter_list);
else
–– Raise the Event without the message
wf_event.raise( p_event_name => ’<EVENT_NAME>’,
p_event_key => ’<EVENT_KEY>’,
p_parameters => l_parameter_list);
end if;
elsif
l_message = ’KEY’ then
–– Raise the Event
wf_event.raise( p_event_name => <EVENT_NAME>,
p_event_key => <EVENT_KEY>,
p_parameters => l_parameter_list);
/*
** Up to your own custom code to commit the transaction
*/
commit;
/*
** Up to your own custom code to handle any major exceptions
*/
exception
when others then
null;
end;
See Also
Description Sends an event message from one agent to another. If the event
message contains both a From Agent and a To Agent, the message is
placed on the outbound queue of the From Agent and then
asynchronously delivered to the To Agent by AQ propagation, or
whichever type of propagation is implemented for the agents’ protocol.
If the event message contains a To Agent but no specified From Agent,
the message is sent from the default outbound agent that matches the
queue type of the To Agent.
If the event message contains a From Agent but no specified To Agent,
the event message is placed on the From Agent’s queue without a
specified recipient.
• You can omit the To Agent if the From Agent uses a
multi–consumer queue with a subscriber list. (The standard
Workflow queue handlers work only with multi–consumer
queues.) In this case, the queue’s subscriber list determines
which consumers can dequeue the message. If no subscriber list
is defined for that queue, however, the event message is placed
on the WF_ERROR queue for error handling.
Note: The subscriber list for a multi–consumer queue in Oracle
Advanced Queuing is different from event subscriptions in the
Oracle Workflow Business Event System. For more
information, see: Subscription and Recipient Lists, Oracle
Application Developer’s Guide – Advanced Queuing.
• You can also omit the To Agent if the From Agent uses a
single–consumer queue for which you have defined a custom
queue handler. For a single–consumer queue, no specified
consumer is required.
The send date within the event message indicates when the message
should become available for the consumer to dequeue. If the send date
is blank, the Send() procedure resets the value to the current system
date, meaning the message is immediately available for dequeuing as
soon as it is propagated. If the send date is a future date, the message is
marked with a delay time corresponding to that date and does not
become available for dequeuing until the delay time has passed. For
more information, see: Time Specification: Delay, Oracle Application
Developer’s Guide – Advanced Queuing.
Arguments (input)
p_event The event message.
Description Creates a WF_AGENT_T structure for the specified agent and sets the
agent’s system and name into the structure. See: Agent Structure: page
8 – 231.
Arguments (input)
p_agent_guid The globally unique identifier of the agent.
Description Tests whether the specified event is enabled and whether there are any
enabled subscriptions by the local system referencing the event, or
referencing an enabled event group that contains the event. Test()
returns the most costly data requirement among these subscriptions,
using the following result codes:
• NONE—No enabled local subscriptions reference the event, or
the event does not exist.
• KEY—At least one enabled local subscription references the
event, but all such subscriptions require only the event key.
• MESSAGE—At least one enabled local subscription on the event
requires the complete event data.
Arguments (input)
p_event_name The internal name of the event.
Arguments (input)
p_event The event message.
p_out_agent_ The outbound agent on whose queue the event
override message should be enqueued.
Description Monitors an agent for inbound event messages and dequeues messages
using the agent’s queue handler.
The standard WF_EVENT_QH queue handler sets the date and time
when an event message is dequeued into the RECEIVE_DATE attribute
of the event message. Custom queue handlers can also set the
RECEIVE_DATE value if this functionality is included in the Dequeue
API.
When an event is dequeued, the Event Manager searches for and
executes any active subscriptions by the local system to that event with
a source type of External, and also any active subscriptions by the local
system to the Any event with a source type of External. If no active
subscriptions exist for the event that was received (apart from
subscriptions to the Any event), then Oracle Workflow executes any
active subscriptions by the local system to the Unexpected event with a
source type of External.
The Listen procedure exits after all event messages on the agent’s
queue have been dequeued.
Note: You can use the Check Setup web page to schedule
Listen procedures for all active inbound and error queues. See:
Scheduling Listeners for Local Inbound Agents: page 13 – 54.
Arguments (input)
p_agent_name The name of the inbound agent.
See Also
See Also
Description Retrieves error information from the error stack and sets it into the
event message. The error message and error stack are set into the
corresponding attributes of the event message. The error name and
error type are added to the PARAMETER_LIST attribute of the event
message.
Arguments (input)
p_event The event message.
p_type The error type, either ’ERROR’ or ’WARNING’.
Description Sets the dispatch mode of the Event Manager to either deferred or
synchronous subscription processing. Call SetDispatchMode() with the
mode ’ASYNC’ just before calling Raise() to defer all subscription
processing forever for the event that you will raise. In this case, the
Event Manager places the event on the WF_DEFERRED queue before
executing any subscriptions for that event. The subscriptions are not
executed until the agent listener runs to dequeue the event from the
WF_DEFERRED queue.
You can call SetDispatchMode() with the mode ’SYNC’ to set the
dispatch mode back to normal synchronous subscription processing. In
this mode, the phase number for each subscription determines whether
the subscription is executed immediately or deferred.
Note: This method of deferring subscription processing is not
recommended and should only be used in exceptional
circumstances, since it requires hard–coding the deferral in
your application. To retain the flexibility to modify subscription
processing without intrusion into the application, you can
simply mark some or all of the individual subscriptions for
deferral using the subscription phase numbers.
Arguments (input)
p_mode The dispatch mode: either ’ASYNC’ for deferred
(asynchronous) subscription processing, or ’SYNC’
for synchronous subscription processing.
See Also
Description Adds the specified parameter name and value pair to the end of the
specified parameter list varray. If the varray is null,
AddParameterToList() initializes it with the new parameter.
Arguments (input)
p_name The parameter name.
p_value The parameter value.
p_parameterlist The parameter list.
Description Adds the specified parameter name and value pair to the end of the
specified parameter list varray. If the varray is null,
AddParameterToListPos() initializes it with the new parameter. The
procedure also returns the index for the position at which the
parameter is stored within the varray.
Arguments (input)
p_name The parameter name.
p_value The parameter value.
p_parameterlist The parameter list.
Description Retrieves the value of the specified parameter from the specified
parameter list varray. GetValueForParameter() begins at the end of the
parameter list and searches backwards through the list.
Arguments (input)
p_name The parameter name.
p_parameterlist The parameter list.
Description Retrieves the value of the parameter stored at the specified position in
the specified parameter list varray.
Arguments (input)
p_position The index representing the position of the
parameter within the parameter list.
p_parameterlist The parameter list.
See Also
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
Description Returns the status code ERROR. Additionally, when you assign this
function as the rule function for a subscription, you must enter a text
string representing the internal name of an error message in the
Parameters field for the subscription. When the subscription is
executed, Error() will set that error message into the event message
using setErrorMessage(). See: setErrorMessage: page 8 – 245.
The text string you enter in the Parameters field must be a valid name
of an Oracle Workflow error message. The names of the error messages
provided by Oracle Workflow are stored in the NAME column of the
WF_RESOURCES table for messages with a type of WFERR.
You can use Error() as a subscription rule function if you want to send
the system administrator an error notification with one of the
predefined Workflow error messages whenever a particular event is
raised.
For example, define a subscription to the relevant event with the rule
function WF_RULE.Error and enter WFSQL_ARGS in the Parameters
field. Then raise the event to trigger the subscription. Because Error()
returns the status code ERROR, the Event Manager places the event
message on the WF_ERROR queue and subscription processing for the
event is halted. When the listener runs on the WF_ERROR queue, an
error notification will be sent to the system administrator with the
message ”Invalid value(s) passed for arguments,” which is the display
name of the WFSQL_ARGS error message.
Note: Error() does not raise any exception to the calling
application when it completes normally.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
Description Returns the status code WARNING. Additionally, when you assign this
function as the rule function for a subscription, you must enter a text
string representing the internal name of an error message in the
Parameters field for the subscription. When the subscription is
executed, Warning() will set that error message into the event message
using setErrorMessage(). See: setErrorMessage: page 8 – 245.
The text string you enter in the Parameters field must be a valid name
of an Oracle Workflow error message. The names of the error messages
provided by Oracle Workflow are stored in the NAME column of the
WF_RESOURCES table for messages with a type of WFERR.
You can use Warning() as a subscription rule function if you want to
send the system administrator a warning notification with one of the
predefined Workflow error messages whenever a particular event is
raised.
For example, define a subscription to the relevant event with the rule
function WF_RULE.Warning and enter WFSQL_ARGS in the Parameters
field. Then raise the event to trigger the subscription. Because
Warning() returns the status code WARNING, the Event Manager
places the event message on the WF_ERROR queue, but subscription
processing for the event still continues. When the listener runs on the
WF_ERROR queue, a warning notification will be sent to the system
administrator with the message ”Invalid value(s) passed for
arguments,” which is the display name of the WFSQL_ARGS error
message.
Note: Warning() does not raise any exception to the calling
application when it completes normally.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
Description Returns the status code SUCCESS. This function removes the event
message from the queue but executes no other code except returning
the SUCCESS status code to the calling subscription.
You can use Success for testing and debugging purposes while
developing code for use with the Business Event System. For example,
if you are trying to debug multiple subscriptions to the same event, you
can modify one of the subscriptions by replacing its rule function with
WF_RULE.Success, leaving all other details for the subscription intact.
When the subscription is executed, it will return SUCCESS but not
perform any other subscription processing. This method can help you
isolate a problem subscription.
Success() is analogous to the WF_STANDARD.Noop procedure used in
the standard Noop activity.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
Description Sends the event message to the workflow process specified in the
subscription, which will in turn send the event message to the inbound
agent specified in the subscription.
Note: Workflow_Protocol() does not itself send the event
message to the inbound agent. This function only sends the
event message to the workflow process, where you can model
the processing that you want to send the event message on to
the specified agent.
If the subscription also specifies an outbound agent, the workflow
process places the event message on that agent’s queue for propagation
to the inbound agent. Otherwise, a default outbound agent will be
selected.
If the subscription parameters include the parameter name and value
pair ACKREQ=Y, then the workflow process waits to receive an
acknowledgement after sending the event message.
If the workflow process raises an exception, Workflow_Protocol() stores
the error information in the event message and returns the status code
ERROR. Otherwise, Workflow_Protocol() returns the status code
SUCCESS.
Workflow_Protocol() is used as the rule function in several predefined
subscriptions to Workflow Send Protocol and Event System
Demonstration events. See: Workflow Send Protocol: page 14 – 16 and
Event System Demonstration: page 15 – 63.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
See Also
Description Sets the parameter name and value pairs from the subscription
parameters into the PARAMETER_LIST attribute of the event message,
except for any parameter named ITEMKEY or CORRELATION_ID. For
a parameter with one of these names, the function sets the
CORRELATION_ID attribute of the event message to the parameter
value.
If these operations raise an exception, SetParametersIntoParameterList()
stores the error information in the event message and returns the status
code ERROR. Otherwise, SetParametersIntoParameterList() returns the
status code SUCCESS.
You can use SetParametersIntoParameterList() as the rule function for a
subscription with a lower phase number, to add predefined parameters
from the subscription into the event message. Then subsequent
subscriptions with higher phase numbers can access those parameters
within the event message.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
See Also
Description Parses a string of text that contains the specified number of parameters
delimited by the specified separator. Parameters() returns the parsed
parameters in a varray using the T_PARAMETERS composite datatype,
which is defined in the WF_EVENT_FUNCTIONS_PKG package. The
following table describes the T_PARAMETERS datatype:
T_PARAMETERS VARCHAR2(240)
Table 8 – 11 (Page 1 of 1)
Arguments (input)
p_string A text string containing concatenated parameters.
p_numvalues The number of parameters contained in the string.
p_separator The separator used to delimit the parameters in the
string.
l_parameters :=
wf_event_functions_pkg.parameters(’1111/2222’,2,’/’);
dbms_output.put_line(’Value 1:’||l_parameters(1));
dbms_output.put_line(’Value 2:’||l_parameters(2));
Description Returns the value for the specified parameter from a text string
containing the parameters defined for an event subscription. The
parameter name and value pairs in the text string should be separated
by spaces and should appear in the following format:
<name1>=<value1> <name2>=<value2> ... <nameN>=<valueN>
Arguments (input)
p_string A text string containing the parameters defined for
an event subscription.
p_key The name of the parameter whose value should be
returned.
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
Description Generates the event data for events in the Seed event group. This event
data contains Business Event System object definitions which can be
used to replicate the objects from one system to another.
The Seed event group includes the following events:
• oracle.apps.wf.event.event.create
• oracle.apps.wf.event.event.update
• oracle.apps.wf.event.event.delete
• oracle.apps.wf.event.group.create
• oracle.apps.wf.event.group.update
• oracle.apps.wf.event.group.delete
• oracle.apps.wf.event.system.create
• oracle.apps.wf.event.system.update
• oracle.apps.wf.event.system.delete
• oracle.apps.wf.event.agent.create
• oracle.apps.wf.event.agent.update
• oracle.apps.wf.event.agent.delete
• oracle.apps.wf.event.subscription.create
• oracle.apps.wf.event.subscription.update
• oracle.apps.wf.event.subscription.delete
• oracle.apps.wf.event.all.sync
For the event, event group, system, agent, and subscription definition
events, WF_EVENT_FUNCTIONS_PKG.Generate() calls the Generate
APIs associated with the corresponding tables to produce the event
data XML document. For the Synchronize Event Systems event,
WF_EVENT_FUNCTIONS_PKG.Generate() produces an XML document
containing all the event, event group, system, agent, and subscription
definitions from the Event Manager on the local system.
See Also
Arguments (input)
p_subscription_ The globally unique identifier of the subscription.
guid
p_event The event message.
See Also
The Business Event System replication APIs use the following DTDs:
• WF_EVENTS DTD: page 8 – 295
• WF_EVENT_GROUPS DTD: page 8 – 298
• WF_SYSTEMS DTD: page 8 – 301
• WF_AGENTS DTD: page 8 – 304
• WF_EVENT_SUBSCRIPTIONS DTD: page 8 – 307
Arguments (input)
x_guid The globally unique identifier of the event.
Arguments (input)
x_message An XML message containing the complete
information for an event definition.
Arguments (input)
x_group_guid The globally unique identifier of the event group.
x_member_guid The globally unique identifier of the individual
member event.
Arguments (input)
x_message An XML message containing the complete
information for an event group member definition.
Arguments (input)
x_guid The globally unique identifier of the system.
Arguments (input)
x_message An XML message containing the complete
information for a system definition.
Arguments (input)
x_guid The globally unique identifier of the agent.
Arguments (input)
x_message An XML message containing the complete
information for an agent definition.
Arguments (input)
x_guid The globally unique identifier of the event
subscription.
Arguments (input)
x_message An XML message containing the complete
information for an event subscription definition.
Index – 1
Standard, 4–42, 6–2 AddItemAttrTextArray( ), 8–45
statuses, 8–3 AddParameterToList, 8–247
System: Error, 4–42 AddParameterToList( ), 8–268
timing out, 5–10 AddParameterToListPos( ), 8–269
version number, 4–59
Address, 8–247
Activities( ), 8–113
AddUsersToAdHocRole( ), 8–136
Activity attributes
AdHocDirectory( ), 8–117
See also Function activity attributes
Administrator privileges, 2–15
setting values for, 5–12
Advanced Queues integration, 8–156
Activity nodes
in the Buyer: Advanced Shipment Notice Advanced Queuing, 13–2
process, 15–84 Agent, datatype, 8–231
in the Buyer: Receive Supplier Invoicing Agent Created event, 14–4
process, 15–86 Agent Deleted event, 14–5
in the Buyer: Receive Supplier PO Agent Updated event, 14–4
Acknowledgement process, 15–81
Agents, 13–22
in the Buyer: Send PO to Supplier process, defining, 13–28
15–78
deleting, 13–32
in the Buyer: Top Level PO process, 15–75
direction, 13–22
in the Detail Ping process, 13–78
finding, 13–31
in the Master Ping process, 13–76
pinging, 13–73
in the Notify Approver subprocess, 15–21
protocol, 13–23
in the Requisition process, 15–15
queue handlers, 13–25
in the Supplier: Advanced Shipment Notice
queues, 13–24
process, 15–99
scheduling listeners, 13–54
in the Supplier: Credit Check process, 15–95
scheduling propagations, 13–58
in the Supplier: Get Order Details process,
updating, 13–32
15–92
in the Supplier: Send Supplier Invoice Agents web page, 13–28, 13–32
process, 15–101 ALLOW_FORWARDED_RESPONSE
in the Supplier: Stock Check process, 15–97 parameter, 2–54
in the Supplier: Top Level Order process, And activity, 6–2
15–88 Any event, 14–10
in the Workflow Event Protocol process, Any transitions, 5–2
14–20 APIs, 8–3
Ad hoc users and roles, 5–24 AQ message payload, 8–157
APIs, 8–120
Arrows, 5–2
AddAttr( ), 8–210
Assign activity, 6–14
AddCorrelation( ), 8–287
AssignActivity( ), 8–73
AddItemAttr( ), 8–42
Attachments, DM documents, 10–33
addItemAttrDate( ), 8–42
Attribute, token substitution, 4–41
AddItemAttrDateArray( ), 8–45 Attribute types
addItemAttrNumber( ), 8–42 attribute, 4–11
AddItemAttrNumberArray( ), 8–45 date, 4–10, 4–35
addItemAttrText( ), 8–42 document, 4–11, 4–14, 4–36
Index – 3
FNDWFPR, 16–4 Default Error Process, 6–28
Concurrent programs Default Event Error Process, 6–34
Notification Mailer, 2–41, 2–49 Default transitions, 5–2
Purge Obsolete Workflow Runtime Data, DEFAULT_ERROR, 6–28
8–118 DEFAULT_EVENT_ERROR, 6–34
Workflow Agent Listener, 8–265
Default_Rule( ), 8–274
Workflow Background Process, 2–38
Workflow Definitions Loader, 2–102 Defer Thread activity, 6–6
Workflow Resource Generator, 8–104 Deferred activities, 2–36, 4–46
CONNECT parameter, 2–52 Deferred processing
Constants, WFAttribute class, 8–89 for event subscriptions, 13–39
for workflow processes, 2–36, 8–8
Content, 8–246
DeferredQueue function, 8–171
Content–attached checkbox, 4–37
Delete
CONTEXT( ), 8–107
all workflow data, 16–14
Continue Flow activity, 6–12 data for an item type, 16–15
Coordinating master/detail activities, 6–11 item type attributes, 16–14
Cost threshold, 4–47 runtime data for an item type, 16–15
CreateAdHocRole( ), 8–134 workflow status information, 16–15
CreateAdHocUser( ), 8–132 Demonstration, directory service, 15–7
CreateForkProcess( ), 8–37 Dequeue, queue handler, 7–24
CreateMsg( ), 8–175 DequeueEventDetail( ), 8–164
CreateProcess( ), 8–20 DequeueException( ), 8–170
Custom logos, in web pages, 2–77 DequeueOutbound( ), 8–161
Customization Level, 2–98 Detail Notification web page, 10–19
for activities, 4–8, 4–11, 4–21, 4–32, 4–49, Detail Ping process, summary, 13–77
4–52, 4–55, 4–58, 4–62 Detail process, 6–12
Detail Survey process
activities, 15–47
D summary, 15–46
Data types, wf_payload_t, 8–157 Diagram arrows, 5–2
Database links Direct Response e–mail, 10–3
checking, 13–53 DIRECT_RESPONSE parameter, 2–53
creating, 2–89 Directory repository, 2–20
Datatypes Directory Service
example, 8–249 in Navigator tree, 3–4
for the Business Event System, 8–230 view from Builder, 5–26
WF_AGENT_T, 8–231 Directory services, 2–20
WF_EVENT_T, 8–236 checking the data model, 2–25, 16–10
WF_PARAMETER_LIST_T, 8–235 integrating with local workflow users, 2–27
WF_PARAMETER_T, 8–233 integrating with native Oracle users, 2–26
Date–type attributes, 4–3 integrating with Oracle HR, 2–26
DBA Studio, 2–89 Directory Services APIs, 8–120
DEBUG parameter, 2–55 DISCARD parameter, 2–56
Index – 5
Event Manager, 13–3 F
Event messages
datatype, 8–236 FAILCOMMAND parameter, 2–55
enqueuing, 16–10 File menu, A – 2
Event nodes, 5–12 Find Agent web page, 13–31
Event Rule APIs, 8–272 Find Event web page, 13–14, 13–48
Event subscriptions, 13–33 Find Notifications web page, 10–15
rule functions, 7–25 Find System web page, 13–19
Event Subscriptions web page, 13–50 FND_FNDWFIAS, 11–8
Event System Demonstration FND_FNDWFNOT, 10–14
data model, 15–64 FNDWFLST, 8–265
initiating, 15–66 concurrent program, 16–4
overview, 15–63 FNDWFPR, 8–118
setting up, 15–66 concurrent program, 16–4
Event System Demonstration process, Fonts
installing, 15–64 modifying, 5–21
Event System Local Queues web page, 13–69 setting, 5–21
Event Updated event, 14–2 Forced synchronous processes, 8–14
Event( ), 8–74 Form–type attributes, 4–3
Event–type attributes, 4–4 FORWARD mode, 8–12
Events, 13–4 Forward( ), 8–188, 8–199
defining, 13–5 Frame target, URL attributes, 4–37
deleting, 13–15 FROM parameter, 2–53
finding, 13–14 FUNCMODE, 7–5, 7–6
predefined, 14–2 Function activities, 4–44
raising, 13–4, 13–62 create, 4–50
sending to agents, 13–38 standard Java API, 7–8
sending to workflow processes, 13–37 standard PL/SQL API, 7–3
updating, 13–15 Function activity attributes, 4–8, 4–52
Events web page, 13–5, 13–8, 13–15, 13–44 Functions, 3–10
Events: Buyer Workbench, web page, 15–67 See also PL/SQL procedures
Events: Track Order, web page, 15–69 Future–dated events, 13–40
Example function activity
Select Approver, 15–26
Verify Authority, 15–29 G
Example process
Generate function, 13–5
Event System Demonstration, 15–63
Generate( )
Requisition, 15–5
WF_AGENTS_PKG, 8–305
Execute Concurrent Program activity, 6–22 WF_EVENT_FUNCTIONS_PKG, 8–289
execute( ), 8–88 WF_EVENT_GROUPS_PKG, 8–299
External document integration, 4–6 WF_EVENT_SUBSCRIPTIONS_PKG, 8–308
External Java function activities, 2–79, 8–5, WF_EVENTS_PKG, 8–296
8–81 WF_SYSTEMS_PKG, 8–302
Index – 7
H Event System Demonstration, 15–71
loading, 3–12, 3–13
HandleError( ), 8–76 persistence type, 4–4
Hardware requirements, 2–2 Requisition, 15–12
Help menu, A – 6 saving, 3–12
Hidden item types, 3–4 selector functions, 4–5, 7–13
Standard, 6–2
Home page, 9–2
System: Error, 6–26
HTML_MAIL_TEMPLATE parameter, 2–59 System: Mailer, 2–62
HTMLAGENT parameter, 2–56 Workflow Agent Ping/Acknowledge, 13–74
Workflow Send Protocol, 14–17
ITEMKEY, 7–4, 7–14
I Items( ), 8–112
Icons, 2–78 ItemStatus( ), 8–79
viewing, 4–49, 4–52, 4–54, 4–57 ITEMTYPE, 7–4, 7–14
IDLE parameter, 2–55
InboundQueue function, 8–172
Init.ora parameters, 13–52
J
Initialize, 8–239 Java API, for function activities, 7–8
Initiating a workflow process, 15–8, 15–36, Java APIs, 8–4
15–66 Java Function Activity Agent, 2–79
Internal names starting, 2–79
updating activity, 16–7 stopping, 2–88, 16–11
updating activity attributes, 16–7 Java interface, 8–4
updating item attributes, 16–7 Java monitor tool, 11–2
updating item types, 16–8 Java Runtime Environment, 2–4
updating lookup codes, 16–8 JavaScript, support in a Web browser, 2–4
updating lookup types, 16–8 Joining activities, 5–4
updating message attributes, 16–9
updating messages, 16–9
IsPerformer( ), 8–125 L
Item attributes, external document integration,
4–6 Launch Process activity, 6–6
Item type attributes, 4–2, 4–8, 8–12 LaunchProcess( ), 8–29
arrays, 8–12 List of values, in a web interface, 10–24, 13–22
Event System Demonstration, 15–71 Listen( ), 8–264
Requisition, 15–12 Listeners
Workflow Send Protocol, 14–17 deleting, 13–58
Item types, 3–9, 4–2 for inbound agents, 13–54
callback function, 4–5 running, 16–5
Concurrent Manager Functions, 6–22 scheduling, 13–55
context reset, 7–13 updating, 13–58
copy, 4–16 Load balancing, 6–9
creation, 4–7 loadActivityAttributes( ), 8–83
Index – 9
Notification activities, 4–43 reassign in Notification Web page, 10–23
coupling with custom functions, 4–48, 8–12 reassign via e–mail, 10–12
create, 4–48 responding with Notification Web page,
Notify Requisition Approval Required, 10–23
15–31 setting the From Role, 4–25
Notification APIs, 8–186, 8–191 timed out, 8–189
Notification functions, 4–48, 8–12 transferring, 8–189
via e–mail, 2–41, 10–2
Notification history, 4–26
via Notification Web page, 10–13
Notification ID token, 4–12, 4–13, 4–15, 4–32 viewing attached documents, 10–33
Notification IDs, 10–3 Notifications Worklist. See Worklist web page
Notification Mailer Notifications( ), 8–114
about, 2–41 Notify activity, 6–9
configuration file, 2–51
Notify Approver, example notification
MIME support, 2–42
activities, 15–31
notification preference, 2–42
Notify Approver subprocess, summary, 15–19
required folders, 2–56
response processing, 2–60 Notify Requisition Approval Required, 15–31
script to restart, 2–60 Number–type attributes, 4–3
shutdown, 2–41
starting, 2–49
starting for MAPI–compliant applications, O
2–50
OMBAQ_TEXT_MSG, 8–251
starting for UNIX Sendmail, 2–49
On Revisit, 8–10
Notification method, 10–2
OpenNotificationsExist( ), 8–208
Notification preference, 9–7
Or activity, 6–2
Notification preferences, 2–18, 2–42
Oracle Advanced Queues integration, 8–156
Notification summaries, via e–mail, 10–25
Oracle Advanced Queuing, 13–2
Notification System, 2–41, 8–186
Oracle Applications Manager, 1–5
Notification templates, for e–mail notifications, Oracle DBA Studio, 2–89
2–62
Oracle HTTP Server
Notification Web page, 1–5
identifying the Workflow web agent, 2–16
reassigning notifications, 10–23
Workflow server requirements, 2–4
Notifications, 10–2 Oracle Message Broker, 2–93
attaching a document, 10–36
Oracle Net Services, 2–2
dependence on directory services, 10–2
forwarding, 8–188 Oracle Workflow, implementation issues, 2–5
hiding the Reassign button, 4–25 Oracle Workflow Builder, 1–3
HTML–formatted e–mail, 10–9 Loader functionality, 3–15
identifying the responder, 8–205 overview, 3–2
load balancing, 6–9 requirements, 2–2
plain text e–mail using direct response, 10–6 save modes, 3–15, 4–17
plain text e–mail using templated response, starting from command line, 3–17
10–5 Oracle Workflow home page, 9–2
plain text e–mail with attachments, 10–11 Oracle Workflow Manager, 1–5
Index – 11
Q RESET_FAILED parameter, 2–58
RESET_NLS parameter, 2–58
Queue handlers, 7–23, 13–25 Respond attributes, 2–63, 2–65, 2–68, 2–72
WF_EVENT_OMB_QH, 2–93 RESPOND mode, 8–12
Queue tables, 2–90 Respond to notification
Queues HTML–formatted e–mail, 10–9
assigned to agents, 13–24 plain text e–mail using direct response, 10–6
checking, 13–54 plain text e–mail using templated response,
reviewing, 13–69 10–5
setting up, 2–90 plain text e–mail with attachments, 10–11
via Notification Web page, 10–13
Respond( ), 8–188, 8–205
R Responder, 8–205
Responder( ), 8–206
Raise Event web page, 13–62 Response methods, direct vs. templated, 2–53
RAISE( ), 8–104 Response processing, by Notification Mailer,
Raise( ), 8–255 2–60
Raising events, 13–4, 13–62 Responses, processing, 8–188
Reassign notifications RESULT, 7–5, 7–15
hiding the Reassign button, 4–25 Result type
in Notification Web page, 10–23 for activities, 4–48, 4–52, 4–57
via e–mail, 10–12 for voting activities, 4–61
Reassign web page, 10–23 ResumeProcess( ), 8–33
Receive date, for event messages, 8–264 Retry Error, 6–32
Receive( ) RETRY_ONLY, 6–32
WF_AGENTS_PKG, 8–306 Role
WF_EVENT_FUNCTIONS_PKG, 8–291 administrator, 2–15
WF_EVENT_GROUPS_PKG, 8–300 property page, 5–26
WF_EVENT_SUBSCRIPTIONS_PKG, 8–309 Role Resolution activity, 6–9
WF_EVENTS_PKG, 8–297 Role–type attributes, 4–4
WF_SYSTEMS_PKG, 8–303 Roles, 5–24
RemoveUsersFromAdHocRole, 8–141 ad hoc, 5–24
Replication APIs, Business Event System, loading into the Workflow Builder, 5–25
8–293 tab page, 5–24
view from Builder, 5–26
REPLYTO parameter, 2–56
Rollback, of process, 8–76
Requirements, hardware and software, 2–2
Routing, automatic, 10–26
Requisition, data model, 15–6
Routing rules
Requisition Demonstration, web page, 15–8 deleting, 10–32
Requisition process, 15–5 for a role, 10–27
example function activities, 15–26 listing, 10–27
initiating, 15–8 overriding, 10–31
installing, 15–6 updating, 10–32
summary, 15–13 Rule functions, 7–25
Reset process. See Rollback for event subscriptions, 13–36
Index – 13
end user, 16–16 System Signup web page, 13–65
Stuck processes, 2–36 System Updated event, 14–4
Submit Concurrent Program activity, 6–23 System: Error item type, 6–26
Subprocesses, timing out, 5–10 System: Mailer item type, 2–62
Subscription Created event, 14–5 Systems, 13–17
Subscription Deleted event, 14–5 defining, 13–18
deleting, 13–21
Subscription Updated event, 14–5
finding, 13–19
SubscriptionParameters( ), 8–286 local, 13–17
Subscriptions, 13–33 master/copy, 13–68
deferring, 13–39 signing up, 13–64, 13–65
defining, 13–44 synchronizing, 13–67
deleting, 13–50 updating, 13–21
finding, 13–48 Systems web page, 13–18, 13–21
predefined, 14–2
updating, 13–50
Success( ), 8–279 T
SUMMARYONLY parameter, 2–53 Tag files, 2–56
Supplier: Advanced Shipment Notice process, TAGFILE parameter, 2–56
summary, 15–98
TCP/IP drivers, 2–2
Supplier: Credit Check process, summary,
Templated Response e–mail, 10–3
15–94
Test harness, 12–2
Supplier: Get Order Details process, summary,
15–91 Test( ), 8–262
Supplier: Send Supplier Invoice process, TEST_ADDRESS parameter, 2–55
summary, 15–100 TestContext( ), 8–223
Supplier: Stock Check process, summary, 15–96 Text–type attributes, 4–3
Supplier: Top Level Order process, summary, Timed out processes, 2–36
15–87 Timeout transitions, 5–2, 5–3
Survey–Master/Detail process Timeouts, 5–10
activities, 15–44 dynamic, 5–10
summary, 15–42 Token substitution
Survey–Single Process, activities, 15–41 attributes, 4–41
of document–type message attributes, 4–14
Survey–Single process, summary, 15–39
TOKEN( ), 8–103
SuspendProcess( ), 8–31
Toolbars, Oracle Workflow Builder, A – 7
Synchronize Event Systems event, 14–5
toString( ), 8–98
Synchronous processing, 8–14
Total( ), 8–115
System Created event, 14–4
TotalPERM( ), 8–116
System Deleted event, 14–4 TRANSFER mode, 8–12
System identifier, 13–65 Transfer( ), 8–189, 8–201
System Identifier web page, 13–65 Transitions, 5–2
System integration, 13–2 Any, 5–2
System Signup event, 14–9 creating, 5–18
Index – 15
WF_ERROR queue, 2–90 WF_REQDEMO.StartProcess, 15–8
WF_ERROR_QH, 13–25 WF_REQDEMO.VerifyAuthority, 15–18, 15–29
WF_EVENT_FUNCTIONS_PKG.Generate( ), WF_RESOURCES, environment variable, 2–32
8–289 WF_ROLES, view, 2–23
WF_EVENT_FUNCTIONS_PKG.Receive( ), WF_RUNNABLE_PROCESSES_V, 8–154
8–291 WF_SYSTEMS Document Type Definition,
WF_EVENT_GROUPS Document Type 8–301
Definition, 8–298 WF_SYSTEMS_PKG.Generate, 8–302
WF_EVENT_GROUPS_PKG.Generate, 8–299 WF_SYSTEMS_PKG.Receive, 8–303
WF_EVENT_GROUPS_PKG.Receive, 8–300 WF_USER_ROLES, view, 2–24
WF_EVENT_OMB_QH, 13–25 WF_USERS, view, 2–20
attribute mapping, 8–251 Wfagtlst.sql, 16–5
setting up, 2–93 WFAttribute class, 8–89
WF_EVENT_QH, 13–25 WFAttribute( ), 8–91
WF_EVENT_SUBSCRIPTIONS Document Wfbkg.sql, 16–6
Type Definition, 8–307 Wfbkgchk.sql, 16–6
WF_EVENT_SUBSCRIPTIONS_PKG.Generate, Wfchact.sql, 16–7
8–308 Wfchacta.sql, 16–7
WF_EVENT_SUBSCRIPTIONS_PKG.Receive, Wfchita.sql, 16–7
8–309
Wfchitt.sql, 16–8
WF_EVENT_T, 8–236
Wfchluc.sql, 16–8
mapping attributes to OMBAQ_TEXT_MSG,
8–251 Wfchlut.sql, 16–8
Wfchmsg.sql, 16–9
WF_EVENTS Document Type Definition,
8–295 Wfchmsga.sql, 16–9
WF_EVENTS_PKG.Generate, 8–296 Wfdirchk.sql, 16–10
WF_EVENTS_PKG.Receive, 8–297 wfdircsv.sql, 2–27
WF_IN agent, 13–25 wfdirhrv.sql, 2–26
wfdirouv.sql, 2–26
WF_IN queue, 2–90
wfevquec.sql, 2–92
WF_ITEM_ACTIVITY_STATUSES_V, 8–151
wfevqued.sql, 2–92
WF_ITEMS_V, 8–155
Wfevtenq.sql, 16–10
WF_LANGUAGES view, 2–28
WFFunctionAPI class, 8–81
WF_LOCAL_* tables, 2–20
wfjvlsnr.bat, 2–80
WF_NOTIFICATION() message function, 4–26 wfjvlsnr.csh, 2–80
WF_NOTIFICATION_ATTR_RESP_V, 8–153 Wfjvstop.sql, 16–11
WF_OUT agent, 13–25 WFLOAD, 2–102
WF_OUT queue, 2–90 wfload, 2–101
WF_PARAMETER_LIST_T, 8–235 wfmail.cfg, 2–51
WF_PARAMETER_T, 8–233 Wfmqupd.sql, 16–12
wf_payload_t, 8–157 WFNLADD.sql, 16–5
WF_PURGE, 8–110 WFNLENA.sql, 16–12
WF_REQDEMO.SelectApprover, 15–26 Wfntfsh.sql, 16–12
Index – 17
Workflow processes Workflow Views, 8–151
creating and starting, 16–15 Workflow Warning Mail message template,
monitoring, 11–2 2–75
samples, 15–2 Workflow web pages, modifying template,
Workflow Purge APIs, 8–110 2–77
Workflow Queue APIs, 8–156 Workflow XML Loader, 2–105
Workflow queues, cleaning, 16–13 Workflow_Protocol( ), 8–280
Workflow Resource Generator, 8–104 Workitems. See Items
concurrent program, 8–105 Worklist web page, 10–17
Workflow roles, 2–20 WriteMsg( ), 8–176
Workflow Send Protocol WriteToClob( ), 8–228
item type, 14–17
sample workflow process, 14–16
Workflow Send Protocol Acknowledgement
event, 14–25
X
Workflow Send Protocol event, 14–23 XML Compare Tag Value (Date) activity, 6–19
Workflow Server, requirements, 2–3 XML Compare Tag Value (Number) activity,
Workflow Summary Mail message template, 6–19
2–75 XML Compare Tag Value (Text) activity, 6–19
Workflow URL Attachment message template, XML Compare Tag Value activities, 6–19
2–70 XML Get Tag Value activity, 6–18
Workflow users, 2–20 XML Transform activity, 6–20
Oracle Corporation welcomes your comments and suggestions on the quality and usefulness
of this publication. Your input is an important part of the information we use for revision.
• Did you find any errors?
• Is the information clearly presented?
• Do you need more information? If so, where?
• Are the examples correct? Do you need more examples?
• What features did you like most about this manual? What did you like least about it?
If you find any errors or have any other suggestions for improvement, please indicate the topic, chapter,
and page number below:
The information contained in this document is subject to change without notice. If you find any
problems in the documentation, please report them to us in writing. Oracle Corporation does not
warrant that this document is error–free. Except as may be expressly permitted in your license
agreement for these Programs, no part of these Programs may be reproduced or transmitted in any
form or by any means, electronic or mechanical, for any purpose, without the express written
permission of Oracle Corporation.
If the Programs are delivered to the US Government or anyone licensing or using the Programs on
behalf of the US Government, the following notice is applicable:
The Programs are not intended for use in any nuclear, aviation, mass transit, medical, or other
inherently dangerous applications. It shall be licensee’s responsibility to take all appropriate fail–safe,
back up, redundancy and other measures to ensure the safe use of such applications if the Programs
are used for such purposes, and Oracle disclaims liability for any damages caused by such use of the
Programs.
Oracle is a registered trademark, and Oracle8, Oracle8i, Oracle9i, Oracle Financials, OracleMetaLink,
PL/SQL, and SQL*Plus are trademarks or registered trademarks of Oracle Corporation. Other names
may be trademarks of their respective owners.
Contents
VOLUME 1Volume 1 . . . . . . . . . . . . . . . . . . . . . . . . . . i
Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix
Audience for This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
How To Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xx
Documentation Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . xxi
Other Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Online Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxii
Related User’s Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
Guides Related to All Products . . . . . . . . . . . . . . . . . . . . . . . . . xxiii
User Guides Related to This Product . . . . . . . . . . . . . . . . . . . . xxiv
Installation and System Administration . . . . . . . . . . . . . . . . . xxv
Other Implementation Documentation . . . . . . . . . . . . . . . . . . xxvi
Training and Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxviii
Do Not Use Database Tools to Modify Oracle
Applications Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
About Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxix
Your Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxx
Contents iii
Chapter 2 Setting Up Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–1
Oracle Workflow Hardware and Software Requirements . . . . . . 2–2
Overview of Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Overview of Required Set Up Steps for the Standalone
Version of Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–5
Overview of Required Set Up Steps for the Version of
Oracle Workflow Embedded in Oracle Applications . . . . . . 2–6
Optional Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–6
Other Workflow Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–7
Identifying the Version of Your Oracle Workflow Server . . . 2–8
Setup Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2–9
Setup Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 10
Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 11
Overview of Oracle Workflow Access Protection . . . . . . . . . . . . . 2 – 94
Setting Up a Default Access Level . . . . . . . . . . . . . . . . . . . . . . 2 – 98
Using the Workflow Definitions Loader . . . . . . . . . . . . . . . . . . . . . 2 – 100
Using the Workflow XML Loader . . . . . . . . . . . . . . . . . . . . . . . . . . 2 – 105
Contents v
System: Error Item Type and Item Attributes . . . . . . . . . . . . . 6 – 27
Default Error Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 28
Retry–only Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 32
Default Event Error Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 – 34
Contents vii
CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 101
GET_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 102
TOKEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 103
RAISE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 104
CONTEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 107
TRANSLATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 109
Workflow Purge APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 110
Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 112
Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 113
Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 114
Total . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 115
TotalPERM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 116
AdHocDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 117
Purge Obsolete Workflow Runtime Data Concurrent
Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 118
Workflow Directory Service APIs . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 120
GetRoleUsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 121
GetUserRoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 122
GetRoleInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 123
GetRoleInfo2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 124
IsPerformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 125
UserActive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 126
GetUserName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 127
GetRoleName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 128
GetRoleDisplayName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 129
SetAdHocUserStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 130
SetAdHocRoleStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 131
CreateAdHocUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 132
CreateAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 134
AddUsersToAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 136
SetAdHocUserExpiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 137
SetAdHocRoleExpiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 138
SetAdHocUserAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 139
SetAdHocRoleAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 140
RemoveUsersFromAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 141
Workflow Preferences API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 142
get_pref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 142
Workflow Monitor APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 143
GetAccessKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 144
GetDiagramURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 145
GetEnvelopeURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 147
GetAdvancedEnvelopeURL . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 149
Contents ix
OpenNotificationsExist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 208
Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 209
AddAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 210
SetAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 211
GetAttrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 213
GetInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 214
GetText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 215
GetShortText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 216
GetAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 217
GetAttrDoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 219
GetSubject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 220
GetBody . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 221
GetShortBody . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 222
TestContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 223
AccessCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 224
WorkCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 225
getNotifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 226
getNotificationAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 227
WriteToClob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 228
Overview of the Oracle Workflow Business Event System . . . . . 8 – 229
Business Event System Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 230
Agent Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 231
getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 231
getSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 231
setName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 232
setSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 232
Parameter Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 233
getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 233
getValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 233
setName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 234
setValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 234
Parameter List Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 235
Event Message Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 236
Initialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 239
getPriority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 239
getSendDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 239
getReceiveDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getCorrelationID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getParameterList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getEventName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 240
getEventKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 241
getEventData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 241
Contents xi
Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 277
Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 278
Success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 279
Workflow_Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 280
Error_Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 281
SetParametersIntoParameterList . . . . . . . . . . . . . . . . . . . . . . . . 8 – 282
Event Function APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 283
Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 284
SubscriptionParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 286
AddCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 287
Generate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 289
Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 291
Business Event System Replication APIs . . . . . . . . . . . . . . . . . . . . 8 – 293
WF_EVENTS Document Type Definition . . . . . . . . . . . . . . . . 8 – 295
WF_EVENTS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 296
WF_EVENTS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 297
WF_EVENT_GROUPS Document Type Definition . . . . . . . . 8 – 298
WF_EVENT_GROUPS_PKG.Generate . . . . . . . . . . . . . . . . . . 8 – 299
WF_EVENT_GROUPS_PKG.Receive . . . . . . . . . . . . . . . . . . . 8 – 300
WF_SYSTEMS Document Type Definition . . . . . . . . . . . . . . . 8 – 301
WF_SYSTEMS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 302
WF_SYSTEMS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 303
WF_AGENTS Document Type Definition . . . . . . . . . . . . . . . . 8 – 304
WF_AGENTS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 305
WF_AGENTS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 306
WF_EVENT_SUBSCRIPTIONS Document Type
Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 – 307
WF_EVENT_SUBSCRIPTIONS_PKG.Generate . . . . . . . . . . . 8 – 308
WF_EVENT_SUBSCRIPTIONS_PKG.Receive . . . . . . . . . . . . 8 – 309
Index
VOLUME 2Volume 2 . . . . . . . . . . . . . . . . . . . . . . . . . . i
Contents xiii
System Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 4
Agent Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 4
Event Subscription Definition Events . . . . . . . . . . . . . . . . . . . 14 – 5
Synchronize Event Systems Event . . . . . . . . . . . . . . . . . . . . . . 14 – 5
Seed Event Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 6
Ping Agent Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 8
System Signup Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 9
Any Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 10
Unexpected Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 12
Workflow Send Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 – 16
The Workflow Send Protocol Item Type . . . . . . . . . . . . . . . . . 14 – 17
Summary of the Workflow Event Protocol Process . . . . . . . . 14 – 19
Workflow Event Protocol Process Activities . . . . . . . . . . . . . . 14 – 20
Workflow Send Protocol Events . . . . . . . . . . . . . . . . . . . . . . . . 14 – 23
Contents xv
Supplier: Send Supplier Invoice Subprocess Activities . . . . . 15 – 101
B2B Purchase Order Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 – 102
B2B Purchase Order Acknowledgement Event . . . . . . . . . . . 15 – 105
B2B Advanced Shipment Notice Event . . . . . . . . . . . . . . . . . . 15 – 106
B2B Invoice Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 – 107
Glossary
Index
Contents xvii
xviii Oracle Workflow Guide
CHAPTER
From the Oracle Workflow home page, choose the User Preferences
link.
Alternatively, you can connect directly to the User Preferences web
page:
3. In the Language and Territory fields, use the list of values to select
the NLS_LANGUAGE and NLS_TERRITORY combination that
See Also
10 Viewing Notifications
and Processing
Responses
See Also
See Also
Enter the Action on line 1. Do you approve? Value must be one of the following (default
is ”Reject”):
Approve
Reject
Enter the Review Comments on line 2. Value must be 2000 bytes or less.
Enter the Required Date on line 3. If there is no required date, leave this blank. Value
must be a date in the form ”DD–MON–YYYY”.
Enter the Maximum Amount on line 4. This is the maximum approved amount. Value
must be a number. Default is 1500.
Approve
01–JAN–1998
1000.00
Reject
Too expensive.
Reject
”This item is too expensive. Please find a replacement that is of lower cost, or else
01–JAN–1998
1000.00
See Also
See Also
See Also
3. In the Item Type poplist field, select the item type to which this rule
applies or select <All> if you want this rule to apply to notifications
associated with any item type.
11 Monitoring Workflow
Processes
See Also
Workflow Monitor
The Workflow Monitor is a tool that allows you to view and administer
the status of a specific instance of a workflow process. You can use the
point–and–click interface to display detailed status information about
activities in the process as well as about the process as a whole. The
Workflow Monitor can be run in ’USER’ or ’ADMIN’ mode, where
’ADMIN’ mode provides additional details and functionality pertinent
only to a workflow administrator. See: Workflow Monitor Access: page
11 – 7.
The Workflow Monitor consists of the following sections:
• Process Title
• Process Diagram Window
• Detail Tab Window
• Administration Buttons
Table 11 – 1 (Page 1 of 1)
Usage Tab
Current Location:Activity Display Name
Start/End: No, Start, or End (process result)
Performer: Role name or item attribute internal name
*Comment: Comments for the process activity node
Timeout: N minutes or item attribute internal name
Status Tab
Current Location:Activity Display Name
Status: Activity status
Result: Activity result (result code)
Begin Date: Date activity begins
End Date: Date activity ends
Due Date: Date activity is due to timeout
*Notification: Notification ID
Assigned User: Role name or item attribute internal name
(shown only if Activity Status is ’ERROR’)
*Error Name: Name of error
Error Message: Error message
*Error Stack: Error stack
Notification Tab
Current Location: Activity Display Name
*ID: Notification ID
Recipient: Recipient of notification
Status: Notification status
Item Tab
Process Display Name: Item Type, Item Key (or User Key, if
set)
Owner: Owner of the item, not implemented yet
Begin Date: Date workflow process instance is created
End Date: Date workflow process instance is completed
<Item Attribute>: <type(format)> <value>
...
Administration Buttons
The administration buttons appear beneath the detail tab window only
when the Workflow Monitor is run in ’ADMIN’ mode. Each button
allows you to perform a different administrative operation by calling
the appropriate Workflow Engine API. The buttons and their behavior
are as follows:
• Abort Process—Available only if you select the process title or a
process activity. Calls WF_ENGINE.AbortProcess to abort the
selected process and cancel any outstanding notifications.
Prompts for a result to assign to the process you are about to
abort. The process will have a status of Complete, with the
result you specify. See: AbortProcess: page 8 – 35.
• Suspend Process—Available only if you select the process title or
a process activity. Calls WF_ENGINE.SuspendProcess to suspend
the selected process so that no further activities can be
transitioned to. See: SuspendProcess: page 8 – 31.
<webagent> is the web agent string that you can retrieve from the
WF_WEB_AGENT token in the WF_RESOURCES table by calling
WF_CORE.TRANSLATE( ). See: TRANSLATE: page 8 – 109.
Note: You can also access the Find Processes web page from
the Oracle Workflow home page. See: Accessing the Oracle
Workflow Home Page: page 9 – 2.
1. The Notifications List shows for the selected process instance, all
the current notifications that have been sent that require a special
Result response. In other words, these are the notification activities
that allow the process to branch based on the recipient’s response.
2. The Notification List summarizes what each notification activity is,
who it is assigned to, when it was sent, whether it has been
completed, how many days have passed before completion, as well
as what its result is.
Note: If the process itself is in an error state, and the cause of
the error was from a notification, the result of that notification
may appear as a link in the Result column. Choose that link to
display the cause of the error.
1. The Activities List web page lets you specify various criteria to
filter for specific activities of interest.
2. Use the Activity Status Options check boxes to specify any activity
status of interest. A status of Active also includes activities that are
in the Notified, Deferred and Waiting state.
3. Use the Activity Type check boxes to specify the types of activities
you want to view. You can choose to display notification activities
that require a response, notification activities that do not require a
response, function activities, activities that belong to the Standard
item type, and/or event activities.
4. Once you finish selecting your criteria, choose Filter Activities to
display the activities that match your criteria.
5. The resulting activities summary list includes the following
columns of information:
12 Testing a Workflow
Definition
T his chapter tells you how to test your workflow definitions using
the Oracle Workflow Launch Processes web page.
13 Managing Business
Events
T his chapter tells you how to manage business events using the
Oracle Workflow Event Manager web pages.
Event Manager
The Oracle Workflow Event Manager lets you register interesting
business events that may occur in your applications, the systems
among which events will be communicated, named communication
agents within those systems, and subscriptions indicating that an event
is significant to a particular system. You can use the Event Manager
web pages to define and maintain these events, systems, agents, and
subscriptions.
Note: You must have workflow administrator privileges to
access the Event Manager web pages.
You can use the Workflow XML Loader to upload and download XML
definitions for Business Event System objects between a database and a
flat file. See: Using the Workflow XML Loader: page 2 – 105.
When an event is raised by a local application or received from a local
or external system, the Event Manager executes any subscriptions to
that event. Depending on the action defined in the subscription, the
Event Manager may call custom code, send the event information to a
workflow process, or send the event information to an agent.
The Event Manager also lets you complete your setup for message
propagation, including scheduling listeners for inbound event
messages and propagations for outbound event messages.
After you finish setting up the Business Event System, you can use the
Event Manager to raise events manually, sign up systems to receive
business events from each other, synchronize systems with each other,
and review your local queues. You can test your setup using Workflow
Agent Ping/Acknowledge.
This format allows you to organize the events you define into a
classification hierarchy.
You can also define event groups that let you associate any events you
want with each other and reference them as a group in event
subscriptions. An event group is a type of event composed of a set of
individual member events. The internal names of event groups should
follow the same format as the names of individual events. Once you
have defined an event group, you can register a subscription on the
group rather than having to create separate subscriptions for each
individual event within it. The subscription will be executed whenever
any one of the group’s member events occurs.
4. Enter a Display Name for the event. This name appears in the
Events list.
5. Enter an optional description for the event.
6. In the Status field, select Enabled or Disabled as the event status. If
you disable an event, it still remains in the Events list for reference,
but you cannot use the event in active subscriptions.
7. If you are defining an event that occurs on your local system, enter
the Generate Function for the event. The Generate function is a
PL/SQL procedure that can produce the complete event data from
the event name, event key, and an optional parameter list. See:
Standard API for an Event Data Generate Function: page 7 – 21.
8. You can optionally identify the program or application that owns
the event by entering the program name in the Owner Name field
and the program ID in the Owner Tag field. The Owner Name and
Owner Tag are not required if you are defining an event manually
in the Edit Event page. However, if you use a program to create
4. Enter a Display Name for the event group. This name appears in
the Events list.
5. Enter an optional description for the event group.
6. In the Status field, select Enabled or Disabled as the event group
status. If you disable an event group, it still remains in the Events
list for reference, but you cannot use the event group in active
subscriptions.
7. You can optionally identify the program or application that owns
the event group by entering the program name in the Owner Name
field and the program ID in the Owner Tag field. The Owner Name
and Owner Tag are not required if you are defining an event group
manually in the Edit Group page. However, if you use a program
to create event group definitions automatically, the Event Manager
displays the owner information set by that program in these fields.
You can use the Edit Group page to update this information
manually if necessary.
8. Choose the Submit button to save the event group.
Note: You can also choose the Cancel button to return to the
Events page without saving the event group.
After you save the event group definition, the Edit Group page
displays the list of member events for that group, including the
name, display name, and status of each event.
10. In the Add to Group page that appears, enter search criteria to
locate the event you want to add. The search criteria are:
• Name—enter the internal name of the event you want to add.
12. Select the event or events that you want to add to your event
group. You can choose the Select All button to select all the events
in the list, or choose the Deselect All button to deselect all the
events in the list.
If you want to search for different events, enter new search criteria
and choose the Go button. The Add to Group page displays the list
of events that match your new search criteria.
You can also choose the Cancel button to cancel your current search
and return to your previous search results.
13. When you have finished selecting the events you want to add,
choose the Add button to add the selected events to your event
14. Choose the Submit button to save the event group definition.
Note: You can also choose the Cancel button to return to the
Add to Group page with your latest search results.
15. If you want to remove a member event from the group, select the
event or events you want to delete in the Edit Group page. Choose
Select All to select all the events in the list, or choose Deselect All to
deselect all the events in the list.
16. Choose the Delete button to remove the selected events from your
event group. The Edit Group page displays the updated list of
event group members.
Note: Removing an individual member event from an event
group does not delete the event definition for the individual
event. The individual event remains in the Events list.
17. To view the subscriptions that reference an event, choose the
schedule icon in the Subs column for that event. The Event
Systems
A system is a logically isolated software environment such as a host
machine or database instance. You should define each system to or
from which you will communicate events in the Event Manager.
When you define a system, you can specify whether it is associated
with a master system from which you want it to receive Event Manager
object definition updates.
Each system can expose one or more addressable points of
communication, called agents. After you define your systems, you
should define the agents within those systems that you will use to
communicate business events. See: Agents: page 13 – 22.
Local System
When you install Oracle Workflow in a database, that database is
automatically defined as a system in the Event Manager and set as the
local system in the Global Workflow Preferences page. The following
table lists the default properties of the local system definition.
Master (blank)
Table 13 – 1 (Page 1 of 1)
2. The Find System page appears. The Find System page lets you
enter search criteria to locate specific systems. The search criteria
are:
• Name—enter the internal name of the system you want to
display.
• Display Name—enter the display name of the system you want
to display.
• Master—enter the master system for the system you want to
display. Click on the field’s up arrow icon to display a list of
systems from which to choose. See: Using a List of Values: page
13 – 22.
3. Choose the Find button. The Systems page appears, displaying a
list of systems that match your search criteria. An asterisk marks
the local system.
Agents
An agent is a named point of communication within a system.
Communication within and between systems is accomplished by
sending a message from one agent to another. A single system can have
several different agents representing different communication
alternatives. For example, a system may have different agents to
support inbound and outbound communication, communication by
different protocols, different propagation frequencies, or other
alternatives.
You should define each agent that you will use to communicate events
in the Event Manager. Each agent’s name must be unique within its
system. The agent can be referenced in code within Oracle Workflow by
a compound name in the following format:
<agent_name>@<system_name>
For example, the agent WF_IN within the system HUB could be
referenced as WF_IN@HUB.
After defining the agents on your local system, you should set them up
for event message propagation by scheduling listeners for local
inbound agents and propagations for local outbound agents. See:
Scheduling Listeners for Local Inbound Agents: page 13 – 54 and
Scheduling Propagations for Local Outbound Agents: page 13 – 54.
Table 13 – 2 (Page 1 of 1)
In this format, <schema> represents the schema that owns the queue,
<queue> represents the queue name, and <database link> represents
the name of the database link to the instance where the queue is
located.
Note: You must enter the database link name exactly as the
name was specified when the database link was created. For
example, if a database link is named ORA816.US.ORACLE.COM,
you must enter that complete name in the address of an agent
on that database. You cannot abbreviate the name to ORA816.
The names of the database links that you want to use for the
Business Event System should be fully qualified with the
domain names. To confirm the names of your database links,
use the following syntax:
SELECT db_link FROM all_db_links
Standard Agents
When you install Oracle Workflow, four standard agents are
automatically defined.
• WF_IN—Standard inbound agent
• WF_OUT—Standard outbound agent
• WF_DEFERRED—Standard agent for deferred subscription
processing
• WF_ERROR—Standard agent for error handling
These agents use standard queues that are automatically defined when
you install Oracle Workflow. See: Setting Up Queues: page 2 – 90.
You can enable or disable the WF_IN and WF_OUT agents, but you
must not make any other changes to their definitions. You must not
make any changes to the definitions of the WF_DEFERRED and
WF_ERROR agents.
Name WF_IN
Description WF_IN
Protocol SQLNET
Direction In
Status Enabled
Table 13 – 3 (Page 1 of 1)
The following table lists the default properties for the standard
WF_OUT agent.
Name WF_OUT
Description WF_OUT
Protocol SQLNET
Table 13 – 4 (Page 1 of 2)
Direction Out
Status Enabled
Table 13 – 4 (Page 2 of 2)
The following table lists the default properties for the standard
WF_DEFERRED agent.
Name WF_DEFERRED
Description WF_DEFERRED
Protocol SQLNET
Direction In
Status Enabled
Table 13 – 5 (Page 1 of 1)
The following table lists the default properties for the standard
WF_ERROR agent.
Name WF_ERROR
Description WF_ERROR
Protocol SQLNET
Direction In
Status Enabled
Table 13 – 6 (Page 2 of 2)
3. Enter the internal name of the agent in the Name field. The agent’s
internal name must be unique within the agent’s system. Oracle
Event Subscriptions
An event subscription is a registration indicating that a particular event
is significant to a particular system and specifying the processing to
perform when the triggering event occurs. You can define your event
subscriptions in the Event Manager.
When you install Oracle Workflow, several default subscriptions to
predefined Workflow events are automatically created. You can update,
enable, or disable these subscriptions to perform the event processing
that you want. See: Predefined Workflow Events: page 14 – 2.
See Also
Error Handling
If a rule function returns a status code of WARNING or ERROR,
indicating that a warning condition or an error occurred during
subscription processing, the Event Manager places the event message
on the standard WF_ERROR queue associated with the WF_ERROR
agent. For a WARNING status, the Event Manager then continues
subscription processing for the event. For an ERROR status, the Event
Manager halts subscription processing for the event and rolls back any
subscriptions already executed for the event.
You must schedule a listener to monitor the WF_ERROR agent. When
this listener dequeues the event message from the WF_ERROR queue,
the message is assigned a source type of Error. The Event Manager then
searches for and executes any subscriptions by the local system to that
event or to the Any event with the source type Error. If no
subscriptions are found, the Event Manager executes any subscriptions
by the local system to the Unexpected event with the source type Error.
Oracle Workflow provides one predefined subscription to the
Unexpected event with the source type Error. This subscription
performs the default error handling for any errored event for which
you have not defined a custom Error subscription. The subscription
sends the event message to the Default Event Error process in the
System: Error item type.
See Also
See Also
Oracle Reference
Oracle Application Developer’s Guide – Advanced Queuing
See Also
Agents: page 13 – 22
Listen(): page 8 – 264
Workflow Agent Listener Concurrent Program: page 8 – 265
Wfagtlst.sql: page 16 – 5
5. In Edit Listener page, enter the date on which you want to start
running the listener in the Run Day field. To start the listener on the
current system date, leave this field blank.
Note: If you have set your user preferences to a date format
that includes a time setting, then you can specify the time when
you want to start the listener, as well as the date. Otherwise,
you can only specify a date. See: Setting User Preferences: page
9–5
6. In the Run Every fields, enter an interval to specify how often you
want the listener to be run. You can specify the interval in days,
hours, minutes, and seconds.
7. Choose the Submit button to save the listener schedule. If you are
scheduling the first listener for the agent, the Check Setup page
appears, displaying an updated Scheduled status. If you are
3. To update a listener, choose the pencil icon in the Edit column for
that listener. The Edit Listener page appears. Make your changes to
the listener schedule and save your work. See: To Schedule a
Listener for a Local Inbound Agent: page 13 – 55.
4. To delete a listener, choose the trash icon in the Delete column for
that listener, and choose OK in the confirmation window that
appears. You can also choose Cancel in the confirmation window to
return to the Listeners page without deleting the listener.
See Also
Agents: page 13 – 22
Raising Events
In addition to raising events from your applications or through
workflows, you can raise events that do not require additional
parameters manually using the Raise Event web page. When you raise
an event, the Event Manager searches for and executes any active
subscriptions by the local system to that event with a source type of
Local, and also any active subscriptions by the local system to the Any
event with a source type of Local.
Signing Up Systems
Before you can send business events from one system to another, you
must sign up the destination system with the source system as a
potential recipient of event messages. Signing up a system means
defining the destination system as well as its inbound agents in the
Event Manager of the source system, so that event messages from the
source system can be addressed to the destination agents.
Usually, both systems should be signed up with each other, so that each
system can both send messages to and receive messages from the other
system.
To sign up a destination system for receiving event messages from a
source system, perform the following steps:
1. Retrieve the local system and inbound agent definitions, which
together make up the system identifier information, from the
destination system. You can use the System Identifier web page on
the destination system to generate an XML document containing
the system identifier information. See: To Retrieve System Identifier
Information: page 13 – 65.
Note: If you do not have access to the Oracle Workflow
installation on the destination system, ask the workflow
administrator for that system to perform this step.
2. Add the destination system identifier information to the Event
Manager in the source system. You can use the System Signup web
page on the source system to add the information by raising the
System Signup event with the XML document from the destination
system as the event data. When the System Signup event is raised
on the source system, Oracle Workflow executes a predefined
subscription that adds the system identifier information to the
Synchronizing Systems
Synchronizing systems means replicating all the Event Manager objects
that are defined on the source system to the target system. You can use
the Synchronize Event Systems event to synchronize systems with each
other.
Automatic Replication
After you enable the predefined subscriptions in steps 2 and 3, these
subscriptions will also replicate any subsequent changes you make to
Event Manager object definitions on the source system. Whenever you
create, update, or delete events, event group members, systems, agents,
or subscriptions, Oracle Workflow raises the corresponding predefined
events. These events trigger the Local subscription to the Seed Event
Group on the source system, which sends the object definition data to
the target system. The External subscription to the Seed Event Group
on the target system receives the data and adds, updates, or deletes the
object definition in the Event Manager there.
If you do not want to continue automatically replicating changes on the
source system to the target system, you can either disable the
subscriptions after you finish synchronizing the systems, or disable the
predefined events corresponding to those changes.
Master/Copy Systems
If you choose, you can treat one system as a master system that
replicates its own Event Manager object definitions to its associated
copy systems, but does not accept any object definition changes from
those systems. To set up master/copy replication, perform the steps to
synchronize the target copy systems with the source master system, as
See Also
See Also
Table 13 – 7 (Page 1 of 1)
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
The Detail Ping process begins when it is launched by the Master Ping
process. See: Summary of the Master Ping Process: page 13 – 75.
The workflow begins at node 1 with the Start activity. At node 2, the
process sends a Ping Agent event to the selected inbound agent. At
node 3, the process waits to receive an Acknowledge Ping event back
from the agent. When the acknowledgement is received, the master
process can continue. The detail process ends at this point.
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
Send Event (Node 2)
This event activity sends the Ping Agent event
(oracle.apps.wf.event.test.ping) from an outbound agent on the local
system to the inbound agent identified by the master process. The
event message includes a correlation ID that identifies the detail
process to which it belongs.
14 Predefined Workflow
Events
Event Created
Oracle Workflow raises this event whenever a new individual event or
event group definition is created.
Internal Name oracle.apps.wf.event.event.create
Generate wf_event_functions_pkg.generate
Function
Event Updated
Oracle Workflow raises this event whenever an individual event or
event group definition is updated.
Internal Name oracle.apps.wf.event.event.update
System Created
Oracle Workflow raises this event whenever a new system definition is
created.
Internal Name oracle.apps.wf.event.system.create
Generate wf_event_functions_pkg.generate
Function
System Updated
Oracle Workflow raises this event whenever a system definition is
updated.
Internal Name oracle.apps.wf.event.system.update
Generate wf_event_functions_pkg.generate
Function
System Deleted
Oracle Workflow raises this event whenever a system definition is
deleted.
Internal Name oracle.apps.wf.event.system.delete
Generate wf_event_functions_pkg.generate
Function
Agent Created
Oracle Workflow raises this event whenever a new agent definition is
created.
Internal Name oracle.apps.wf.event.agent.create
Generate wf_event_functions_pkg.generate
Function
Agent Updated
Oracle Workflow raises this event whenever an agent definition is
updated.
Internal Name oracle.apps.wf.event.agent.update
Subscription Created
Oracle Workflow raises this event whenever a new subscription
definition is created.
Internal Name oracle.apps.wf.event.subscription.create
Generate wf_event_functions_pkg.generate
Function
Subscription Updated
Oracle Workflow raises this event whenever a subscription definition is
updated.
Internal Name oracle.apps.wf.event.subscription.update
Generate wf_event_functions_pkg.generate
Function
Subscription Deleted
Oracle Workflow raises this event whenever a subscription definition is
deleted.
Internal Name oracle.apps.wf.event.subscription.delete
Generate wf_event_functions_pkg.generate
Function
Status Disabled
Priority Normal
Table 14 – 1 (Page 1 of 1)
The second subscription can load the Event Manager data into the local
system when one of the group member events is received from an
external source. To use this subscription, you must enable it. The
following table lists the properties defined for this subscription.
Status Disabled
Table 14 – 2 (Page 1 of 1)
See Also
Status Enabled
Table 14 – 3 (Page 1 of 1)
Acknowledge Ping
Oracle Workflow sends this event back to the originating system when
a Ping Agent event is received. See: Workflow Agent
Ping/Acknowledge: page 13 – 73.
Internal Name oracle.apps.wf.event.test.ack
Generate None
Function
Oracle Workflow provides one default subscription to the
Acknowledge Ping event. This subscription sends the Acknowledge
Status Enabled
Table 14 – 4 (Page 1 of 1)
See Also
Status Enabled
Table 14 – 5 (Page 1 of 1)
See Also
Any Event
This event is raised implicitly when any other event is raised locally or
received from an external source. You can define a subscription to the
Any event to implement processing that you want to execute whenever
an event occurs.
Phase 100
Status Disabled
Priority Normal
Table 14 – 6 (Page 1 of 1)
Phase 100
Status Disabled
Priority Normal
Table 14 – 7 (Page 1 of 1)
The third subscription sends the event message to the Default Event
Error process in the System: Error item type and raises an exception
when an event is received from an Error source (that is, when it is
dequeued from the WF_ERROR queue). To use this subscription, you
must enable it. The following table lists the properties defined for this
subscription.
Phase 100
Status Disabled
Priority Normal
Table 14 – 8 (Page 1 of 1)
See Also
Unexpected Event
Oracle Workflow executes subscriptions to this event when an event is
raised locally or received from an external source, but no subscription
exists on that event.
Internal Name oracle.apps.wf.event.unexpected
Generate None
Function
Oracle Workflow provides three default subscriptions to the
Unexpected event. The first subscription can send the event message to
the Default Event Error process in the System: Error item type when an
unexpected event is raised locally. To use this subscription, you must
enable it.
Status Disabled
Table 14 – 9 (Page 1 of 1)
The second subscription sends the event message to the Default Event
Error process in the System: Error item type when an unexpected event
is received from an external source. This subscription allows your local
system to handle any event messages received from external systems
that you were not expecting.
The Default Event Error process notifies the system administrator, who
can retry or abort subscription processing for the event. For example,
the system administrator can optionally define a subscription to
process the event and then retry the event.
The External subscription to the Unexpected event is enabled by
default. You can disable it if necessary.
Status Enabled
Table 14 – 10 (Page 1 of 1)
The third subscription sends the event message to the Default Event
Error process in the System: Error item type when an unexpected event
is received from an Error source (that is, when it is dequeued from the
WF_ERROR queue). This subscription is enabled by default.
Status Enabled
Table 14 – 11 (Page 1 of 2)
Priority Normal
Table 14 – 11 (Page 2 of 2)
See Also
Table 14 – 12 (Page 1 of 1)
Status Enabled
Parameters ACKREQ=Y
Table 14 – 13 (Page 1 of 1)
Status Enabled
Table 14 – 14 (Page 1 of 2)
Table 14 – 14 (Page 2 of 2)
Status Enabled
Table 14 – 15 (Page 1 of 1)
15 Demonstration
Workflow Processes
See Also
SYSADMIN yes
WFADMIN yes
BLEWIS yes
KWALKER yes
Table 15 – 1 (Page 1 of 1)
Table 15 – 2 (Page 1 of 1)
Start (Node 1)
This is a Standard function activity that simply marks the start of the
process.
Function WF_STANDARD.NOOP
Result Type None
The subprocess begins at node 1 with the Start activity. At node 2, the
process notifies the approver to approve a requisition within a specified
period of time. If the approver approves the requisition, the
subprocess ends at node 6 and returns the result Approve to the top
level Requisition process. Similarly, if the approver rejects the
requisition, the subprocess ends at node 7 and returns the result Reject
to Requisition process.
If the approver does not respond by the due date, the subprocess takes
the <Timeout> transition to node 3 to send a reminder to the approver
to approve the requisition. Node 3 also has a timeout value assigned to
it, and if the approver does not respond to the reminder by that time,
the subprocess takes the next <Timeout> transition to loop back to
node 3 to send another reminder to the approver. This loop continues
Start (Node 1)
This is a Standard function activity that simply marks the start of the
subprocess.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
Notify Requisition Approval Required (Node 2)
This activity notifies the approver that the requisition needs to be
approved or rejected. This activity must be completed within 5
minutes, otherwise it times out.
The message includes ’Send’ attributes that display the requisition
number, requisition description, requisition amount, previous approver
name, and preparer name for the requisition when the notification is
sent.
The message includes a special RESULT attribute and a ”Respond”
attribute. The RESULT attribute has a display name of Action and
prompts the approver to respond with a value of ’APPROVE’ or
’REJECT’ from the lookup type called Approval. The value that the
approver selects becomes the result that determines which activity
branch the Workflow Engine transitions to next.
The ”Respond” attribute is called Note and this attribute prompts the
approver for optional comments to include in the notification response.
If you display the property page of this activity node, you see that the
activity is assigned to a performer whose name is stored in an item
type attribute named Forward To Username.
Message Requisition Approval Required
Result Type Approval
Or (Nodes 4 and 5)
This Standard function activity merges two or more parallel branches
in a flow as soon as an activity in any one of those branches complete.
Function WF_STANDARD.ORJOIN
Result Type None
Prerequisite None
Activities
End (Nodes 6 and 7)
This function activity marks the end of the subprocess. Although the
activity itself does not have a result type, each node of this activity in
Result Type This activity expects a response of ’T’ if an approver is found or ’F’ if
an approver is not found. The possible responses are defined in a
lookup type called Boolean, associated with the Standard item type.
PL/SQL Stored The PL/SQL stored procedure that this function activity calls is
Procedure described in detail below. Each section in the procedure is numbered
with the notation 1⇒ for easy referencing.
procedure SelectApprover (itemtype in varchar2,
itemkey in varchar2,
actid in number,
Result Type This activity expects a result of ’Yes’ or ’No’ when the procedure
completes to indicate whether the approver has the authority to
approve the requisition. These result values are defined in the lookup
type called Yes/No, associated with the Standard item type.
PL/SQL Stored The PL/SQL stored procedure that this function activity calls is
Procedure described in detail below. Each section in the procedure is numbered
with the notation 1⇒ for easy referencing. We also use the convention
’l_’ to identify local arguments used within the procedure.
procedure VerifyAuthority (itemtype in varchar2,
itemkey in varchar2,
actid in number,
funcmode in varchar2,
resultout out varchar2) is
1⇒ l_forward_to_username varchar2(30);
l_requisition_amount number;
l_spending_limit number;
2⇒ begin
if (funcmode = ’RUN’) then
l_requisition_amount := wf_engine.GetItemAttrNumber (
itemtype => itemtype,
itemkey => itemkey,
aname => ’REQUISITION_AMOUNT’);
3⇒ l_forward_to_username := wf_engine.GetItemAttrText (
itemtype => itemtype,
itemkey => itemkey,
aname => ’FORWARD_TO_USERNAME’);
4⇒ if (wf_reqdemo.checkSpendingLimit(l_forward_to_username,
l_requisition_amount)) then
Result Type The manager’s response determines the activity that the process
transitions to next. The possible responses, ’APPROVE’ or ’REJECT’
are defined in a lookup type called Approval. These values are defined
by the message’s special Result attribute, whose display name is
Action. These values are also the possible results of the notification
activity, as defined by the Result Type field in the Activity property
page.
Process Node If you display the properties of the Notify Requisition Approval
Properties Required activity node in the Notify Approver subprocess diagram you
should see that this node is set to Normal because it is neither the start
nor end activity in the process.
Table 15 – 3 (Page 1 of 1)
Start (Node 1)
This is a Standard function activity that simply marks the start of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
End (Node 4)
This is a Standard function activity that simply marks the end of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
Start (Node 1)
This is a Standard function activity that simply marks the start of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
End (Node 5)
This is a Standard function activity that simply marks the end of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
Start (Node 1)
This is a Standard function activity that simply marks the start of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
End (Node 4)
This is a Standard function activity that simply marks the end of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
See Also
Table 15 – 4 (Page 1 of 1)
Start (Node 1)
This is a Standard function activity that simply marks the start of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Activity Attributes Retrieved by Function—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
See Also
Table 15 – 5 (Page 1 of 1)
Start (Node 1)
This is a Standard function activity that simply marks the start of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Activity Attributes Retrieved by Function—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
Wait (Node 2)
This is a Standard function activity that pauses the process for the time
you specify.
To use a Wait activity in a process, you must set up at least one
background engine to evaluate whether the wait period has elapsed so
that it can complete the Wait activity.
• Function—WF_STANDARD.WAIT
• Result Type—None
Wait (Node 4)
This is a Standard function activity that pauses the process for the time
you specify.
To use a Wait activity in a process, you must set up at least one
background engine to evaluate whether the wait period has elapsed so
that it can complete the Wait activity.
• Function—WF_STANDARD.WAIT
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Activity Attributes Retrieved by Function
– Wait Mode: Item Attribute, Frequency
Wait (Node 8)
This is a Standard function activity that pauses the process for the time
you specify.
To use a Wait activity in a process, you must set up at least one
background engine to evaluate whether the wait period has elapsed so
that it can complete the Wait activity.
• Function—WF_STANDARD.WAIT
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Activity Attributes Retrieved by Function
– Wait Mode: Constant, Absolute Date
– Absolute Date: Item Attribute, End date
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
Start (Node 1)
This is a Standard function activity that simply marks the start of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Activity Attributes Retrieved by Function—None
End (Node 3)
This is a Standard function activity that simply marks the end of the
process.
• Function—WF_STANDARD.NOOP
• Result Type—None
• Required—Yes
• Prerequisite Activities—None
• Activity Attributes Retrieved by Function—None
• Item Attributes Set by Function—None
• Item Attributes Retrieved by Function—None
2. Select the order number for your purchase order and choose the
Submit button.
3. In the Events: Track Order page that appears, choose the Queue
Messages link to display the Event System Local Queues page and
review the messages on the Business Event System queues. See:
Reviewing Local Queues: page 13 – 69.
Table 15 – 6 (Page 1 of 2)
Table 15 – 6 (Page 2 of 2)
And (Node 8)
This Standard function activity merges two or more parallel branches
in the flow only when the activities in all of those branches complete.
Function WF_STANDARD.ANDJOIN
Result Type None
Prerequisite Buyer: Advanced Shipment Notice, Buyer: Receive
Activities Supplier Invoicing
End (Node 9)
This Standard function activity marks the end of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite And
Activities
The subprocess begins at node 1 with the Start activity. At node 2, the
process retrieves the name of the order requestor from the purchase
order event message. Then the process sends the purchase order to the
supplier and notifies the order requestor that the purchase order has
been sent. The subprocess ends at this point.
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
End (Node 5)
This Standard function activity marks the end of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite PO Sent to Supplier
Activities
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
End (Node 5)
This Standard function activity marks the end of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite PO Acknowledged by Supplier
Activities
The subprocess begins at node 1 with the Start activity. At node 2, the
process waits to receive an advanced shipment notice from the
supplier. When the advanced shipment notice is received, the process
notifies the order requestor that the order has been shipped. The
subprocess ends at this point.
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
The subprocess begins at node 1 with the Start activity. At node 2, the
process waits to receive an invoice from the supplier. When the invoice
is received, the process notifies the order requestor that the invoice has
arrived. The subprocess ends at this point.
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
The Supplier: Top Level Order workflow begins when the Supplier
system receives the B2B Purchase Order event from the Buyer system.
Predefined subscriptions change the correlation ID to consist of the
prefix SO followed by the event key (the order number), and send the
event to the Supplier: Top Level Order process.
And (Node 6)
This Standard function activity merges two or more parallel branches
in the flow only when the activities in all of those branches complete.
Function WF_STANDARD.ANDJOIN
Result Type None
Prerequisite Supplier: Credit Check, Supplier: Stock Check
Activities
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
And (Node 5)
This Standard function activity merges two or more parallel branches
in the flow only when the activities in all of those branches complete.
Function WF_STANDARD.ANDJOIN
Result Type None
Prerequisite XML Get Tag Value (node 3), XML Get Tag Value
Activities (node 4)
End (Node 6)
This Standard function activity marks the end of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite And
Activities
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
The subprocess begins at node 1 with the Start activity. At node 2, the
process performs a stock check to determine if the ordered item is in
stock. The subprocess ends at this point.
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
End (Node 3)
This Standard function activity marks the end of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite Stock Check
Activities
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
End (Node 4)
This Standard function activity marks the end of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite Supplier: Send ASN
Activities
Start (Node 1)
This Standard function activity marks the start of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite None
Activities
End (Node 4)
This Standard function activity marks the end of the process.
Function WF_STANDARD.NOOP
Result Type None
Prerequisite Supplier: Send Invoice
Activities
Phase 1
Status Enabled
Table 15 – 7 (Page 1 of 1)
The second subscription sends the event message to the Buyer: Top
Level PO process in the Event System Demonstration item type when
the B2B Purchase Order event is raised locally. This subscription is
enabled by default. The following table lists the properties defined for
this subscription.
Phase 2
Status Enabled
Table 15 – 8 (Page 1 of 1)
Phase 1
Status Enabled
Table 15 – 9 (Page 1 of 1)
The fourth subscription sends the event message to the Supplier: Top
Level Order process in the Event System Demonstration item type
when the B2B Purchase Order event is received from an external
source. This subscription is enabled by default. The following table lists
the properties defined for this subscription.
Phase 2
Status Enabled
Table 15 – 10 (Page 1 of 2)
Table 15 – 10 (Page 2 of 2)
Phase 1
Status Enabled
Table 15 – 11 (Page 1 of 1)
The second subscription sends the event message to the Buyer: Top
Level PO process in the Event System Demonstration item type when
Phase 2
Status Enabled
Table 15 – 12 (Page 1 of 1)
Phase 1
Status Enabled
Table 15 – 13 (Page 1 of 1)
The second subscription sends the event message to the Buyer: Top
Level PO process in the Event System Demonstration item type when
the B2B Advanced Shipment Notice event is received from an external
source. The subscription is enabled by default. The following table lists
the properties defined for this subscription.
Phase 2
Status Enabled
Table 15 – 14 (Page 1 of 1)
Phase 1
Status Enabled
Table 15 – 15 (Page 1 of 1)
The second subscription sends the event message to the Buyer: Top
Level PO process in the Event System Demonstration item type when
the B2B Invoice event is received from an external source. The
subscription is enabled by default. The following table lists the
properties defined for this subscription.
Phase 2
Status Enabled
Table 15 – 16 (Page 1 of 2)
Table 15 – 16 (Page 2 of 2)
16 Workflow
Administration Scripts
FNDWFLST
For Oracle Workflow embedded in Oracle Applications, use the
standard concurrent program FNDWFLST ”Workflow Agent Listener”
to monitor an agent for inbound event messages.
Navigate to the Submit Requests form in Oracle Applications to submit
the Workflow Agent Listener 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 and Submitting a Request,
Oracle Applications User’s Guide.
You must supply the name of the agent that you want to monitor as a
parameter for the Workflow Agent Listener concurrent program.
Note: If you are using the version of Oracle Workflow
embedded in Oracle Applications and you have implemented
Oracle Applications Manager, you can use Oracle Workflow
Manager to submit and manage the Workflow Agent Listener
concurrent program. For more information, please refer to the
Oracle Applications Manager online help.
FNDWFPR
For Oracle Workflow embedded in Oracle Applications, use the
standard concurrent program FNDWFPR ”Purge Obsolete Workflow
Runtime Data” to purge old data from the Oracle Workflow runtime
tables regularly.
Navigate to the Submit Requests form in Oracle Applications to submit
the Purge Obsolete Workflow Runtime Data 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 and Submitting a
Request, Oracle Applications User’s Guide.
WFNLADD.sql
If you enable a new language in your Oracle installation, use
WFNLADD.sql to add the missing rows for that language to the Oracle
Workflow translation tables. See: Creating the WF_LANGUAGES
View: page 2 – 28 and wfnlena.sql: page 16 – 12.
Use the script as follows:
sqlplus <user/pwd> @WFNLADD
Wfagtlst.sql
Use wfagtlst.sql to run a listener to monitor an agent for inbound event
messages. When a message is received, the Event Manager searches for
and executes any active subscriptions by the local system to the event
with a source type of External, and also any active subscriptions by the
local system to the Any event with a source type of External.
Use the script as follows:
sqlplus <user/pwd> @wfagtlst <agent_name>
Replace <agent_name> with the internal name of the agent that you
want to monitor for inbound event messages.
See Also
Wfbkg.sql
If you are using the standalone version of Oracle Workflow, you can
use wfbkg.sql to start a background engine. This script calls the
WF_ENGINE Background API to run a background engine for the
indicated number of minutes. On completing its current set of eligible
activities to process, the background process waits for the specified
number of seconds before launching another background engine. This
cycle continues until the indicated number of minutes have elapsed.
Use the script as follows:
sqlplus <user/pwd> @wfbkg <minutes> <seconds>
See Also
Background: page 8 – 40
Setting up Background Workflow Engines: page 2 – 36
Wfbkgchk.sql
Use wfbkgchk.sql to get a list of all activities waiting to be processed by
the background engine the next time it runs.
Use the script as follows:
sqlplus <user/pwd> @wfbkgchk
Background: page 8 – 40
Setting up Background Workflow Engines: page 2 – 36
Wfchact.sql
Use wfchact.sql to change the internal name of an activity and update
all references to the activity. See: Change the internal name of a
workflow object: page 16 – 2.
Use the script as follows:
sqlplus <user/pwd> @wfchact <act_type> <old_act> <new_act>
Replace <act_type> with the item type that the activity you wish to
update is associated with, replace <old_act> with the current internal
name of the activity, and replace <new_act> with the new internal name
of the activity.
Wfchacta.sql
Use wfchacta.sql to change the internal name of an activity attribute
and update all references to the activity attribute. See: Change the
internal name of a workflow object: page 16 – 2.
Use the script as follows:
sqlplus <user/pwd> @wfchacta <act_type> <old_acta> <new_acta>
Replace <act_type> with the item type that the activity attribute you
wish to update is associated with, replace <old_acta> with the current
internal name of the activity attribute, and replace <new_acta> with the
new internal name of the activity attribute.
Wfchita.sql
Use wfchita.sql to change the internal name of an item attribute and
update all references to the item attribute. See: Change the internal
name of a workflow object: page 16 – 2.
Use the script as follows:
Replace <item_type> with the item type that the item attribute you
wish to update is associated with, replace <old_attr> with the current
internal name of the item attribute, and replace <new_acta> with the
new internal name of the item attribute.
Wfchitt.sql
Use wfchitt.sql to change the internal name of an item type and update
all references to the item type. See: Change the internal name of a
workflow object: page 16 – 2.
Use the script as follows:
sqlplus <user/pwd> @wfchitt <old_type> <new_type>
Replace <old_type> with the current internal name of the item attribute,
and replace <new_type> with the new internal name of the item
attribute.
Wfchluc.sql
Use wfchluc.sql to change the internal name of a lookup code and
update all references to the lookup code. See: Change the internal
name of a workflow object: page 16 – 2.
Use the script as follows:
sqlplus <user/pwd> @wfchluc <lookup_type> <old_luc> <new_luc>
Replace <lookup_type> with the lookup type of the lookup code you
wish to update, replace <old_luc> with the current internal name of the
lookup code, and replace <new_luc> with the new internal name of the
lookup code.
Wfchlut.sql
Use wfchlut.sql to change the internal name of a lookup type and
update all references to the lookup type. See: Change the internal name
of a workflow object: page 16 – 2.
Use the script as follows:
Replace <old_lut> with the current internal name of the lookup type,
replace <new_lut> with the new internal name of the lookup type.
Wfchmsg.sql
Use wfchmsg.sql to change the internal name of a message and update
all references to the message. See: Change the internal name of a
workflow object: page 16 – 2.
Use the script as follows:
sqlplus <user/pwd> @wfchmsg <msg_type> <old_msg> <new_msg>
Replace <msg_type> with the item type of the message you wish to
update, replace <old_msg> with the current internal name of the
message, replace <new_msg> with the new internal name of the message.
Wfchmsga.sql
Use wfchmsga.sql to change the internal name of a message attribute.
This script does not update the message subject/body references to the
message attribute. You must manually update the message attribute
references. See: Change the internal name of a workflow object: page
16 – 2.
Use the script as follows:
sqlplus <user/pwd> @wfchmsga <msg_type> <msg_name> <old_attr>
<new_attr>
Replace <msg_type> with the item type of the message attribute you
wish to update, replace <msg_name> with the internal name of the
message that the message attribute belongs to, replace <old_attr> with
the current internal name of the message attribute, and replace
<new_attr> with the new internal name of the message attribute.
Wfevtenq.sql
Use wfevtenq.sql to enqueue an event message on a local queue using
an override agent. This script constructs an event message using the
event name, event key, event data, From Agent, and To Agent you
specify. Then the event message is enqueued on the queue associated
with the override agent you specify, which can be different than the
From Agent listed inside the event message. If no override agent is
Wfjvstop.sql
Use wfjvstop.sql to stop the Java Function Activity Agent by placing a
stop message on the ’Outbound’ queue.
Use the script as follows:
sqlplus <user/pwd> @wfjvstop
Wfnlena.sql
If you define a new language in your Oracle installation, use
wfnlena.sql to enable or disable that language in Oracle Workflow. See:
WFNLADD.sql: page 16 – 5.
Use the script as follows:
sqlplus <user/pwd> @wfnlena <language_code> <enable_flag>
Wfntfsh.sql
Use wfntfsh.sql to display status information about a particular
notification, given its notification ID.
Use the script as follows:
sqlplus <user/pwd> @wfntfsh <notification_id>
Wfprot.sql
Use wfprot.sql to reset the protection level of all objects associated with
a specified item type.
Replace <Item_type> with the item type that you want to reset the
protection level for, and replace <protection_level> with the new
protection level.
Wfqclean.sql
Use wfqclean.sql to clean up Workflow queues in the system tables.
Wfrefchk.sql
Use wfrefchk.sql to check for invalid workflow data that is missing
primary key data for a foreign key.
sqlplus <user/pwd> @wferfchk
Wfretry.sql
Use wfretry.sql to display a list of activities that have encountered an
error for a given process instance and then specify whether to skip,
retry, or reset any one of those errored activities.
Wfrmall.sql
Use wfrmall.sql to delete all data in all Oracle Workflow runtime and
design time tables.
Use the script as follows:
sqlplus <user/pwd> @wfrmall
Wfrmita.sql
Use wfrmita.sql to delete all workflow data for a specified item type
attribute. This script prompts you for the item type and the name of
the attribute to delete. Alternatively, you can use Oracle Workflow
Builder to delete an item type attribute from a workflow definition
stored in a file or a database.
Use the script as follows:
sqlplus <user/pwd> @wfrmita
Wfrmitt.sql
Use wfrmitt.sql to delete all data in all Oracle Workflow design time
and runtime tables for a particular item type. This script prompts you
for an item type from a list of valid item types.
Use the script as follows:
sqlplus <user/pwd> @wfrmitt
Wfrmtype.sql
Use wfrmtype.sql to delete runtime data associated with a given item
type. This script prompts you for an item type to purge, from a list of
valid item type, then asks you to choose between deleting all data
associated with a specified item type or deleting only data for the
completed activities and items of the specified item type.
Use the script as follows:
sqlplus <user/pwd> @wfrmtype
Wfrun.sql
Use wfrun.sql to create and start a specified process.
Use the script as follows:
Wfstat.sql
Use wfstat.sql to display a developer status report for an indicated
item. The output is 132 characters per line.
Use the script as follows:
sqlplus <user/pwd> @wfstat <item_type> <item_key>
Wfstatus.sql
Use wfstatus.sql to display an end user status report for an indicated
item. The output is 132 characters per line.
Use the script as follows:
sqlplus <user/pwd> @wfstatus <item_type> <item_key>
Wfstdchk.sql
Use wfstdchk.sql to check and report any problems found in the Oracle
Workflow data model. For example, this script will report any function
activities that reference invalid functions and scan the tables of each
workflow process definition object to verify that each row has a valid
internal name and display name.
Use the script as follows:
sqlplus <user/pwd> @wfstdchk
Wfver.sql
Use wfver.sql to display the version of the Oracle Workflow server, the
status and version of the Oracle Workflow PL/SQL packages, and the
version of the Oracle Workflow views installed.
Use the script as follows:
sqlplus <user/pwd> @wfver
Wfverupd.sql
Use wfverupd.sql to correct problems arising in your workflow process
that are due to multiple versions of an activity being active
simultaneously. This script identifies and corrects errors in versions of
activities that cause multiple versions to appear to be active at once.
Use the script as follows:
sqlplus <user/pwd> @wfverupd
A Oracle Workflow
Builder Menus and
Toolbars
File Menu
The File menu lets you perform several actions.
New—Creates a new workspace for you to define an item type.
Quick Start Wizard—Creates a framework from which you can
begin designing a workflow process definition. See: Quick Start
Wizard Overview: page 3 – 18.
Open...—Opens a data store by prompting you to connect to a
database or a file. See: Opening and Saving Item Types: page
3 – 12.
Close Store—Closes the selected data store. This menu option is
available only if the Navigator is the active window.
Save—Saves changes to the currently connected database or file.
See: Opening and Saving Item Types: page 3 – 12.
Save As—Save changes to the file or database you specify with an
optional effective date.
Create Shortcut—Creates a shortcut icon on your desktop of the
current Oracle Workflow Builder session. Prompts for a shortcut
name. The shortcut runs Oracle Workflow Builder and
automatically connects to the data store that was selected at the
time you created the shortcut, loading in the item types and
opening the process windows that were loaded and open at the
time. If the data store is a database, the shortcut prompts for the
database password before starting Oracle Workflow Builder. This
feature is available only when you run Oracle Workflow Builder in
Microsoft Windows 95 or Windows NT 4.0 or higher. Earlier
versions of Microsoft Windows NT do not support the concept of
shortcuts. See: Creating a Shortcut Icon for a Workflow Process:
page 5 – 22.
Verify—Validates all process definitions in the current data store.
Use Refresh to display the latest verification report of the process.
See: To Validate a Process: page 5 – 21
Edit Menu
The Edit menu varies depending on whether you select the Navigator
window or a process window. The following menu options appear
only when you select the Navigator window and apply only to the
Navigator window:
New—Creates a new item type, function activity, process activity,
notification activity, event activity, message, lookup type, lookup
code, or attribute by displaying its property page(s).
Copy—Copies the selected object in the navigator tree.
Paste—Pastes the object from the clipboard into the selected branch
of the navigator tree.
Delete—Deletes the selected object from the navigator tree.
Find—Displays the Search window so you can enter search criteria
to find an object in the navigator tree. See: To Find an Object in the
Navigator Tree: page 3 – 6.
Find Again—Finds an object in the navigator tree using the same
criteria defined previously in the Search window.
Properties—Shows the property pages of the selected object.
Process Details—Opens the process window of the selected
process activity.
Move Attribute—Reorders the attributes listed in the current
branch of the navigator tree by moving the selected attribute up or
down the list.
The following menu options appear only when you select a process
window and apply only to the selected process window:
View Menu
The View menu lets you alter the display of Oracle Workflow Builder.
Font—Displays the Fonts property page. Use the property page to
change the font settings of the text that appear in the Navigator
and process windows. Changes apply to all future sessions of
Oracle Workflow Builder. See: Modifying Fonts in Oracle
Workflow Builder: 5 – 21.
Log –> Show—Toggles between displaying and hiding the Log
window. The Message Log window displays messages from the
Workflow Builder that are not error–related.
Log –> Detailed—Toggles the debug mode of Oracle Workflow
Builder on and off. When you check Detailed, you turn the debug
mode on and cause Oracle Workflow Builder to write more
extensive messages to the Log window. You should not check
Detailed unless instructed to do so by your Oracle customer
support representative, as this mode significantly slows down the
Oracle Workflow Builder.
Log –>To File—Writes all future content of the Message Log
window to a file. Select Log Show from the View menu to
determine the location and name of the log file.
Log –> Bring to Front—Brings the Message Log window to the
front as the active window.
Grid Snap—Toggles grid snap on or off for all process windows.
Show Label in Designer submenu—A submenu of options that let
you control the information displayed in an activity’s label.
Choose either Instance Label, Internal Name, Display Name,
Performer, or Comment.
Show Label in Designer –> Instance Label—Uses the node label
as the label for each activity node in a process diagram. This
setting persists for all process diagrams and for all sessions of
Oracle Workflow Builder until you specifically make a change.
Show Label in Designer –> Internal Name—Uses the internal
name of an activity as the label for each activity node in a process
Help Menu
The Help menu lets you invoke help about using Oracle Workflow.
Contents—Displays help on how to use Oracle Workflow.
About Oracle Workflow...—Displays the current version and
access level of Oracle Workflow Builder. You can also edit your
access level in the Access Level field and apply your change by
choosing OK.
Navigator Toolbar
The Navigator toolbar includes the following buttons which apply only
to objects selected from the navigator tree:
B Oracle Applications
Embedded Workflows
See Also
Oracle Engineering
Engineering Change Orders Process—Submits an engineering change
order to the appropriate people for approval.
Oracle Payables
AP Open Interface Import Process—Automates verification and
validation of data in the Open Interface tables. For example, this
process can be modified to validate all accounting code combinations
in the Open Interface tables. Notification of any invalid code
combinations can be sent to a specified user for correction. Optionally
the process can be set up to override any invalid code combinations
with a designated default value. You can use Oracle Workflow to
include additional workflow rules that meet the specific requirements
of a business. Once an invoice has passed this process it is ready to be
imported into the Oracle Payables application tables. To initiate the
Open Interface Import process, submit Payables Open Interface
Workflow from the Submit Requests window.
For more information about related workflows in Oracle Internet
Expenses, including expense reports and procurement cards, see Oracle
Internet Expenses: page B – 3.
Oracle Projects
Project Approval and Status Change Process—Routes a project and
notifies appropriate users of any project status change. For example,
you can submit the project for approval, or notify appropriate people
upon project closure. You select which workflow to use for the
appropriate status change, as well as determining the person(s) to route
the project to.
Budget Approval Process—Routes a project budget for approval and
baseline. You select which workflow to use for the budget type, as well
as determining the person(s) to route the budget to.
Step Down Allocations Process—Automates the execution of
step–down auto allocation sets to create allocation runs, generate the
allocation transactions, release the allocation transactions (or require
approval before the process proceeds), distribute costs, and update
project summary amounts.
Oracle Purchasing
Procurement Workflow—The Procurement Workflow is a lights–out,
hands–off transaction processing system that is truly flexible and
extensible to all members of your supply chain. It is one of the key
enablers in the shift towards more strategic sourcing and procurement
activities. It consists of the Document Approval, Automatic Document
Creation, Change Orders, Account Generation, Send Notifications,
Oracle Receivables
Credit Memo Request Approval Process – Routes a credit memo
request for approval using an organization’s internal management
hierarchy or approval limits defined in Oracle Receivables. If the
request is approved, a credit memo is automatically created in Oracle
Receivables. Otherwise, the process notifies the requestor with an
explanation of why it was not approved.
You initiate the Credit Memo Request workflow from iReceivables.
iReceivables is a web–based, self–service application that enables
registered users to access their Receivables account information using a
standard web browser. When an iReceivables user chooses the Dispute
a Bill function, Receivables places the specified amount in dispute and
initiates the Credit Memo Request process to route the request for
approval.
See Also
Oracle Payables
E–mail Remittance Advice Program – When you confirm a payment
batch or create a Quick payment, the Business Event System initiates
this program which automatically sends an e–mail to each supplier that
has a remittance advice e–mail address defined.
Customization Guidelines
1. Verify that all setup steps have been completed as documented in
the Oracle Workflow Guide, and the product–specific User’s
Guides.
2. Test the unmodified seeded workflow, event, or subscription on a
test database and ensure that it runs successfully with the setup
and data specific to your environment.
3. Refer to the product–specific User’s Guide and any documentation
update, available on MetaLink, for the specific workflow, event, or
subscription of interest. These documentation sources specifically
mention what should NOT be modified. Oracle Support Services
will not support modifications to any object that is specifically
documented as not modifiable.
4. Gradually build in customizations step–by–step, and test the
customized workflow or subscription after each step.
5. When creating PL/SQL procedures, conform to the standard
PL/SQL API templates documented in the Oracle Workflow Guide.
Be sure to handle exceptions in the event of an error so you can
track down the procedure where the error has occurred.
6. Do not implement the customized workflow, event, or subscription
in production without fully ensuring that it works successfully on a
test database, which is a replica of your production setup.
What Is Supported
The following types of customizations are supported:
1. Any customization that is stated as Required in the seeded
workflow’s, event’s, or subscription’s product–specific User’s
Guide or documentation update notes.
2. Customization examples documented in the product–specific
User’s Guide or documentation update notes. Any issues that
Glossary – 1
Event Key A string that uniquely identifies an Item A specific process, document, or
instance of an event. Together, the event transaction that is managed by a workflow
name, event key, and event data fully process. For example, the item managed by
communicate what occurred in the event. the Requisition Approval Process workflow
is a specific requisition created by Oracle
Event Message A standard Workflow
Internet Commerce’s Web Requisitions
structure for communicating business
page.
events, defined by the datatype
WF_EVENT_T. The event message contains Item Attribute See Item Type Attribute.
the event data as well as several header
Item Type A grouping of all items of a
properties, including the event name, event
particular category that share the same set
key, addressing attributes, and error
of item attributes. For example, PO
information.
Requisition is an item type used to group
Event Subscription A registration indicating all requisitions created by Oracle Internet
that a particular event is significant to a Commerce’s Web Requisitions page. Item
system and specifying the processing to type is also used as a high level grouping
perform when the triggering event occurs. for processes.
Subscription processing can include calling
Item Type Attribute A feature associated with
custom code, sending the event message to
a particular item type, also known as an
a workflow process, or sending the event
item attribute. An item type attribute is
message to an agent.
defined as a variable whose value can be
External Functions Programs that are looked up and set by the application that
executed outside of the Oracle database maintains the item. An item type attribute
server. and its value is available to all activities in a
process.
External Java Functions Java programs that
are executed outside of the Oracle database Lookup Code An internal name of a value
server by the Java Function Activity Agent. defined in a lookup type.
Function A PL/SQL stored procedure that Lookup Type A predefined list of values.
can define business rules, perform Each value in a lookup type has an internal
automated tasks within an application, or and a display name.
retrieve application information. The
Message The information that is sent by a
stored procedure accepts standard
notification activity. A message must be
arguments and returns a completion result.
defined before it can be associated with a
Function Activity An automated unit of work notification activity. A message contains a
that is defined by a PL/SQL stored subject, a priority, a body, and possibly one
procedure. or more message attributes.
Glossary – 3
Workflow Engine The Oracle Workflow
component that implements a workflow
process definition. 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.
Index – 1
Standard, 4–42, 6–2 AddItemAttrTextArray( ), 8–45
statuses, 8–3 AddParameterToList, 8–247
System: Error, 4–42 AddParameterToList( ), 8–268
timing out, 5–10 AddParameterToListPos( ), 8–269
version number, 4–59
Address, 8–247
Activities( ), 8–113
AddUsersToAdHocRole( ), 8–136
Activity attributes
AdHocDirectory( ), 8–117
See also Function activity attributes
Administrator privileges, 2–15
setting values for, 5–12
Advanced Queues integration, 8–156
Activity nodes
in the Buyer: Advanced Shipment Notice Advanced Queuing, 13–2
process, 15–84 Agent, datatype, 8–231
in the Buyer: Receive Supplier Invoicing Agent Created event, 14–4
process, 15–86 Agent Deleted event, 14–5
in the Buyer: Receive Supplier PO Agent Updated event, 14–4
Acknowledgement process, 15–81
Agents, 13–22
in the Buyer: Send PO to Supplier process, defining, 13–28
15–78
deleting, 13–32
in the Buyer: Top Level PO process, 15–75
direction, 13–22
in the Detail Ping process, 13–78
finding, 13–31
in the Master Ping process, 13–76
pinging, 13–73
in the Notify Approver subprocess, 15–21
protocol, 13–23
in the Requisition process, 15–15
queue handlers, 13–25
in the Supplier: Advanced Shipment Notice
queues, 13–24
process, 15–99
scheduling listeners, 13–54
in the Supplier: Credit Check process, 15–95
scheduling propagations, 13–58
in the Supplier: Get Order Details process,
updating, 13–32
15–92
in the Supplier: Send Supplier Invoice Agents web page, 13–28, 13–32
process, 15–101 ALLOW_FORWARDED_RESPONSE
in the Supplier: Stock Check process, 15–97 parameter, 2–54
in the Supplier: Top Level Order process, And activity, 6–2
15–88 Any event, 14–10
in the Workflow Event Protocol process, Any transitions, 5–2
14–20 APIs, 8–3
Ad hoc users and roles, 5–24 AQ message payload, 8–157
APIs, 8–120
Arrows, 5–2
AddAttr( ), 8–210
Assign activity, 6–14
AddCorrelation( ), 8–287
AssignActivity( ), 8–73
AddItemAttr( ), 8–42
Attachments, DM documents, 10–33
addItemAttrDate( ), 8–42
Attribute, token substitution, 4–41
AddItemAttrDateArray( ), 8–45 Attribute types
addItemAttrNumber( ), 8–42 attribute, 4–11
AddItemAttrNumberArray( ), 8–45 date, 4–10, 4–35
addItemAttrText( ), 8–42 document, 4–11, 4–14, 4–36
Index – 3
FNDWFPR, 16–4 Default Error Process, 6–28
Concurrent programs Default Event Error Process, 6–34
Notification Mailer, 2–41, 2–49 Default transitions, 5–2
Purge Obsolete Workflow Runtime Data, DEFAULT_ERROR, 6–28
8–118 DEFAULT_EVENT_ERROR, 6–34
Workflow Agent Listener, 8–265
Default_Rule( ), 8–274
Workflow Background Process, 2–38
Workflow Definitions Loader, 2–102 Defer Thread activity, 6–6
Workflow Resource Generator, 8–104 Deferred activities, 2–36, 4–46
CONNECT parameter, 2–52 Deferred processing
Constants, WFAttribute class, 8–89 for event subscriptions, 13–39
for workflow processes, 2–36, 8–8
Content, 8–246
DeferredQueue function, 8–171
Content–attached checkbox, 4–37
Delete
CONTEXT( ), 8–107
all workflow data, 16–14
Continue Flow activity, 6–12 data for an item type, 16–15
Coordinating master/detail activities, 6–11 item type attributes, 16–14
Cost threshold, 4–47 runtime data for an item type, 16–15
CreateAdHocRole( ), 8–134 workflow status information, 16–15
CreateAdHocUser( ), 8–132 Demonstration, directory service, 15–7
CreateForkProcess( ), 8–37 Dequeue, queue handler, 7–24
CreateMsg( ), 8–175 DequeueEventDetail( ), 8–164
CreateProcess( ), 8–20 DequeueException( ), 8–170
Custom logos, in web pages, 2–77 DequeueOutbound( ), 8–161
Customization Level, 2–98 Detail Notification web page, 10–19
for activities, 4–8, 4–11, 4–21, 4–32, 4–49, Detail Ping process, summary, 13–77
4–52, 4–55, 4–58, 4–62 Detail process, 6–12
Detail Survey process
activities, 15–47
D summary, 15–46
Data types, wf_payload_t, 8–157 Diagram arrows, 5–2
Database links Direct Response e–mail, 10–3
checking, 13–53 DIRECT_RESPONSE parameter, 2–53
creating, 2–89 Directory repository, 2–20
Datatypes Directory Service
example, 8–249 in Navigator tree, 3–4
for the Business Event System, 8–230 view from Builder, 5–26
WF_AGENT_T, 8–231 Directory services, 2–20
WF_EVENT_T, 8–236 checking the data model, 2–25, 16–10
WF_PARAMETER_LIST_T, 8–235 integrating with local workflow users, 2–27
WF_PARAMETER_T, 8–233 integrating with native Oracle users, 2–26
Date–type attributes, 4–3 integrating with Oracle HR, 2–26
DBA Studio, 2–89 Directory Services APIs, 8–120
DEBUG parameter, 2–55 DISCARD parameter, 2–56
Index – 5
Event Manager, 13–3 F
Event messages
datatype, 8–236 FAILCOMMAND parameter, 2–55
enqueuing, 16–10 File menu, A – 2
Event nodes, 5–12 Find Agent web page, 13–31
Event Rule APIs, 8–272 Find Event web page, 13–14, 13–48
Event subscriptions, 13–33 Find Notifications web page, 10–15
rule functions, 7–25 Find System web page, 13–19
Event Subscriptions web page, 13–50 FND_FNDWFIAS, 11–8
Event System Demonstration FND_FNDWFNOT, 10–14
data model, 15–64 FNDWFLST, 8–265
initiating, 15–66 concurrent program, 16–4
overview, 15–63 FNDWFPR, 8–118
setting up, 15–66 concurrent program, 16–4
Event System Demonstration process, Fonts
installing, 15–64 modifying, 5–21
Event System Local Queues web page, 13–69 setting, 5–21
Event Updated event, 14–2 Forced synchronous processes, 8–14
Event( ), 8–74 Form–type attributes, 4–3
Event–type attributes, 4–4 FORWARD mode, 8–12
Events, 13–4 Forward( ), 8–188, 8–199
defining, 13–5 Frame target, URL attributes, 4–37
deleting, 13–15 FROM parameter, 2–53
finding, 13–14 FUNCMODE, 7–5, 7–6
predefined, 14–2 Function activities, 4–44
raising, 13–4, 13–62 create, 4–50
sending to agents, 13–38 standard Java API, 7–8
sending to workflow processes, 13–37 standard PL/SQL API, 7–3
updating, 13–15 Function activity attributes, 4–8, 4–52
Events web page, 13–5, 13–8, 13–15, 13–44 Functions, 3–10
Events: Buyer Workbench, web page, 15–67 See also PL/SQL procedures
Events: Track Order, web page, 15–69 Future–dated events, 13–40
Example function activity
Select Approver, 15–26
Verify Authority, 15–29 G
Example process
Generate function, 13–5
Event System Demonstration, 15–63
Generate( )
Requisition, 15–5
WF_AGENTS_PKG, 8–305
Execute Concurrent Program activity, 6–22 WF_EVENT_FUNCTIONS_PKG, 8–289
execute( ), 8–88 WF_EVENT_GROUPS_PKG, 8–299
External document integration, 4–6 WF_EVENT_SUBSCRIPTIONS_PKG, 8–308
External Java function activities, 2–79, 8–5, WF_EVENTS_PKG, 8–296
8–81 WF_SYSTEMS_PKG, 8–302
Index – 7
H Event System Demonstration, 15–71
loading, 3–12, 3–13
HandleError( ), 8–76 persistence type, 4–4
Hardware requirements, 2–2 Requisition, 15–12
Help menu, A – 6 saving, 3–12
Hidden item types, 3–4 selector functions, 4–5, 7–13
Standard, 6–2
Home page, 9–2
System: Error, 6–26
HTML_MAIL_TEMPLATE parameter, 2–59 System: Mailer, 2–62
HTMLAGENT parameter, 2–56 Workflow Agent Ping/Acknowledge, 13–74
Workflow Send Protocol, 14–17
ITEMKEY, 7–4, 7–14
I Items( ), 8–112
Icons, 2–78 ItemStatus( ), 8–79
viewing, 4–49, 4–52, 4–54, 4–57 ITEMTYPE, 7–4, 7–14
IDLE parameter, 2–55
InboundQueue function, 8–172
Init.ora parameters, 13–52
J
Initialize, 8–239 Java API, for function activities, 7–8
Initiating a workflow process, 15–8, 15–36, Java APIs, 8–4
15–66 Java Function Activity Agent, 2–79
Internal names starting, 2–79
updating activity, 16–7 stopping, 2–88, 16–11
updating activity attributes, 16–7 Java interface, 8–4
updating item attributes, 16–7 Java monitor tool, 11–2
updating item types, 16–8 Java Runtime Environment, 2–4
updating lookup codes, 16–8 JavaScript, support in a Web browser, 2–4
updating lookup types, 16–8 Joining activities, 5–4
updating message attributes, 16–9
updating messages, 16–9
IsPerformer( ), 8–125 L
Item attributes, external document integration,
4–6 Launch Process activity, 6–6
Item type attributes, 4–2, 4–8, 8–12 LaunchProcess( ), 8–29
arrays, 8–12 List of values, in a web interface, 10–24, 13–22
Event System Demonstration, 15–71 Listen( ), 8–264
Requisition, 15–12 Listeners
Workflow Send Protocol, 14–17 deleting, 13–58
Item types, 3–9, 4–2 for inbound agents, 13–54
callback function, 4–5 running, 16–5
Concurrent Manager Functions, 6–22 scheduling, 13–55
context reset, 7–13 updating, 13–58
copy, 4–16 Load balancing, 6–9
creation, 4–7 loadActivityAttributes( ), 8–83
Index – 9
Notification activities, 4–43 reassign in Notification Web page, 10–23
coupling with custom functions, 4–48, 8–12 reassign via e–mail, 10–12
create, 4–48 responding with Notification Web page,
Notify Requisition Approval Required, 10–23
15–31 setting the From Role, 4–25
Notification APIs, 8–186, 8–191 timed out, 8–189
Notification functions, 4–48, 8–12 transferring, 8–189
via e–mail, 2–41, 10–2
Notification history, 4–26
via Notification Web page, 10–13
Notification ID token, 4–12, 4–13, 4–15, 4–32 viewing attached documents, 10–33
Notification IDs, 10–3 Notifications Worklist. See Worklist web page
Notification Mailer Notifications( ), 8–114
about, 2–41 Notify activity, 6–9
configuration file, 2–51
Notify Approver, example notification
MIME support, 2–42
activities, 15–31
notification preference, 2–42
Notify Approver subprocess, summary, 15–19
required folders, 2–56
response processing, 2–60 Notify Requisition Approval Required, 15–31
script to restart, 2–60 Number–type attributes, 4–3
shutdown, 2–41
starting, 2–49
starting for MAPI–compliant applications, O
2–50
OMBAQ_TEXT_MSG, 8–251
starting for UNIX Sendmail, 2–49
On Revisit, 8–10
Notification method, 10–2
OpenNotificationsExist( ), 8–208
Notification preference, 9–7
Or activity, 6–2
Notification preferences, 2–18, 2–42
Oracle Advanced Queues integration, 8–156
Notification summaries, via e–mail, 10–25
Oracle Advanced Queuing, 13–2
Notification System, 2–41, 8–186
Oracle Applications Manager, 1–5
Notification templates, for e–mail notifications, Oracle DBA Studio, 2–89
2–62
Oracle HTTP Server
Notification Web page, 1–5
identifying the Workflow web agent, 2–16
reassigning notifications, 10–23
Workflow server requirements, 2–4
Notifications, 10–2 Oracle Message Broker, 2–93
attaching a document, 10–36
Oracle Net Services, 2–2
dependence on directory services, 10–2
forwarding, 8–188 Oracle Workflow, implementation issues, 2–5
hiding the Reassign button, 4–25 Oracle Workflow Builder, 1–3
HTML–formatted e–mail, 10–9 Loader functionality, 3–15
identifying the responder, 8–205 overview, 3–2
load balancing, 6–9 requirements, 2–2
plain text e–mail using direct response, 10–6 save modes, 3–15, 4–17
plain text e–mail using templated response, starting from command line, 3–17
10–5 Oracle Workflow home page, 9–2
plain text e–mail with attachments, 10–11 Oracle Workflow Manager, 1–5
Index – 11
Q RESET_FAILED parameter, 2–58
RESET_NLS parameter, 2–58
Queue handlers, 7–23, 13–25 Respond attributes, 2–63, 2–65, 2–68, 2–72
WF_EVENT_OMB_QH, 2–93 RESPOND mode, 8–12
Queue tables, 2–90 Respond to notification
Queues HTML–formatted e–mail, 10–9
assigned to agents, 13–24 plain text e–mail using direct response, 10–6
checking, 13–54 plain text e–mail using templated response,
reviewing, 13–69 10–5
setting up, 2–90 plain text e–mail with attachments, 10–11
via Notification Web page, 10–13
Respond( ), 8–188, 8–205
R Responder, 8–205
Responder( ), 8–206
Raise Event web page, 13–62 Response methods, direct vs. templated, 2–53
RAISE( ), 8–104 Response processing, by Notification Mailer,
Raise( ), 8–255 2–60
Raising events, 13–4, 13–62 Responses, processing, 8–188
Reassign notifications RESULT, 7–5, 7–15
hiding the Reassign button, 4–25 Result type
in Notification Web page, 10–23 for activities, 4–48, 4–52, 4–57
via e–mail, 10–12 for voting activities, 4–61
Reassign web page, 10–23 ResumeProcess( ), 8–33
Receive date, for event messages, 8–264 Retry Error, 6–32
Receive( ) RETRY_ONLY, 6–32
WF_AGENTS_PKG, 8–306 Role
WF_EVENT_FUNCTIONS_PKG, 8–291 administrator, 2–15
WF_EVENT_GROUPS_PKG, 8–300 property page, 5–26
WF_EVENT_SUBSCRIPTIONS_PKG, 8–309 Role Resolution activity, 6–9
WF_EVENTS_PKG, 8–297 Role–type attributes, 4–4
WF_SYSTEMS_PKG, 8–303 Roles, 5–24
RemoveUsersFromAdHocRole, 8–141 ad hoc, 5–24
Replication APIs, Business Event System, loading into the Workflow Builder, 5–25
8–293 tab page, 5–24
view from Builder, 5–26
REPLYTO parameter, 2–56
Rollback, of process, 8–76
Requirements, hardware and software, 2–2
Routing, automatic, 10–26
Requisition, data model, 15–6
Routing rules
Requisition Demonstration, web page, 15–8 deleting, 10–32
Requisition process, 15–5 for a role, 10–27
example function activities, 15–26 listing, 10–27
initiating, 15–8 overriding, 10–31
installing, 15–6 updating, 10–32
summary, 15–13 Rule functions, 7–25
Reset process. See Rollback for event subscriptions, 13–36
Index – 13
end user, 16–16 System Signup web page, 13–65
Stuck processes, 2–36 System Updated event, 14–4
Submit Concurrent Program activity, 6–23 System: Error item type, 6–26
Subprocesses, timing out, 5–10 System: Mailer item type, 2–62
Subscription Created event, 14–5 Systems, 13–17
Subscription Deleted event, 14–5 defining, 13–18
deleting, 13–21
Subscription Updated event, 14–5
finding, 13–19
SubscriptionParameters( ), 8–286 local, 13–17
Subscriptions, 13–33 master/copy, 13–68
deferring, 13–39 signing up, 13–64, 13–65
defining, 13–44 synchronizing, 13–67
deleting, 13–50 updating, 13–21
finding, 13–48 Systems web page, 13–18, 13–21
predefined, 14–2
updating, 13–50
Success( ), 8–279 T
SUMMARYONLY parameter, 2–53 Tag files, 2–56
Supplier: Advanced Shipment Notice process, TAGFILE parameter, 2–56
summary, 15–98
TCP/IP drivers, 2–2
Supplier: Credit Check process, summary,
Templated Response e–mail, 10–3
15–94
Test harness, 12–2
Supplier: Get Order Details process, summary,
15–91 Test( ), 8–262
Supplier: Send Supplier Invoice process, TEST_ADDRESS parameter, 2–55
summary, 15–100 TestContext( ), 8–223
Supplier: Stock Check process, summary, 15–96 Text–type attributes, 4–3
Supplier: Top Level Order process, summary, Timed out processes, 2–36
15–87 Timeout transitions, 5–2, 5–3
Survey–Master/Detail process Timeouts, 5–10
activities, 15–44 dynamic, 5–10
summary, 15–42 Token substitution
Survey–Single Process, activities, 15–41 attributes, 4–41
of document–type message attributes, 4–14
Survey–Single process, summary, 15–39
TOKEN( ), 8–103
SuspendProcess( ), 8–31
Toolbars, Oracle Workflow Builder, A – 7
Synchronize Event Systems event, 14–5
toString( ), 8–98
Synchronous processing, 8–14
Total( ), 8–115
System Created event, 14–4
TotalPERM( ), 8–116
System Deleted event, 14–4 TRANSFER mode, 8–12
System identifier, 13–65 Transfer( ), 8–189, 8–201
System Identifier web page, 13–65 Transitions, 5–2
System integration, 13–2 Any, 5–2
System Signup event, 14–9 creating, 5–18
Index – 15
WF_ERROR queue, 2–90 WF_REQDEMO.StartProcess, 15–8
WF_ERROR_QH, 13–25 WF_REQDEMO.VerifyAuthority, 15–18, 15–29
WF_EVENT_FUNCTIONS_PKG.Generate( ), WF_RESOURCES, environment variable, 2–32
8–289 WF_ROLES, view, 2–23
WF_EVENT_FUNCTIONS_PKG.Receive( ), WF_RUNNABLE_PROCESSES_V, 8–154
8–291 WF_SYSTEMS Document Type Definition,
WF_EVENT_GROUPS Document Type 8–301
Definition, 8–298 WF_SYSTEMS_PKG.Generate, 8–302
WF_EVENT_GROUPS_PKG.Generate, 8–299 WF_SYSTEMS_PKG.Receive, 8–303
WF_EVENT_GROUPS_PKG.Receive, 8–300 WF_USER_ROLES, view, 2–24
WF_EVENT_OMB_QH, 13–25 WF_USERS, view, 2–20
attribute mapping, 8–251 Wfagtlst.sql, 16–5
setting up, 2–93 WFAttribute class, 8–89
WF_EVENT_QH, 13–25 WFAttribute( ), 8–91
WF_EVENT_SUBSCRIPTIONS Document Wfbkg.sql, 16–6
Type Definition, 8–307 Wfbkgchk.sql, 16–6
WF_EVENT_SUBSCRIPTIONS_PKG.Generate, Wfchact.sql, 16–7
8–308 Wfchacta.sql, 16–7
WF_EVENT_SUBSCRIPTIONS_PKG.Receive, Wfchita.sql, 16–7
8–309
Wfchitt.sql, 16–8
WF_EVENT_T, 8–236
Wfchluc.sql, 16–8
mapping attributes to OMBAQ_TEXT_MSG,
8–251 Wfchlut.sql, 16–8
Wfchmsg.sql, 16–9
WF_EVENTS Document Type Definition,
8–295 Wfchmsga.sql, 16–9
WF_EVENTS_PKG.Generate, 8–296 Wfdirchk.sql, 16–10
WF_EVENTS_PKG.Receive, 8–297 wfdircsv.sql, 2–27
WF_IN agent, 13–25 wfdirhrv.sql, 2–26
wfdirouv.sql, 2–26
WF_IN queue, 2–90
wfevquec.sql, 2–92
WF_ITEM_ACTIVITY_STATUSES_V, 8–151
wfevqued.sql, 2–92
WF_ITEMS_V, 8–155
Wfevtenq.sql, 16–10
WF_LANGUAGES view, 2–28
WFFunctionAPI class, 8–81
WF_LOCAL_* tables, 2–20
wfjvlsnr.bat, 2–80
WF_NOTIFICATION() message function, 4–26 wfjvlsnr.csh, 2–80
WF_NOTIFICATION_ATTR_RESP_V, 8–153 Wfjvstop.sql, 16–11
WF_OUT agent, 13–25 WFLOAD, 2–102
WF_OUT queue, 2–90 wfload, 2–101
WF_PARAMETER_LIST_T, 8–235 wfmail.cfg, 2–51
WF_PARAMETER_T, 8–233 Wfmqupd.sql, 16–12
wf_payload_t, 8–157 WFNLADD.sql, 16–5
WF_PURGE, 8–110 WFNLENA.sql, 16–12
WF_REQDEMO.SelectApprover, 15–26 Wfntfsh.sql, 16–12
Index – 17
Workflow processes Workflow Views, 8–151
creating and starting, 16–15 Workflow Warning Mail message template,
monitoring, 11–2 2–75
samples, 15–2 Workflow web pages, modifying template,
Workflow Purge APIs, 8–110 2–77
Workflow Queue APIs, 8–156 Workflow XML Loader, 2–105
Workflow queues, cleaning, 16–13 Workflow_Protocol( ), 8–280
Workflow Resource Generator, 8–104 Workitems. See Items
concurrent program, 8–105 Worklist web page, 10–17
Workflow roles, 2–20 WriteMsg( ), 8–176
Workflow Send Protocol WriteToClob( ), 8–228
item type, 14–17
sample workflow process, 14–16
Workflow Send Protocol Acknowledgement
event, 14–25
X
Workflow Send Protocol event, 14–23 XML Compare Tag Value (Date) activity, 6–19
Workflow Server, requirements, 2–3 XML Compare Tag Value (Number) activity,
Workflow Summary Mail message template, 6–19
2–75 XML Compare Tag Value (Text) activity, 6–19
Workflow URL Attachment message template, XML Compare Tag Value activities, 6–19
2–70 XML Get Tag Value activity, 6–18
Workflow users, 2–20 XML Transform activity, 6–20
Oracle Corporation welcomes your comments and suggestions on the quality and usefulness
of this publication. Your input is an important part of the information we use for revision.
• Did you find any errors?
• Is the information clearly presented?
• Do you need more information? If so, where?
• Are the examples correct? Do you need more examples?
• What features did you like most about this manual? What did you like least about it?
If you find any errors or have any other suggestions for improvement, please indicate the topic, chapter,
and page number below: