Oracler Workflow Guide

RELEASE 2.6.2 VOLUME 1

March 2002

Oracle Workflow Guide Volume 1, Release 2.6.2 The part number for this volume is A95276–03 . To reorder this book, please use the set part number, A95265–03 . Copyright E 1996, 2002 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: RESTRICTED RIGHTS NOTICE Programs delivered subject to the DOD FAR Supplement are ”commercial computer software” and use, duplication and disclosure of the Programs including documentation, shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. Otherwise, Programs delivered subject to the Federal Acquisition Regulations are ”restricted computer software” and use, duplication and disclosure of the Programs shall be subject to the restrictions in FAR 52.227–19, Commercial Computer Software – Restricted Rights (June, 1987). Oracle Corporation, 500 Oracle Parkway, Redwood City, CA 94065. 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 Express, JInitiator, Oracle8, Oracle8i, Oracle9i, OracleMetaLink, Oracle Press, Oracle Store, 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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Audience for This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How To Use This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Documentation Accessibility . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Online Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Related User’s Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Guides Related to All Products . . . . . . . . . . . . . . . . . . . . . . . . . User Guides Related to This Product . . . . . . . . . . . . . . . . . . . . Installation and System Administration . . . . . . . . . . . . . . . . . Other Implementation Documentation . . . . . . . . . . . . . . . . . . Training and Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Do Not Use Database Tools to Modify Oracle Applications Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Oracle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Your Feedback . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

xix xx xx xxi xxii xxii xxiii xxiii xxiv xxv xxvi xxviii xxix xxix xxx

Chapter 1

Overview of Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . Introduction to Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . Major Features and Definitions . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1–1 1–2 1–3 1–6

Contents

iii

Chapter 2

Setting Up Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Workflow Hardware and Software Requirements . . . . . . Overview of Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Required Setup Steps for the Standalone Version of Oracle Workflow . . . . . . . . . . . . . . . . . Overview of Required Setup Steps for the Version of Oracle Workflow Embedded in Oracle Applications . . . . . . Optional Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Other Workflow Features . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Identifying the Version of Your Oracle Workflow Server . . . Setup Flowchart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setup Checklist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Oracle Workflow Access Protection . . . . . . . . . . . . . Setting Up a Default Access Level . . . . . . . . . . . . . . . . . . . . . . Using the Workflow Definitions Loader . . . . . . . . . . . . . . . . . . . . . Using the Workflow XML Loader . . . . . . . . . . . . . . . . . . . . . . . . . .

2–1 2–2 2–6 2–6 2–7 2–7 2–8 2–9 2 – 10 2 – 11 2 – 12 2 – 101 2 – 105 2 – 107 2 – 112

Chapter 3

Defining a Workflow Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Oracle Workflow Builder . . . . . . . . . . . . . . . . . . . . . . The Navigator Tree Structure . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing the Navigator Tree . . . . . . . . . . . . . . . . . . . . . . . . . . . . Creating Process Definitions in Oracle Workflow Builder . . . . . . Opening and Saving Item Types . . . . . . . . . . . . . . . . . . . . . . . . Quick Start Wizard Overview . . . . . . . . . . . . . . . . . . . . . . . . . . Using Oracle Workflow Builder with Different Server Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Item Type Definition Web Page . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3–1 3–2 3–3 3–4 3–7 3 – 12 3 – 18 3 – 21 3 – 24

Chapter 4

Defining Workflow Process Components . . . . . . . . . . . . . . . . . . Workflow Process Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . Item Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Allowing Access to an Object . . . . . . . . . . . . . . . . . . . . . . . . . . Lookup Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Voting Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deleting Objects in Oracle Workflow Builder . . . . . . . . . . . . . . . . Modifying Objects in Oracle Workflow Builder . . . . . . . . . . . . . . Workflow Objects That Support Versioning . . . . . . . . . . . . . .

4–1 4–2 4–2 4 – 17 4 – 19 4 – 23 4 – 42 4 – 61 4 – 68 4 – 69 4 – 70

iv Oracle Workflow Guide

Workflow Objects That Do Not Support Versioning . . . . . . . 4 – 71

Chapter 5

Defining a Workflow Process Diagram . . . . . . . . . . . . . . . . . . . . Process Window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying Fonts in Oracle Workflow Builder . . . . . . . . . . . . Creating a Shortcut Icon for a Workflow Process . . . . . . . . . . Roles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

5–1 5–2 5 – 21 5 – 22 5 – 24

Chapter 6

Predefined Workflow Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . Standard Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . And/Or Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Comparison Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compare Execution Time Activity . . . . . . . . . . . . . . . . . . . . . . Wait Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Block Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defer Thread Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Launch Process Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Noop Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Loop Counter Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Start Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . End Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Role Resolution Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Notify Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Vote Yes/No Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Master/Detail Coordination Activities . . . . . . . . . . . . . . . . . . Wait for Flow Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Continue Flow Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Assign Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Get Monitor URL Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Get Event Property Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . Set Event Property Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . Compare Event Property Activity . . . . . . . . . . . . . . . . . . . . . . XML Get Tag Value Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . XML Compare Tag Value Activities . . . . . . . . . . . . . . . . . . . . . XML Transform Activity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Concurrent Manager Standard Activities . . . . . . . . . . . . . . . . . . . . Execute Concurrent Program Activity . . . . . . . . . . . . . . . . . . . Submit Concurrent Program Activity . . . . . . . . . . . . . . . . . . . Wait for Concurrent Program Activity . . . . . . . . . . . . . . . . . . . Default Error Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6–1 6–2 6–2 6–3 6–3 6–4 6–5 6–6 6–6 6–7 6–7 6–8 6–8 6–9 6–9 6 – 10 6 – 11 6 – 12 6 – 12 6 – 14 6 – 14 6 – 15 6 – 15 6 – 16 6 – 18 6 – 19 6 – 20 6 – 22 6 – 22 6 – 23 6 – 24 6 – 26

Contents

v

System: Error Item Type and Item Attributes . . . . . . . . . . . . . Default Error Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Retry–only Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Default Event Error Process . . . . . . . . . . . . . . . . . . . . . . . . . . . .

6 – 27 6 – 28 6 – 32 6 – 34

Chapter 7

Defining Procedures and Functions for Oracle Workflow . . . . Defining Procedures and Functions for Oracle Workflow . . . . . . Standard API for PL/SQL Procedures Called by Function Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Standard API for Java Procedures Called by Function Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Standard API for an Item Type Selector or Callback Function . . Standard APIs for ”PL/SQL” and ”PL/SQL CLOB” Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ”PL/SQL” Documents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ”PL/SQL CLOB” Documents . . . . . . . . . . . . . . . . . . . . . . . . . . Standard API for an Event Data Generate Function . . . . . . . . . . . Standard APIs for a Queue Handler . . . . . . . . . . . . . . . . . . . . . . . . Enqueue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Dequeue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Standard API for an Event Subscription Rule Function . . . . . . . .

7–1 7–2 7–3 7–8 7 – 13 7 – 17 7 – 17 7 – 19 7 – 21 7 – 23 7 – 23 7 – 24 7 – 25

Chapter 8

Oracle Workflow APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Workflow Procedures and Functions . . . . . . . . . . . . . . . . . Overview of the Workflow Engine . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Workflow Java Interface . . . . . . . . . . . . . . . . . . . . . . . . Additional Workflow Engine Features . . . . . . . . . . . . . . . . . . Workflow Engine APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetItemUserKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetItemUserKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetActivityLabel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetItemOwner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . StartProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . LaunchProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SuspendProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ResumeProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AbortProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateForkProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . StartForkProcess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8–1 8–2 8–3 8–5 8–8 8 – 19 8 – 21 8 – 23 8 – 24 8 – 25 8 – 26 8 – 28 8 – 30 8 – 32 8 – 34 8 – 36 8 – 38 8 – 40

vi Oracle Workflow Guide

Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddItemAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddItemAttributeArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetItemAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetItemAttrDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetItemAttributeArray . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getItemTypes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetItemAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetItemAttrDocument . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetItemAttrClob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getItemAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetItemAttrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetActivityAttrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetActivityAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetActivityAttrClob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . BeginActivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CompleteActivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CompleteActivityInternalName . . . . . . . . . . . . . . . . . . . . . . . . AssignActivity . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HandleError . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetItemParent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ItemStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getProcessStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Function APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . loadItemAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . loadActivityAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getActivityAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getItemAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setItemAttrValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . execute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Attribute APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WFAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . value . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getFormat . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getValueType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . toString . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . compareTo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Core APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8 – 41 8 – 43 8 – 46 8 – 48 8 – 51 8 – 53 8 – 56 8 – 57 8 – 59 8 – 60 8 – 61 8 – 62 8 – 63 8 – 64 8 – 66 8 – 67 8 – 69 8 – 72 8 – 74 8 – 75 8 – 77 8 – 79 8 – 80 8 – 81 8 – 82 8 – 83 8 – 84 8 – 85 8 – 87 8 – 88 8 – 89 8 – 90 8 – 92 8 – 93 8 – 94 8 – 95 8 – 96 8 – 97 8 – 98 8 – 99 8 – 100 8 – 101

Contents

vii

CLEAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GET_ERROR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TOKEN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RAISE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CONTEXT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TRANSLATE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Purge APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Items . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Notifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Total . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TotalPERM . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AdHocDirectory . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Purge Obsolete Workflow Runtime Data Concurrent Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Directory Service APIs . . . . . . . . . . . . . . . . . . . . . . . . . . GetRoleUsers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetUserRoles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetRoleInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetRoleInfo2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IsPerformer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . UserActive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetUserName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetRoleName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetRoleDisplayName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAdHocUserStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAdHocRoleStatus . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateAdHocUser . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddUsersToAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAdHocUserExpiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAdHocRoleExpiration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAdHocUserAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAdHocRoleAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RemoveUsersFromAdHocRole . . . . . . . . . . . . . . . . . . . . . . . . . Workflow LDAP APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synch_changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synch_all . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Schedule_changes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Preferences API . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . get_pref . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Monitor APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8 – 102 8 – 103 8 – 104 8 – 105 8 – 108 8 – 110 8 – 111 8 – 113 8 – 114 8 – 115 8 – 116 8 – 117 8 – 118 8 – 119 8 – 121 8 – 123 8 – 124 8 – 125 8 – 126 8 – 127 8 – 128 8 – 129 8 – 130 8 – 131 8 – 132 8 – 133 8 – 134 8 – 136 8 – 138 8 – 139 8 – 140 8 – 141 8 – 142 8 – 143 8 – 144 8 – 145 8 – 146 8 – 147 8 – 148 8 – 148 8 – 149

viii Oracle Workflow Guide

GetAccessKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetDiagramURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetEnvelopeURL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetAdvancedEnvelopeURL . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Workflow Views . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WF_ITEM_ACTIVITY_STATUSES_V . . . . . . . . . . . . . . . . . . . WF_NOTIFICATION_ATTR_RESP_V . . . . . . . . . . . . . . . . . . . WF_RUNNABLE_PROCESSES_V . . . . . . . . . . . . . . . . . . . . . . WF_ITEMS_V . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Queue APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . EnqueueInbound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DequeueOutbound . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DequeueEventDetail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PurgeEvent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . PurgeItemType . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ProcessInboundQueue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetMessageHandle . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DequeueException . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . DeferredQueue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . InboundQueue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OutboundQueue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ClearMsgStack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . CreateMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WriteMsg . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetMsgAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetMsgResult . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Document Management APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . get_launch_document_url . . . . . . . . . . . . . . . . . . . . . . . . . . . . . get_launch_attach_url . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . get_open_dm_display_window . . . . . . . . . . . . . . . . . . . . . . . . get_open_dm_attach_window . . . . . . . . . . . . . . . . . . . . . . . . . set_document_id_html . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of the Oracle Workflow Notification System . . . . . . . . Notification Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Notification APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Custom Callback Function . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SendGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Forward . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Transfer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Cancel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8 – 150 8 – 151 8 – 153 8 – 155 8 – 157 8 – 157 8 – 159 8 – 160 8 – 161 8 – 162 8 – 165 8 – 167 8 – 170 8 – 172 8 – 173 8 – 174 8 – 175 8 – 176 8 – 177 8 – 178 8 – 179 8 – 180 8 – 181 8 – 182 8 – 183 8 – 184 8 – 185 8 – 186 8 – 187 8 – 188 8 – 189 8 – 190 8 – 192 8 – 192 8 – 197 8 – 199 8 – 200 8 – 203 8 – 205 8 – 207 8 – 209

Contents

ix

CancelGroup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Respond . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Responder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . VoteCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . OpenNotificationsExist . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Close . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddAttr . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetAttrInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetShortText . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetAttribute . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetAttrDoc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetSubject . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetBody . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetShortBody . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TestContext . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AccessCheck . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WorkCount . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getNotifications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getNotificationAttributes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WriteToClob . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of the Oracle Workflow Business Event System . . . . . Business Event System Datatypes . . . . . . . . . . . . . . . . . . . . . . . . . . Agent Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setSystem . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameter Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setValue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameter List Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Message Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Initialize . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getPriority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getSendDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getReceiveDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getCorrelationID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8 – 210 8 – 211 8 – 212 8 – 213 8 – 214 8 – 215 8 – 216 8 – 217 8 – 219 8 – 220 8 – 221 8 – 222 8 – 223 8 – 225 8 – 226 8 – 227 8 – 228 8 – 229 8 – 230 8 – 231 8 – 232 8 – 233 8 – 234 8 – 235 8 – 236 8 – 237 8 – 237 8 – 237 8 – 238 8 – 238 8 – 239 8 – 239 8 – 239 8 – 240 8 – 240 8 – 241 8 – 242 8 – 245 8 – 245 8 – 245 8 – 246 8 – 246

x Oracle Workflow Guide

getParameterList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getEventName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getEventKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getEventData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getFromAgent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getToAgent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getErrorSubscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getErrorMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . getErrorStack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setPriority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setSendDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setReceiveDate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setCorrelationID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setParameterList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setEventName . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setEventKey . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setEventData . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setFromAgent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setToAgent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setErrorSubscription . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setErrorMessage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . setErrorStack . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Content . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddParameterToList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetValueForParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example for Using Abstract Datatypes . . . . . . . . . . . . . . . . . . Mapping Between WF_EVENT_T and OMBAQ_TEXT_MSG . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Raise . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Send . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . NewAgent . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Test . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Enqueue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Listen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Agent Listener Concurrent Program . . . . . . . . . . . SetErrorInfo . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetDispatchMode . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddParameterToList . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddParameterToListPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . GetValueForParameter . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

8 – 246 8 – 246 8 – 247 8 – 247 8 – 247 8 – 247 8 – 247 8 – 248 8 – 248 8 – 248 8 – 248 8 – 249 8 – 249 8 – 249 8 – 250 8 – 250 8 – 250 8 – 251 8 – 251 8 – 251 8 – 251 8 – 252 8 – 252 8 – 253 8 – 253 8 – 253 8 – 255 8 – 257 8 – 260 8 – 261 8 – 265 8 – 267 8 – 268 8 – 269 8 – 270 8 – 272 8 – 273 8 – 274 8 – 275 8 – 276 8 – 277

Contents

xi

GetValueForParameterPos . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Subscription Rule Function APIs . . . . . . . . . . . . . . . . . . . . . Default_Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Log . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Warning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Success . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow_Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Error_Rule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SetParametersIntoParameterList . . . . . . . . . . . . . . . . . . . . . . . . Event Function APIs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . SubscriptionParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . AddCorrelation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Generate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Business Event System Replication APIs . . . . . . . . . . . . . . . . . . . . WF_EVENTS Document Type Definition . . . . . . . . . . . . . . . . WF_EVENTS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . WF_EVENTS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . . WF_EVENT_GROUPS Document Type Definition . . . . . . . . WF_EVENT_GROUPS_PKG.Generate . . . . . . . . . . . . . . . . . . WF_EVENT_GROUPS_PKG.Receive . . . . . . . . . . . . . . . . . . . WF_SYSTEMS Document Type Definition . . . . . . . . . . . . . . . WF_SYSTEMS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . WF_SYSTEMS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . WF_AGENTS Document Type Definition . . . . . . . . . . . . . . . . WF_AGENTS_PKG.Generate . . . . . . . . . . . . . . . . . . . . . . . . . . WF_AGENTS_PKG.Receive . . . . . . . . . . . . . . . . . . . . . . . . . . . WF_EVENT_SUBSCRIPTIONS Document Type Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WF_EVENT_SUBSCRIPTIONS_PKG.Generate . . . . . . . . . . . WF_EVENT_SUBSCRIPTIONS_PKG.Receive . . . . . . . . . . . . Index

8 – 278 8 – 279 8 – 281 8 – 283 8 – 284 8 – 285 8 – 286 8 – 287 8 – 288 8 – 289 8 – 290 8 – 291 8 – 293 8 – 294 8 – 296 8 – 298 8 – 300 8 – 302 8 – 303 8 – 304 8 – 305 8 – 306 8 – 307 8 – 308 8 – 309 8 – 310 8 – 311 8 – 312 8 – 313 8 – 314 8 – 315 8 – 316

xii Oracle Workflow Guide

VOLUME 2Volume 2 . . . . . . . . . . . . . . . . . . . . . . . . . .

i

Chapter 9

Oracle Workflow Home Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 – 1 Accessing the Oracle Workflow Home Page . . . . . . . . . . . . . . . . . 9 – 2 Setting User Preferences . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 – 6

Chapter 10

Viewing Notifications and Processing Responses . . . . . . . . . . . Overview of Notification Handling . . . . . . . . . . . . . . . . . . . . . . . . . Reviewing Notifications via Electronic Mail . . . . . . . . . . . . . . Viewing Notifications from a Web Browser . . . . . . . . . . . . . . Reviewing a Summary of Your Notifications via Electronic Mail . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Defining Rules for Automatic Notification Processing . . . . .

10 – 1 10 – 2 10 – 2 10 – 12 10 – 24 10 – 25

Chapter 11

Monitoring Workflow Processes . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Workflow Monitoring . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Monitor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Monitor Access . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

11 – 1 11 – 2 11 – 2 11 – 7

Chapter 12

Testing a Workflow Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 – 1 Testing Workflow Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 – 2

Chapter 13

Managing Business Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Managing Business Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Agents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Setting Up Message Propagation . . . . . . . . . . . . . . . . . . . . . . . Raising Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Signing Up Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Synchronizing Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Reviewing Local Queues . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Agent Ping/Acknowledge . . . . . . . . . . . . . . . . . . . . . . . The Workflow Agent Ping/Acknowledge Item Type . . . . . . Summary of the Master Ping Process . . . . . . . . . . . . . . . . . . . . Master Ping Process Activities . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Detail Ping Process . . . . . . . . . . . . . . . . . . . .

13 – 1 13 – 2 13 – 4 13 – 17 13 – 22 13 – 34 13 – 53 13 – 65 13 – 67 13 – 70 13 – 72 13 – 77 13 – 78 13 – 79 13 – 80 13 – 81

Contents

xiii

Detail Ping Process Activities . . . . . . . . . . . . . . . . . . . . . . . . . . 13 – 82

Chapter 14

Predefined Workflow Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Predefined Workflow Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Group Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . System Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Agent Definition Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Event Subscription Definition Events . . . . . . . . . . . . . . . . . . . Synchronize Event Systems Event . . . . . . . . . . . . . . . . . . . . . . Seed Event Group . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ping Agent Events . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . System Signup Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Any Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Unexpected Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . User Entry Has Changed Event . . . . . . . . . . . . . . . . . . . . . . . . Workflow Send Protocol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Workflow Send Protocol Item Type . . . . . . . . . . . . . . . . . Summary of the Workflow Event Protocol Process . . . . . . . . Workflow Event Protocol Process Activities . . . . . . . . . . . . . . Workflow Send Protocol Events . . . . . . . . . . . . . . . . . . . . . . . .

14 – 1 14 – 2 14 – 2 14 – 3 14 – 4 14 – 4 14 – 5 14 – 5 14 – 6 14 – 8 14 – 9 14 – 10 14 – 12 14 – 15 14 – 17 14 – 18 14 – 20 14 – 21 14 – 24

Chapter 15

Demonstration Workflow Processes . . . . . . . . . . . . . . . . . . . . . . . Sample Workflow Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Displaying the Process Diagram of a Sample Workflow . . . . Requisition Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the Requisition Data Model . . . . . . . . . . . . . . . . . . . Initiating the Requisition Workflow . . . . . . . . . . . . . . . . . . . . . The Requisition Item Type . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Requisition Approval Process . . . . . . . . . . . Requisition Process Activities . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Notify Approver Subprocess . . . . . . . . . . . . Notify Approver Subprocess Activities . . . . . . . . . . . . . . . . . . Sample StartProcess Function . . . . . . . . . . . . . . . . . . . . . . . . . . Example Function Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . Example: Select Approver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example: Verify Authority . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Example Notification Activity . . . . . . . . . . . . . . . . . . . . . . . . . . Example: Notify Requisition Approval Required . . . . . . . . . Product Survey Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15 – 1 15 – 2 15 – 3 15 – 5 15 – 6 15 – 8 15 – 12 15 – 13 15 – 15 15 – 19 15 – 21 15 – 23 15 – 26 15 – 26 15 – 29 15 – 31 15 – 31 15 – 34

xiv Oracle Workflow Guide

Installing the Product Survey Data Model . . . . . . . . . . . . . . . Initiating the Product Survey Workflow . . . . . . . . . . . . . . . . . The Product Survey Item Type . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Survey – Single Process . . . . . . . . . . . . . . . . . Survey – Single Process Activities . . . . . . . . . . . . . . . . . . . . . . Summary of the Survey – Master/Detail Process . . . . . . . . . Survey – Master/Detail Process Activities . . . . . . . . . . . . . . . Summary of the Detail Survey Process . . . . . . . . . . . . . . . . . . Detail Survey Process Activities . . . . . . . . . . . . . . . . . . . . . . . . Document Review Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Document Management Item Type . . . . . . . . . . . . . . . . . . Summary of the Document Review Process . . . . . . . . . . . . . . Document Review Process Activities . . . . . . . . . . . . . . . . . . . . Error Check Process . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Periodic Alert Item Type . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Error Check Process . . . . . . . . . . . . . . . . . . . . Error Check Process Activities . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the User Defined Alert Action Process . . . . . . . User Defined Alert Action Process Activities . . . . . . . . . . . . . Event System Demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Installing the Event System Demonstration Data Model . . . Initiating the Event System Demonstration Workflow . . . . . The Event System Demonstration Item Type . . . . . . . . . . . . . Summary of the Buyer: Top Level PO Process . . . . . . . . . . . . Buyer: Top Level PO Process Activities . . . . . . . . . . . . . . . . . . Summary of the Buyer: Send PO to Supplier Subprocess . . . Buyer: Send PO to Supplier Subprocess Activities . . . . . . . . Summary of the Buyer: Receive Supplier PO Acknowledgement Subprocess . . . . . . . . . . . . . . . . . . . . . . . . . Buyer: Receive Supplier PO Acknowledgement Subprocess Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Buyer: Advanced Shipment Notice Subprocess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Buyer: Advanced Shipment Notice Subprocess Activities . . Summary of the Buyer: Receive Supplier Invoicing Subprocess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Buyer: Receive Supplier Invoicing Subprocess Activities . . . Summary of the Supplier: Top Level Order Process . . . . . . . Supplier: Top Level Order Process Activities . . . . . . . . . . . . . Summary of the Supplier: Get Order Details Subprocess . . . Supplier: Get Order Details Subprocess Activities . . . . . . . . . Summary of the Supplier: Credit Check Subprocess . . . . . . .

15 – 35 15 – 36 15 – 38 15 – 39 15 – 41 15 – 42 15 – 44 15 – 46 15 – 47 15 – 49 15 – 49 15 – 50 15 – 52 15 – 54 15 – 54 15 – 56 15 – 57 15 – 60 15 – 61 15 – 63 15 – 64 15 – 66 15 – 71 15 – 73 15 – 75 15 – 78 15 – 78 15 – 80 15 – 81 15 – 83 15 – 84 15 – 85 15 – 86 15 – 87 15 – 88 15 – 91 15 – 92 15 – 94

Contents

xv

Supplier: Credit Check Subprocess Activities . . . . . . . . . . . . . Summary of the Supplier: Stock Check Subprocess . . . . . . . . Supplier: Stock Check Subprocess Activities . . . . . . . . . . . . . Summary of the Supplier: Advanced Shipment Notice Subprocess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supplier: Advanced Shipment Notice Subprocess Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Summary of the Supplier: Send Supplier Invoice Subprocess . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Supplier: Send Supplier Invoice Subprocess Activities . . . . . B2B Purchase Order Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B2B Purchase Order Acknowledgement Event . . . . . . . . . . . B2B Advanced Shipment Notice Event . . . . . . . . . . . . . . . . . . B2B Invoice Event . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

15 – 95 15 – 96 15 – 97 15 – 98 15 – 99 15 – 100 15 – 101 15 – 102 15 – 105 15 – 106 15 – 107

Chapter 16

Workflow Administration Scripts . . . . . . . . . . . . . . . . . . . . . . . . . Miscellaneous SQL Scripts . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FNDWFLST . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FNDWFPR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . WFNLADD.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfagtlst.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfbkg.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfbkgchk.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchact.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchacta.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchita.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchitt.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchluc.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchlut.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchmsg.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfchmsga.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfdirchk.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfevtenq.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfjvstop.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfmqupd.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfnlena.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfntfsh.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfprot.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfqclean.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfrefchk.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfretry.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfrmall.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16 – 1 16 – 2 16 – 4 16 – 5 16 – 5 16 – 6 16 – 6 16 – 7 16 – 7 16 – 7 16 – 8 16 – 8 16 – 8 16 – 9 16 – 9 16 – 9 16 – 10 16 – 10 16 – 11 16 – 12 16 – 12 16 – 12 16 – 12 16 – 13 16 – 13 16 – 13 16 – 14

xvi Oracle Workflow Guide

Wfrmita.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfrmitms.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfrmitt.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfrmtype.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfrun.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfstat.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfstatus.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfstdchk.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfver.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfverchk.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Wfverupd.sql . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

16 – 14 16 – 15 16 – 15 16 – 15 16 – 15 16 – 16 16 – 16 16 – 16 16 – 16 16 – 17 16 – 17

Appendix A

Oracle Workflow Builder Menus and Toolbars . . . . . . . . . . . . . A – 1 Oracle Workflow Builder Menus . . . . . . . . . . . . . . . . . . . . . . . . . . . A – 2 Oracle Workflow Builder Toolbars . . . . . . . . . . . . . . . . . . . . . . . . . A – 7

Appendix B

Oracle Workflow Implementation in Other Oracle Products . Predefined Workflows Embedded in Oracle E–Business Suite . . Oracle Workflow Business Event System Implementation in Oracle E–Business Suite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Oracle Workflow Implementation in the Oracle9i Platform . . . . Oracle Support Policy for Predefined Workflows, Events, and Subscriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Customization Guidelines . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Resolving Customization Issues . . . . . . . . . . . . . . . . . . . . . . . . What Is NOT Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What Is Supported . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

B–1 B–2 B – 16 B – 18 B – 20 B – 20 B – 21 B – 21 B – 21

Appendix C

Oracle Workflow Performance Concepts . . . . . . . . . . . . . . . . . . . Oracle Workflow Performance Concepts . . . . . . . . . . . . . . . . . . . . Designing Workflow Processes for Performance . . . . . . . . . . Managing Runtime Data for Performance . . . . . . . . . . . . . . . Glossary Index

C–1 C–2 C–2 C–8

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.

How To Use This Guide
This guide contains the information you need to understand and use Oracle Workflow. • Chapter 1 provides an overview of Oracle Workflow. • Chapter 2 describes how to implement Oracle Workflow for your site. • Chapter 3 describes how to begin defining a workflow process. • Chapter 4 describes how to define the components necessary to build a workflow process. • Chapter 5 describes how to draw and define a workflow process diagram. • Chapter 6 describes the standard activities provided with Oracle Workflow. • Chapter 7 describes the standard APIs for the PL/SQL and Java functions that can be called by Oracle Workflow. • Chapter 8 provides detailed information about Oracle Workflow’s APIs.

xx

Oracle Workflow Guide

• Chapter 9 describes the Oracle Workflow home page, where users and administrators can centrally access all the web–based features of Oracle Workflow. • Chapter 10 discusses how a user can view and act on a workflow notification. • Chapter 11 describes how to use the Workflow Monitor to administer or view the status of a workflow process. • Chapter 12 describes how to launch a workflow process for testing purposes. • Chapter 13 describes how to manage business events. • Chapter 14 describes the standard events provided with Oracle Workflow. • Chapter 15 describes the demonstration workflow processes included with Oracle Workflow. • Chapter 16 describes the miscellaneous administrative SQL scripts included with Oracle Workflow. • Appendix A describes the Oracle Workflow Builder menus and toolbar. • Appendix B lists the predefined workflow processes that are included with the Oracle Applications–embedded version of Oracle Workflow, the Oracle Applications features that leverage the Business Event System, and the Oracle9i platform features that leverage Oracle Workflow. This appendix also includes the Oracle Workflow support policy. • Appendix C describes concepts and techniques that you can use for performance gain when running Oracle Workflow. At the end of this guide, we include a glossary of Oracle Workflow terms.

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

Preface

xxi

For additional information.com/accessibility/. note that all Oracle Applications documentation is available online (HTML or PDF). xxii Oracle Workflow Guide . Online Documentation If you are using the version of Oracle Workflow embedded in Oracle Applications. The new features section also includes information about any features that were not yet available when this guide was printed. If this guide refers you to other Oracle Applications documentation. if your administrator has installed software from a mini–pack or an upgrade.oracle. The conventions for writing code require that closing braces should appear on an otherwise empty line. this document describes the new features. however. • Online Help – The new features section in the HTML help describes new features in 11i. may not always correctly read the code examples in this document.obstacles so that our documentation can be accessible to all of our customers. a Windows screen reader. JAWS may not always read a line of text that consists solely of a bracket or brace. visit the Oracle Accessibility Program Web site at http://www. Oracle Corporation neither evaluates nor makes any representations regarding the accessibility of these Web sites. and support services. Other Information Sources You can choose from many sources of information. Accessibility of Links to External Web Sites in Documentation This documentation may contain links to Web sites of other companies or organizations that Oracle Corporation does not own or control. This information is updated for each new release of Oracle Workflow. to increase your knowledge and understanding of Oracle Workflow. use only the Release 11i versions of those guides. For example. Online help patches are available on OracleMetaLink. including online documentation. Accessibility of Code Examples in Documentation JAWS. training.

Preface xxiii . and portions of the guide are available in Windows Help format as well. and navigate using the graphical user interface (GUI) available with this release of Oracle Workflow (and any other Oracle Applications products). If you are using the standalone version of Oracle Workflow. You can read the guides online by choosing Library from the expandable menu on your HTML help window.com.• 11i Features Matrix – This document lists new features available by patch and identifies any associated new documentation. • Readme File – Refer to the readme file for patches that you have installed to learn about new documentation or documentation patches that you can download. The Windows Help is available from the Oracle Workflow Builder Help menu. if you are using the version of Oracle Workflow embedded in Oracle Applications. run reports. Therefore. by reading from the Oracle Applications Document Library CD included in your media pack. Guides Related to All Products Oracle Applications User’s Guide This guide explains how to enter data. note that this guide is available online in HTML format. you can purchase them from the Oracle Store at http://oraclestore. This guide also includes information on setting user profiles. The new features matrix document is available on OracleMetaLink. you may want to refer to other user’s guides when you set up and use Oracle Workflow to learn more about the embedded workflows. The Windows Help is available from the Oracle Workflow Builder Help menu. Related User’s Guides Oracle Workflow is used by other Oracle Applications products to provide embedded workflows. or by using a Web browser with a URL that your system administrator provides. as well as running and reviewing reports and concurrent processes. The HTML documentation is available from a URL provided by your system administrator or from the help icon in the Oracle Workflow web pages. Portions of this guide are also available online in Windows Help format.oracle. query. If you require printed guides.

budgets. budgeting. User Guides Related to This Product Oracle General Ledger User Guide This guide provides information about journal entry. Oracle Business Intelligence System Implementation Guide This guide provides information about implementing Oracle Business Intelligence (BIS) in your environment. costing. Oracle Receivables User Guide This guide provides information about entering and managing customers. and transactions. and billing. expenditures. Managers and employees can then use an intranet and Web browser to have easy and intuitive access to personal and career management functionality Oracle Payables User Guide This guide provides information about entering and managing suppliers. and multi–company accounting and consolidation. receipts. Implementing Oracle Self–Service Human Resources (SSHR) This guide provides information about setting up the self–service human resources management functions for managers and employees. collections. Oracle Purchasing User’s Guide This guide provides information about entering and managing purchase orders and requisitions.You can access this user’s guide online by choosing ”Getting Started with Oracle Applications” from any Oracle Applications help file. Oracle Projects User Guide This guide provides information about entering and managing projects. and payments. invoices. xxiv Oracle Workflow Guide .

You should use this guide in conjunction with individual product user’s guides and implementation guides. features. Discoverer workbooks. and terminology for Oracle Applications Release 11i. which minimizes the time to install Oracle Applications. This guide also introduces the concepts behind Applications–wide features such as Business Intelligence (BIS). architecture. Oracle XML Gateway User’s Guide This guide explains how to implement the production and consumption of valid. It provides a useful first book to read before an installation of Oracle Applications.0 products to Release 11i. and Self–Service Web Applications. languages and character sets. technology stack.7 or Release 11. Installing Oracle Applications This guide provides instructions for managing the installation of Oracle Applications products. Oracle Financials Open Interface Reference This guide is a compilation of all open interface descriptions in all Oracle Financial Applications user’s guides.BIS 11i User Guide Online Help This guide is provided as online help only from the BIS application and includes information about intelligence reports. and the Performance Management Framework. In Release 11i. This guide contains instructions for using Oracle Rapid Install and lists the tasks you need to perform to finish your installation. much of the installation process is handled using Oracle Rapid Install. Installation and System Administration Oracle Applications Concepts This guide provides an introduction to the concepts. Upgrading Oracle Applications Refer to this guide if you are upgrading your Oracle Applications Release 10. well–formed XML messages between Oracle Applications and trading partners. This guide describes the upgrade process and lists database and product–specific Preface xxv . the Oracle8 technology stack. and the Oracle8i Server technology stack by automating many of the required steps.

It describes the Oracle Application Object Library components needed to implement the Oracle Applications user interface described in the Oracle Applications User Interface Standards for Forms–Based Products. It also provides information to help you build your custom Oracle Forms Developer 6i forms so that they integrate with Oracle Applications. AD Controller. License Manager. enhancements. It provides a history of the changes to individual Oracle Applications products between Release 11. Oracle Applications Developer’s Guide This guide contains the coding standards followed by the Oracle Applications development staff. It includes new features. AD Administration. SmartClient. Oracle Applications System Administrator’s Guide This guide provides planning and reference information for the Oracle Applications System Administrator. customize menus and online help. xxvi Oracle Workflow Guide . This guide also provides information on maintaining the Oracle applications file system and database. and others. It contains how–to steps. screenshots. and seed data for this interval. or character mode) or Release 11. and changes made to database objects. AutoPatch. and manage concurrent processing.0.7 (NCA. Other Implementation Documentation Oracle Applications Product Update Notes Use this guide as a reference for upgrading an installation of Oracle Applications.upgrade tasks. You cannot upgrade to Release 11i directly from releases prior to 10.7. profile options.0 and Release 11i. It contains information on how to define security. such as AutoUpgrade. You must be either at Release 10. to upgrade to Release 11i. AD Relink. Oracle Alert User’s Guide This guide explains how to define periodic and event alerts to monitor the status of your Oracle Applications data. Maintaining Oracle Applications Use this guide to help you run the various AD utilities. and other information that you need to run the AD utilities.

and programs for a specific Oracle Applications product. Multiple Organizations in Oracle Applications This guide describes how to set up and use Oracle Workflow with Oracle Applications’ Multiple Organization support feature. and write custom reports for Oracle Applications products. This manual details additional steps and setup considerations for implementing Oracle Workflow with this feature. setup and reference information for the Oracle Workflow implementation team. forms. Oracle eTechnical Reference Manuals Each eTechnical Reference Manual (eTRM) contains database diagrams and a detailed description of database tables. reports. Oracle Applications Flexfields Guide This guide provides flexfields planning. Oracle eTRM is available on OracleMetaLink. so you can define and support different organization structures when running a single installation of Oracle Workflow. Oracle Applications User Interface Standards for Forms–Based Products This guide contains the user interface (UI) standards followed by the Oracle Applications development staff. integrate Oracle Applications data with non–Oracle applications.Multiple Reporting Currencies in Oracle Applications If you use the Multiple Reporting Currencies feature to record transactions in more than one currency. Oracle Manufacturing 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 information helps you convert data from your existing applications. It describes the UI for the Oracle Applications products and how to apply this UI to the design of an application built by using Oracle Forms. as well as for users responsible for the ongoing maintenance of Oracle Applications product data. Preface xxvii . use this manual before implementing Oracle Workflow. This manual also provides information on creating custom reports on flexfields data.

Oracle Applications Message Reference Manual This manual describes all Oracle Applications messages. managing an Oracle database server. you may want to use your organization structure. and your hardware and software environment. These courses are organized into functional learning paths. You have a choice of educational environments. and Oracle’s large staff of consultants and support specialists with expertise in your business area. xxviii Oracle Workflow Guide . For example. 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. Oracle training professionals can tailor standard courses or develop custom courses to meet your needs. This manual is available in HTML format on the documentation CD–ROM for Release 11i. and data as examples in a customized training session delivered at your own facility. our team of experienced professionals provides the help and information you need to keep Oracle Workflow working for you. Oracle University’s online education utility. or you can use Oracle Learning Network (OLN). you can arrange for our trainers to teach at your facility.This documentation includes APIs and open interfaces found in Oracle Manufacturing. In addition. Support From on–site support to central support. You can attend courses offered by Oracle University at any one of our many Education Centers. so you take only those courses appropriate to your job or area of responsibility. terminology. This team includes your Technical Representative and Account Manager. This documentation includes APIs and open interfaces found in Oracle Order Management Suite. Training and Support Training Oracle offers a complete set of training courses to help you and your staff master Oracle Workflow and reach full productivity quickly.

unified computing and information resource. Oracle Applications also keeps track of who changes information. Oracle Data Browser. Oracle provides powerful tools you can use to create. you may change a row in one table without making corresponding changes in related tables. But when you modify Oracle Applications data using anything other than Oracle Applications. any change you make using Oracle Applications can update many tables at once. database triggers. Preface xxix . If you enter information into database tables using database tools. you may store invalid information. retrieve. network computers and personal digital assistants. manufacturing. Oracle products are available for mainframes. human resources. allowing organizations to integrate different computers. an integrated suite of more than 160 software modules for financial management. project systems. supply chain management. change. Because Oracle Applications tables are interrelated. you risk destroying the integrity of your data and you lose the ability to audit changes to your data. About Oracle Oracle Corporation develops and markets an integrated line of software products for database management. If your tables get out of synchronization with each other. into a single. you risk retrieving erroneous information and you risk unpredictable results throughout Oracle Applications. When you use Oracle Applications to modify your data. different networks. decision support. You also lose the ability to track who has changed your information because SQL*Plus and other database tools do not keep a record of changes.Do Not Use Database Tools to Modify Oracle Applications Data Oracle STRONGLY RECOMMENDS that you never use SQL*Plus. or any other tool to modify Oracle Applications data unless otherwise instructed. and even different database management systems. But if you use Oracle tools such as SQL*Plus to modify Oracle Applications data. and office automation. and maintain information in an Oracle database. Oracle Applications automatically checks that your changes are valid. different operating systems. as well as Oracle Applications. applications development. and customer relationship management. store. minicomputers. personal computers.

S. along with related consulting. xxx Oracle Workflow Guide . tools. CA 94065 U. Your Feedback Thank you for using Oracle Workflow and this guide.A. Oracle Applications Documentation Manager Oracle Corporation 500 Oracle Parkway Redwood Shores. 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.com. Or. Oracle offers its database. Oracle values your comments and feedback. education.Oracle is the world’s leading supplier of software for information management. and the world’s second largest software company. send electronic mail to appsdoc_us@oracle. in over 145 countries around the world. Mail your comments to the following address or call us directly at (650) 506–7000. and applications products. and support services.

which implements process definitions at runtime. • Workflow Monitor. which communicates business events between systems. T Overview of Oracle Workflow 1–1 . These features include: • Oracle Workflow Builder. which sends notifications to and processes responses from users in a workflow.CHAPTER 1 Overview of Oracle Workflow his chapter introduces you to the concept of a workflow process and to the major features of Oracle Workflow. which allows you to track your workflow process using a web browser. • The Workflow Engine. a graphical tool that lets you create business process definitions. • The Business Event System. • The Notifications System.

You can define processes that loop. See: Major Features and Definitions: page 1 – 3. to express any business rule that affects a workflow process. Oracle Workflow lets you automate and continuously improve business processes. 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. Unlike workflow systems that simply route documents from one user to another with some approval steps. Routing Information With so much information available. Oracle Workflow lets you model sophisticated business processes. Oracle Workflow can route supporting information to each decision maker in a business process. 1–2 Oracle Workflow Guide . you can use the full power of PL/SQL. and more. See: Workflow Processes: page 1 – 6. decompose into subflows. Delivering Electronic Notifications Oracle Workflow extends the reach of business process automation throughout the enterprise and beyond to include any e–mail or Internet user. and act based on their e–mail responses. branch into parallel flows and then rendezvous. the language of the Oracle database server. and take action using a standard Web browser. routing information of any type according to business rules you can easily change to people both inside and outside your enterprise. You can even view your list of things to do. Defining and Modifying Business Rules Oracle Workflow lets you define and continuously improve your business processes using a drag–and–drop process designer. Because Oracle Workflow can decide which path to take based on the result of a stored procedure. including necessary supporting information.Introduction to Oracle Workflow Business processes today involve getting many types of information to multiple people according to rules that are constantly changing. Oracle Workflow lets people receive notifications of items awaiting their attention via e–mail. and in so many different forms.

and subflows. The Workflow Engine supports sophisticated workflow rules. are signaled to the engine via a PL/SQL API or a Java API. or change workflow activities. In this way. view. At any time you can add. or set up new prerequisite relationships among activities. Using the Workflow Builder. or modify a business process with simple drag and drop operations. Based on flexibly–defined workflow rules. Changes in workflow state. See: Workflow Processes: page 1 – 6. You can communicate events among systems within your own enterprise and with external systems as well. Major Features and Definitions Oracle Workflow Builder Oracle Workflow Builder lets you create. You can easily work with a summary–level model of your workflow. parallel flows. the engine determines which activities are eligible to run. Business Event System The Business Event System is an application service that uses the Oracle Advanced Queuing (AQ) infrastructure to communicate business events Overview of Oracle Workflow 1–3 .Integrating Systems Oracle Workflow lets you set up subscriptions to business events which can launch workflows or enable messages to be propagated from one system to another when business events occur. expanding activities within the workflow as needed to greater levels of detail. such as the completion of workflow activities. you can create and modify all workflow objects. including activities. you can operate Oracle Workflow Builder from a desktop PC or from a disconnected laptop PC. you can implement point–to–point messaging integration or use Oracle Workflow as a messaging hub for more complex system integration scenarios. and messages. including looping. item types. branching. You can model business processes that include complex routing and processing rules to handle events powerfully and flexibly. And. remove. and then runs them. Workflow Engine The Workflow Engine embedded in the Oracle database server monitors workflow states and coordinates the routing of activities for a process.

Each notification includes a message that contains all the information a user needs to make a decision. which lets you register subscriptions to significant events. The information may be embedded in the message body or attached as a separate document. The Business Event System consists of the Event Manager. such as approvals for requisitions or sales orders. Complete Programmatic Extensibility Oracle Workflow lets you include your own PL/SQL procedures or external functions as activities in your workflows. 1–4 Oracle Workflow Guide .between systems. and event activities. the subscribing code is executed in the same transaction as the code that raised the event. and sending event information to other queues or systems. allowing you to open and save workflow definitions in both a database and file. Subscription processing can include executing custom code on the event information. you can have your own program run whenever the Workflow Engine detects that your program’s prerequisites are satisfied. Workflow Definitions Loader The Workflow Definitions Loader is a utility program that moves workflow definitions between database and corresponding flat file representations. Oracle Workflow interprets each notification activity response to decide how to move on to the next workflow activity. which can be an individual user or a group of users. which let you model business events within workflow processes. Electronic Notifications Oracle Workflow lets you include users in your workflows to handle activities that cannot be automated. Without modifying your application code. When a local event occurs. Electronic notifications are routed to a role. You can use it to move workflow definitions from a development to a production database. In addition to being a standalone server program. or to apply upgrades to existing definitions. the Workflow Definitions Loader is also integrated into Oracle Workflow Builder. sending event information to a workflow process. Any user associated with that role can act on the notification.

please refer to the Oracle Applications Manager online help. Also. you can also use the Oracle Workflow Manager component of Oracle Applications Manager as an additional administration tool for Oracle Workflow. If you are using the version of Oracle Workflow embedded in Oracle Applications and you have implemented Oracle Applications Manager.Electronic Mail Integration Electronic mail (e–mail) users can receive notifications of outstanding work items and can respond to those notifications using their e–mail application of choice. Internet–Enabled Workflow Any user with access to a standard Web browser can be included in a workflow. Overview of Oracle Workflow 1–5 . Web users can access a Notification Web page to see their outstanding work items. and other functionality in Oracle Applications. Oracle Applications Manager is a tool that provides administrative and diagnostic capabilities for concurrent processing. if you are using the standalone version of Oracle Workflow available with Oracle9i Release 2. you can use the standalone Oracle Workflow Manager component available through Oracle Enterprise Manager as an additional administration tool for Oracle Workflow. An e–mail notification can include an attachment that provides another means of responding to the notification. For more information. The Workflow Monitor also displays a separate status summary for the work item. Monitoring and Administration Workflow administrators and users can view the progress of a work item in a workflow process by connecting to the Workflow Monitor using a standard Web browser that supports Java. please refer to the Oracle Workflow Manager online help. the process. For more information. and each activity in the process. Oracle Workflow. The Workflow Monitor displays an annotated view of the process diagram for a particular instance of a workflow process. so that users can get a graphical depiction of their work item status. then navigate to additional pages to see more details or provide a response.

a business event. The Workflow Engine takes over by driving the relevant work item defined by the application. the Workflow Engine performs automated steps and invokes appropriate agents when external processing is required. through a specific workflow process definition. An activity in a process definition can be an automated function defined by a PL/SQL stored procedure or an external function. The rules. a notification to a user or role that may optionally request a response. or a subflow that itself is made up of a more granular set of activities.Workflow Processes Oracle Workflow manages business processes according to rules that you define. include the activities that occur in the process and the relationship between those activities. A workflow process is initiated when an application calls a set of Oracle Workflow Engine APIs. 1–6 Oracle Workflow Guide . According to the workflow process definition. which we call a workflow process definition. The following diagram depicts a simplified workflow process definition that routes a requisition to a manager or set of managers for approval.

• Verify Authority—to verify that a selected approver has the spending authority to approve the requisition. The icons represent activities.We refer to the whole drawing as a process or process diagram. who should approve the requisition. including: • Select Approver—to select. new items are created for the process when a user creates and submits a requisition in the appropriate application. Overview of Oracle Workflow 1–7 . according to your business rules. In the above example. and the arrows represent the transitions between the activities. This process contains several workflow activities implemented as PL/SQL stored procedures.

1–8 Oracle Workflow Guide .

T Setting Up Oracle Workflow 2–1 .CHAPTER 2 Setting Up Oracle Workflow his chapter describes the requirements for Oracle Workflow and provides the steps necessary to set up Oracle Workflow at your site.

0. Without some form of remote access and control software. nor will they be able to supply patches directly to your client PC.6 or higher for Oracle8i. – Remote access and control software to be used by Customer Support for dial–in access through a modem to your PC. At least one PC at your site should be configured with a modem. – At least 32 Mb of memory.1.0 or higher – At least 60 Mb of available disk space to install Oracle Workflow Builder. The preferred software is Symantec’s Norton pcANYWHERE. ISO 9660 format CD–ROM available as a logical drive – Microsoft Windows 95. or Windows NT 4.6 or higher for Oracle8i. Oracle Worldwide Customer Support will not be able to dial in to your site to diagnose problems. Warning: Please follow the necessary security precautions against viruses and unauthorized access when installing any software that allows remote access.1 or higher for Oracle9i) and Required Support Files (version 8. Compaq or 100% compatible personal computer with the following: – A 486 processor or better – Clock speed of 66 Mhz or greater (90 Mhz or greater is recommended) – Network card – SVGA color monitor – Modem configured with dial–in access for use by Oracle Worldwide Customer Support. and Required Support Files. – Dual speed. or version 9. Windows 98.1 or higher for Oracle9i).1. Oracle Net Services.0. Windows 2000. 64 Mb recommended 2–2 Oracle Workflow Guide .Oracle Workflow Hardware and Software Requirements The components of Oracle Workflow require the following hardware and software configurations: • Oracle Workflow Builder is installed using Oracle Universal Installer and requires the installation of Oracle Net Services (version 8. You should install Oracle Workflow Builder on an IBM. or Microcom’s Carbon Copy. or version 9.

.

– Oracle8i Enterprise or Standard Edition database version 8.1. or version 9.1.1 or higher for Oracle8i.0. the following additional hardware and software configurations are required: – ISO 9660 format CD–ROM available as a logical drive – Microsoft Windows NT 4.0 or higher • The Oracle Workflow Server requires the following: . along with the Oracle Objects and JServer Options.1 or higher for Oracle9i – SQL*Plus version 8. installed on a supported server machine – At least 40 Mb of available disk space for Oracle Workflow Server once it is installed in your Oracle Home – At least 128 Mb of memory.6 or higher.6 or higher for Oracle8i. or Oracle9i Enterprise or Standard Edition database version 9.0. Attention: Oracle Net Services require and only support the use of Microsoft’s TCP/IP drivers. 256 Mb recommended – Oracle Net Services version 8.0.1 or higher.1 or higher for Oracle9i If you are installing Oracle Workflow Server on Microsoft Windows NT. or version 9.

using an Oracle8i Standard Edition database limits some of the features available for use by the Oracle Workflow Business Event System. Consequently. – Oracle Advanced Queuing propagation in Oracle8i Standard Edition does not support propagating messages outside the local database. you should choose Oracle8i Enterprise Edition. it is important to note that Oracle Workflow leverages Oracle8i functionality. Setting Up Oracle Workflow 2–3 . you should choose Oracle8i Enterprise Edition. For example: – You cannot create any additional queues in Oracle8i Standard Edition beyond the default queues provided by Oracle Workflow. Attention: While the version of Oracle Workflow offered to Oracle8i Standard Edition customers is exactly the same as the version offered to Oracle8i Enterprise Edition customers. If you require additional queues. If you require messages to be propagated to other systems.

. Oracle Workflow can also send mail to other e–mail applications as long as you install the appropriate UNIX gateway product to communicate with your e–mail application of choice. these restrictions no longer apply.In Oracle9i. however. Exactly the same functionality is available with Oracle Workflow in an Oracle9i Standard Edition database as in an Oracle9i Enterprise Edition database. • The e–mail notifications component contains a Notification Mailer program that can send mail through UNIX Sendmail or a Windows NT MAPI–compliant mail application.

(See: OL2000: Developer Information About the Outlook E–mail Security Update.7 or higher and with Oracle9i Database version 9. Version 1.0.1 or higher. 2–4 Oracle Workflow Guide . and Event Manager components require Oracle HTTP Server and mod_plsql to be installed on a server machine.5x.) As a result. Attention: The Microsoft Outlook E–mail Security Update that was released on June 7. The Oracle Workflow MAPI Mailer is not certified on Windows XP. as well as with Oracle9i Application Server version 1. such as Netscape Communicator version 4. Workflow customers running on NT/2000 are certified to install the UNIX version of the Oracle Workflow Notification Mailer (on UNIX) and connect to a Workflow Server database running on NT/2000. The Oracle HTTP Server and mod_plsql components are included with Oracle8i Database version 8.7x.76 or a higher version of 4. the Oracle Workflow MAPI Mailer is not certified on any Microsoft Windows platforms where this Microsoft Outlook E–mail Security Update or above has been applied.8 or higher and Abstract Windowing Toolkit (AWT). To view notifications you need a Web browser application that supports JavaScript and Frames. or Microsoft Internet Explorer version 5. • The Web notifications.1 or higher.1. 2000 desupports the MAPI Commmon Messaging Calls (CMC) interface used by the Oracle Workflow MAPI Mailer.com/support/kb/articles/ Q262/7/01.0. http://support.microsoft. Workflow Monitor.ASP.1.0x or 5. To view the Workflow Monitor you need a Web browser that supports Java Development Kit (JDK). your e–mail application should support HTML attachments and you should have a Web browser application that supports JavaScript and Frames to view the attachment. • To send and respond to e–mail notifications with HTML attachments.

To implement Single Sign–On integration. • To extract the HTML help for the standalone version of Oracle Workflow.1.x version.1.2) installed. you must have Java Runtime Environment (JRE) version 1. • To implement Oracle Internet Directory integration.• To run external Java function activities and to use the Workflow XML Loader. you must have Oracle Internet Directory Release 2 (9. or a higher 1.2) and Oracle9iAS Portal Release 2 (9. Setting Up Oracle Workflow 2–5 . you must implement Oracle Internet Directory integration.0. and you must have Oracle9iAS Single Sign–On Server Release 2 (9. installed. you need an unzip utility.2) installed and have mod_osso installed with Oracle HTTP Server.0.8.0.

Overview of Setting Up After you install Oracle Workflow. The Notification System uses these views to send notifications to the performers specified in your activities. 2. 5. 2–6 Oracle Workflow Guide . See: Setting Up an Oracle Workflow Directory Service: page 2 – 21. 4. Overview of Required Setup Steps for the Standalone Version of Oracle Workflow 1. Map Oracle Workflow’s directory service to the users and roles currently defined in your organization’s directory repository by constructing views based on those database tables. you implement it for your site by setting up the preferences and components appropriate for your enterprise. Oracle Workflow uses this view to create in its translation tables. See: Setting Global User Preferences: page 2 – 14. The Global Preferences web page also lets you define your workflow administrator role and your Workflow web agent. Your roles can be either individual users or a group of users. See: Setting Up Background Workflow Engines: page 2 – 43. You can specify the cost threshold level of your primary and background engines to determine the activities an engine processes and the activities an engine defers. 3. See: Setting the WF_RESOURCES Environment Variable: page 2 – 42. Set up background Workflow Engines to control the load and throughput of the primary Workflow Engine on your system. Create a view called WF_LANGUAGES that identifies the languages defined in your Oracle database server installation. Define an environment variable called WF_RESOURCES if your Workflow server is installed on a UNIX platform. Set up the default Oracle Workflow user preferences for your entire enterprise using the Global Preferences web page. Oracle Workflow provides example directory services views that you can modify and reload. See: Creating the WF_LANGUAGES View: page 2 – 38. a row that maps to a row found in its non–translated base table for each installed language.

Overview of Required Setup Steps for the Version of Oracle Workflow Embedded in Oracle Applications 1. Set up background Workflow Engines to control the load and throughput of the primary Workflow Engine on your system. The Global Preferences web page also lets you define your workflow administrator role and your Workflow web agent. See: Setting the Socket Listener Profile Options: page 2 – 40. you may want to refer to their appropriate sections for additional background information: – Directory services: page 2 – 21 – WF_LANGUAGES view: page 2 – 38 – Path to the language–dependent resources file: page 2 – 42 2. . See: Setting Up Background Workflow Engines: page 2 – 43. Set up the default Oracle Workflow user preferences for your entire enterprise using the Global Preferences web page. See: Setting Global User Preferences: page 2 – 14. 3. You can specify the cost threshold level of your primary and background engines to determine the activities an engine processes and the activities an engine defers. Set the system profile options called Socket Listener Activated and Socket Listener Port. Attention: Although your Oracle Workflow installation automatically sets up the following for you.

Additionally. you can synchronize the user information in your Workflow directory service with Oracle Internet Directory (OID). and WF_ITEMS tables for performance gain. Setting Up Oracle Workflow 2–7 . Optional Setup Steps 1. See: Partitioning Workflow Tables: page 2 – 12. if you have installed Oracle9iAS Release 2 or higher. WF_ITEM_ACTIVITY_STATUSES_H. If you are using the standalone version of Oracle Workflow with Oracle9i Database Server Release 2 or Oracle9i Application Server (Oracle9iAS) Release 2 or higher. WF_ITEM_ATTRIBUTE_VALUES. you can also use OID integration to implement single sign–on integration. See: Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30. You can partition the WF_ITEM_ACTIVITY_STATUSES. 2.

Other Workflow Features Before deploying Oracle Workflow and custom process definitions to other branches of your enterprise. Set up the Business Event System if you want to communicate business events between systems using event subscription processing and Workflow process event activities. you can protect your data from further modification by determining the level of access your users have to the data. 4. See: Customizing the Logo on Oracle Workflow’s Web Pages: page 2 – 84. You can also use the Workflow Definitions Loader to load workflow process definitions from flat files to the database without using Oracle Workflow Builder. See: Setting Up the WF_EVENT_OMB_QH Queue Handler: page 2 – 100. See: Overview of Oracle Workflow Access Protection: page 2 – 101. See: Implementing the Notification Mailer: page 2 – 48. Set up the WF_EVENT_OMB_QH queue handler if you are using the Business Event System with Oracle8i and you want to use Oracle Message Broker to propagate event messages between systems. 7. you can use the Workflow XML Loader to load XML definitions for Business Event System objects 2–8 Oracle Workflow Guide . See: Using the Workflow Definitions Loader: page 2 – 107. See: Modifying Your Message Templates: page 2 – 69. If you are using the Business Event System. 9. See: Setting Up the Business Event System: page 2 – 96.3. You can include additional icons to your Oracle Workflow Icons subdirectory to customize the diagrammatic representation of your workflow processes. See: Adding Custom Icons to Oracle Workflow: page 2 – 85. 8. Set up the Java Function Activity Agent if you are using the standalone version of Oracle Workflow and you want to run external Java function activities. You can modify the templates for your electronic mail notifications. 5. Set up the Notification Mailer program if you want to allow your users to receive notifications by e–mail. Customize the company logo that appears in Oracle Workflow’s web pages. See: Setting Up the Java Function Activity Agent: page 2 – 86. Use custom symbols for each activity you define. 6.

sql.between a database and a flat file. See: Using the Workflow XML Loader: page 2 – 112. In addition.6 against an Oracle Workflow 2. See: wfver. such as the Workflow Definitions Loader. automatically verify that the module is compatible with the version of the Oracle Workflow server that it is operating against.3 database. Identifying the Version of Your Oracle Workflow Server If you ever need to determine the version of the Oracle Workflow server you are running. all Oracle Workflow modules.0. Notification Mailer. Setting Up Oracle Workflow 2–9 . Oracle Workflow Builder.sql: page 16 – 16. you can connect to your Workflow server account using SQLPLUS and run a script called wfver. and the Workflow Monitor. This version compatibility check helps to prevent problems such as running Oracle Workflow Builder 2.

Setup Flowchart The following flowchart shows the Oracle Workflow setup steps. You need to perform optional steps only if you plan to use the related feature or complete certain business functions. Some of the steps are required and some are optional. 2 – 10 Oracle Workflow Guide .

Step 1 Step 2 Step 3 Step 4 Step 5 Step 6 Step 7 Step 8 Step 9 Step 10 Step 11 Step 12 Step 13 Step 14 Step 15 Required Optional Required Required Optional Required Required Required Required Optional Optional Optional Optional Optional Optional Optional Step Partitioning Workflow Tables: page 2 – 12 Setting Global User Preferences: page 2 – 14 Setting Up an Oracle Workflow Directory Service: page 2 – 21 Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30 Creating the WF_LANGUAGES View: page 2 – 38 Setting the Socket Listener Profile Options: page 2 – 40 Setting the WF_RESOURCES Environment Variable: page 2 – 42 Setting Up Background Workflow Engines: page 2 – 43 Implementing the Notification Mailer: page 2 – 48 Modifying Your Message Templates: page 2 – 69 Customizing the Logo on Oracle Workflow’s Web Pages: page 2 – 84 Adding Custom Icons to Oracle Workflow: page 2 – 85 Setting Up the Java Function Activity Agent: page 2 – 86 Setting Up the Business Event System: page 2 – 96 Setting Up the WF_EVENT_OMB_QH Queue Handler: page 2 – 100 Standalone/ Embedded/ Both Both Both Standalone Standalone Standalone Embedded Standalone Both Both Both Both Both Standalone Both Both Setting Up Oracle Workflow 2 – 11 . Step No. A reference to whether the step is pertinent to the standalone or embedded version of Oracle Workflow or both and whether the step is optional or required is provided.Setup Checklist The following table lists Oracle Workflow setup steps.

the script is called wfupartb. 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_ITEMS WF_ITEM_ATTRIBUTE_VALUES_PK WF_ITEMS_PK WF_ITEMS_N1 WF_ITEMS_N2 WF_ITEMS_N3 Table 2 – 1 (Page 1 of 1) Before running the partitioning script.Setup Steps Step 1 Partitioning Workflow Tables Partitioning addresses key issues in supporting very large tables and indexes by letting you decompose them into smaller and more manageable pieces called partitions. This step is highly recommended for performance gain. The script partitions four Workflow tables and recreates the associated indexes. once partitions are defined. SQL queries and DML statements do not need to be modified in order to access partitioned tables. Also. However. For the version of Oracle Workflow embedded in Oracle Applications. 2 – 12 Oracle Workflow Guide . In this way.sql. The following table shows the Workflow tables and indexes on which the script runs. for the standalone version of Oracle Workflow. You can optionally run a script to partition certain Workflow tables that store runtime status data. partitioning is entirely transparent to applications. partitioning can simplify the manageability of large database objects. DDL statements can access and manipulate individual partitions rather than entire tables or indexes. you should back up these four tables so that you can restore them in case the script fails. the script is called wfupart.sql.

you should allow sufficient time for the script to run. To minimize the time required. . such as after a fresh installation of Oracle Workflow. When the tables already contain existing data. run the script as early as possible in your setup process. in the same tablespace where the underlying tables are located. the script requires slightly more diskspace than the underlying tables. During the creation of the partitioned tables. Similarly. Additionally. sufficient free space is required for the index tablespace. The amount of time needed depends on the amount of data in the tables. such as after an upgrade from a previous release.To run the script. you must have sufficient free space on the table and index tablespaces. the script requires more time than it does when the tables are empty.

Since the script’s operations are DDL operations running in nologging mode. Use the script as follows: sqlplus <wf_user>/<wf_passwd> @wfupart <wf_user> <wf_passwd> For example: sqlplus owf_mgr/owf_mgr @wfupart owf_mgr owf_mgr If the partitioning script fails. you must perform any necessary cleanup manually. For Oracle Workflow embedded in Oracle Applications. the wfupartb.sql script is located in the admin/sql subdirectory under $FND_TOP. Attention: If you are running the partitioning script through Oracle Net Services. the wfupart. Use the script as follows: sqlplus <apps_user>/<apps_passwd> @wfupartb <fnd_user> <fnd_passwd> <apps_user> <apps_passwd> For example: sqlplus apps/apps @wfupartb applsys apps apps apps For standalone Oracle Workflow. See Also Partitioning for Performance: page C – 8 Setting Up Oracle Workflow 2 – 13 . Context: You need to perform this step only once. then you must set the TWO_TASK variable before you begin. rollback is not possible.sql script is located in the wf/admin/sql subdirectory in your Oracle Home.

. but only a workflow administrator has access to the Global Preferences page. As a workflow administrator. Both web pages are accessible from the Oracle Workflow Home page.Step 2 Setting Global User Preferences You can control how you interact with Oracle Workflow by specifying user preferences that you can set from the User Preferences web page. An individual user can override a default user preference at any time by changing the value of the user preference in the User Preferences web page. you also have access to the Global Preferences web page. which you can use to globally set default user preference values for the entire enterprise.

then choose the Global Preferences link: <webagent>/wfa_html. " To Set Global User Preferences 1. If you map to some other preference source or set a hard–coded value to these columns. Territory. See: Setting Up an Oracle Workflow Directory Service: page 2 – 21. Territory. and Notification_Preference columns to the Oracle Workflow preferences table. Use a web browser to connect to the Oracle Workflow home page. and Notification preference settings in the Global Preferences and User Preferences web pages are valid only if your directory service views map the Language. Attention: The Language. See: Setting User Preferences: page 9 – 6. .home Alternatively. you can connect directly to the Global Preferences web page: <webagent>/wf_pref. Context: You need to perform this step only once. any changes you make to the preferences via the preferences web pages are ignored.edit?edit_defaults=Y <webagent> represents the base URL of the web agent you configured for Oracle Workflow in your Web server.

2 – 14 Oracle Workflow Guide . so if you have not yet logged on as a valid user in the current web session. you will be prompted to do so before the page appears. Attention: These are secured pages.

The Global Preferences web page displays a summary of your current global preferences.2. Setting Up Oracle Workflow 2 – 15 . Choose Update to modify these preferences.

use the list of values to select the role to which you want to assign workflow administrator privileges. Any user associated with this role can run the Oracle Workflow Find Processes web page. any user in the administration role can view any other user’s notifications and access the Event Manager web pages. See: Setting Up an Oracle Workflow Directory Service: page 2 – 21. Note: To find out which role currently has workflow administrator privileges. such as in a development environment.3. which provides full access to Oracle Workflow’s administration features. enter an asterisk (*) in the Workflow Administrator field. without accessing the Global Workflow Preferences page. If you want all users and roles to have workflow administrator privileges. In the Workflow Administrator field. In addition. you can use the following command: 2 – 16 Oracle Workflow Guide .

• For the standalone version of Oracle Workflow. the default setting after installation is SYSADMIN. Caution: The list of values fields that are implemented in many of Oracle Workflow’s web pages will not function properly unless you specify the base URL of your Oracle Workflow web agent in this field. Setting Up Oracle Workflow 2 – 17 . to find the role names for various administrator responsibilities in Oracle Applications. then any Oracle Applications user with that responsibility will have workflow administrator privileges. In the Workflow Web Agent field. the default setting after installation is an asterisk (*). • For the version of Oracle Workflow embedded in Oracle Applications. You can log in as any user to access the Global Workflow Preferences page and specify the preferences you want. After installing Oracle Workflow. Note: The SYSADMIN role is different than the role associated with the System Administrator responsibility in Oracle Applications. you must set the Workflow Administrator preference to the internal name of the Workflow role associated with that responsibility. enter the base URL of the Oracle web agent you defined for Oracle Workflow in Oracle HTTP Server. For example. If you want to assign workflow administrator privileges to this or any other Oracle Applications responsibility. If you set the Workflow Administrator preference to the role name of a responsibility. display_name from wf_roles where display_name like ’%Admin%’. use the following command: select name. 4. You must log in as the SYSADMIN user to access the Global Workflow Preferences page and specify the preferences you want. you should change the Workflow Administrator preference from the default setting to the role that you want to have administrator privileges.select text from wf_resources where name = ’WF_ADMIN_ROLE’. You can query the WF_ROLES view to find the role name for a responsibility.

See your Oracle HTTP Server documentation for more information.com:portID>/pls/<DAD_name> <server.com:portID> represents the server and TCP/IP port number on which your web listener accepts requests and <DAD_name> represents the name of the DAD you configured for the Oracle Workflow database schema. .The base URL should look like this if you are using Oracle HTTP Server as your Web server: http://<server.

5. The download location is the location where you have staged the JInitiator executable for download to users’ client machines. You can find the class ID and version number for the version of JInitiator you have installed in the jinit–version. Note: The Local System setting is specific to this installation of Oracle Workflow and is not included when Business Event System data is replicated to other systems. This information is required for Oracle Workflow to launch Oracle Applications forms linked to notifications and to display the Workflow Monitor. 2 – 18 Oracle Workflow Guide . 7. If you are using the version of Oracle Workflow embedded in Oracle Applications. • Enabled—Subscriptions are executed on all events. Oracle Workflow automatically creates the system definition for this database in the Event Manager during installation. enter the Jinitiator plugin class ID.txt). See: Systems: page 13 – 17. The Local System field displays the system name for the database where this installation of Oracle Workflow is located. download location. you should also edit the APPS_WEB_AGENT profile option.1). For more information. use the list of values to select the Business Event System status that you want to assign to the local system. refer to Complete Guide to JInitiator for Oracle’s E–Business Suite (Note 162488. 6. available on MetaLink. See: Setting the Socket Listener Profile Options: page 2 – 40.1) and Upgrading Oracle JInitiator with Oracle Applications 11i (Note 124606. The Business Event System treats this system as the local system and all others as external systems. and version number. Attention: If you are using the version of Oracle Workflow embedded in Oracle Applications. In the System Status field.txt file (<drive>:\Program Files\Oracle\jinit<version>\doc\ jinit–version.

8. The password is stored in encrypted form. If you are implementing OID synchronization. • LDAP Changelog Base Directory—The LDAP node under which change logs are located. • LDAP User Name—The LDAP user. Note: The System Status setting is specific to this installation of Oracle Workflow and is not included when Business Event System data is replicated to other systems. • Disabled—No subscriptions are executed on any events. specify the directories for the change log and the user records. In the Language and Territory fields. For example: cn=Base. This LDAP user account must have write privileges. After you finish setting up the Business Event System. specify the Lightweight Directory Access Protocol (LDAP) server information for the LDAP directory to which you want to connect. Note: Oracle Workflow sets the system status to Enabled by default. • LDAP Host—The host on which the LDAP directory resides. If you are implementing OID synchronization. use the list of values to select the NLS_LANGUAGE and NLS_TERRITORY combination that Setting Up Oracle Workflow 2 – 19 . If you are implementing Oracle Internet Directory (OID) synchronization. This user name is required to bind to the LDAP directory. For example: cn=orcladmin • LDAP Password—The LDAP password. specify the LDAP user account used to connect to the LDAP server. For example: cn=changelog • LDAP User Base Directory—The LDAP node under which user records can be found. • External Only—Subscriptions are executed only on events received from external systems. 10.• Local Only—Subscriptions are executed only on events raised on the local system. • LDAP Port—The port on the host. cn=OracleSchemaVersion 11. 9. you can change the setting to the status you want for event processing.

If you do not specify a date format. local system. • Plain text mail—Send notifications as plain text e–mail. 15. Users must read their mail using an HTML e–mail viewer. Users must view the notifications and take action from the Notifications web page. If you specify a time format along with your date format. 2 – 20 Oracle Workflow Guide . even if you do not include a time format with your date format. territory. use the list of values to select a notification preference: • HTML mail—Send notifications as HTML e–mail. 12. Note: Oracle Workflow may include a time element when relevant for certain displayed dates. document home node. Users must use the Notifications web page to take action on individual notifications.defines the default language–dependent behavior and territory–dependent formatting of your users’ notification sessions. • Plain text mail with HTML attachments—Send notifications as plain text e–mail but include the HTML–formatted version of the notifications as attachments. Note: These global language. • Plain text summary mail—Send a summary of all notifications as plain text e–mail. Leave the Document Home Node field blank. This functionality is reserved for future use. 14. specify an Oracle8i–compliant date format that defines the default date format for the workflow database sessions of all users. The workflow administrator role. and notification preferences are saved to the Oracle Workflow Preferences table for a special user name called –WF_DEFAULTS–. then the date format defaults to DD–MON–YYYY. you will see two time elements following your date. then in those situations when Oracle Workflow displays a time element. • Do not send me mail—Do not send the notifications as e–mail. 13. In the Date Format field. An example of an Oracle8i–compliant date format is DD–Mon–RRRR. In the ’Send me electronic mail notifications’ field. and LDAP information is saved to the Workflow Resources table. Click OK once you are satisfied with your changes. workflow web agent.

.Step 3 Setting Up an Oracle Workflow Directory Service Oracle Workflow offers you flexibility in defining who your workflow users and roles are. WF_LOCAL_ROLES. You can use these tables to store users and roles not included in your existing directory repository by calling the appropriate Directory Service PL/SQL API. WF_ROLES. and WF_LOCAL_USER_ROLES that contain columns similar to those defined in the WF_USERS. See: Workflow Directory Service APIs: page 8 – 121. respectively. You determine the directory repository you want Oracle Workflow to reference for users and roles information by creating three views based on the database tables that make up that repository. The views are: • WF_USERS • WF_ROLES • WF_USER_ROLES In addition. and WF_USER_ROLES views. Oracle Workflow provides three local tables called WF_LOCAL_USERS.

Note: If you are using the standalone version of Oracle Workflow. See: Predefined Directory Services: page 2 – 26 See: Ad Hoc Users and Roles: page 5 – 24 Setting Up Oracle Workflow 2 – 21 . Attention: You should avoid selecting from DUAL to incorporate additional users and roles into the directory service views as this allows you to violate the unique constraint on certain columns of the views and reduces performance with unnecessary joins between the ’select from DUAL’ statements. you can integrate your Workflow directory service with Oracle Internet Directory (OID) as your directory repository. and you have installed Oracle9i Release 2 or higher or Oracle9iAS Release 2 or higher. Context: You need to perform this step only once. you must map your directory service views only to the WF_LOCAL tables to enable synchronization of Workflow user information with OID. In this case. See: Integrating Oracle Workflow Directory Services with Local Workflow Users: page 2 – 28 and Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30.

making sure it contains the following columns: • Name—The internal name of the user as referenced by the Workflow Engine and Notification System. an internal name for a user can be mbeech or 009. For example. . where 009 represents the user’s employee ID. Create this view.WF_USERS The WF_USERS view should reference information about all the individuals in your organization who may receive workflow notifications.

they have to query the notification from the Notification Web page. DO NOT use string functions to force these restrictions. HTML–formatted e–mail or by plain text e–mail with HTML attachments. Matthew’. For example. A value of MAILTEXT. Note: You can map the Notification_Preference column over the Oracle Workflow preferences table using the statement below. If your source table does not have a column that meets these criteria. a value of SUMMARY allows users to get periodic e–mail summaries of their open notifications. MAILHTML. However. • Notification_Preference—Indicate how this user prefers to receive notifications. ”PER_PEOPLE:009” represents a user whose employee ID is 009 and is stored in the personnel table called PER_PEOPLE. Instead. Finally.or MAILATTH allows users to receive and respond to notifications by plain text e–mail. respectively. The benefit of this is that you can then globally set the default notification preference for all users in your enterprise using the Global Preferences web page and let individual users 2 – 22 Oracle Workflow Guide . See: Overview of Notification Handling: page 10 – 2 and Notification Preferences: page 2 – 49. MAILHTML. to respond to the individual notifications. define the Name column to be <orig_system>:<orig_system_id> so that Oracle Workflow can reference the original base table where users are stored and a unique user in that table. • Description—An optional description of the user. Attention: The Name column must be sourced from a column that is less than 30 characters long and is all uppercase. A value of QUERY allows users to query notifications from the Notifications Web page. An example of a display name can be ’Beech. or MAILATTH also allows users to query their notifications from the Notifications Web page. • Display_Name—The display name of the user. Note: A notification preference of MAILTEXT.

User Preferences: page 9 – 6 and get_pref: page 8 – 148. NVL(wf_pref.’MAILTYPE’). See: Global Preferences: page 2 – 14 and User Preferences: page 9 – 6.USER_NAME. Refer to your Oracle Database user’s guide or installation manual for the list of supported language conventions.’LANGUAGE’).get_pref(USR. NVL(wf_pref.override that default value by changing their notification preference in the User Preferences web page. by specifying a language in the Global Preferences web page. Note: You can globally set the language for all the users in your enterprise. See: Global Preferences: page 2 – 14. ’MAILHTML’) • Language—The value of the database NLS_LANGUAGE initialization parameter that specifies the default language–dependent behavior of the user’s notification session. FNDL.get_pref(USR.USER_NAME. Note: You can map the Language column over the Oracle Workflow preferences table using the statement below. Individual users may override that default value by changing their language in the User Preferences web page. The benefit of this is that you can then globally set the default Language for all users in your enterprise using the Global Preferences web page and let individual users override that default value by changing their Language in the User Preferences web page. User Preferences: page 9 – 6 and get_pref: page 8 – 148. See: Global Preferences: page 2 – 14.NLS_LANGUAGE) .

See: Modifying Your Message Templates: page 2 – 69. The e–mail templates are delivered in a file called wfmail.wft under the subdirectory $ORACLE_HOME/wf/res/<lang>. Refer to your Oracle Database user’s guide or installation manual for the list of supported territory conventions. • Territory—The value of the database NLS_TERRITORY initialization parameter that specifies the default territory–dependant formatting used in the user’s notification session. Setting Up Oracle Workflow 2 – 23 . You can check the appropriate language subdirectory to verify if the templates have been translated to the language you wish to set. Attention: Make sure that the e–mail templates used by the Notification Mailer to send notifications have been translated by Oracle to the language you wish to set.

and temporarily unavailable (TMPLEAVE). These statuses are also stored in the lookup type called WFSTD_AVAILABILITY_STATUS. For example. if this view is based on the personnel data stored in a Human Resource Management System. The benefit of this is that you can then globally set the default Territory for all users in your enterprise using the Global Preferences web page and let individual users override that default value by changing their Territory in the User Preferences web page.’TERRITORY’). Orig_System can be defined as PER. Orig_System_ID can be defined as the value stored in a column called PERSON_ID in a Human Resources database table called PER_PEOPLE. The possible statuses are: active (ACTIVE). For example. unavailable for an extended period (EXTLEAVE). NVL(wf_pref. User Preferences: page 9 – 6 and get_pref: page 8 – 148. See: Global Preferences: page 2 – 14.USER_NAME. • Fax—A Fax number for the user. • Orig_System_ID—The primary key that identifies the user in this repository system. FNDL. • Status—The availability of the user to participate in a workflow process. • Orig_System—A code that you assign to the directory repository that this view is based on.Note: You can map the Territory column over the Oracle Workflow preferences table using the statement below. • Expiration_Date—The date at which the user is no longer valid in the directory service. Create this view. Those columns that are preceded by an asterisk (*) are similar to the matching column described for the WF_USERS view: . making sure it contains the following columns pertaining to the roles in your repository. WF_ROLES The WF_ROLES view should reference information about all the roles in your organization who may receive workflow notifications. permanently unavailable (INACTIVE).get_pref(USR.NLS_TERRITORY) • Email_Address—A valid electronic mail address for this user or a mail distribution list defined by your electronic mail system.

2 – 24 Oracle Workflow Guide Attention: We require that you also define each user identified by WF_USERS as a role. .

DO NOT use string functions to force these restrictions. When a notification is assigned to the multi–user role. For example. suppose a user has a notification preference of ’SUMMARY’. the user will receive a single notification message addressed to the role. • *Fax • *Orig_System • *Orig_System_ID • *Status • *Expiration_Date WF_USER_ROLES The WF_USER_ROLES view is an intersection of the users and roles in WF_USERS and WF_ROLES. • Name—The internal name of the role. Instead. making sure it contains the following columns: Setting Up Oracle Workflow 2 – 25 . whose notification preference is ’MAILHTML’. the Notification Mailer sends an individual e–mail to each user within the role. Create this view. If your source table does not have a column that meets these criteria.Note: If a user is a member of a role and the user information is different from the role information. the role information will override the user information when the Notification System delivers a notification to the role. as opposed to a summary message that includes that notification in it. For example. • *Display_Name • *Description • *Notification_Preference • *Language • *Territory • Email_Address—if the e–mail address is null for a given role. and the user is also a member of a multi–user role. define the Name column to be <orig_system>:<orig_system_id> so that Oracle Workflow can reference the original base table where roles are stored and a unique role in that table. The Name column must be sourced from a column that is less than or equal to 30 characters long and is all uppercase. ”PER_POSITION:009” represents a position whose ID is 009 and is stored in the personnel table called PER_POSITION.

. • Role_Orig_System—A code that you assign to the role directory repository as listed in the view WF_ROLES. • User_Orig_System—A code that you assign to 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_ID—The primary key that identifies the role in the role directory repository as listed in the view WF_ROLES.• User_Name—The internal name of the user 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.

The workflow directory services views you create will most likely contain unions. If you are using the standalone version Oracle Workflow. The Oracle database server is unable to preserve the indexes in that view when you make such a join. therefore you should not join to them directly. Warning: Avoid making a join to a view that contains a union as this results in poor database performance. 2 – 26 Oracle Workflow Guide . Forcing the usernames to uppercase in your view definition results in poor performance when accessing these views. you can choose to implement one of the following two directory services or create your own: • A directory services with native Oracle users. If you are using the version of Oracle Workflow embedded in Oracle Applications you automatically: • Integrate your Oracle Workflow directory service with a unified Oracle Applications environment. use the appropriate directory services API. Attention: To take advantage of unique indexes when querying users. Predefined Directory Services Oracle Workflow provides scripts for you to implement any one of three directory service environments. See: Workflow Directory Services APIs: page 8 – 121. make sure you initially enter the usernames in your database in uppercase only. • A directory services with local workflow users. If you need to retrieve data from any of the three directory services views.

.You can customize any of these directory services environments further by editing and rerunning their scripts against your Workflow Server.

Oracle Application Object Library tables. you automatically install this script to create the unified environment.sql and is located on your server in the admin/sql subdirectory under $FND_TOP. You base your views on the tables DBA_USERS. The script is located on your server in the Oracle Workflow admin/sql subdirectory for the standalone version of Oracle Workflow. This script is automatically run by the Oracle Universal Installer when you install the standalone version of Oracle Workflow.sql: page 16 – 10.sql script in the Oracle Workflow sql subdirectory on your server. However. and the WF_LOCAL tables. WF_ROLES. and WF_USER_ROLES views that map to this unified environment. the script is called wfdirhrv. WF_LOCAL_USERS. When you install Oracle Applications. The unified environment maps over Oracle Human Resources tables.sql to validate your directory service data model. various Oracle Applications tables. Use the wfdirouv. Aside from the users and roles stored in WF_LOCAL_USERS and WF_LOCAL_ROLES. " Integrating Oracle Workflow Directory Services with a Unified Oracle Applications Environment If you are using the version of Oracle Workflow embedded in Oracle Applications. See: Wfdirchk. " Integrating Oracle Workflow Directory Services with Native Oracle Users If you plan to use the standalone version of Oracle Workflow. the default notification preference for all workflow users and roles in the unified environment is set to ’MAILHTML’. or in the sql subdirectory under $FND_TOP for the version of Oracle Workflow embedded in Oracle Applications. Setting Up Oracle Workflow 2 – 27 . your Oracle Workflow directory service views are automatically based on a unified Oracle Applications environment. and WF_LOCAL_ROLES. you can map your directory service to the native users and roles in the Oracle RDBMS. Oracle Workflow provides a script you can use to setup the views. if you should need to edit and rerun this script for whatever reason. you should run the script wfdirchk. DBA_ROLES. Attention: If you create your own directory service or edit any of the predefined directory services listed above. Oracle Workflow provides a sql script that defines the WF_USERS.

Note: The wfdirouv. then simply add the domain for your organization. you can enter your users and roles information in the WF_LOCAL tables and map your directory service to these tables. The WF_ROLES view includes all users in the WF_USERS view.com’.sql script in the Oracle Workflow sql subdirectory on your server. For each DBA user. The default notification preference for each DBA user is MAILHTML.You can customize and rerun this script if necessary. As a minimal setup step. the originating system is ORACLE and the originating system ID is the ROLE column in DBA_ROLES. Use the wfdircsv.sql script sets each native Oracle user’s e–mail address to the user’s respective username. the columns that you change are EMAIL_ADDRESS in WF_USERS and EMAIL_ADDRESS in WF_ROLES. if the usernames and e–mail account names match. where role_name begins with WF. Oracle Workflow provides a script you can use to set up the views. . to the usernames in the WF_USERS view definition. and all roles in DBA_ROLES. You can customize the views in this script to incorporate the users and roles from your custom directory repository. For each DBA role. The default notification preference for each DBA role is MAILHTML. the originating system is called ORACLE. all roles defined in the WF_LOCAL_ROLES table. The WF_USER_ROLES view consists of the names and originating system information of both users and roles in WF_USERS and WF_ROLES. The script creates three views.sql script to either link your native Oracle users to an existing mail directory store through the WF_ROLES view definition. or. Typically. The WF_USERS view creates a workflow user for each DBA user and any users stored in WF_LOCAL_USERS. This script creates three views. you should edit the wfdirouv. such as ’@oracle. " Integrating Oracle Workflow Directory Services with Local Workflow Users If you plan to use the standalone version of Oracle Workflow and the users and roles of your directory repository are not stored in any existing database tables. and the originating system ID is the USERNAME column in DBA_USERS.

2 – 28 Oracle Workflow Guide Attention: If you want to implement Oracle Internet Directory (OID) integration for the standalone version of Oracle .

you must run the wfdircsv. (Only users are maintained through OID. See: Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30. The originating system in the WF_USERS view is called WF_LOCAL_USERS. After implementing OID integration. Setting Up Oracle Workflow 2 – 29 . The WF_USER_ROLES view consists of the names and originating system information of both users and roles in WF_USERS and WF_ROLES.Workflow. The originating system is WF_LOCAL_ROLES and the originating system ID is 0. and the originating system ID is 0. because only the WF_LOCAL_USERS table will be synchronized with OID. you maintain your user information only through OID.) In this case. you must not customize the script to incorporate any other tables. not Workflow roles. The WF_ROLES view includes all users in WF_LOCAL_USERS and all roles defined in WF_LOCAL_ROLES.sql script to ensure that your directory service views are mapped only to the WF_LOCAL tables.

500 standard for directory services. a user who is logged into any participating Oracle9iAS component is automatically authenticated when accessing any other participating component and does not need to log in again. Context: You need to perform this step only once. It combines Lightweight Directory Access Protocol (LDAP) Version 3 with the high performance. you can synchronize the user information in your Workflow directory service with Oracle Internet Directory (OID) using Lightweight Directory Access Protocol (LDAP). It is a common language that LDAP clients and servers use to communicate. robustness. This integration is recommended because it enables you to manage and publish user information in a central location which various systems can reference. LDAP is a standard. • Participate in single sign–on through LDAP external authentication with Oracle Portal and Oracle9iAS Single Sign–On Server. lightweight implementation of the International Standardization Organization (ISO) X. and availability of Oracle9i. thin client applications. Synchronization with OID enables Oracle Workflow to do the following: • Assign ownership of work items and send notifications to users defined in OID. It requires a minimal amount of networking software on the client side. LDAP was conceived as an internet–ready. scalability. and you have installed Oracle9i Release 2 or higher or Oracle9iAS Release 2 or higher.Step 4 Synchronizing Workflow Directory Services with Oracle Internet Directory If you are using the standalone version of Oracle Workflow. if you have installed Oracle9iAS Release 2 or higher. which makes it particularly attractive for internet–based. extensible directory access protocol. • Synchronize with other external user directories that are synchronized with OID. With single sign–on. Oracle Internet Directory Oracle Internet Directory is a general purpose directory service that enables fast retrieval and centralized management of information about dispersed users and network resources. The advantages of OID include: 2 – 30 Oracle Workflow Guide .

Setting Up Oracle Workflow 2 – 31 . Oracle Internet Directory also takes advantage of all the availability features of Oracle9i. Information about changes made to directory data on a server is stored in special tables on the Oracle9i database. • Synchronization with other directories – Oracle Internet Directory includes the Oracle Directory Integration platform that enables you to synchronize with other enterprise repositories. such technologies as multithreaded LDAP servers and database connection pooling allow it to support thousands of concurrent clients with subsecond search response times. It maps users for any partner application to user entries in OID entries. Additionally. a robust replication mechanism. then a user can access the data from another server. and authenticates them by using LDAP mechanisms. it is protected by Oracle’s backup capabilities.• Scalability – Oracle Internet Directory exploits the strengths of Oracle9i. • Security – Oracle Internet Directory offers comprehensive and flexible access control. Oracle Internet Directory also provides data management tools. Oracle9iAS Single Sign–On uses Oracle Internet Directory to store user entries. running with large datastores and heavy loads. can recover from system failures quickly. • High availability – Oracle Internet Directory is designed to meet the needs of a variety of important applications. such as Oracle Directory Manager and a variety of command–line tools. password–based. and certificate–based using Secure Socket Layer (SSL) Version 3 for authenticated access and data privacy. Moreover. An administrator can grant or restrict access to a specific directory object or to an entire directory subtree. enabling support for terabytes of directory information. In addition. For example. the Oracle9i database. Because directory information is stored securely in the Oracle9i database. Oracle Internet Directory implements three levels of user authentication: anonymous. These are replicated throughout the directory environment by Oracle9i Replication. for manipulating large volumes of LDAP data. it supports full. including third–party LDAP directories. multimaster replication between directory servers: If one server in a replication community becomes unavailable.

Oracle HTTP Server becomes a partner application of the Login Server. If you implement Oracle Internet Directory/Single Sign–On integration. 2 – 32 Oracle Workflow Guide . because users do not need to maintain a separate username and password for each application they access • Increased security. because when the password is only required once. users can log into it using the single sign–on mechanism. Oracle Workflow uses Oracle HTTP Server as its Web server. If the user is not already logged in to Oracle Workflow or another Oracle9iAS Single Sign–On participating application. Oracle9iAS Single Sign–On provides the following benefits: • Ease of administration and reduced administrative costs. Oracle Workflow participates in single sign–on by using mod_osso to authenticate access to its secured web pages. allowing users to log in to multiple Web–based applications by entering a user name and password only once. easy–to–remember passwords or write them down The core of the Oracle9iAS Single Sign–On technology is the Login Server. users are less likely to use simple. the Workflow security package WFA_SEC checks the CGI environment variable REMOTE_USER for user information. an Oracle module that enables single sign–on. A partner application delegates its authentication to the Login Server. Partner applications support a single sign–on mechanism that enables them to accept a user’s username and password as validated by the Login Server. The Login Server authenticates users and passes their identities to the partner applications that are integrated with it. With mod_osso. When a user first tries to access a secured Workflow web page. If a partner application is registered with the Login Server.See Also Oracle Internet Directory Administrator’s Guide Oracle9iAS Single Sign–On Oracle9iAS Single Sign–On is a component of Oracle9i Application Server that provides a framework for secure single sign–on. because user names and passwords can be stored and maintained outside of any particular application and shared across the enterprise • Convenient login experience. the user will be prompted to log in before the page appears.

• Authenticates the user by means of the user name and password. • Sets a partner application cookie so that subsequent user access does not require a redirect to the Login Server. if no application cookie is present. If.Note: The WFA_SEC package must be loaded as a post–install step if you choose to implement Oracle Internet Directory/Single Sign–On integration. Acting as an Oracle9iAS Single Sign–On partner application. by using a URL with an encrypted parameter containing the user’s identity. determining what. • Presents the requested application page to the user. Oracle HTTP Server with mod_osso then performs the following steps: • Decrypts the parameter. access privileges to grant to the user). If there is no login cookie. mod_osso. Instead. • Stores an encrypted login cookie on the authenticated client. Oracle HTTP Server internally calls to mod_osso. during the same session. The Login Server binds to OID and then looks up the user credentials stored in the directory. For more information. Setting Up Oracle Workflow 2 – 33 . The Login Server performs the following steps: • Prompts the user for the user name and password. mod_osso transparently redirects the user to the Login Server to obtain authentication credentials. • Establishes its own session management (for example. the Login Server obtains the information from the login cookie that is already on the client browser. the Login Server does not prompt the user for a username and password. the Login Server presents the user with a login page. • Identifies the user. To set the variable REMOTE_USER. if any. The login cookie provides the Login Server with the user’s identity and indicates that authentication has already been performed. see your installation documentation. if no login cookie is present. using external repository authentication that relies on an LDAP–compliant directory. specifically Oracle Internet Directory. the user again seeks access to the same or to a different partner application. • Transparently redirects the user to the partner application.

Note: OID integration includes only individual users. Otherwise. The login cookie is never written to disk. Ensure that the following PL/SQL packages required for LDAP synchronization are loaded in your database: • DBMS_LDAP—This package contains the functions and procedures which can be used to access data from LDAP servers. See: Workflow LDAP APIs: page 8 – 144. Workflow roles are not maintained through OID. " To Synchronize Workflow Directory Services with OID 1. the authentication request returns the partner application to the logged in state of the previous user. the Login Server can send the login cookie to the client browser over an encrypted SSL channel. either at the end of a time interval specified by the administrator. 2. or when the user exits the browser. See Also Oracle9iAS Single Sign–On Administration Guide Oracle9iAS Single Sign–On Application Developer’s Guide Oracle Internet Directory Synchronization Oracle Workflow provides APIs to synchronize the user information in your Workflow directory service with OID. • WFA_SEC—This package contains Workflow security functions and procedures. These APIs are defined in a PL/SQL package called WF_LDAP. 2 – 34 Oracle Workflow Guide . not user groups. For the standalone version of Oracle Workflow. Note: To log out of a partner application and log in as another user. For single sign–on integration. ensure that the Database Access Descriptor for Oracle Workflow is protected in the mod_osso configuration file. installation of these packages is completed as part of the post–installation steps after you install the Oracle Workflow server. The login cookie expires with the session. the user must also log out of the Login Server session. For the standalone version of Oracle Workflow.To guard against eavesdropping.

wf.mod_osso configuration is completed as part of the post–installation steps after you install the Oracle Workflow server. if (res) then 5.Synch_all( ) API.change event. To begin the synchronization. See: Integrating Oracle Workflow Directory Services with Local Workflow Users: page 2 – 28. Use the following commands to run Synch_all( ): declare res boolean := FALSE. you should use this function only once during setup. Ensure that the following global Workflow preferences are set to the appropriate information for your OID installation. based on the LDAP directory information specified in the Global Workflow Preferences.sql script to map your directory service views only to the WF_LOCAL tables.change event with the rule function WF_SSO. and raises the oracle. This function retrieves all the existing user information from OID. begin wf_log_pkg. If necessary. Run the wfdircsv.apps. Because Synch_all( ) retrieves information for all users stored in OID.public.apps. res := wf_ldap. Setting Up Oracle Workflow 2 – 35 . Enable the predefined subscription to the oracle.user.user_change. 3. See: To Set Global User Preferences: page 2 – 14.user. 6.wf. run the WF_LDAP. The predefined subscription to this event that you enabled loads the user information into the WF_LOCAL_USERS table. See: User Entry Has Changed Event: page 14 – 15 and To Update or Delete an Event Subscription: page 13 – 52. however.WF_DEBUG_FLAG := TRUE. • LDAP Host • LDAP Port • LDAP User Name • LDAP Password • LDAP Changelog Base Directory • LDAP User Base Directory 4.public. you can also run Synch_all( ) as required for recovery or cleanup.synch_all().

Synch_changes( ) to perform a single update. wf_ldap. To continue updating user information periodically. / Then run SQL*Plus and load your new script to the database.change event.put_line(’failed ’).WF_DEBUG_FLAG := TRUE. else dbms_output.0. You can create a script to run WF_LDAP. For example.10).Schedule_changes( ).Synch_changes( ) or WF_LDAP. You can use WF_LDAP. Subsequently. which is also the recommended frequency to check for updates. If there is a change. to run the API at an interval of ten minutes.Synch_changes( ) repeatedly at an interval that you specify. and deletion.schedule_changes(0. end. use WF_LDAP. 2 – 36 Oracle Workflow Guide .public. create a SQL file with the following commands: declare begin wf_log_pkg. The default interval. This procedure submits a database job using the DBMS_JOB utility to run WF_LDAP. the function retrieves the user information from OID and raises the oracle.put_line(’succeeded’). Note: You must terminate the running of any WF_LDAP APIs before changing your LDAP setup. you must maintain the synchronization between your Workflow directory service and OID by retrieving and loading only changed OID user information. The predefined subscription to this event that you enabled loads the changed user information into the WF_LOCAL_USERS table. WF_LDAP. such as by migrating to a different LDAP server. is ten minutes. modification.apps. The function connects to OID based on the LDAP directory information specified in the Global Workflow Preferences. / 7. including creation. by querying the LDAP change log records.Schedule_changes( ) to retrieve changed user information from OID.wf. It is recommended that you update the user information every ten minutes. end if.dbms_output. You can use either WF_LDAP. end.Synch_changes( ) identifies LDAP user changes in OID.user.Schedule_changes( ).

.

Attention: If you implement OID integration. Consequently. You must not create ad hoc users in the WF_LOCAL_USERS table. SetAdHocUserStatus( ). however. See Also Setting Global User Preferences: page 2 – 14 Workflow LDAP APIs: page 8 – 144 User Entry Has Changed Event: page 14 – 15 Managing Job Queues. you must not use the CreateAdHocUser( ). SetAdHocUserExpiration( ). You can still use ad hoc roles. if you implement OID integration. Oracle Administrator’s Guide Workflow Directory Service APIs: page 8 – 121 Setting Up Oracle Workflow 2 – 37 . you must maintain your users only through OID. since Workflow roles are not maintained through OID. or SetAdHocUserAttr( ) APIs in the WF_DIRECTORY package. because you risk discrepancies in your user information and unpredictable results if you use any tool other than OID to maintain users after integrating with OID.

you must create a view called WF_LANGUAGES that identifies the languages defined in your Oracle installation. See: Oracle Database National Language Support Guide " To display user defined objects in Oracle Workflow Builder in other languages (for standalone version only) 1. The WF_LANGUAGES view must include the following columns: • Code—The language code. Create the WF_LANGUAGES view in your workflow server. Set the NLS_LANG environment variable for the new language. 3. Oracle Workflow uses this view to create in its translatable tables. in order for this to be possible. • Installed_Flag—Flag to indicate if the language is installed and available for use. 2 – 38 Oracle Workflow Guide .sql: page 16 – 5. However. • NLS_Codeset—The character set for the language. • Display_Name—The display name of the language. Run the script WFNLADD. A sample WF_LANGUAGES view is included in the script of each of the predefined directory services that Oracle Workflow provides. 5. a row for each language that maps to a row found in its non–translated base table. • NLS_Language—The value of the Oracle NLS_LANGUAGE initialization parameter that specifies the default language–dependent behavior of a session. Context: You need to perform this step only once. Install Oracle Workflow. Run the script wfnlena.sql: page 16 – 12.sql to enable the language of interest. 2.sql to create rows for the enabled language in each workflow object translation table. See: wfnlena. • NLS_Territory—The value of the Oracle NLS_TERRITORY initialization parameter that specifies the default territory–dependant date and numeric formatting of a session. 4.Step 5 Creating the WF_LANGUAGES View The field values in the property pages of Oracle Workflow Builder and the workflow notifications delivered to your users can be translated to the languages defined in your Oracle installation. See: WFNLADD.

use the command: setenv NLS_LANG = ’language. you can set your users and roles’ default language setting to that language in the Global Preferences web page. the Workflow Definitions Loader uses the language specified in the . as a workflow administrator.wft file. in UNIX. " To display e–mail notifications in other languages 1. Load the translated . Determine if Oracle has translated the e–mail notification templates to the language you wish to set by checking for a file called wfmail. Setting Up Oracle Workflow 2 – 39 . 2. you can specify the default language that your users’ web sessions display by setting the Language parameter in the Global User Preferences web page. while the Workflow Resource Generator accepts a language parameter. Note: To determine the language to load.For example. making sure that the current NLS_LANG setting is correct. Create a translated version of your workflow process definition and save it as a flat file (. run the regedit32 command and locate the NLS_LANG setting under the HKEY_LOCAL_MACHINE/SOFTWARE/ORACLE hierarchy.wft in the appropriate language subdirectory $ORACLE_HOME/wf/res/<lang>. then set the variable to the new value and save your edit.wft). See: Setting Global User Preferences: page 2 – 14 and Setting User Preferences: page 9 – 6.territory_characterset’ For Windows NT. 7. If the e–mail templates are available for the language you wish to display. " To display an Oracle Workflow web session in other languages (for standalone version only) H If you have multiple languages installed for Oracle Workflow.wft file to your workflow database. 6. Individual users can override the default language by setting the Language parameter in the User Preferences web page. Double click on NLS_LANG. If you do not specify a language parameter. See: Modifying Your Message Templates: page 2 – 69. the Workflow Resource Generator defaults to the current setting of NLS_LANG. See: Setting Global User Preferences: page 2 – 14.

) WF_PLUGIN_VERSION <Plugin version> (Such as 1.msg for the Java plugin: WF_CLASSID <Class ID for Jinitiator> (Required if you are using Microsoft Internet Explorer. From the Worklist. 2 – 40 Oracle Workflow Guide . This profile option can be set to different ports for different users.) WF_PLUGIN_DOWNLOAD <Plugin location> (Such as http://<server>/OA_JAVA/. You can activate the Oracle Applications socket listener by setting the Socket Listener Activated profile option to Yes using the System Profile Values Window. users can select a notification link to display the contents of a notification in the Notification Details page. it must check for appropriate context information with Oracle Applications.27. if users have set different ports. To accomplish this. the socket listener on the form side must be active. If the socket listener port is not set at user level. Oracle Workflow launches the forms for each user at the specified port. You must also set the Socket Listener Port profile option to the port at which Oracle Workflow should launch attached forms.7.msg into the WF_RESOURCES table. If the notification details display an attached form icon. You can also set these three values in the Global Preferences page. Oracle Applications users can launch the Oracle Workflow Notification Worklist from their Oracle Applications menus.Step 6 Setting the Socket Listener Profile Options The Notification Details web page can display an attached form icon to support form attributes in a notification message. the Workflow Administrator needs to specify the following token values in $FND_TOP/resource/<language>/wfcfg.1. two different users logged into Oracle Applications on the same machine can both launch attached forms at the same time without interference from each other. See: To Set Global User Preferences: page 2 – 14. Before Oracle Workflow can launch the form from the Notification Details page. users can choose that icon to launch an Oracle Applications form. However. In addition. By using different socket listener ports. Oracle Workflow launches attached forms at the default port set for the site.) Run the Workflow Resource Generator to load the contents of wfcfg.

See: Overview of Setting User Profiles: Oracle Applications System Administrator’s Guide See: To run the Workflow Resource Generator: page 8 – 105. Setting Up Oracle Workflow 2 – 41 .Context: You need to perform this step only once.

you must set an environment variable called WF_RESOURCES to point to the language–dependent Oracle Workflow resource file (wf<language>.res).Step 7 Setting the WF_RESOURCES Environment Variable If you are using the standalone version of Oracle Workflow and your Workflow server is installed on a UNIX platform. The resource file generally resides under the res subdirectory of your Oracle Workflow server directory structure. .

You do not need to set this environment variable if your Workflow server is installed on the Windows NT platform. the path of the language–dependent Oracle Workflow resource file is $FND_TOP/$APPLRSC/wf<language>. The Workflow server installation on Windows NT automatically sets a WF_RESOURCES environment variable that identifies the path of the wf<language>. Context: You need to perform this step only once. You also do not need to set this environment variable if you are using the version of Oracle Workflow embedded in Oracle Applications. Attention: Do not enclose environment variable values in double quotes (” ”) as this is not supported. For Oracle Applications. 2 – 42 Oracle Workflow Guide .res file.res.

You can define and start up as many background engines as you like to check for deferred and timed out activities. A background engine must also be set up to handle timed out notification activities. the background engine marks that activity as timed out and calls the Workflow Engine. which may occur on some other parallel branch of the process. If a ’NOTIFIED’ activity does have a time out value. The main Workflow Engine can then continue to the next available activity. a background engine set up to handle timed out activities periodically checks for ’NOTIFIED’ activities and whether these activities have time out values specified. In these cases. the process cannot continue. and no other activity is active. When the Workflow Engine comes across a notification activity that requires a response. but cannot progress any further. the costly activity is deferred by the Workflow Engine and run later by a background engine. The background engine sets the status of a stuck process to ERROR:#STUCK and executes the error process defined for it. an activity can require a large amount of processing resource or time to complete. it calls the Notification System to send the notification to the appropriate performer. Meanwhile. and then sets the notification activity to a status of ’NOTIFIED’ until the performer completes the notification activity. • An activity returns a result for which no eligible transition exists.Step 8 Setting Up Background Workflow Engines When the Workflow Engine initiates and performs a process. but the pivot activity of the loop has the On Revisit property set to Ignore. Setting Up Oracle Workflow 2 – 43 . In some cases. a background engine must be set up to handle stuck processes. it completes all necessary activities before continuing to the next eligible activity. if the function for a function activity returns an unexpected result value. and no default transition is modeled after that activity. Additionally. A process is identified as stuck when it has a status of ACTIVE. a process could become stuck in the following situations: • A thread within a process leads to an activity that is not defined as an End activity but has no other activity modeled after it. and the current date and time exceeds that time out value. The Workflow Engine then resumes by trying to execute a <Timeout> transition activity. Oracle Workflow lets you manage the load on the Workflow Engine by setting up supplemental engines to run these costly activities as background tasks. For instance. • A process with only one thread loops back. For example.

See: Background: page 8 – 41 and Managing Job Queues. and one that can handle stuck processes. You can use the procedures in the DBMS_JOB package to schedule and manage the background engine as a database job. See: To Schedule Background Engines: page 2 – 45 Note: If you are using the version of Oracle Workflow embedded in Oracle Applications and you have implemented Oracle Applications Manager. Sample scripts that repeatedly run the background engine are provided with the standalone version of Oracle Workflow. you should set the background engine up to run periodically by either using a script to restart the background engine periodically (for the standalone version of Oracle Workflow).BACKGROUND() API to start up a background engine. Run the background engine to check for stuck processes when the load on the system is low. or scheduling the Background Process concurrent program to resubmit periodically (for the version of Oracle Workflow embedded in Oracle Applications). one that can process deferred activities. Generally. A background engine runs until it completes all eligible activities at the time it was initiated. normally not more often than once a day. you should run a separate background engine to check for stuck processes at less frequent intervals than the background engine that you run for deferred activities. then use the WF_ENGINE. Oracle Administrator’s Guide. At a minimum. you can use Oracle Workflow Manager to submit and manage the Workflow Background 2 – 44 Oracle Workflow Guide . See: Activity Cost: page 4 – 47 See: Timeout Transitions: page 5 – 3 See: Deferring Activities: page C – 7 " To Start a Background Engine If you are using the standalone version of Oracle Workflow. Context: You need to perform this step only once. you can start a background engine by submitting the Background Process concurrent program using the Submit Requests form. If you are using the version of Oracle Workflow embedded in Oracle Applications. Generally. you need to set up one background engine that can handle both timed out and deferred activities as well as stuck processes. and within specific cost ranges. Ensure that you have at least one background engine that can check for timed out activities.Background engines can be restricted to handle activities associated with specific item types.

enter the rollback segment you want in the Rollback Segment field. and choose the Session Control button.Process concurrent program. To Schedule Background Engines If you are using the version of Oracle Workflow embedded in Oracle Applications. Oracle Applications System Administrator’s Guide. Note: If you require a larger rollback segment for the Workflow Background Process than the default. " To Run a Workflow Background Process as a Concurrent Program 1. Query the Workflow Background Process concurrent program (FNDWFBG) in the Concurrent Programs window. Navigate to the Submit Requests form. please refer to the Oracle Workflow Manager online help. please refer to the Oracle Applications Manager online help. Submit the Workflow Background Process concurrent program as a request. Then in the Session Control window. you need to set up one background engine that can handle both timed out and deferred activities as well as stuck processes. Use the Submit Requests window in Oracle Applications to submit the Workflow Background Process. you can submit the background engine procedure as a concurrent program to schedule different background engines to run at different times. you can use the standalone Oracle Workflow Manager component available through Oracle Enterprise Manager to submit and manage Workflow background engine database jobs. Oracle Applications User’s Guide. For more information. 3. Note: Make sure you have a least one background engine that can check for timed out activities. This rollback segment will be used instead of the default and will be used up until the first commit. and one that can handle stuck processes. At a minimum. one that can process deferred activities. If you are using the standalone version of Oracle Workflow available with Oracle9i Release 2. For more information. enter values for the following parameters: Setting Up Oracle Workflow 2 – 45 . See: Submitting a Request. In the Parameters window. and save your work. 2. See: Concurrent Programs Window. you can use the Concurrent Programs window in the System Administrator responsibility to specify the rollback segment that you want.

and one that can handle stuck processes. Minimum Threshold Maximum Threshold Process Deferred Specify whether this background engine checks for deferred activities. 4. in hundredths of a second. Setting this parameter to ’Yes’ allows the engine to check for stuck processes. Specify the maximum cost that an activity can have for this background engine to execute it. in hundredths of a second. the engine processes any deferred activity regardless of its item type. 5. The default values for these arguments are 0 and 100 so that the background engine runs activities regardless of cost. If you do not specify an item type. By using Minimum Threshold and Maximum Threshold you can create multiple background engines to handle very specific types of activities. one that can process deferred activities. you need to set up one background engine that can handle both timed out and deferred activities as well as stuck processes. 2 – 46 Oracle Workflow Guide . Choose OK to close the Parameters window.Item Type Specify an item type to restrict this engine to activities associated with that item type. When you finish modifying the run options to define the schedule for the background engine. choose Submit to submit the request. At a minimum. Specify the minimum cost that an activity must have for this background engine to execute it. Setting this parameter to ’Yes’ allows the engine to check for timed out activities. Specify whether this background engine checks for activities that have timed out. Process Timeout Process Stuck Note: Make sure you have a least one background engine that can check for timed out activities. Setting this parameter to ’Yes’ allows the engine to check for deferred activities. Specify whether this background engine checks for stuck processes.

You should reset the threshold value afterwards in SQLPLUS or in the next function activity so that other activities are processed as expected. Setting Up Oracle Workflow 2 – 47 . The engine threshold is set in an externalized constant called THRESHOLD.THRESHOLD := n. You can do this by altering the Workflow Engine threshold in the PL/SQL stored procedure for a function activity. you may want to force the engine to defer an activity although the activity’s cost is less than fifty.See Also See: Overview of Concurrent Programs and Requests. The Workflow Engine threshold is set to 50 as a default. Include the following line in your PL/SQL procedure to set the WF Engine threshold to a different value: WF_ENGINE. The background engine then only processes activities with costs within your specifications. specify the minthreshold and maxthreshold arguments when starting the engine. Activities with a cost higher than 50 are deferred for background engines to process. Oracle Applications System Administrator’s Guide " To Set Engine Thresholds To set the thresholds of background engines. In some cases.

as well as from the Notifications Worklist web page. and performs the following action for each message: • Resolves the recipient role to a single e–mail address. • Sends the message via UNIX Sendmail or any MAPI–compliant mail application on Windows NT. The Notification Mailer polls the database for messages that have to be sent. dequeues these messages from the SMTP advanced queue. however. Checking the Business Event System Setup: page 13 – 53. 2 – 48 Oracle Workflow Guide . • Generates the message and any optional attachments using the appropriate message template. See: Modifying Your Message Templates: page 2 – 69. enabling you to use these pages to check the number of notification messages on the Notification Mailer queue. The e–mail notifications are based on standard templates defined in Oracle Workflow Builder.Step 9 Implementing the Notification Mailer The Notification Mailer is a program that performs e–mail send and response processing for the Oracle Workflow Notification System. See: Standard Agents: page 13 – 25. it continually polls the database for messages to send and checks its response mail account for responses to process. The templates describe the syntax the reply should follow and list the information needed to confirm the notification. and Reviewing Local Queues: page 13 – 72. Once you set up the Notification Mailer to run. The Notification Mailer also processes responses by interpreting the text of messages mailed to its response mail account and calling the appropriate notification response function to complete the notification. and any information necessary to process the response. which itself can be a mail list. You need to perform this step only if you wish to have your workflow users receive their notifications via e–mail. the due date. Note: A standard agent named WF_SMTP_O_1_QUEUE is defined for the Notification Mailer SMTP queue in the Event Manager. • Switches its database session to the role’s preferred language and territory as defined by the directory service. The WF_SMTP_O_1_QUEUE agent is not used by the Business Event System. This agent appears in the Check Setup page and the Event System Local Queues page of the Event Manager. You do not have to do anything else unless you have a need to shut it down and restart it again with different parameters. The generated e–mail message also includes any custom site information.

.

you can use the concurrent manager to restart the Notification Mailer program manually or schedule it to restart periodically. Five notification preferences are available: • Plain text mail (MAILTEXT)—The notification message appears as plain text. Often times. Some mail readers can only display plain text. See: HTML–Formatted E–mail: page 2 – 51. Attention: The Notification Mailer will shut itself down if a database failure is encountered or if the PL/SQL package state for the session is invalid due to dropping or replacing of package definitions. you can restart the Notification Mailer manually or run a shell script that restarts the Notification Mailer if it ever exits with a failure. Setting Up Oracle Workflow 2 – 49 . • HTML mail (MAILHTML)—The notification message appears as HTML–formatted text. See: To Run a Perpetual Shell Script for the Notification Mailer: page 2 – 67. This means that the Notification Mailer can exchange messages with workflow users containing languages with different character sets and multi–media encoded content. Context: You need to perform this step only once. If you are using the standalone version of Oracle Workflow. Notification Preferences Oracle Workflow allows you to determine how you view notifications by setting a notification preference in the User Preferences web page. while still others can only display HTML formatting in an attachment. with no attachments. the functionality of a user’s mail reader determines what the user’s notification preference should be. others can display HTML formatting. See: Reviewing Notifications via Electronic Mail: page 10 – 2 Full MIME Support Oracle Workflow fully supports MIME (Multi–purpose Internet Mail Extensions) encoded messages. See: Plain Text E–mail: page 2 – 50. If the notification message has ’Content–Attached’ message attributes. these attributes appear as additional attachments to the message. See: Setting User Preferences: page 9 – 6. If you are using the version of Oracle Workflow embedded in Oracle Applications. 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. One attachment is an HTML–formatted version of the message. To respond to the individual notifications in the summary. Attention: If you wish to view notifications with HTML formatting. with at least two other attachments. but your mail reader is not able to interpret HTML formatting in the mail message body. change your notification preference to ’Plain text mail with HTML attachments’ (MAILATTH). • Do not send me mail (QUERY)—The Notification Mailer does not send you e–mail notifications. these attributes appear as additional attachments to the message. and the other is a link to the notification in the Notifications web page. . Instead you must query and respond to your notifications from the Notifications web page. See: Plain Text E–mail with an HTML Attachment: page 2 – 53. The MAILATTH preference delivers an HTML–formatted version of the notification as an attachment to the plain text notification. • Plain text summary mail (SUMMARY)—The message is a plain text summary of all open notifications. you must access the notifications from the Notifications web page. • Plain text mail with HTML attachments (MAILATTH)—The notification message appears as plain text.

For example: 2 – 50 Oracle Workflow Guide . When the Notification Mailer polls the Notification table and identifies that flag. it generates a plain text e–mail notification from the information in the table and sends it to the performer role. the notification is flagged as such in the Workflow Notification table. The Notification Mailer uses the Text Body defined for the message in the Oracle Workflow Builder message property page to generate the plain text e–mail. See: Reviewing Notifications via Electronic Mail: page 10 – 2 See: Viewing Notifications from a Web Browser: page 10 – 12 See: Reviewing a Summary of Your Notifications via Electronic Mail: page 10 – 24 Plain Text E–mail If the performer of a notification has a notification preference of plain text mail (MAILTEXT). Attention: You can always query and respond to your notifications from the Notifications web page. even if you set your notification preference to send you mail. It token replaces all attribute values referenced in the message body with plain text values.

• PL/SQL and PL/SQL CLOB document attributes are token replaced with a plain text version of a PL/SQL document. followed by a colon and the URL: <URL_Attribute_Display_Name>:<URL> . • URL attributes are token replaced with the display name of the URL attribute.

it generates an HTML–formatted e–mail notification from the information in the table and sends it to the performer role.. To view these attachments. When the Notification Mailer polls the Notification table and identifies that flag. Attention: Message attributes that have Attach Content checked in their Attributes property page.. you should set your notification preference to plain text mail with HTML Attachments (MAILATTH). A recipient of a plain text e–mail notification responds by manually replying to the notification and entering response values following the instructions provided in the notification. you should display your notifications in the Notifications Worklist web page. HTML–Formatted E–mail If the performer of a notification has a notification preference of HTML mail (MAILHTML). For example: • PL/SQL and PL/SQL CLOB document attributes are token replaced with HTML text or plain text between <pre>. The performer role should use an e–mail reader that can interpret and display HTML content within a message body. See: Viewing Notifications from a Web Browser: page 10 – 12.</pre> HTML tags. Setting Up Oracle Workflow 2 – 51 . See: To Respond to a Plain Text E–mail Notification Using Templated Response: page 10 – 4 and To Respond to a Plain Text E–mail Notification Using Direct Response: page 10 – 6. Note that this may render some attachments unreadable if the attachment includes special formatting or your plain text e–mail reader does not recognize attachments. it uses the Text Body to generate the HTML mail. The Notification Mailer uses the HTML Body defined for the message in the Message Body property page to generate the HTML e–mail. The Notification Mailer token replaces all message attributes referenced in the message body with HTML–formatted values. are attached as plain text to their parent notification. Note: If your e–mail reader cannot interpret HTML formatting in a message body. If no HTML Body is defined. the notification is flagged as such in the Workflow Notification table.

For example: – If the message attribute is a URL attribute. or by the token name if no text value is defined.html” and ”Notification References. Then use the Workflow Resource Generator program to generate a new 2 – 52 Oracle Workflow Guide . When you select this attachment. You can respond directly to your notification from this web page. your e–mail reader opens a browser window that displays your notification in the Notification Details web page. are appended as HTML–formatted attachments to their parent message. the file name of the Notification References attachment is determined by the text value for the WF_URLLIST_ATTACHMENT resource token. and you are not already logged in. This attachment includes a link to each URL attribute for the message that has Attach Content checked. bypassing the need to process your response through the Notification Mailer. Similarly. or audio URL content. respectively. Note: Message attributes that have Attach Content checked in their Attributes property page. an attachment called Notification References is appended to the message. your e–mail reader takes you to the target URL page. video. You can navigate to a URL by choosing its link. The default file names are ”Notification Detail Link. you will be prompted to log in when you select the Notification Detail Link before you can access the Notification Details web page. If you want to specify different file names for these attachments. the fully generated PL/SQL document is fetched and attached to the message.msg source file specifying the new file names as the text values for the WF_URL_NOTIFICATION and WF_URLLIST_ATTACHMENT resource tokens. Note: If the SEND_ACCESS_KEY parameter in the Notification Mailer configuration file is set to N. Note: The file name of the Notification Detail Link attachment is determined by the text value for the WF_URL_NOTIFICATION resource token. The Notification Mailer does not have any special handling of image. The attachment is called Notification Detail Link.• URL attributes are token replaced with HTML anchors. An HTML–formatted notification always includes at least one attachment. When you select such an anchor.html”. or by the token name if no text value is defined. – If the message attribute is a PL/SQL or PL/SQL CLOB document attribute. you must first create a .

Alternatively.res) from the source file and to upload the new seed data from the source file to the database table WF_RESOURCES. are appended as HTML–formatted attachments. For example: – If the message attribute is a URL attribute. Plain Text E–mail with an HTML Attachment If the performer of a notification has a notification preference of plain text mail with HTML attachments (MAILATTH). See: Sending Plain Text E–mail: page 2 – 50 and Sending HTML–Formatted E–mail: page 2 – 51. it generates a plain text e–mail notification with HTML attachments from the information in the table and sends it to the performer role. an attachment called Notification References is appended to the message. you can respond to your HTML–formatted notification by clicking on a link that represents the response in the HTML message body. then the HTML attachment will also appear in line in the message body. If no HTML Body is defined. The response link generates a plain text e–mail response that includes a response template modified with the predefined response value that you select. The performer role should use an e–mail reader that supports HTML attachments. When the Notification Mailer polls the Notification table and identifies that flag. If your e–mail reader supports HTML–formatting in the message body. The Notification Mailer uses the Text Body defined for the message in the Message Body property page to generate the plain text body of the e–mail. See: To Run the Workflow Resource Generator: page 8 – 105 and Setting the WF_RESOURCES Environment Variable: page 2 – 42. This attachment includes a link to each URL attribute for Setting Up Oracle Workflow 2 – 53 . The Notification Mailer token replaces all message attributes referenced in the plain text message body with plain text values and token replaces all message attributes referenced in the attached HTML message with HTML–formatted values. Note: Message attributes that have Attach Content checked in their Attributes property page. It also generates an HTML version of the notification message and sends it as an attachment called HTML Message Body to the plain text e–mail. The Notification Mailer generates the content of the HTML attachment from the HTML Body defined for the message. the notification is flagged as such in the Workflow Notification table. it uses the Text Body to generate the HTML mail. See: To Respond to an HTML E–mail Notification: page 10 – 9.Oracle Workflow resource file (wf<language>.

– If the message attribute is a PL/SQL or PL/SQL CLOB document attribute. The default file 2 – 54 Oracle Workflow Guide . You can respond directly to your notification from this web page. Note: The file name of the HTML Message Body attachment is determined by the text value for the WF_HTML_MESSAGE resource token. a recipient of this type of notification can respond in one of two other ways: • Manually reply to the notification and enter response values following the instructions provided in the notification. the fully generated PL/SQL document is fetched and attached to the message. • Select the HTML Message Body attachment to display the HTML–formatted version of the e–mail message. When you select Notification Detail Link. and click on the HTML link that represents the response.the message that has Attach Content checked. Similarly. See: To Respond to a Plain Text E–mail Notification with an HTML Attachment: page 10 – 11. or by the token name if no text value is defined. Note: If the SEND_ACCESS_KEY parameter in the Notification Mailer configuration file is set to N. Alternatively. bypassing the need to process your response through the Notification Mailer. the file name of the Notification Detail Link attachment is determined by the text value for the WF_URL_NOTIFICATION resource token. The response link generates a plain text e–mail response that includes a response template updated with the predefined response value you select. You can navigate to a URL by choosing its link. you will be prompted to log in when you select the Notification Detail Link before you can access the Notification Details web page. and the file name of the Notification References attachment is determined by the text value for the WF_URLLIST_ATTACHMENT resource token. or by the token name if no text value is defined. See: To Respond to a Plain Text E–mail Notification Using Templated Response: page 10 – 4 and To Respond to a Plain Text E–mail Notification Using Direct Response: page 10 – 6. or by the token name if no text value is defined. your e–mail reader opens a browser window that displays your notification in the Notification Details web page. and you are not already logged in. The first attachment is HTML Message Body and the other is Notification Detail Link. The notifications received by a user whose notification preference is ’Plain text with HTML attachments’ always contain at least two attachments.

and ”Notification References. and WF_URLLIST_ATTACHMENT resource tokens. You must also define three folders or files in your mail account to use response processing. you can use the standalone Oracle Workflow Manager component available through Oracle Enterprise Manager to monitor the throughput of the Notification Mailer. ”Notification Detail Link. you must set up a least one mail account dedicated to the Notification Mailer in one of these mail applications. Users can receive e–mail notifications using any e–mail reader that is MAPI–compliant running on Windows NT or that UNIX Sendmail can provide a gateway to.html”. WF_URL_NOTIFICATION. Starting the Notification Mailer You can install and set up the Notification Mailer to run against UNIX Sendmail or a MAPI–compliant mail application on Windows NT. please refer to the Oracle Workflow Manager online help. See: To Run the Workflow Resource Generator: page 8 – 105 and Setting the WF_RESOURCES Environment Variable: page 2 – 42. before doing so.html”. use the following command syntax: wfmail. Then use the Workflow Resource Generator program to generate a new Oracle Workflow resource file (wf<language>. For more information. The Notification Mailer resides on your server in the $ORACLE_HOME/bin subdirectory.<xxx> –f <config_file> Replace <xxx> with snd to use the UNIX Sendmail version of the Notification Mailer. Replace <config_file> with the full path and Setting Up Oracle Workflow 2 – 55 . However. " To Start the Notification Mailer for UNIX Sendmail For the Standalone Version of Oracle Workflow: 1.html”.names are ”HTML Message Body.msg source file specifying the new file names as the text values for the WF_HTML_MESSAGE.res) from the source file and to upload the new seed data from the source file to the database table WF_RESOURCES. To run the Notification Mailer. If you want to specify different file names for these attachments. Note: If you are using the standalone version of Oracle Workflow available with Oracle9i Release 2. you must first create a . respectively.

5. enter the path and filename of a configuration file. When you finish modifying the print and run options for this request. you can specify the parameters for the Notification Mailer as arguments on the command line rather than in a configuration file. 2 – 56 Oracle Workflow Guide . Oracle Applications User’s Guide. 3. by typing the following command: wfmail. The Notification Mailer program is registered as a concurrent program. with any number of optional parameters and values. Submit the Notification Mailer concurrent program as a request. but override certain parameter values in the configuration file by specifying command line values: wfmail. To run the concurrent program from the Submit Requests form. See: Overview of Concurrent Programs and Requests.. 4. navigate to the Submit Requests form. Or. choose Submit to submit the request.. Note: 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. For the Version of Oracle Workflow Embedded in Oracle Applications: 1.<xxx> <arg1> <arg2> . Oracle Applications System Administrator’s Guide. Alternatively. The configuration file contains the parameters you want to run with the Notification Mailer. you can specify a configuration file.. In the Parameters window.<xxx> –f <config_file> <arg1> <arg2> . Note: If you are using the version of Oracle Workflow embedded in Oracle Applications and you have implemented Oracle Applications Manager. You can run the Notification Mailer concurrent program from the Submit Requests form or from the command line. please refer to the Oracle Applications Manager online help. 2.. using the format parameter=value.. 2. Choose OK to close the Parameters window.. 6.name of the configuration file that contains the parameters you want to run with the Notification Mailer. See: Submitting a Request. For more information. Replace <arg1> <arg2> . you can use Oracle Workflow Manager to configure and run the Notification Mailer.

you can also run the Notification Mailer concurrent program from the command line. if you want to specify the parameters for the Notification Mailer as arguments on the command line rather than in a configuration file.. Alternatively./]file.7. 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.. Install the Notification Mailer for MAPI–compliant mail applications on your Windows NT PC using Oracle Universal Installer. you can type the following command: wfmlr. Setting Up Oracle Workflow 2 – 57 .exe <arg1> <arg2> .. Or.ext or <native path> " To Start the Notification Mailer for MAPI–Compliant Mail Applications 1. replace config_file with the file specification of the configuration file that contains the parameters you want to run with the Notification Mailer. Rather than use the Submit Requests form. but you must first edit the properties of the icon to include the above command as its target.. Enter: WFMAIL apps/pwd 0 Y FILE config_file Replace apps/pwd with username and password to the APPS schema. The Notification Mailer program resides in <drive>:\<ORACLE_HOME>\bin.exe –f <config_file> 2. Note: You can also double–click on the Oracle Workflow Notification Mailer icon in the Oracle – <SID NAME> program group to start the program.exe –f <config_file> <arg1> <arg2> .. 3. you can specify a configuration file. Start the Notification Mailer program by entering the following command in an MS–DOS prompt window: <drive>:\<ORACLE_HOME>\bin\wfmlr.. but override certain parameter values in the configuration file by specifying command line values: wfmlr. A file specification for config_file can be: @<application_short_name>:[<dir>/.

please refer to the Oracle Applications Manager online help. the file resides in the resource subdirectory under $FND_TOP on your server. you can use Oracle Workflow Manager to configure and run the Notification Mailer. " To Create a Configuration File for the Notification Mailer 1. Any text preceded by # is not interpreted and can be used for including comments. Oracle Workflow provides an example configuration file. with the required and optional parameters and values. . The parameters are as follows: • CONNECT—(Required) The information to connect to the database account where the Oracle Workflow server is installed. using the format. If you are using the standalone version of Oracle Workflow. Note: If you are using the version of Oracle Workflow embedded in Oracle Applications and you have implemented Oracle Applications Manager...Replace <arg1> <arg2> . The file also resides on your PC in the <drive>:\<ORACLE_HOME>\wf\data subdirectory. 2. For more information.. under the subdirectory res. The content of the configuration file is formatted as follows: #Description PARAMETER1=<value1> #Description PARAMETER2=<value2> . called wfmail. username/password@connect_string (or alias). the file resides in your Oracle Workflow server directory structure. List each parameter name on the left side of the equal sign (=) and specify a value for each parameter on the right. For the version of Oracle Workflow embedded in Oracle Applications. using the format parameter=value. 3.cfg..

Attention: The CONNECT parameter is not required if you submit the Notification Mailer as a concurrent program from the version of Oracle Workflow embedded in Oracle Applications. the concurrent manager passes in the database connection information for the Notification Mailer to use. 2 – 58 Oracle Workflow Guide . In this case.

For Sendmail. the account information is the mail account profile name and mail account password. For MAPI–compliant mail programs. such as /var/mail/applmgr3.• ACCOUNT—(Required) The information to connect to the mail account that the program uses to send notification messages. in this example. applmgr3. Note that this should correspond to the account from which you start the Notification Mailer. . the account information would be the full file path of the mail spool file where incoming messages are stored.

.

The node name is included with the outgoing notification ID. • FROM—The value that appears in the From: field of the message header when a notification message is delivered to a user. For example. Note: You can only run one Notification Mailer per instance. if you already have a Notification Mailer on the server with the node name wf. The default name is wf. The default is Oracle Workflow. and want to start the Sendmail version of the Notification Mailer concurrent program. Attention: If you are using the version of Oracle Workflow embedded in Oracle Applications. . and each Notification Mailer must use a separate e–mail account to process responses. you must also specify the full path of the Sendmail executable directory in your PATH environment variable. If you have multiple workflow databases on one server. you could assign the node name wf2 to the Notification Mailer for the next instance you set up. you must define a unique node name for each Notification Mailer configuration file to ensure that the Notification Mailer for each instance uses a different TMP file for processing. Attention: If you want to start the Sendmail version of the Notification Mailer. then the Account parameter must be set to the account from which you start the Concurrent Manager. • NODE—(Required) The node identifier name.

The MAPI–compliant version of the Notification Mailer uses the display value that is set up for the mail account specified in the ACCOUNT parameter. • SUMMARYONLY—(Required) Indicate whether this Notification Mailer processes only notifications assigned to users/roles with a notification preference of ’SUMMARY’ or Setting Up Oracle Workflow 2 – 59 . Attention: The FROM parameter is only used to set the From: field value by the UNIX Sendmail version of the Notification Mailer.

’MAILATTH’. to schedule the Notification Mailer.whether it only processes notifications for users/roles with a notification preference of ’MAILTEXT’. The default is N. For the direct response method. this simply involves scheduling the Notification Mailer concurrent program in the Submit Request form. • DIRECT_RESPONSE—Specify N or n to send plain text notifications requiring a templated response to users with a notification preference of ’MAILTEXT’ or ’MAILATTH’. Specify Y or y to send plain text notifications requiring a direct response to users with these preferences. For the templated response method. Valid values are Y or N. ’MAILATTH’. users must enter their response values directly as the first lines of a reply. You should set up at least two Notification Mailers. or ’MAILHTML’. then the Notification Mailer will shut itself down after it polls the database and delivers any appropriate notification summaries. one where SUMMARYONLY=Y and one where SUMMARYONLY=N if any of your workflow users or roles have a notification preference of ’MAILTEXT’. The default is N. See: Reviewing Notifications via Electronic Mail: page 10 – 2. such as a cron job in UNIX. You must therefore schedule the Notification Mailer to run at the frequency you want notification summaries to be delivered. See: Setting Up Users and Roles from a Directory Repository: 2 – 21. ’MAILHTML’. We recommend you run the summary Notification Mailer once a day. users must reply using a template of response prompts and enter their response values between the quotes following each prompt. For Oracle Workflow running in the standalone environment. For the version of Oracle Workflow embedded in Oracle Applications. . or ’SUMMARY’. If you set SUMMARYONLY=Y. since the summary includes all open notifications. this would involve creating an operating system script.

you should comment out the 2 – 60 Oracle Workflow Guide . Consequently. Instead. the Notification Mailer will ignore the DIRECT_RESPONSE parameter when sending messages to users with a notification preference of ’MAILATTH’. if you do not need to use the Workflow Open Mail for Outlook Express template. all users with this notification preference will receive the plain text message body defined for the Workflow Open Mail for Outlook Express template. Attention: If you include the HTML_MAIL_TEMPLATE parameter in your configuration file. which uses the templated response method.

the Notification Mailer treats the response as a valid response. such as FYI (For Your Information) notifications. If the value is Y. meaning the notification was not forwarded or was forwarded according to a valid routing rule. which is an individual user’s e–mail address. If the two e–mail addresses match exactly. Valid values include Y or N. Warning: Note that there are limitations when you set ALLOW_FORWARDED_RESPONSE to N. the Notification Mailer will check if the ”From:” e–mail address of the notification response exactly matches the e–mail address of the recorded recipient role (or the e–mail address of a user in that role). The value must be an integer greater than or equal to zero. • AUTOCLOSE_FYI—Indicate whether this Notification Mailer automatically closes notifications that do not require a response. Setting Up Oracle Workflow 2 – 61 . If the two e–mail addresses do not match exactly. The default is Y. will never match the distribution list mail alias. the Notification Mailer does not process the response and treats it as unsolicited mail. If the value is N. suppose a notification is sent to a distribution list mail alias that does not have a USER/ROLE relationship in the Oracle Workflow directory service.HTML_MAIL_TEMPLATE parameter to let the DIRECT_RESPONSE parameter take effect. after sending the notifications by electronic mail. If any user from the distribution list responds to the notification. the Notification Mailer never checks the ”From:” e–mail address of the notification response and always allows the response to be processed. The default is 30. • IDLE—The number of seconds to wait before checking for messages to send. Valid values include Y or N. because the ”From:” e–mail address. • ALLOW_FORWARDED_RESPONSE—Indicate whether to allow a user to respond to an e–mail notification that has been forwarded from another role. The default is Y. meaning the notification was simply forwarded using the e–mail Forward command. all FYI notifications will remain open in the Notifications Worklist until users manually close these notifications. the Notification Mailer will always treat their notification response as unsolicited mail. For example. If the value is N.

The Notification Mailer always looks for the shutdown file in its current working directory before looking for notifications to process. The default is N. . For the concurrent program version of the Notification Mailer. For the version of Oracle Workflow embedded in Oracle Applications. The default filename is shutdown. For the standalone version of Oracle Workflow. the activity output goes to the concurrent manager log file. the Notification Mailer’s current working directory is the directory from which you start the Notification Mailer. Valid values include Y or N. • FAILCOMMAND—The command to run if the Notification Mailer encounters a fatal error. The test address overrides each recipient’s e–mail address so that you can test a workflow process without having to change each recipient’s e–mail address to access the test notifications. If the file exists. • REPLYTO—(Required) A default e–mail address to reply to. then the Notification Mailer shuts down. the current working directory is the $APPLCSF/$APPLLOG directory. A valid value would be a filename. • DEBUG—Indicate whether to print debugging information in the log. This lets you safely shut down the Notification Mailer without killing the process. You must remove the shutdown file to restart the Notification Mailer again. • SHUTDOWN—The name of a file that cues the Notification Mailer to shut down. If you have not set the $APPLCSF environment variable. if the e–mail account that processes responses is different from the e–mail account that sends outgoing notifications. then place the shutdown file in the $FND_TOP/$APPLLOG directory. This parameter is valid only for the standalone version of the Notification Mailer.• LOG—The name of a log file to record activity. • TEST_ADDRESS—Indicate a test e–mail address to direct all outgoing e–mail notifications.

The MAPI–compliant version of the Notification Mailer uses the display value that is set up for the mail account specified in the ACCOUNT parameter. • HTMLAGENT—The base URL that identifies the HTML Web Agent that handles HTML notification responses. Attention: The REPLYTO parameter is only used to set the reply–to address by the UNIX Sendmail version of the Notification Mailer. The default URL is derived from the Workflow 2 – 62 Oracle Workflow Guide . This URL is required to support e–mail notifications with HTML attachments.

Note: For the UNIX Sendmail version of the Notification Mailer. you can use a tag file to specify how your mail system identifies those stray messages and how you want the Notification Mailer to handle those messages should it come across them. but you can override this default by entering a different value for this parameter. A ’–’ preceding the name causes the Notification Mailer to truncate the folder or file on startup. See: Setting Global User Preferences: page 2 – 14. The default is unprocessed. . • DISCARD—The name of the mail folder or full path name of the mail file to put discarded messages. Note: For the UNIX Sendmail version of the Notification Mailer. Note: For the UNIX Sendmail version of the Notification Mailer. The default is –discard. Since different mail systems vary in how they identify bounced. or otherwise invalid messages. • UNPROCESS—The name of the mail folder or the full path name of the mail file to put unprocessed notification messages. auto–reply messages such as those sent by vacation daemons. Unusual messages include bounced or returned messages. The tag file lists strings of text found in unusual messages and the status you want to assign to a message response if it contains any of those strings. The default is processed. A ’–’ preceding the name causes the Notification Mailer to truncate the folder or file on startup. the UNPROCESS value must always be the full path name of a mail file. mass mailing lists. A ’–’ preceding the name causes the Notification Mailer to truncate the folder or file on startup. the PROCESS value must always be the full path name of a mail file.Web Agent specified in the Global Preferences web page. and so on. undeliverable. the DISCARD value must always be the full path name of a mail file. • TAGFILE—The full path and name of a tag file. • PROCESS—The name of the mail folder or full path name of the mail file to put processed notification messages.

it moves the message response to the discard folder and sends a ’Warning’ message to the sender that it Setting Up Oracle Workflow 2 – 63 . Attention: Only a message response that contains a notification ID is checked by the tag file. If the Notification Mailer receives a message response that does not contain a notification ID.

IGNORE. In this case. – ERROR—moves the message to the discard folder and initiates an error process.received unsolicited mail. See: Workflow Warning Mail Message: page 2 – 82. it moves the message to the discard folder. . Ideally. The Notification Mailer can also assign an INVALID status to a message response. This status is purely informative. as no further processing occurs with this notification. the workflow administrator corrects the problem and resends the notification by updating its mail status to MAIL. if one is defined. The notification’s status is still OPEN and its mail status is still SENT. – UNAVAIL (or any other user defined tag)—moves the message to the discard folder and continues waiting for a reply to the notification since the notification’s status is still OPEN. so that it continues to wait for a valid reply. but its mail status is updated to UNAVAIL. if the returned response value is not a valid value in the assigned lookup (result) type. Subject: line. The format used in the tag file is Status ”Matching string” where Status can be the value: ERROR. The Notification Mailer handles a message assigned one of these status values as follows: – IGNORE—moves the message to the discard folder and continues waiting for a valid reply to the open notification. The notification’s status is still OPEN. or body of the message. See: Workflow Invalid Mail Message: page 2 – 79. and sends an ’Invalid’ message but does not alter the notification’s status or mail status. or UNAVAIL and ”Matching string” is the text to look for in the From: line. but its mail status and activity status are updated to ERROR.

If you do not identify bounced and auto–reply messages. send an ’Invalid’ message and continue to wait for a reply. Attention: It is important that you uniquely identify bounced messages and auto–replies from normal responses in the tag file. 2 – 64 Oracle Workflow Guide . In both cases a perpetual loop would occur where the Notification Mailer keeps sending out an ’Invalid’ message and the ’Invalid’ message bounces back or is auto–replied. the Notification Mailer can mistake these as invalid responses.

As an example. if you want to mark all message responses that contain the string ”–– Unsent message follows ––” in the subject or body of the message as an error. you can include the following line in your tag file: ERROR ”–– Unsent message follows ––” .

If neither a language nor a territory is specified in the user preferences. The default is N. you should prioritize your strings listing the ERROR tags first. the file resides in your Oracle Workflow server directory structure in the subdirectory res.tag. • HTML_MAIL_TEMPLATE—Specify OPEN_MAIL_OUTLOOK to use the Workflow Open Mail for Outlook Express message as the Setting Up Oracle Workflow 2 – 65 . • RESET_FAILED—Indicate whether this Notification Mailer should reset all notifications with a mail status of FAILED to a mail status of MAIL when the Notification Mailer is started. Due to this behavior. See: Setting User Preferences: page 9 – 6. followed by the UNAVAIL and then IGNORE tags. That is. the Notification Mailer will convert the message to the codeset listed in the WF_LANGUAGES table for the language and territory specified in the recipient’s Workflow user preferences. For the version of Oracle Workflow embedded in Oracle Applications. Attention: If a message response matches more than one string in the tag file. If no preferred territory is specified. the Notification Mailer will use the codeset associated with the first entry it encounters for the user’s preferred language. the Notification Mailer performs a top to bottom comparison against the tag file. it gets tagged with the status of the first string it matches in the file. • RESET_NLS—Indicate whether the Notification Mailer should convert the NLS codeset for a notification message according to the notification recipient’s preferences before composing the message. the Notification Mailer will use the codeset seeded in WF_LANGUAGES for the language AMERICAN and territory AMERICA. the file resides on your server in the resource subdirectory under $FND_TOP. For the standalone version of Oracle Workflow. Oracle Workflow provides an example tag file called wfmail. Valid values include Y or N. Valid values include Y or N. If the value is Y. The default is N. the Notification Mailer will reset all FAILED notifications to a mail status of MAIL on startup and then attempt to process these notifications as usual. If the value is Y.

If you want to use the normal Workflow Open Mail (Templated) and Workflow Open Mail (Direct) templates. You can select this message template if you use an e–mail application such as Microsoft Outlook Express as your e–mail client. for users with a notification preference of ’MAILHTML ’or ’MAILATTH’.template for e–mail notifications that require a response. . in order to include a link to the Notification Details web page which lets users respond to the notification there. you can comment out this parameter in your configuration file and let the Notification Mailer use these templates by default. This template is provided to accommodate e–mail applications that cannot process the response links included in the Workflow Open Mail (Templated) and Workflow Open Mail (Direct) templates.

if users are not already logged in. Specify N to exclude the access key from the Notification Detail Link. if they have not already done so. Attention: If you include the HTML_MAIL_TEMPLATE parameter in your configuration file. When users click the link without the access key. you should comment out the HTML_MAIL_TEMPLATE parameter to let the DIRECT_RESPONSE parameter take effect. they are prompted to log in. if you do not need to use the Workflow Open Mail for Outlook Express template. Note: The HTML_MAIL_TEMPLATE parameter does not apply to users with a notification preference of ’MAILTEXT’. However. Instead. which uses the templated response method. • SEND_ACCESS_KEY—Specify Y to include an access key in the Notification Detail Link attachment that is sent with HTML e–mail notifications and with plain text e–mail notifications with HTML attachments. See: Defining Rules for Automatic Notification Processing: page 10 – 25 2 – 66 Oracle Workflow Guide . whether they are currently logged in or not. Consequently. all users with this notification preference will receive the plain text message body defined for the Workflow Open Mail for Outlook Express template. The access key allows users to access the Notification Details web page directly by clicking the Notification Detail Link. they cannot access any other notifications except the notification with which the attachment was sent. The default is Y. before they can access the Notification Details web page. the Notification Mailer will ignore the DIRECT_RESPONSE parameter when sending messages to users with a notification preference of ’MAILATTH’.

checking for the notification ID and node identifier. • Checks for messages. it reads the message. The three folders or files serve to hold discarded. Setting Up Oracle Workflow 2 – 67 . Response Processing You must create three folders or files in your response mail account before starting the Notification Mailer to process responses. it moves the message to the unprocessed folder. If a message exists. it: • Retrieves the notification ID. If you are running the standalone version of Oracle Workflow. it does not move the message so that the Notification Mailer for the correct node can read it later. • If the message is not a notification. Oracle Workflow provides a sample shell script to restart the UNIX Sendmail Notification Mailer. The Notification Mailer does the following to check for response messages: • Logs into the response mail account. 2. it moves it to the discard folder. but for the wrong node." To Run a Perpetual Shell Script for the Notification Mailer 1.csh –f <config_file> Replace <config_file> with the full path name of the configuration file that contains the parameters you want to run with the Notification Mailer. The shell script passes all command line arguments directly to the Notification Mailer executable. Note: Use a similar technique to restart the Window NT Notification Mailer. For each message. you need to set up a perpetual shell script that restarts the Notification Mailer if it shuts down due to failure. The Notification Mailer then opens the unprocessed folder to process each response. Enter the following command at your operating script prompt to run the shell script: wfmail. unprocessed. • If the message is a notification. and processed messages. • If the message is a notification for the current node. The script is called wfmail.csh and it is located in the Oracle Home bin subdirectory on your server.

The Notification Mailer then truncates the discard and processed folders. it moves it to the discard folder. it reroutes it or updates the notification’s status and stops any further processing depending on the specifications of the tag file. – If the notification does not exist. if a ’–’ precedes the discard and process parameters specified in the configuration file. If a response is invalid. – If the notification exists and is open. – If the notification exists. 2 – 68 Oracle Workflow Guide . If the message bounced. it sends an Workflow Invalid Mail message to the recipient role. • Moves the message for the completed notification to the processed folder and closes the unprocessed folder. if any. but is closed or canceled. and logs out of the mail and database accounts. it verifies the response values with the definition of the message’s response attributes in the database. • Checks the Oracle Workflow database for this notification. it moves it to the discard folder. If the responses are valid. it calls a Respond function to complete the notification response and saves the change to the database.• Checks to see if the message bounced by referring to a specified tag file.

rather they act as templates for any e–mail messages the Notification system sends. The response instructions in the plain text message body describe how to reply manually using the templated response method.Step 10 Modifying Your Message Templates Use the System: Mailer item type in Oracle Workflow Builder to configure the templates that Oracle Workflow uses to send e–mail notifications. The messages of the System: Mailer item type are not true messages. Warning: Do not add new attributes or delete existing attributes from the message templates in the System: Mailer item type. You can reorganize the layout of these attributes in each template to customize the e–mail messages sent by the Notification system. including what header information to include. It also includes the following information about a message: message priority. Context: You need to perform this step only once. the Notification system uses the Workflow Open Mail (Templated) message as a template for e–mail notifications that require a response. Setting Up Oracle Workflow 2 – 69 . The System: Mailer item type has attributes that represent every part of the notification message. date that a response is due. Note: To select the templated response method. The notification template includes generic instructions on how to respond to a notification. The response instructions in the HTML–formatted message body describe how to reply using the automatically generated response template. This message is used for notifications sent to performers with a notification preference of MAILHTML. System: Mailer messages determine the basic format of an e–mail notification. and any comments from the sender of the message or. This message is used for notifications sent to performers with a notification preference of MAILTEXT or MAILATTH. any comments from the forwarder. See: To Create a Configuration File for the Notification Mailer: page 2 – 58. and is also attached to notifications sent to performers with a notification preference of MAILATTH. if the notification is forwarded from another user. or whether and where to include details such as the message due date and priority. Workflow Open Mail (Templated) Message If you select the templated response method. set DIRECT_RESPONSE=N in the configuration file for the Notification Mailer.

The values are drawn from the message definition associated with a notification activity. MAILTO CLICK_HERE_ RESPONSE You can customize the boilerplate text that appears in the body of the Workflow Open Mail (Templated) message. the performer. Required notification code used to identify the information in the notification. specified in the notification activity. Copy and paste from 2 – 70 Oracle Workflow Guide . The boilerplate text for a plain text message body is as follows: Oracle Workflow Notification &COMMENT ____________Start of Response Template____________ Response Template for &NOTIFICATION To submit your response. START_DATE TO SUBJECT BODY COMMENT PRIORITY DUE_DATE NOTIFICATION RESPONSE The date the message is sent. The role the notification is sent to. This attribute is used only for HTML e–mail notifications. The user response section as defined by the Respond message attributes in the actual notification message definition. The content of the HTML tag that a recipient would click on to respond to a notification. This attribute is not currently used. The priority of the notification message. Comments added by the sender or the forwarder. The content of the HTML tag that a recipient would click on to access the Notification Details page to respond to a notification. The subject line defined in the message. where attributes preceded by an ampersand (&) are token substituted with runtime values when the notification is sent. reply to this message.The Workflow Open Mail (Templated) message has the following message attributes. The date by which a response is required. The text of the body defined in the message. including this response template with your reply.

Note: To select the direct response method. date that a response is due. any comments from the forwarder. the Notification system uses the Workflow Open Mail (Direct) message as a template for e–mail notifications that require a response. Setting Up Oracle Workflow 2 – 71 . The notification template includes generic instructions on how to respond to a notification. set DIRECT_RESPONSE=Y in the configuration file for the Notification Mailer. and any comments from the sender of the message or. Insert your response value between the quotes following each response prompt.this message if necessary to obtain an editable copy of the template. ensure all response prompts include a desired response value within quotes. It also includes the following information about a message: message priority. Before sending the E–mail response to close this notification. if the notification is forwarded from another user. &RESPONSE ____________End of Response Template_____________ Notification Details: &BODY Due Date: &DUE_DATE The boilerplate text for a HTML–formatted message body is as follows: <HTML> <HEAD> <TITLE> Oracle Workflow Notification </TITLE> </HEAD> <BODY BGCOLOR=”#FFFFFF” > <P><B><FONT SIZE=+1>&COMMENT</FONT> </B> <P>&BODY <P><B>Please click on one of the following choices to automatically generate an E–mail response. See: To Create a Configuration File for the Notification Mailer: page 2 – 58.</B> <P>&MAILTO </BODY> </HTML> Workflow Open Mail (Direct) Message If you select the direct response method.

The content of the HTML tag that a recipient would click on to access the Notification Details page to respond to a notification.The response instructions in the plain text message body describe how to reply using the direct response method. and is also attached to notifications sent to performers with a notification preference of MAILATTH. This message is used for notifications sent to performers with a notification preference of MAILHTML. specified in the notification activity. The subject line defined in the message. Comments added by the sender or the forwarder. The date by which a response is required. The priority of the notification message. The text of the body defined in the message. START_DATE TO SUBJECT BODY COMMENT PRIORITY DUE_DATE NOTIFICATION RESPONSE The date the message is sent. This message is used for notifications sent to performers with a notification preference of MAILTEXT or MAILATTH. This attribute is used only for HTML e–mail notifications. MAILTO CLICK_HERE_ RESPONSE 2 – 72 Oracle Workflow Guide . The content of the HTML tag that a recipient would click on to respond to a notification. the performer. The values are drawn from the message definition associated with a notification activity. The user response section as defined by the Respond message attributes in the actual notification message definition. This attribute is not currently used. The role the notification is sent to. regardless of which response method you select in the DIRECT_RESPONSE parameter. Required notification code used to identify the information in the notification. The response instructions in the HTML–formatted message body describe how to reply using the automatically generated response template. The Workflow Open Mail (Direct) message has the following message attributes. Note: Responses that are generated automatically from an HTML–formatted notification or attachment always use a response template.

Instructions below detail exactly what should be placed on each line of your reply.You can customize the boilerplate text that appears in the body of the Workflow Open Mail (Direct) message. reply to this message.</B> <P>&MAILTO </BODY> </HTML> Setting Up Oracle Workflow 2 – 73 . Before sending the E–mail response to close this notification. The first lines of your reply must be your responses to the notification questions. where attributes preceded by an ampersand (&) are token substituted with runtime values when the notification is sent. &RESPONSE ____________________________________________________ Notification Details: &BODY Due Date: &DUE_DATE The boilerplate text for a HTML–formatted message body is as follows: <HTML> <HEAD> <TITLE> Oracle Workflow Notification </TITLE> </HEAD> <BODY BGCOLOR=”#FFFFFF” > <P><B><FONT SIZE=+1>&COMMENT</FONT> </B> <P>&BODY <P><B>Please click on one of the following choices to automatically generate an E–mail response. ensure all response prompts include a desired response value within quotes. The boilerplate text for a plain text message body is as follows: Oracle Workflow Notification &COMMENT ____________________________________________________ Response Instructions for &NOTIFICATION To submit your response. including this note with your reply.

This message includes a link to the Notification Details web page to let users respond to the notification there. Note: To select the Workflow Open Mail for Outlook Express message as the message template for users with a notification preference of MAILHTML or MAILATTH. you should select the Workflow Open Mail for Outlook Express message as a template for e–mail notifications that require a response. This template is provided to accommodate e–mail applications that cannot process the response links included in the Workflow Open Mail (Templated) and Workflow Open Mail (Direct) templates. set HTML_MAIL_TEMPLATE=OPEN_MAIL_OUTLOOK in the configuration file for the Notification Mailer. . See: To Create a Configuration File for the Notification Mailer: page 2 – 58. for users with a notification preference of MAILHTML or MAILATTH.Workflow Open Mail for Outlook Express Message If you use an e–mail application such as Microsoft Outlook Express as your e–mail client.

2 – 74 Oracle Workflow Guide . you should comment out the HTML_MAIL_TEMPLATE parameter to let the DIRECT_RESPONSE parameter take effect. which uses the templated response method. The response instructions in the plain text message body describe how to reply manually using the templated response method. it automatically attempts to establish a web session with the web server. This message is used for notifications sent to performers with a notification preference of MAILHTML. if you do not need to use the Workflow Open Mail for Outlook Express template. all users with this notification preference will receive the plain text message body defined for the Workflow Open Mail for Outlook Express template. and is also attached to notifications sent to performers with a notification preference of MAILATTH. the Notification Mailer will ignore the DIRECT_RESPONSE parameter when sending messages to users with a notification preference of ’MAILATTH’. Consequently. See: Reviewing Notifications via Electronic Mail: page 10 – 2. This message is used for notifications sent to performers with a notification preference of MAILATTH. Attention: If you include the HTML_MAIL_TEMPLATE parameter in your configuration file. Instead. The HTML–formatted message body includes a link called ”Click here to respond” which lets users access the notification in the Notification Details web page to respond to the notification. Note: When users choose the ”Click here to respond” link. Users must be able to connect to the web server to use this link to respond to a notification.

This attribute is not currently used. the performer. Insert your response value between the quotes following each response prompt. START_DATE TO SUBJECT BODY COMMENT PRIORITY DUE_DATE NOTIFICATION RESPONSE The date the message is sent. reply to this message including this response template in your reply. This attribute is used only for HTML e–mail notifications. The values are drawn from the message definition associated with a notification activity.The Workflow Open Mail for Outlook Express message has the following message attributes. specified in the notification activity. Comments added by the sender or the forwarder. The boilerplate text for a plain text message body is as follows: Oracle Workflow Notification &COMMENT ____________Start of Response Template____________ Response Template for &NOTIFICATION To submit your response. The text of the body defined in the message. Setting Up Oracle Workflow 2 – 75 . The date by which a response is required. The priority of the notification message. The content of the HTML tag that a recipient would click on to respond to a notification. The content of the HTML tag that a recipient would click on to access the Notification Details page to respond to a notification. Required notification code used to identify the information in the notification. The subject line defined in the message. MAILTO CLICK_HERE_ RESPONSE You can customize the boilerplate text that appears in the body of the Workflow Open Mail for Outlook Express message. The role the notification is sent to. The user response section as defined by the Respond message attributes in the actual notification message definition. where attributes preceded by an ampersand (&) are token substituted with runtime values when the notification is sent.

2 – 76 Oracle Workflow Guide . The values are drawn from the message definition associated with a notification activity. START_DATE TO SUBJECT BODY COMMENT PRIORITY DUE_DATE The date the message is sent. The text of the body defined in the message. The priority of the notification message. The role the notification is sent to. The date by which a response is required. In addition to the message. The Workflow Open FYI Mail message has the following message attributes. The subject line defined in the message. the performer. specified in the notification activity.&RESPONSE ____________End of Response Template_____________ Notification Details: &BODY Due Date: &DUE_DATE The boilerplate text for a HTML–formatted message body is as follows: <HTML> <HEAD> <TITLE> Oracle Workflow Notification </TITLE> </HEAD> <BODY BGCOLOR=”#FFFFFF” > <P><B><FONT SIZE=+1>&COMMENT</FONT> </B> <P>&BODY <P>&CLICK_HERE_RESPONSE </BODY> </HTML> Workflow Open FYI Mail Message The Notification system uses the Workflow Open FYI Mail message as a template for all e–mail notifications that do not require a response. The template indicates that the notification is for your information (FYI) and does not require a response. Comments added by the sender or the forwarder. the template also includes any comments from the sender or forwarder of the message.

where attributes preceded by an ampersand (&) are token substituted with runtime values when the notification is sent. The Workflow URL Attachment message has the following message attribute.NOTIFICATION Required notification code used to identify the information in the notification. The template includes a list with links to each URL. You can customize the text that appears in the body of the Workflow URL Attachment template. URLLIST The list of URLs to be included in the attachment. The boilerplate text for the HTML–formatted message body is as follows: <HTML> <HEAD> <TITLE> Oracle Workflow Notification References </TITLE> </HEAD> <BODY BGCOLOR=”#FFFFFF” > Setting Up Oracle Workflow 2 – 77 . The boilerplate text for the plain text message body is as follows: Oracle Workflow Notification (FYI) &COMMENT ––––––––––––––––––––––––––––––––––––––––––– &BODY The boilerplate text for the HTML–formatted message body is as follows: <HTML><HEAD></HEAD> <BODY BGCOLOR=”#FFFFFF”><b>Oracle Workflow Notification (FYI)</b> <br>&COMMENT <hr> <P>&BODY </BODY> </HTML> Workflow URL Attachment Message The Notification system uses the Workflow URL Attachment message as a template to create the Notification References attachment for HTML–formatted notification messages that include URL attributes with Attach Content checked. The value is drawn from the message definition associated with a notification activity. where an attribute preceded by an ampersand (&) is token substituted with a runtime value when the notification is sent. You can customize the text that appears in the body of the Workflow Open FYI Mail template.

The role the notification is sent to. Required notification code used to identify the information in the notification. You may simply delete it along with this message. specified in the notification activity. The date by which a response is required. The text of the original message. the performer.<P><B><FONT SIZE=+1>Notification References</FONT> </B> <HR WIDTH=”100%”> <BR> &URLLIST <BR> <HR WIDTH=”100%”> <BR>&nbsp. Comments added by the sender or the forwarder. –––––––––––––––––––––––––––––––––––––––––––– &BODY The boilerplate text for the HTML–formatted message body is as follows: <html><Head></Head><body>You earlier received the notification shown below. and no longer requires your response. The boilerplate text for the plain text message body is as follows: You earlier received the notification shown below. with values that are drawn from the message definition associated with the canceled notification activity: START_DATE TO SUBJECT BODY COMMENT PRIORITY DUE_DATE NOTIFICATION The date the original message was sent. The subject line of the original message. That notification is now canceled. That notification is now 2 – 78 Oracle Workflow Guide . It has the following message attributes. </BODY> </HTML> Workflow Canceled Mail Message The Workflow Canceled Mail message informs the recipient that a previously sent notification is canceled. The priority of the notification message.

The content of the HTML tag that a recipient would click on to access the Notification Details page to respond to a notification. specified by the notification activity. The role the notification is sent to. simply delete it along with this message. the performer. and no longer requires your response. This attribute is not currently used. MAIL_ERROR_ MESSAGE MAIL_ERROR_ STACK CLICK_HERE_ RESPONSE The boilerplate text for the plain text message body is as follows: Setting Up Oracle Workflow 2 – 79 .canceled. The user response section as defined by the Respond message attributes in the original message definition. Required notification code used to identify the information in the notification. The date by which a response is required. The subject line of the original message. The text of the original message. <hr> &BODY </body></html> You may Workflow Invalid Mail Message The Workflow Invalid Mail message gets sent to a user when a user responds incorrectly to a notification. The message describes how to respond to the notification correctly. An error message that the mail program generates if an error occurs upon processing the response. Comments added by the sender or the forwarder. The message attributes are as follows: START_DATE TO SUBJECT BODY COMMENT PRIORITY DUE_DATE NOTIFICATION RESPONSE The date the original message was sent. The priority of the notification message. An error stack of arguments that the mail program generates if an error occurs upon processing the response. You can provide this information to your support representative if the problem cannot be resolved with a corrected response.

You must supply a value or a blank line for each question asked. &RESPONSE ––––––––––––––––––––––––––––––––––––––––––– Notification Details: &BODY Due Date: &DUE_DATE The boilerplate text for the HTML–formatted message body is as follows: <html><Head></Head><body>WARNING: Your previous response to this message was invalid (see error message below). Please resubmit your response. You should enter one line for each response required by the notification. any additional lines will be ignored. The first lines of your reply must be your responses to the notification questions. Error Message: &MAIL_ERROR_MESSAGE Error Stack: &MAIL_ERROR_STACK –––––––––––––––––––––––––––––––––––––––––––––––––– Response Instructions for &NOTIFICATION To submit your response. <P>Error Message: &MAIL_ERROR_MESSAGE <BR>Error Stack: &MAIL_ERROR_STACK <HR><P><B><FONT SIZE=+1>&COMMENT</FONT> </B> <P>&BODY <P><B>Please click on one of the following choices to 2 – 80 Oracle Workflow Guide . You may leave a line blank to accept the default value for that specific response. reply to this message. Please resubmit your response.Oracle Workflow Notification &COMMENT WARNING: Your previous response to this message was invalid (see error message below). Instructions below detail exactly what should be placed on each line of your reply. This note contains a special ’NID’ string that is required to process the response. including this original with your reply.

That notification is now closed. <hr> Setting Up Oracle Workflow 2 – 81 . the performer. The subject line of the original message. That notification is now closed. and no longer requires your response. You may simply delete it along with this message. specified in the notification activity. and no longer requires your response. The priority of the notification message. You may simply delete it along with this message. ensure all response prompts include a desired response value within quotes.</B> <P>&MAILTO </BODY> </HTML> Workflow Closed Mail Message The Workflow Closed Mail message informs the recipient that a previously sent notification is now closed. Before sending the E–mail response to close this notification. –––––––––––––––––––––––––––––––––––––––––––– &BODY The boilerplate text for the HTML–formatted message body is as follows: <html><Head></Head><body>You earlier received the notification shown below. Required notification code used to identify the information in the notification. The text of the original message. It has the following message attributes. Comments added by the sender or the forwarder. The date by which a response is required.automatically generate an E–mail response. The boilerplate text for the plain text message body is as follows: You earlier received the notification shown below. with values that are drawn from the message definition associated with the closed notification activity: START_DATE TO SUBJECT BODY COMMENT PRIORITY DUE_DATE NOTIFICATION The date the original message was sent. The role the notification is sent to.

The current date. The user/role the notification summary is sent to. The boilerplate text for the plain text message body is as follows: Summary of Notifications for ’&USER_NAME’ (Please use the Notifications web page to see details or respond.) –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– &SUMMARY The boilerplate text for the HTML–formatted message body is as follows: <HTML><HEAD></HEAD><BODY> <P><FONT size=+1>Summary of Notifications for ’&USER_NAME’</FONT> <BR><i>Please use the Notifications web page to see details or respond. with values that are drawn from the message definition associated with the open notification activity: SUMMARY USER_NAME SYSDATE Summary report.&BODY </body></html> Workflow Summary Mail Message The Notification system uses the Workflow Summary Mail message as a template to send a summary of workflow notifications to users and roles that have their notification preference set to ’SUMMARY’ in the Oracle Workflow directory service.</i> <HR> &SUMMARY </BODY> </HTML> Workflow Warning Mail Message The Notification system uses the Workflow Warning Mail message as a template to send a message to a user if it receives unsolicited mail from 2 – 82 Oracle Workflow Guide . It has the following message attributes. The Workflow Summary Mail message summarizes all currently open notifications for a given user/role. the performer.

please use the response template that was included with your notification. please do not send mail to this account. It has the following message attributes.</b> <hr> <P>From: &UFROM <BR>Subject: &USUBJECT <P>&UBODY </body></html> Setting Up Oracle Workflow 2 – 83 . with values that are drawn from the unsolicited mail: UBODY USUBJECT UFROM The text of the unsolicited mail message body. please use the auto–generated reply created when responding to the original message. If you are responding to a notification.that user. This contains the ’NID’ line which is necessary for identification. please do not send mail to this account. –––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– From: &UFROM Subject: &USUBJECT &UBODY The boilerplate text for the HTML–formatted message body is as follows: <html><head></head><body> <b>Messages sent to this account are processed automatically by the Oracle Workflow Notification Mailer. The address of the user that sent the unsolicited mail. The message you sent did not appear to be in response to a notification. The message you sent did not appear to be in response to a notification. The boilerplate text for the plain text message body is as follows: Messages sent to this account are processed automatically by the Oracle Workflow Notification Mailer. If you are not responding to a notification. If you are responding to a notification. If you are not responding to a notification. Take care to include the ’NID’ line of the template in your reply. The text of the unsolicited mail subject line.

1. the mapping of /OA_MEDIA/ is completed after you install the Oracle Workflow server and you set up the Workflow Monitor. Note: If you are using Oracle Workflow embedded in Oracle Applications.8 or higher and Abstract Windowing Toolkit (AWT) to connect to the Workflow Monitor.gif if you are using the standalone version of Oracle Workflow. you must have Oracle HTTP Server installed.gif format) to FNDLOGOS.Step 11 Customizing the Logo on Oracle Workflow’s Web Pages To use Oracle Workflow’s web pages and the Workflow Monitor at your site. Move the file to the physical directory that your web server’s /OA_MEDIA/ virtual directory points to. Use a web browser that supports JavaScript to connect to the Notification Web page or a web browser that supports Java Development Kit (JDK). the mapping of /OA_MEDIA/ is completed as part of the Oracle Applications installation and setup steps. Once your web server is installed and set up.gif if you are using Oracle Workflow embedded in Oracle Applications or WFLOGO. Refer to your web server documentation for additional information. Note: If you are using the standalone version of Oracle Workflow. Context: You need to perform this step only once. you can customize the company logo that appears on Oracle Workflow’s web pages. 2 – 84 Oracle Workflow Guide . 1. 2. Version 1. " To Customize Oracle Workflow’s Web Pages You can customize the company logo that appears in the upper right corner of Oracle Workflow’s web pages. Copy or rename your company logo file (in .

the mapping of /OA_MEDIA/ is completed after you install the Oracle Workflow server and you set up the Workflow Monitor. If you want the custom icons that you include in your Oracle Workflow Builder process definition to appear in the Workflow Monitor when you view the process.ico suffix. so that the Workflow Monitor can access them: Note: If you are using Oracle Workflow embedded in Oracle Applications. The Icon subdirectory is defined in the registry of Oracle Workflow Builder.ico) to gif format (. Setting Up Oracle Workflow 2 – 85 . Context: You need to perform this step only once.Step 12 Adding Custom Icons to Oracle Workflow Oracle Workflow Builder looks for icons in the Icon subdirectory of the Oracle Workflow area on your PC. Workflow provides a variety of icons that you can use with your activities and processes.gif). the mapping of /OA_MEDIA/ is completed as part of the Oracle Applications installation and setup steps. you must do the following: • Convert the custom icon files (. The Oracle Workflow area is typically the Wf subdirectory within your ORACLE_HOME directory structure.gif files to the physical directory that your web server’s /OA_MEDIA/ virtual directory points to. Note: If you are using the standalone version of Oracle Workflow. You can add any icon files to this area as long as they are Windows icon files with the . • Copy the .

Step 13 Setting Up the Java Function Activity Agent To execute external Java function activities. you must specify the database connection details. Starting the Java Function Activity Agent If you are using the standalone version of Oracle Workflow. you can run scripts provided by Oracle Workflow to start the Java Function Activity agent. Some standard Workflow activities are external Java function activities and require the Java Function Activity Agent. Note: The Java Runtime Environment is available for download from http://www. or a higher 1. This functionality is currently only available for the standalone version of Oracle Workflow. you must have Java Runtime Environment (JRE) Version 1.1. To Create a Function Activity: page 4 – 50. To run the Java Function Activity Agent. See: Standard Activities: page 6 – 2. and places the results on the ’Inbound’ queue for external function processing. calls the appropriate Java functions. The Java Function Activity Agent dequeues the messages related to external Java activities from the ’Outbound’ queue for external function processing. You use different commands to start the agent depending on whether you are running it from a script or manually. installed. you must run a background engine to process the ’Inbound’ queue and complete the function activity. 2 – 86 Oracle Workflow Guide . See: Setting Up Background Engines: page 2 – 43. When you start the Java Function Activity Agent. Note: These ’Outbound’ and ’Inbound’ queues are separate from the queues used for the Business Event System. you must set up the Java Function Activity Agent. You can also define your own external Java function activities.8.1.x version. and which options you want to specify.javasoft. You can also start the agent manually. and Standard API for Java Procedures Called by Function Activities: page 7 – 8. which platform you are running it on. Context: You need to perform this step only once. After a Java function completes. See: Workflow Queue APIs: page 8 – 162. You can also optionally specify the character set and the JDBC driver type that you want to use.com.

csh script on UNIX. The custom class files should reside on the same platform where the Java Function Activity Agent is run.csh or wfjvlsnr. however. Running the wfjvlsnr. if you want to use the default JDBC OCI8 driver: wfjvlsnr. you must edit the scripts to include the path to the JAR files containing your custom Java classes. you can run scripts called wfjvlsnr. <password>—The password for your Oracle Workflow database account.csh <user_name>/<password>@<connect_string> [<character_set>] Replace the parameters in the command as follows: • • <user_name>—The user name of your Oracle Workflow database account. respectively. depending on your platform and the options you want to specify. Since this command uses the default JDBC OCI8 driver. These scripts are located on your server in the Oracle Workflow admin subdirectory. You can also use the following command to run the wfjvlsnr.csh script on UNIX.csh ”<user_name> <password> <connect_string> [<JDBC_driver>]” [<character_set>] Replace the parameters in the command as follows: Setting Up Oracle Workflow 2 – 87 . Oracle Workflow uses UTF8 by default. the connect string should be the database name as specified in its TNSNAMES entry. • <character_set>—The character set to use for the database session. You can use commands with different syntax to run the scripts.Starting the Java Function Activity Agent From a Script If you are using the standalone version of Oracle Workflow. if you want to specify the JDBC driver type to use: wfjvlsnr. If you define your own external Java function activities. The Java Function Activity Agent does not need to reside on the same tier as the database. you can use the following command to run the wfjvlsnr.csh Script on UNIX For example. • <connect_string>—The connect string for the database.bat to start the Java Function Activity Agent on UNIX or on Windows NT. If you do not specify a character set.

For the first type. and JDBC driver type. If you do not specify a character set. must be enclosed in double quotes to separate them from the character set parameter.bat <user_name>/<password>@<connect_string> [<character_set>] Replace the parameters in the command as follows: 2 – 88 Oracle Workflow Guide .• • <user_name>—The user name of your Oracle Workflow database account. <password>—The password for your Oracle Workflow database account. If you do not specify a character set. The JDBC driver type can be either oci8 or thin. port number. port number. Note: The connection details. connect string.bat script. password. Running the wfjvlsnr. if you want to use the default JDBC OCI8 driver: wfjvlsnr. you can use two different types of connect string. protocol. the connect string should include the host name. The format of the connect string depends on the JDBC driver type. • <connect_string>—The connect string for the database.bat Script on Windows NT On Windows NT. • <character_set>—The character set to use for the database session. the connect string should include an Oracle Net name–value pair with the host name. the connect string should be the database name as specified in its TNSNAMES entry. and SID in the following format: (description=(address=(host=<host_name>)(protocol= <protocol>)(port=<port_number>))(connect_data=(sid= <database_SID>))) • <JDBC_driver>—The JDBC driver type you want to use to connect to the database. in the following format: <database_name> – For a JDBC THIN driver. Oracle Workflow uses the JDBC OCI8 driver by default. – For a JDBC OCI8 driver. and database system identifier (SID) in the following format: <host_name>:<port_number>:<database_SID> For the second type. you can use the following command to run the wfjvlsnr. Oracle Workflow uses UTF8 by default. including the user name.

the connect string should include the host name. the connect string should be the database name as specified in its TNSNAMES entry. For the first type.bat script on Windows NT. port number. and SID in the following format: (description=(address=(host=<host_name>)(protocol= <protocol>)(port=<port_number>))(connect_data=(sid= <database_SID>))) Setting Up Oracle Workflow 2 – 89 .• • <user_name>—The user name of your Oracle Workflow database account. • <character_set>—The character set to use for the database session. <password>—The password for your Oracle Workflow database account. protocol. If you do not specify a character set. Since this command uses the default JDBC OCI8 driver. port number. You can also use the following command to run the wfjvlsnr. you can use two different types of connect string. and database system identifier (SID) in the following format: <host_name>:<port_number>:<database_SID> For the second 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 format of the connect string depends on the JDBC driver type. the connect string should include an Oracle Net name–value pair with the host name.bat ”<user_name> <password> <connect_string> [<JDBC_driver>]” [<character_set>] Replace the parameters in the command as follows: • • <user_name>—The user name of your Oracle Workflow database account. <password>—The password for your Oracle Workflow database account. • <connect_string>—The connect string for the database. if you want to specify the JDBC driver type to use: wfjvlsnr. Oracle Workflow uses UTF8 by default. • <connect_string>—The connect string for the database.

this file is named fndewt.jar. and JDBC driver type. this file is named ewt–<version>.jar.fnd. such as ewt–3_3_18.jar. • The Ewt JAR file—Utilities referenced by the Workflow Java APIs.jar—The Java Function Activity Agent. Note: The connection details. this file is named share–<version>. or whichever version is current. In the version of Oracle Workflow embedded in Oracle Applications. In the standalone version of Oracle Workflow with Oracle9i. the directory containing the Workflow JAR files. password. such as swingall–1_1_1. Starting the Java Function Activity Agent Manually To start the Java Function Activity Agent manually. • <character_set>—The character set to use for the database session.jar. • The Swing JAR file—Optional additional utilities. or whichever version is current.WFFALsnr. Oracle Workflow uses the JDBC OCI8 driver by default. connect string.jar. the Oracle XML parser.jar. the Oracle JDBC implementation. run JRE against oracle.• <JDBC_driver>—The JDBC driver type you want to use to connect to the database. this file is named fndbalishare. In the standalone version of Oracle Workflow with Oracle9i. and the following Workflow JAR files: • wfjava. this file is named swingall–<version>. The JDBC driver type can be either oci8 or thin. If you do not specify a character set. You can also optionally specify the character set and the JDBC driver type that you want to use. The CLASSPATH must point to the Java Runtime Environment. • The Share JAR file—Utilities referenced by the Workflow Java APIs. Oracle Workflow uses UTF8 by default. and the database connect string.jar—Workflow Java APIs. including the user name. such as share–1_1_9.jar.jar. If you do not specify a character set. In the version of Oracle Workflow embedded in Oracle Applications. specifying your CLASSPATH. • wfapi. or whichever version is current. the user name and password of your Oracle Workflow database account. In the version of Oracle 2 – 90 Oracle Workflow Guide .wf. In the standalone version of Oracle Workflow with Oracle9i. must be enclosed in double quotes to separate them from the character set parameter.apps.

you can optionally use the –DCHARSET option to specify the character set that you want to use. The Java Function Activity Agent does not need to reside on the same tier as the database. Setting Up Oracle Workflow 2 – 91 . however.fnd. Oracle Workflow uses UTF8 by default. The custom class files should reside on the same platform where the Java Function Activity Agent is run. You can use commands with different syntax to start the Java Function Activity Agent manually. <user_name>—The user name of your Oracle Workflow database account. you must also include the JAR files containing your custom Java classes in the CLASSPATH. depending on your platform and the options you want to specify. this file is named fndswing.zip: $<Workflow_JAR_file_directory>/<Share_JAR_file>: $<Workflow_JAR_file_directory>/<Ewt_JAR_file>: $<Workflow_JAR_file_directory>/<Swing_JAR_file>:” [–DCHARSET=<character_set>] oracle.wf. you can use the following command to start the Java Function Activity Agent on UNIX.jar.jar:$<ORACLE_HOME>/wf/ xml/java/lib/xmlparserv2.Workflow embedded in Oracle Applications. the Workflow JAR files are located in the <ORACLE_HOME>/jlib directory.apps. If you do not specify a character set. the Workflow JAR files are located in the <ORACLE_HOME>/wf/java/oracle/apps/fnd/wf/jar/ directory. Replace the parameters in the command as follows: • • <character_set>—The character set to use for the database session.WFFALsnr <user_name>/<password>@<connect_string> In this command. If you define your own external Java function activities. Starting the Java Function Activity Agent on UNIX For example. if you want to use the default JDBC OCI8 driver: jre –classpath ”$<JREPATH>/rt.jar:$<Workflow_JAR_file_directory>/ wfapi. Note: In the standalone version of Oracle Workflow with Oracle9i.jar:$<Workflow_JAR_file_directory>: $<Workflow_JAR_file_directory>/wfjava.jar:$<ORACLE_HOME>/jdbc/lib/classes111. In the version of Oracle Workflow embedded in Oracle Applications.

the connect string should be the database name as specified in its TNSNAMES entry. You can also use the following command to start the Java Function Activity Agent on UNIX. <user_name>—The user name of your Oracle Workflow database account.jar:$<ORACLE_HOME>/wf/ xml/java/lib/xmlparserv2. Oracle Workflow uses UTF8 by default. and database system 2 – 92 Oracle Workflow Guide .WFFALsnr <user_name> <password> <connect_string> [<JDBC_driver>] In this command.jar:$<Workflow_JAR_file_directory>/ wfapi. Replace the parameters in the command as follows: • • • <character_set>—The character set to use for the database session.zip: $<Workflow_JAR_file_directory>/<Share_JAR_file>: $<Workflow_JAR_file_directory>/<Ewt_JAR_file>: $<Workflow_JAR_file_directory>/<Swing_JAR_file>:” [–DCHARSET=<character_set>] oracle. 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.fnd.jar:$<Workflow_JAR_file_directory>: $<Workflow_JAR_file_directory>/wfjava. the connect string should include the host name. If you do not specify a character set.jar:$<ORACLE_HOME>/jdbc/lib/classes111. if you want to specify the JDBC driver type to use: jre –classpath ”$<JREPATH>/rt. you can use two different types of connect string. <password>—The password for your Oracle Workflow database account. For the first type. you can optionally use the –DCHARSET option to specify the character set that you want to use.• <password>—The password for your Oracle Workflow database account. • <connect_string>—The connect string for the database. port number. The format of the connect string depends on the JDBC driver type. Since this command uses the default JDBC OCI8 driver. – For a JDBC OCI8 driver.apps. • <connect_string>—The connect string for the database.wf.

and SID in the following format: (description=(address=(host=<host_name>)(protocol= <protocol>)(port=<port_number>))(connect_data=(sid= <database_SID>))) • <JDBC_driver>—The JDBC driver type you want to use to connect to the database.jar. If you do not specify a character set. the connect Setting Up Oracle Workflow 2 – 93 . <password>—The password for your Oracle Workflow database account.jar. <Workflow_JAR_file_directory>\wfjava. Replace the parameters in the command as follows: • • • <character_set>—The character set to use for the database session. <Workflow_JAR_file_directory>\<Swing_JAR_file>. <Workflow_JAR_file_directory>\<Share_JAR_file>. <Workflow_JAR_file_directory>\<Ewt_JAR_file>.wf.fnd. Oracle Workflow uses the JDBC OCI8 driver by default. <user_name>—The user name of your Oracle Workflow database account.<ORACLE_HOME>\wf\ xml\java\lib\xmlparserv2.zip.<ORACLE_HOME>\jdbc\lib\classes111.apps. Oracle Workflow uses UTF8 by default.<JREPATH>\rt. Since this command uses the default JDBC OCI8 driver.WFFALsnr <user_name>/<password>@<connect_string> In this command. • <connect_string>—The connect string for the database.<Workflow_JAR_file_directory>\ wfapi. Starting the Java Function Activity Agent on Windows NT On Windows NT.<Workflow_JAR_file_directory>. you can optionally use the –DCHARSET option to specify the character set that you want to use.” –nojit [–DCHARSET=<character_set>] oracle. The JDBC driver type can be either oci8 or thin. the connect string should include an Oracle Net name–value pair with the host name.identifier (SID) in the following format: <host_name>:<port_number>:<database_SID> For the second type.jar. If you do not specify a character set. port number. if you want to use the default JDBC OCI8 driver: jre –classpath ”. protocol.jar. you can use the following command to start the Java Function Activity Agent.

in the following format: <database_name> – For a JDBC THIN driver. 2 – 94 Oracle Workflow Guide .<ORACLE_HOME>\jdbc\lib\classes111. • <connect_string>—The connect string for the database.<Workflow_JAR_file_directory>\ wfapi. protocol.” –nojit [–DCHARSET=<character_set>] oracle. Replace the parameters in the command as follows: • • • <character_set>—The character set to use for the database session. you can optionally use the –DCHARSET option to specify the character set that you want to use.<JREPATH>\rt. <password>—The password for your Oracle Workflow database account.jar. the connect string should include the host name.jar. – For a JDBC OCI8 driver.zip. if you want to specify the JDBC driver type to use: jre –classpath ”. <Workflow_JAR_file_directory>\wfjava. If you do not specify a character set.jar. You can also use the following command to start the Java Function Activity Agent on Windows NT.WFFALsnr <user_name> <password> <connect_string> [<JDBC_driver>] In this command. <user_name>—The user name of your Oracle Workflow database account.fnd. the connect string should include an Oracle Net name–value pair with the host name.<ORACLE_HOME>\wf\ xml\java\lib\xmlparserv2. you can use two different types of connect string. <Workflow_JAR_file_directory>\<Share_JAR_file>.jar. the connect string should be the database name as specified in its TNSNAMES entry. For the first type.wf. <Workflow_JAR_file_directory>\<Swing_JAR_file>. The format of the connect string depends on the JDBC driver type. Oracle Workflow uses UTF8 by default. and database system identifier (SID) in the following format: <host_name>:<port_number>:<database_SID> For the second type.apps.<Workflow_JAR_file_directory>.string should be the database name as specified in its TNSNAMES entry. port number. <Workflow_JAR_file_directory>\<Ewt_JAR_file>.

located in the admin/sql subdirectory on your Oracle Workflow server.port number. If you do not specify a character set. Stopping the Java Function Activity Agent Normally. The JDBC driver type can be either oci8 or thin. the Java Function Activity Agent runs as a perpetual job. and SID in the following format: (description=(address=(host=<host_name>)(protocol= <protocol>)(port=<port_number>))(connect_data=(sid= <database_SID>))) • <JDBC_driver>—The JDBC driver type you want to use to connect to the database. Setting Up Oracle Workflow 2 – 95 .sql script once for each Java Function Activity Agent. However. you must run the wfjvstop. you can stop the agent by running a script called wfjvstop.sql: page 16 – 11. Note: If you are running more than one Java Function Activity Agent simultaneously. Oracle Workflow uses the JDBC OCI8 driver by default. This script places a stop message on the ’Outbound’ queue.sql. See: wfjvstop.

you must create database links from your local system to the remote systems. You need to perform this step only if you want to use event processing. create database links to those external systems.com CONNECT TO wfuser IDENTIFIED BY welcome USING ’wf817’. queues. For example: CREATE DATABASE LINK wf817.Step 14 Setting Up the Business Event System The Business Event System is an application service delivered with Oracle Workflow that uses Oracle Advanced Queuing (AQ) to communicate business events between systems. If you want to communicate business events between the local system and external systems. Schedule a listener to monitor the standard WF_ERROR queue to enable error handling for the Business Event System. perform the following steps: 1. See: Setting Up Queues: page 2 – 97 and Scheduling Listeners for Local Inbound Agents: page 13 – 56. set up your queues.us. See: Overview of the Oracle Workflow Business Event System: page 8 – 235 and Managing Business Events: page 13 – 2. Context: You need to perform this step only once. You can either create database links and set up queues manually. and queue propagation without requiring knowledge of the SQL DDL commands. Oracle DBA Studio allows workflow administrators to quickly and easily create and administer database links. You should fully qualify the database link name with the domain name. Oracle Enterprise Manager Administrator’s Guide. queue tables. 2. 3. See: DBA Management Pack. To set up the Business Event System. or use Oracle DBA Studio in the Oracle Enterprise Manager to perform these steps. If you want to use custom queues for propagating events. 2 – 96 Oracle Workflow Guide .oracle. You can use the following syntax to create a database link: CREATE DATABASE LINK <database link name> CONNECT TO <user> IDENTIFIED BY <password> USING ’<connect string>’. Creating Database Links To propagate event messages between systems.

If you have multiple installations of Oracle Workflow on both the local database and the remote database. The following table lists the standard queues. you can omit the <user> IDENTIFIED BY <password> clause. 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. four standard queues are created automatically for the four standard Workflow agents. the database link uses the username and password of the user who is connected to the database. See: Checking the Business Event System Setup: page 13 – 53. See Also CREATE DATABASE LINK. In this case. See: Standard Agents: page 13 – 25 and Event Message Structure: page 8 – 242. To verify the names of your database links. These queues all use the standard WF_EVENT_T structure as their payload type. CREATE PUBLIC DATABASE LINK <database link name> CONNECT TO <user> IDENTIFIED BY <password> USING ’<connect string>’. and you want to use the same username and password to access both systems. CREATE DATABASE LINK <database link name> CONNECT TO USING ’<connect string>’. If you want to create a public database link available to all users. You must associate a queue with each agent you define in the Event Manager. Setting Up Oracle Workflow 2 – 97 . When you install Oracle Workflow. specify the parameter PUBLIC. Oracle SQL Reference Setting Up Queues The Business Event System uses Oracle Advanced Queuing (AQ) to communicate event messages between systems.

use the PL/SQL procedure DBMS_AQADM. You can change the retention time if necessary using the PL/SQL procedure DBMS_AQADM. you must schedule listeners for WF_DEFERRED and WF_ERROR to enable deferred subscription processing and error handling for the Business Event System. queue_payload_type => ’<queue payload type>’.1’). However.Queue Table Queue Name Description WF_IN WF_OUT WF_DEFERRED WF_ERROR WF_IN WF_OUT WF_DEFERRED WF_ERROR Default inbound queue Default outbound queue Default queue for deferred subscription processing Default queue for error handling Table 2 – 2 (Page 1 of 1) The default retention time set for consumed messages on the standard Workflow queues is seven days. If you define a queue with a different payload type. respectively. Also. Use the following syntax: DBMS_AQADM. if you want to use WF_IN and WF_OUT for event message propagation. WF_EVENT_QH.Create_Queue_Table ( queue_table => ’<queue table name>’. sort_list => ’PRIORITY. See: Scheduling Listeners for Local Inbound Agents: page 13 – 56 and Scheduling Propagations for Local Outbound Agents: page 13 – 56.Alter_Queue.ENQ_TIME’. You can also set up your own queues for event message propagation. For queues that you want use the standard Workflow format. See: Standard APIs for a Queue Handler: page 7 – 23. You must not change any other part of the setup of these queues. • To create a queue table. create the queue. specify the queue payload type as WF_EVENT_T. To set up a queue. and start the queue. These queues can use the standard queue handler provided with Oracle Workflow. you must create a queue handler to translate between the standard Workflow format and the format required by the queue. 2 – 98 Oracle Workflow Guide .Create_Queue_Table. you must create the queue table. schedule a listener for WF_IN and propagations for WF_OUT as well. multiple_consumers => TRUE compatible => ’8.

Use the following syntax: DBMS_AQADM. • To start a queue. Oracle Application Developer’s Guide – Advanced Queuing DBMS_AQADM. Oracle Supplied PL/SQL Packages Reference Setting Up Oracle Workflow 2 – 99 . use the PL/SQL procedure DBMS_AQADM.Start_Queue ( queue_name => ’<queue name>’).7 or higher. • To create a queue.6 does not allow you to select the USER_DATA column from queue tables. Oracle Workflow provides a sample script called wfevquec. Note: SQL*Plus version 8.You can also use the storage_clause parameter to specify the tablespace where you want to create the queue table.sql which you can modify to drop queues.Create_Queue ( queue_name => ’<queue name>’. queue_table => ’<queue table name>’).Create_Queue. See Also Administrative Interface.Start_Queue. or in the sql subdirectory under $FND_TOP for the version of Oracle Workflow embedded in Oracle Applications. as well as a sample script called wfevqued. You must have SQL*Plus version 8. These scripts are located on your server in the Oracle Workflow sql subdirectory for the standalone version of Oracle Workflow. Use the following syntax: DBMS_AQADM.sql which you can modify to set up your queues. See: Checking the Business Event System Setup: page 13 – 53. use the PL/SQL procedure DBMS_AQADM.1.Grant_Queue_Privilege. Note: If you want other database users to enqueue messages onto or dequeue messages from your queue. you must grant those users the appropriate privileges using the PL/SQL procedure DBMS_AQADM.1. You can use the Check Setup web page to verify that your queues are set up properly. if you want to be able to select the event message payload from your Workflow queues. You may want to specify a tablespace if you expect a queue to be very large. which allows you to select USER_DATA.

See: Agents: page 13 – 22. This script is located in the wf/sql subdirectory in your Oracle Home.pls to create the PL/SQL body for the WF_EVENT_OMB_QH package. Use OMB to create the AQ queues that you want to use for event message propagation. create queues called WF_OMB_IN and WF_OMB_OUT. OMBAQ_TEXT_MSG.pls to create the PL/SQL spec for the WF_EVENT_OMB_QH package. This script is located in the wf/sql subdirectory in your Oracle Home. in place of Oracle Message Broker. Run the script wfquhndos. After you set up WF_EVENT_OMB_QH. you can use the Messaging Gateway and Internet access features of Oracle Advanced Queuing to propagate event messages. and the structure required by OMB queues. For example. Context: You need to perform this step only once. In Oracle9i. You should create at least one inbound and one outbound queue. WF_EVENT_T. See Also Standard APIs for a Queue Handler: page 7 – 23 Event Message Structure: page 8 – 242 Mapping Between WF_EVENT_T and OMBAQ_TEXT_MSG: page 8 – 257 2 – 100 Oracle Workflow Guide . you can assign this queue handler to Business Event System agents that use propagation protocols you have implemented through OMB. Note: You do not need to perform this step if you are using Oracle9i. 3. The queues should be single–consumer queues created in your Oracle Workflow schema.Step 15 Setting Up the WF_EVENT_OMB_QH Queue Handler You need to perform this step only if you are using the Business Event System with Oracle8i and you want to use Oracle Message Broker (OMB) to propagate event messages between systems. 2. The WF_EVENT_OMB_QH queue handler translates between the standard Workflow event message structure. Run the script wfquhndob. " To Set Up WF_EVENT_OMB_QH 1.

Access protection lets seed data providers protect certain data as ’read–only’. The headquarters team. The Standard item type contains standard activities that can be dropped into any custom workflow process. seed data refers to either of the following: • Workflow object definitions that can and should be customized to meet a certain consumer’s needs. In Oracle Workflow. This makes the headquarters team a consumer of the Standard item type seed data. while allowing other data to be customized. customization. The headquarters team can satisfy both requirement using the access protection feature in Oracle Workflow. access protection lets the seed data provider overwrite any existing protected seed data with new versions of that seed data. a ’seed data provider’ is any organization that creates ’seed data’ for other organizations (’seed data consumers’) to use in defining and customizing a workflow process. and access levels make up the access protection feature and determines whether a user can Setting Up Oracle Workflow 2 – 101 . while preserving any customizations made to customizable seed data. The combination of protection. • Workflow object definitions protected against customization because they represent standards that may also be upgraded in the future by the provider. Now suppose the headquarters team wants to deploy the custom workflow definition that it created to teams at other regional offices. the Oracle Workflow development team is a provider of seed data called the Standard item type. Also during a seed data upgrade. • Designate certain objects in its deployed process as customizable for the regional offices to alter to their offices’ needs. For example. may want to do the following: • Identify certain workflow objects in its custom workflow definition as corporate standards that the regional teams should adhere to and not modify.Overview of Oracle Workflow Access Protection Access protection is a feature that prevents workflow seed data created by a ’seed data provider’ from being modified by a ’seed data consumer’. Oracle Workflow assigns a protection and customization level to every workflow object definition stored in the database and requires every user of Oracle Workflow to operate at a certain access level. Here. The development team at your organization’s headquarters may create a custom workflow process definition that references activities from the Standard item type. as seed data providers.

modify a given workflow object. The level in all three cases, is a numeric value ranging from 0 to 1000 that indicates the relationship between different organizations as providers and consumers of seed data. The following range of levels are presumed by Oracle Workflow: 0–9 10–19 20–99 100–999 Oracle Workflow Oracle Application Object Library Oracle Applications development Customer organization. You can determine how you want this range to be interpreted. For example, 100 can represent headquarters, while 101 can represent a regional office, and so on. Public

1000 Access Level

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 – 107. 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

2 – 102

Oracle Workflow Guide

variable in an environment file. The default environment file is APPLSYS.env. If you do not define this environment variable, the Workflow Definitions Loader simply assumes a default access level of 100. Refer to your Oracle Applications installation manual for more information about environment files. 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

Setting Up Oracle Workflow

2 – 103

by anyone other than users operating at your current access level. The following table shows which access levels can access an object under different settings of the ’Preserve Customizations’ and ’Lock at this Access Level’ options.

Preserve Customizations Cleared Checked

Lock at this Access Level Cleared Cleared

Access Level applied to Object

Object may be updated by any access level. Object may only be updated by users with access levels equal to or higher than your current access level. Object may only be updated by users with access levels equal to or lower than your current access level. Object cannot be updated by any access level except for your current access level.

Cleared

Checked

Checked Table 2 – 3 (Page 1 of 1)

Checked

Attention: If you have installed the beta version of Microsoft’s Internet Explorer on your PC, which automatically installs an early version of a file called comctl32.dll, you may not see the lock icons appear on the locked objects in Oracle Workflow Builder. To correct this problem, install the production version of Microsoft’s Internet Explorer to replace comctl32.dll with the latest copy.

The protection and access levels in Oracle Workflow are present to remind you that certain workflow objects should not be modified or should only be modified by someone accessing the tool at an authorized access level. It is not intended as a means of securing or source controlling your workflow objects.

Attention: Most workflow objects provided by Oracle Workflow have a protection level of 0, which means the objects can only be modified by the Oracle Workflow team, operating at an access level of 0. If you attempt to alter your access level to 0 and modify the data anyway, your customizations will not be supported, especially if Oracle Workflow provides an upgrade to the seed data that may overwrite the modifications you make to the originally protected data.

2 – 104

Oracle Workflow Guide

Customization Level Every workflow object, in addition to having a protection level, also records a customization level equal to your access level when you modify the object and save it to a database or file. For example, if a workflow object is customizable (protection level is 1000), and you customize it at an access level of 100, you now mark the object as having a customization level of 100. The customization level indicates that the object can only be further modified by someone operating at an access level equal to or higher than the customization level. So in this example, you can only customize the object further if your access level is 100 or higher. If you are operating at an access level lower than an object’s customization level, you will see a small lock on that workflow object’s icon, indicating that the object can be used but not modified. This ensures that a customizable object that has been customized never gets overwritten during a seed data upgrade because the upgrade always occurs with the Workflow Definitions Loader operating at an access level below the customized object’s customization level.

Setting Up a Default Access Level
When you install Oracle Workflow Builder on a Microsoft Windows 95, Windows 98, Windows 2000, or Windows NT PC, Oracle Universal Installer assigns a default access level that is global to the PC and the operating system you are installing on. After installing Oracle Workflow Builder, you can have individual users on the PC change their access level to a new setting which overrides the default access level set for the PC. If a user does not define an access level, Oracle Workflow Builder assumes the value of the default access level for the PC. The access levels are stored in the Microsoft Windows registry. If you are deploying Oracle Workflow Builder and workflow seed data to users in other parts of your organization, and you wish to discourage those users from modifying the seed data that you provide, you can have them operate Oracle Workflow Builder at an access level that is higher than the data’s protection level. For example if you, as a seed data provider, are operating at an access level of 100 and the seed data you create is protected at a level of 100, then you should require the access level for your users or seed data consumers to be 101 or higher. You can set a user’s access level in Oracle Workflow Builder by having them choose About Oracle Workflow Builder... from the Help menu. In the About Oracle Workflow Builder window, change the Access Level

Setting Up Oracle Workflow

2 – 105

field to a number higher than your seed data protection level, then choose OK. You can also set the access level directly in the Microsoft Windows registry by using a registry editor such as regedit to edit the decimal value under HKEY_LOCAL_MACHINE\SOFTWARE\ORACLE\Workflow\Level. For the Workflow Definitions Loader program, you set the default access level that the program operates at for downloading process definitions to a file, by defining an environment variable called WF_ACCESS_LEVEL and setting its value using the appropriate operating system command. Caution: Although you can modify your access level, Oracle Workflow does not support any customizations to seed data originally protected at a level 99 or lower. We STRONGLY RECOMMEND that you not change your access level to an unauthorized level for modifying protected data.

2 – 106

Oracle Workflow Guide

Using the Workflow Definitions Loader
Rather than use the File Save or File Open menu options in Oracle Workflow Builder, you can also run a program called Workflow Definitions Loader to save or load process definitions from a database or flat file. When you upgrade your database, use the Workflow Definitions Loader to preserve and back up your process definitions to a flat file. When the database upgrade is complete, use the Loader program again to upload the definitions back into your database. You can also use the Loader program to upgrade your database with a newer version of a process definition or to transfer process definitions to other databases. When you upload or upgrade a process definition, the Workflow Definitions Loader automatically validates the process definition to ensure that it conforms to specific process design rules. It performs the same validation as the Oracle Workflow Builder Verify feature. See: To Validate a Process Definition: page 5 – 21.

Attention: When you upload or upgrade a workflow definition onto an existing definition in a database, it is possible that an object in the upload/upgrade definition has a Display Name that is already in use by a different object in the target database. If this occurs, the Workflow Definition Loader automatically resolves the display name conflict by adding a ’@’ character to the beginning of conflicting display names in the target database. The upload/upgrade definition is then applied as is and a warning message is generated. Note: You can use the Workflow Definitions Loader Release 2.6.1 to upload and download process definitions from all versions of the Oracle Workflow Server embedded in Oracle Applications Release 11i, as well as Release 2.6.1, base Release 2.6, and Release 2.5 of the standalone version of the Oracle Workflow Server. However, when you use the Workflow Definitions Loader to upload process definitions to an earlier Oracle Workflow Server version, those processes cannot include any new features introduced in later releases. For more details about which features you must not use with earlier versions, see: Using Oracle Workflow Builder with Different Server Versions: page 3 – 21.

Setting Up Oracle Workflow

2 – 107

"

To run the Workflow Definitions Loader for the standalone version of Oracle Workflow 1. The Workflow Definitions Loader program is located on your server in the bin subdirectory of the Oracle Home directory structure. Run the program from your operating system prompt as follows (replacing <username/password@database> with the username, password and Oracle Net connect string or alias to your database): • To apply a seed data upgrade to a database from an input file, type:
wfload <username/password@database> <input_file>

2.

By using the default upgrade behavior, the Workflow Definitions Loader assumes the access level of the file’s creator (seed data provider) and overwrites any objects protected at a level equal to or above the upgrade file’s access level. During an upgrade, the Loader program preserves any customizations made to customizable seed data in the database. <input_file> represents the name and full path of the upgrade file you are loading. • To upload process definitions from an input file to a database, type:
wfload –u <username/password@database> <input_file>

The upload mode is useful to someone who is developing a workflow process. It allows the developer to save definitions to the database without concern that accidental customizations to existing objects might prevent the upload of some process definition elements. The Workflow Definitions Loader uses the access level specified in the input file. <input_file> represents the name and full path of the input file you want to upload from. • To force an upload of the process definitions from an input file to a database regardless of an object’s protection level, type:
wfload –f <username/password@database> <input_file> <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

2 – 108

Oracle Workflow Guide

also useful for loading .wft files from Oracle Workflow Release 1.0 or 1.0.1, which reflect an older data model. Note: When using the force option to load a .wft file from Oracle Workflow Release 1.0 or 1.0.1 into a database, you must also complete a manual step once the .wft file is loaded. You must associate the lookup types that you load with an item type. To do this, in the Navigator window of Oracle Workflow Builder, drag the lookup types from the independent Lookup Types branch to a Lookup Types branch associated with an item type. • To download the process definition of one or more item types from a database to an output file, type:
wfload [–d <date>] <username/password@database> <output_file> <item_type1> <item_type2> ...<item_typeN> <output_file> represents the name and full path of the output file you want to write to, and <item_typeN> represents the internal name of each item type you want to download. You can also replace <item_typeN> with ’*’ to represent all item types (make sure you enclose the asterisk in single quotes). If you specify the –d option with a date (omitting the square brackets), you can download the process definition that was effective at that date. The date must be supplied in the following format: YYYY/MM/DD HH24:MI:SS.

Your output file should have the extension .wft. When you download a process definition, the Loader program sets the output file’s access level to be the value stored in the WF_ACCESS_LEVEL environment variable.
"

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. Submit the Workflow Definitions Loader concurrent program as a request. See: Submitting a Request, Oracle Applications User’s Guide.

2.

Setting Up Oracle Workflow

2 – 109

3.

In the Parameters window, enter values for the following parameters: Specify ”Download” to download a process definition from the database to a flat file. Specify ”Upgrade” to apply a seed data upgrade to a database from an input file. The Workflow Definitions Loader assumes the access level of the file’s creator (seed data provider) and overwrites any objects protected at a level equal to or above the upgrade file’s access level. The Loader program preserves any customizations made to customizable seed data in the database. Specify ”Upload” to load a process definition from a flat file into the database. The upload mode is useful to someone who is developing a workflow process. It allows the developer to save definitions to the database without concern that accidental customizations to existing objects might prevent the upload of some process definition elements. The Workflow Definitions Loader uses the access level defined by the input file to upload the process definitions from the file and therefore will overwrite objects in the database that are protected at a level equal to or higher than that file’s access level. Specify ”Force” to force an upload of the process definitions from an input file to a database regardless of an object’s protection level You should be certain that the process definition in the file is correct as it overwrites the entire process stored in the database. The Force mode is useful for fixing data integrity problems in a database with a known, reliable file backup.

Mode

File

Specify the full path and name of the file that you want to download a process definition to, or upgrade or upload a process definition from. If you set Mode to ”Download”, use the List button to choose the item type for the process definition you want to download.

Item Type

Note: When you submit the Workflow Definitions Loader from the Submit Requests form to download process definitions to a file, you can only specify to download one item

2 – 110

Oracle Workflow Guide

type at a time. If you wish to download multiple or all item types simultaneously, you should submit the Workflow Definitions Loader concurrent program from the command line. See Step 6 below for details. 4. 5. 6. Choose OK to close the Parameters window. When you finish modifying the print and run options for this request, choose Submit to submit the request. Rather than use the Submit Requests form, you can also run the Workflow Definitions Loader concurrent program from the command line by entering the following commands: To upgrade— To upload— To force— WFLOAD apps/pwd 0 Y UPGRADE file.wft WFLOAD apps/pwd 0 Y UPLOAD file.wft WFLOAD apps/pwd 0 Y FORCE file.wft

To download— WFLOAD apps/pwd 0 Y DOWNLOAD file.wft ITEMTYPE1 [ITEMTYPE2 ...ITEMTYPEN] Replace apps/pwd with username and password to the APPS schema, replace file.wft with the file specification of a workflow process definition file, and replace ITEMTYPE1, ITEMTYPE2, ... ITEMTYPEN with the one or more item type(s) you want to download. You can also download all item types simultaneously by replacing ITEMTYPE1 with ’*’ (make sure you enclose the asterisk in single quotes). A file specification is specified as:
@<application_short_name>:[<dir>/.../]file.ext

or
<native path>

Setting Up Oracle Workflow

2 – 111

Using the Workflow XML Loader
The Workflow XML Loader lets you upload and download XML definitions for Business Event System objects between a database and a flat file. When you download Business Event System object definitions from a database, Oracle Workflow saves the definitions as an XML file. When you upload object definitions to a database, Oracle Workflow loads the definitions from the source XML file into the Business Event System tables in the database, creating new definitions or updating existing definitions as necessary. The XML definitions for Business Event System objects are structured according to the following document type definitions (DTDs): • Events—WF_EVENTS DTD: page 8 – 302 • Event group members—WF_EVENT_GROUPS DTD: page 8 – 305 • Systems—WF_SYSTEMS DTD: page 8 – 308 • Agents—WF_AGENTS DTD: page 8 – 311 • Event subscriptions—WF_EVENT_SUBSCRIPTIONS DTD: page 8 – 314 You can download Business Event System object definitions in either normal download mode or exact download mode. • Normal download mode lets you save a generic copy of object definitions from one system that you can use to create similar definitions in other systems. In this mode, the Workflow XML Loader replaces certain system–specific data within the object definitions with tokens. Choose normal download mode, for example, when you want to save Business Event System object definitions from a development system as seed data that can be uploaded to a production system. • Exact download mode lets you save object definitions exactly as they are specified in the database. In this mode, the Workflow XML Loader does not convert any data to tokens; instead, all values, including system–specific values, are copied to the XML file. Choose exact download mode, for example, when you want to save Business Event System object definitions from one production system so that you can replicate them to another production system that communicates with the first. In normal download mode, the Workflow XML Loader uses the following tokens to replace system–specific data within Business Event System object definitions. The tokens are prefixed by #.

2 – 112

Oracle Workflow Guide

• #NEW—Replaces the global unique identifier for an agent within an agent definition, or for an event subscription within a subscription definition. • #LOCAL—Replaces the global unique identifier for the local system wherever it appears within an agent or subscription definition. • #OWNER—Replaces the name of the schema that owns a queue when the schema appears as part of the queue name and agent address within an agent definition. • #SID—Replaces the database system identifier (SID) when it appears as part of the agent address within an agent definition. • #WF_IN—Replaces the global unique identifier for the WF_IN agent on the local system when it appears as the Source Agent, Out Agent, or To Agent within an event subscription definition. • #WF_OUT—Replaces the global unique identifier for the WF_OUT agent on the local system when it appears as the Source Agent, Out Agent, or To Agent within an event subscription definition. • #WF_ERROR—Replaces the global unique identifier for the WF_ERROR agent on the local system when it appears as the Source Agent, Out Agent, or To Agent within an event subscription definition. By converting these system–specific values to tokens, the loader produces template definitions that you can use to create similar objects in other systems. When you upload object definitions that contain tokens to a database, Oracle Workflow replaces the tokens with the appropriate values for that system.

See Also
Managing Business Events: page 13 – 2
"

To Download Business Event System XML Definitions from a Database To download Business Event System object definitions from a database to a flat XML file, you can either run the Workflow XML Loader manually, or, if you are using the standalone version of Oracle Workflow, you can use a script to run the loader.

Setting Up Oracle Workflow

2 – 113

To run the Workflow XML Loader manually, run JRE against oracle.apps.fnd.wf.WFXLoad. You must specify your CLASSPATH pointing to the Java Runtime Environment, the directory containing the Workflow JAR files, the Oracle JDBC implementation, and the following Workflow JAR files: • wfjava.jar—Workflow Java utilities • wfapi.jar—Workflow Java APIs Note: If you are using the standalone version of Oracle Workflow with Oracle9i, the Workflow JAR files are located in the <ORACLE_HOME>/jlib directory. If you are using the version of Oracle Workflow embedded in Oracle Applications, the Workflow JAR files are located in the
<ORACLE_HOME>/wf/java/oracle/apps/fnd/wf/jar/

directory. For example, on UNIX, use the following command to run the Workflow XML Loader:
jre –classpath ”$<JREPATH>/rt.jar:$<Workflow_JAR_file_directory>: $<Workflow_JAR_file_directory>/wfjava.jar: $<Workflow_JAR_file_directory>/wfapi.jar: $<ORACLE_HOME>/jdbc/lib/classes111.zip:” oracle.apps.fnd.wf.WFXLoad –d[e] <user> <password> <connect_string> <protocol> <lang> <output_file> <object> <key>

On Windows NT, use the following command:
jre –classpath ”;<JREPATH>\rt.jar;<Workflow_JAR_file_directory>; <Workflow_JAR_file_directory>\wfjava.jar; <Workflow_JAR_file_directory>\wfapi.jar; <ORACLE_HOME>\jdbc\lib\classes111.zip;” oracle.apps.fnd.wf.WFXLoad –d[e] <user> <password> <connect_string> <protocol> <lang> <output_file> <object> <key>

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>

2 – 114

Oracle Workflow Guide

On Windows NT, use the following command:
wfxload.bat –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 for your database account.

<password>—The

• <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

Setting Up Oracle Workflow

2 – 115

abbreviations, see: Locale Data, Oracle National Language Support Guide. • <output_file>—The name and full path of the output file to which you want to save the definitions. • <object>—The type of object definitions you want to download. – EVENT—Event, event group member, and event subscription definitions – SYSTEMS—System definitions – AGENTS—Agent definitions – ALL—All Business Event System object definitions, including events, event group members, systems, agents, and event subscriptions Note: The Workflow XML Loader only downloads system, agent, and event subscription definitions that belong to the local system. • <key>—An optional key to restrict the definitions that are downloaded. If you specify a key, the loader retrieves definitions only for those objects whose internal names include that key. The key value is case sensitive and cannot contain any spaces. To retrieve all object definitions of the specified type, you can omit this parameter. Note: If you specify ALL for the object type, the Workflow XML Loader ignores the key and downloads all Business Event System object definitions from the system.

Attention: To use the Workflow XML Loader in download mode, you must have a version 8.1.7 or higher database. The download utility is not supported for earlier versions of Oracle8i. To replicate Business Event System objects from one system to another for earlier database versions, you should follow the steps to synchronize systems using predefined subscriptions provided with the Business Event System. See: Synchronizing Systems: page 13 – 70. You can, however, use the Workflow XML Loader in upload mode with versions of Oracle8i earlier than 8.1.7.

"

To Upload Business Event System XML Definitions to a Database To upload Business Event System object definitions from an XML file to a database, you can either run the Workflow XML Loader manually, or,

2 – 116

Oracle Workflow Guide

if you are using the standalone version of Oracle Workflow, you can use a script to run the loader. To run the Workflow XML Loader manually, run JRE against oracle.apps.fnd.wf.WFXLoad. You must specify your CLASSPATH pointing to the Java Runtime Environment, the directory containing the Workflow JAR files, the Oracle JDBC implementation, and the following Workflow JAR files: • wfjava.jar—Workflow Java utilities • wfapi.jar—Workflow Java APIs Note: If you are using the standalone version of Oracle Workflow with Oracle9i, the Workflow JAR files are located in the <ORACLE_HOME>/jlib directory. If you are using the version of Oracle Workflow embedded in Oracle Applications, the Workflow JAR files are located in the
<ORACLE_HOME>/wf/java/oracle/apps/fnd/wf/jar/

directory. For example, on UNIX, use the following command to run the Workflow XML Loader:
jre –classpath ”$<JREPATH>/rt.jar:$<Workflow_JAR_file_directory>: $<Workflow_JAR_file_directory>/wfjava.jar: $<Workflow_JAR_file_directory>/wfapi.jar: $<ORACLE_HOME>/jdbc/lib/classes111.zip:” oracle.apps.fnd.wf.WFXLoad –u <user> <password> <connect_string> <protocol> <lang> <source_file>

On Windows NT, use the following command:
jre –classpath ”;<JREPATH>\rt.jar;<Workflow_JAR_file_directory>; <Workflow_JAR_file_directory>\wfjava.jar; <Workflow_JAR_file_directory>\wfapi.jar; <ORACLE_HOME>\jdbc\lib\classes111.zip;” oracle.apps.fnd.wf.WFXLoad –u <user> <password> <connect_string> <protocol> <lang> <source_file>

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>

Setting Up Oracle Workflow

2 – 117

On Windows NT, use the following command:
wfxload.bat –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 for your database account.

<password>—The

• <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.

2 – 118

Oracle Workflow Guide

CHAPTER 3 Defining a Workflow Process his chapter tells you how to use Oracle Workflow Builder to define a workflow process definition. T Defining a Workflow Process 3–1 .

viewing. You then assemble the activities in a process window to create a process diagram. Note: If you maximize the Navigator window or any process window in Oracle Workflow Builder. which can be opened and edited in a text editor so that the process definition can be spoken by a screen reader for greater user accessibility. It contains a Navigator window that you use to define the activities and components of your business process. and modifying workflow process definitions. 3–2 Oracle Workflow Guide .Overview of Oracle Workflow Builder Oracle Workflow Builder is a graphical tool for creating. Note: A workflow process definition can also be stored as a flat file. you will not be able to access the menu from your keyboard using the Alt key. See: Creating Process Definitions in Oracle Workflow Builder: page 3 – 7.

• Notifications—lists the notification activities associated with the current item type. A lookup type is a list of values that can be referenced by a message. function. See: Item Type Attributes: page 4 – 2. A data store (primary branch) is a database connection or flat file that holds your workflow process definition. See: Activities: page 4 – 42. if an item type is a purchase order requisition. An event activity represents a business event that the process receives. A function activity represents a PL/SQL stored procedure that the Workflow Engine executes automatically. or process as its possible result type. A lookup type has one or more values called lookup codes associated with it. For example. or by a notification. The following six tertiary branches appear beneath each item type branch: • Attributes—lists the attributes for the current item type. See: Activities: page 4 – 42. raises. The message may prompt for a response or may simply provide information. • Processes—lists the process activities or workflow process definitions for the current item type. Defining a Workflow Process 3–3 . See: Messages: page 4 – 23. Within each data store there is at least one item type heading (secondary branch) that represents the grouping of a particular set of processes and its component objects. • Lookup Types—lists the lookup types associated with the current item type. See: Process Window: page 5 – 2 and Activities: page 4 – 42. A message can have message attributes associated with it. or sends. A function activity can also have activity attributes associated with it. A notification activity sends a message to a user or role. Item type attributes describe features of an item type.The Navigator Tree Structure The Navigator window displays a navigator tree hierarchy for each data store that you open or load into Oracle Workflow Builder. then an item type attribute can be the requisition amount or the requisition ID. • Functions—lists the function activities associated with the current item type. See: Lookup Types: page 4 – 19. See: Activities: page 4 – 42. • Events—lists the event activities associated with the current item type. • Messages—lists the messages that a notification activity associated with the current item type can send to a user or role.

When you double–click on Hidden Item Types. See: Roles: page 5 – 24. You can use either your mouse or the arrow keys on your keyboard to expand or collapse the navigator tree. Sub–branches appear indented below the branches from which they are expanded. where you can expand branches that begin with a plus sign (+) to further sub–branches until you find your component of interest. you get a Show Item Types window that lets you load other item types into Oracle Workflow Builder. Viewing the Navigator Tree The navigator tree is organized much like the hierarchy of a file system. If the data store is a database connection and the database contains other item types that you have not loaded into Oracle Workflow Builder. The Directory Service branch lists all the directory service roles that you load from your Oracle Workflow database. You can expand no further when a branch displays neither a plus nor minus sign.Note: Each data store also contains a Directory Service branch. Branches that are expanded are preceded by a minus sign (–). See: Navigator Toolbar: page A – 7. The Navigator window also contains a toolbar that you can use to perform actions within the Navigator window. 3–4 Oracle Workflow Guide . a branch called Hidden Item Types appears.

Defining a Workflow Process 3–5 .

4. Enter the text to search for in the Search Text field." To Find an Object in the Navigator Tree 1. 2. Choose Find. 5. Choose Search. 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. You can choose Find Again from the Edit menu to repeat the search using the search criteria previously defined in the Search window. 6. 3–6 Oracle Workflow Guide . from the Edit menu to display a Search window that lets you specify search criteria to find an object in the navigator tree. 3. The search is case insensitive and looks for the text pattern that you specify in the field that you specify... Specify to search for this text in the object’s Display Name or Internal Name.

only one version of the activity is ”in effect”. See: To Create a Process Definition From Bottom–Up: page 3 – 8. Note that a Defining a Workflow Process 3–7 . you can first sketching out the process diagram with activities. activities also have dates of effectivity so that at any point in time. determine what activities need to occur. Oracle Workflow uses the version of the activity that was in effect when the process was initiated. you can use either the top–down or bottom–up approach to complete the design. See: To Use the Quick Start Wizard: page 3 – 18. • Bottom–Up Design—If you prefer to take a more programmatic approach to your design.Creating Process Definitions in Oracle Workflow Builder Before using Oracle Workflow Builder. It then creates an outline process diagram from which you can flesh out with more activities. It also updates the version number whenever you make changes to an existing activity. In Oracle Workflow. It saves the new version of the activity to the database without overwriting older versions of the activity. There are several ways you can go about creating a workflow process definition: • Top–Down Design—If you prefer to approach your design from a high level. See: Sample Workflow Processes: page 15 – 2. who needs to be informed and what they need to know. The Quick Start Wizard creates a new item type for your process. what results dictate the different branches of the process. In particular. then go back later to create the supporting objects for each activity. See: To Create a Process Definition from Top–Down: page 3 – 10. you can first define each of the supporting objects of your process before attempting to create a higher level process diagram. If a process is running. Quick Start Wizard The Quick Start Wizard helps you build a process definition from scratch using a process definition template. Oracle Workflow provides several demonstration workflow examples. the order of the activities. you should plan what your process needs to accomplish. Once the Quick Start Wizard sets up the template. It does not switch versions of the activity mid–way through the process. Versioning and Dates of Effectivity Oracle Workflow Builder assigns a version number to each new activity that you create. prompting you for the minimum required information.

The Result Type poplist field lets you select the value <None> or some predefined lookup type. See Also Modifying Objects in Oracle Workflow Builder: page 4 – 69 Using the Edit Button in a Property Page To create an object in Oracle Workflow Builder. If the modification affects existing processes. their latest definition always apply. you should create a new object rather than edit the existing object. you can then choose the adjacent Edit button to display the property page for that lookup type. you can choose the adjacent Edit button to display and edit the source property page(s) of the value. You can also save a definition to the database to be effective at some future time. For these objects. double–click on the Oracle Workflow Builder icon located in the Application Development folder within the Oracle – <SID NAME> program group. To start Oracle Workflow Builder. Note that Oracle Workflow Builder does not maintain version information for objects that are considered constant. " To Create a Process Definition From Bottom Up 1. When you finish viewing or editing the property page for that lookup type. you can choose OK or Cancel to return to the notification activity property page. For example. if you create a notification activity. you must specify a Result Type for the activity. you enter information in the object’s property page.process itself is an activity. Oracle Workflow Builder also supports the concept of saving and loading process definitions according to an effective date. an Edit button appears to the right of that poplist. For example. messages and lookup types. If you are 3–8 Oracle Workflow Guide . When you are done with the source property page(s) and choose OK or Cancel. so you should always consider whether a change to any of these objects is backwards compatible. item type attributes. you return to the original property page you were working on. so a process definition always remains constant until the process instance completes. such as item types. When you select a value from a poplist. you can load a definition into Oracle Workflow Builder that was effective at an earlier point in time. If you select a lookup type. If a poplist field yields values that are themselves defined from some other property pages in Oracle Workflow Builder. Some of the information you provide can be selected from a list of values.

Suggestion: Alternatively. Defining a Workflow Process 3–9 . 4. messages. See: To Use the Quick Start Wizard: page 3 – 18. you can drag the lookup onto an activity in the navigator tree to assign that lookup as the activity’s result type. See: To Create Lookup Types: page 4 – 20. you can also select the Oracle Workflow Builder icon from the appropriate program folder of the Start menu. If you wish to create a notification activity for your process. 6. you should define the lookup type that represents your activity’s Result Type. You can drag a new message onto a notification activity in the navigator tree to assign the message to that activity. See: To Define a Message Attribute: page 4 – 34. Create new messages. After defining a lookup type and an activity. See: To Create a Message: page 4 – 29.using Windows 95 or NT 4. you should first create the message that you want the notification activity to send. Create new lookup types. Create a new item type. Once the Quick Start Wizard creates your new item type and new process activity. you can use the Quick Start Wizard to first create the framework for your new process definition. Choose New from the File menu to create a workspace for your new process definition. You can also define message attributes of type ’Respond’ to prompt the notification recipient for a response. you can skip to step 4 below to begin defining the supporting objects for the new item type and process activity. Lookup types can also be referenced by item type attributes. activity attributes. You can also create message attributes for the message. See: To Define an Item Type or Activity Attribute: page 4 – 8. Before defining an activity. See: To Create an Item Type: page 4 – 7. The item type classifies the work item to be managed by the process. 5. 3.0 or higher. or message attributes. 2. A Result Type is a list of possible results that an activity can have upon completion. You can incorporate message attributes of type ’Send’ into a message that are token substituted at runtime to provide dynamic content. You can define item type attributes to fully describe your item type and have the activities in your process refer to these attributes for information.

See: To Save Your Work: page 3 – 15. notification activity. To start Oracle Workflow Builder. See: Workflow APIs: page 8 – 3 and Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3. See: Activities: page 4 – 42 and Standard Activities: 6 – 2. 3 – 10 Oracle Workflow Guide . The process diagram establishes the relationship of all the activities in your process. You can do this through SQL*PLUS or the Oracle Procedure Builder. 2. Create a new process activity. In a database accessible by your Oracle Workflow server.7. Specify the requested information for the new item type and new process activity. See: Diagramming a Process: page 5 – 5.0 or higher. You can drag activities from the navigator tree into the Process window. 8. Diagram the process. 10. Save your work by choosing Save or Save As from the File menu. 9. If you are using Windows 95 or NT 4. See Also To Modify a Process Definition: page 3 – 11 Deleting Objects in Oracle Workflow Builder: page 4 – 68 Modifying Objects in Oracle Workflow Builder: page 4 – 69 Item Type Definition Web Page: page 3 – 24 " To Create a Process Definition from Top Down 1. function activity. you can also select the Oracle Workflow Builder icon from the appropriate program folder of the Start menu. create the PL/SQL stored procedures called by your PL/SQL function activities. You may also use predefined standard activities associated with the Standard item type. Display the Process window for your process activity to diagram the activities and transitions that define your workflow process. You need to define at least one process activity that represents your high level process diagram. or event activity. See: To Use the Quick Start Wizard: page 3 – 18. double–click on the Oracle Workflow Builder icon located in the Application Development folder within the Oracle – <SID NAME> program group. Use the Quick Start Wizard to create the framework for your new process definition.

Model your process by drawing transitions between your activities. 4. You may also use predefined standard activities associated with the Standard item type. The Workflow Error window is non–modal. A Process window appears. . that shows a Start and an End activity node. See: To Save Your Work: page 3 – 15. Save your work by choosing Save or Save As from the File menu. See: Standard Activities: 6 – 2. See: To Define Nodes in a Process: page 5 – 8. the Workflow Error window will appear when you open this process definition later. 5. Create your process diagram by defining new activity nodes to place between the Start and End nodes. Use the Copy button to copy the information to the clipboard if you want to paste it into another document for later reference. Attention: When you save your work. If you save your work without correcting the problems. so you can keep it up on your screen while you go back to your process to correct the problems that are identified. You can also save your work as is. See: Diagramming a Process: page 5 – 5.3. Oracle Workflow automatically validates the process definition for any invalid or missing information and displays what it finds in a Workflow Error verification window. and fix the problems later.

To start Oracle Workflow Builder. you can also select the Oracle Workflow Builder icon from the appropriate program folder of the Start menu. If you are using Windows 95 or NT 4. double–click on the Oracle Workflow Builder icon located in the Application Development folder within the Oracle – <SID NAME> program group. Defining a Workflow Process 3 – 11 . Choose Open from the File menu to open a connection to the database or file that contains the process definition you want to 2.0 or higher. See Also To Modify a Process Definition: page 3 – 11 Deleting Objects in Oracle Workflow Builder: page 4 – 68 Modifying Objects in Oracle Workflow Builder: page 4 – 69 Item Type Definition Web Page: page 3 – 24 " To Modify a Process Definition 1.

When you save your work to a flat file. You can also modify the process diagram by displaying the Process window for your process activity. function activity. Opening an item type automatically retrieves all the attributes. or activity attribute. message. You can save an item type to a database or to a flat file. Save your work by choosing Save or Save As from the File menu. Select and expand the existing item type associated with the process definition you want to modify. 6. See: Diagramming a Process: page 5 – 5. process activity. 3. message attribute. functions and processes associated with that item type. 4. You can also load an item type into Oracle Workflow Builder from a database or flat file. notifications. notification activity. See: To Save Your Work: page 3 – 15.modify. you actually save everything in the current data store to the file. you actually save everything in the current data store that has been modified. You can modify an item type. messages. An item type can include one or more processes. See: To Access Process Definitions in an Existing Data Store: page 3 – 13. To Define a Message Attribute: page 4 – 34. When you save your work to a database. lookup. item type attribute. 5. See: To Create an Item Type: page 4 – 7. To Create a Message: page 4 – 29. . To Define an Item Type or Activity Attribute: page 4 – 8. See Also Deleting Objects in Oracle Workflow Builder: page 4 – 68 Modifying Objects in Oracle Workflow Builder: page 4 – 69 Item Type Definition Web Page: page 3 – 24 Opening and Saving Item Types All processes are associated with an item type. lookups. To Create Lookup Types: page 4 – 20. or Activities: page 4 – 42.

3 – 12 Oracle Workflow Guide Attention: Always save a copy of your workflow process definition as a flat file and check that file into a source control system to maintain a working version of your process definition. Avoid using the process definition stored in your .

" To Access Process Definitions in an Existing Data Store 1.0 or higher. In Oracle Workflow Builder. as others with access to the database can update the definition. double–click on the Oracle Workflow Builder icon located in the Application Development folder within the Oracle – <SID NAME> program group. If you are using Windows 95 or NT 4. select Open. To open a File: Provide the complete file path and choose OK. Select database or file to connect to the source containing the item type to which your process definition is associated. 2. Note: To connect from Oracle Workflow Builder to a database..database as your source controlled version. To start Oracle Workflow Builder.. the language of your Oracle Workflow Builder installation must match one of the available languages of the Oracle Workflow Server installation in the database. you can also select the Oracle Workflow Builder icon from the appropriate program folder from the Start menu. Defining a Workflow Process 3 – 13 . or use Browse to locate and open the file (extension . from the File menu.wft). 3.

0 Explorer or Microsoft Windows NT File Manager into the navigator tree to open that file in Oracle Workflow Builder. The format that you should use to specify the date and time depends on the date and time preferences defined in the Regional Settings of your Windows Control Panel. you can specify a date and time in the Effective field and have Oracle Workflow Builder retrieve that data from the database. 3 – 14 Oracle Workflow Guide . 4. Note: If you are using the version of Oracle Workflow embedded in Oracle Applications. Enter the name of the database alias or connect string and choose OK. the current directory that you open the file from becomes the new default directory from which you open files in the future. To open a Database connection: Enter the username and password for the database. If you wish to retrieve a process definition that was effective at a particular point in time.wft file from the Microsoft Windows 95/98/2000/NT 4.Note: You can also drag and drop a . 5. Note: When you use Browse to find and open a file. use the APPS schema to connect to the database. This default directory persists until you use Browse again to locate another file.

Choose Save from the File menu to save your work and make the changes immediately effective. choose Save from the File menu to preserve your changes and make them effective immediately. the item type(s) you want to view. If you want to save only specific item types. you may get validation errors due to foreign key references. Choose OK to load these item types into the navigator tree. When you use the Save command. See: To Save Your Work: page 3 – 15. then you must create a new data store. 7. If at any time you want to view and modify item types that are hidden in the current data store. . The final process definition in the new store will be valid as long as all referenced item types are copied to the new destination store. However. and copy the specific item types you want to save into the new store and save the new store. the Show Item Types window appears. If multiple item types exist in the data store. When you finish working. See Also To Start Oracle Workflow Builder from the MS–DOS Prompt: page 3 – 17 " To Save Your Work 1. You can also choose Show/Hide Item Types from the File menu to display the Show Item Types window. and choose << to move it into the Visible list.6. Pay attention to these errors as they may indicate that you need to also copy other item types into the new store to resolve the foreign key references. 8. you save all modified objects in the currently selected data store (even those that are hidden) back to that data store. Note: You can copy item types from one store to another in any order even if the item types reference each other. you can double–click on the Hidden Item Types branch in the navigator tree to display the Show Item Types window and select the item types you want to show. Select from the Hidden list.

there is a check box called ”Allow modifications of customized objects”. In the ”About Oracle Workflow Builder” dialog box from the Help menu. Oracle Workflow Builder saves your edits in ’upload’ mode. If you check this check box. overwriting any protected objects Defining a Workflow Process 3 – 15 . Attention: Oracle Workflow Builder can save your work to the database using one of two modes.

Note: If you save your work to a database with a future effective date. These two modes match the upgrade and upload behavior of the Workflow Definitions Loader program. and the date when you want your process definition to take effect in the database. See: To Set the Access Level for an Object: page 4 – 18 and Using the Workflow Definitions Loader: page 2 – 107. continue to modify your process and later choose Save 3 – 16 Oracle Workflow Guide . from the File menu. See: Version/Effective Date: page 8 – 11. As the default. If you want to save your work to a different data store (database or flat file).that you have access to modify. You can leave the Effective field blank to save and make the changes effective immediately.. or if you want to save it to a database with an effective date other than the current system date. the check box is unchecked. 2. as well as any previously customized objects. then choose Save As. Oracle Workflow Builder runs in ’upgrade’ mode and will only save edits to protected objects that you have access to change and will not overwrite objects that have been previously customized. If you uncheck this check box.. Use the Save As window to specify the file or database you want to save your process definition to. and then in the same Oracle Workflow Builder session.

Choose Close Store from the File menu to close your connection to the current database or file data store. If you save your work without correcting the problems. or go ahead and save your work as is. You can either correct the information before saving your work. 5. Note that when you save your work. and fix the problems later. the Workflow Error window will reappear when you reopen your process definition. 4.from the File menu. Choose Exit from the File menu to exit Oracle Workflow Builder. 3. you automatically save the process definition to the same database using the previously specified effective date. Use the Copy button to copy the information from the Workflow Error window to the clipboard for later reference. Attention: The Close Store and Exit options from the File menu are enabled only when the Navigator window is the current window. Oracle Workflow automatically validates the process definition for any invalid or missing information and displays what it finds in a Workflow Error verification window. .

type the following command at the MS–DOS prompt. " To Start Oracle Workflow Builder from the MS–DOS Prompt: Rather than starting Oracle Workflow Builder by double–clicking on its Windows icon. you can also type in a command at the MS–DOS prompt and specify the file or database to connect to. where <username/password@connect> represents the database account information to connect to: wfbldr –c <username/password@connect> Note: If you run Oracle Workflow Builder in Microsoft Windows 95 or Windows NT 4. where <filename.0 or higher.wft) from the Windows Explorer to automatically open that file and start Oracle Workflow Builder. 1. type the following command to start Oracle Workflow Builder with a specific workflow data file. To start Oracle Workflow Builder with a specific database connection. Defining a Workflow Process 3 – 17 .wft> represents the full path and name of the data file: wfbldr <filename.wft> 2. you can also double–click on a workflow data file (. In an MS–DOS prompt window.

where <item_type> represents the internal name of the item type you want to open: –E <item_type> For example: wfbldr wfdemo. you can take the bottom–up or top–down approach to complete your workflow process definition.wft –E wfdemo 4. 3. Select Quick Start Wizard from the File menu. " To Use the Quick Start Wizard 1. append the following to the appropriate command shown in Step 1 or 2.wft –E WFDEMO:NOTIFYAPPROVER See Also Using the Workflow Definitions Loader: page 2 – 107 Creating a Shortcut to a Workflow Process: page 5 – 22 Quick Start Wizard Overview The Quick Start Wizard lets you begin designing a workflow process immediately. append the following to the appropriate command shown in Step 1 or 2. To start Oracle Workflow Builder and open a specified item type in a data store. 3 – 18 Oracle Workflow Guide .Note: If you are using the version of Oracle Workflow embedded in Oracle Applications. where <item_type:process> represents the internal names of the item type and process you want to open: –E <item_type:process> For example: wfbldr wfdemo. It first loads a file called wftemplate. To start Oracle Workflow Builder and open a specified process diagram in a data store. use the APPS schema to connect to the database. Once you initiate the Quick Start Wizard.wft that is an outline of all the mandatory objects you need to build a workflow process and then displays a Process window for you to diagram your process.

SQL scripts. and PL/SQL procedures refer to the internal name when identifying an item type. All Oracle Workflow APIs. The Workflow Quick Start Wizard window prompts you for the following mandatory information: • New Item Type – Internal Name—Specify an all uppercase internal name with a maximum of eight characters. .2.

Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. – Display Name—Enter a translatable Display Name for the item type. specify the number of days from the time an item type instance completes Defining a Workflow Process 3 – 19 .sql: page 16 – 8.sql. – Days—If Persistence Type is Temporary. See: Wfchitt. – Persistence Type—Specify Temporary or Permanent persistence for the status audit trail of the item type. Attention: To update the internal name of an item type once it is defined. you must use a special SQL script called wfchitt.

• New Process – Internal Name—Specify an all uppercase internal name. . See: Persistence Type: page 4 – 4.before its status audit trail can be purged.

See: To Create a Process Definition from Top–Down: page 3 – 10. • Loads the Standard item type into the new data store so that you can include standard activities in the process you create. – Display Name—Enter a translatable Display Name for the process activity. Attention: To update the internal name of an activity once it is defined. See: Wfchact. 3. You can go back later to fill in the details of each activity and its supporting objects.sql: page 16 – 7.sql. The Display Name also appears in the title bar of your Process window. • Opens the Process window for the new process activity you defined. 3 – 20 Oracle Workflow Guide . • Uses the information you entered in the Workflow Quick Start Wizard window to create a new item type and process activity in the data store. You can now customize your process definition in one of two ways: • Take a bottom–up design approach by first creating activities and all their supporting objects before trying to draw a workflow diagram. The Process window displays a Start and an End activity. The Quick Start Wizard does the following: • Creates a new data store called ”Untitled–n” in the Navigator window. you must use a special SQL script called wfchact. 4. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. See: To Create a Process Definition From Bottom–Up: page 3 – 8. • Take a top–down design approach by creating activities that contain minimum information so you can draw the workflow diagram first.

6.Using Oracle Workflow Builder with Different Server Versions The Oracle Workflow Builder Release 2.6. and Release 2. base Release 2.6 features.6. view.5 of the standalone version of the Oracle Workflow Server.6. The Oracle Workflow Builder can upload and download these process definitions to a database with Oracle Workflow Server Release 2. The Oracle Workflow Builder can upload and download these process definitions to a database with Oracle Workflow Server Release 2. • Alternatively.6 installed. you can create.6. and modify workflow process definitions that include new features introduced in Release 2. Release 2. . • You can create.1. and modify workflow processes that include only Release 2.2 is compatible with all versions of the Oracle Workflow Server embedded in Oracle Applications Release 11i.2. as well as with Release 2.5 features. such as Business Event System components and external Java function activities. view. if you do not want to take advantage of the Release 2.5 installed.

6.6.2 or Release 2.6 Embedded Server or a Release 2.6.6. or with standalone Oracle Workflow Server Release 2.6 embedded in Oracle Applications.6.6.6.1.6.2. it is only certified with the Oracle Workflow Server Release 2. or with the standalone version of the Oracle Workflow Server Release 2. Using the Release 2.2 Oracle Workflow Builder with a Release 2. You can save these process definitions to the database and open process definitions from the database to view or modify them.6 Oracle Workflow Builder and save these process definitions to a database with Oracle Workflow Server Release 2.2 client component that is compatible with earlier versions of the Oracle Workflow Server. Attention: The Oracle Workflow Builder is the only Release 2.6.6.5 Oracle Workflow Builder or with the base Release 2.1 Standalone Server If you are using the Oracle Workflow Builder with Oracle Workflow Server Release 2. You can also open existing process definitions that were created with the Release 2.6 embedded in Oracle Applications.2 or Release 2.1. The Oracle Workflow Mailer Release 2.2 is not compatible with any earlier versions of the server. you can use all currently available features in your workflow processes.2 or Release 2. Defining a Workflow Process 3 – 21 .

6. However. However. 5.6. you must not use the Event Parameter lookup code which is now available in the Event Property lookup type. you can include most of the currently available features in your workflow processes. 3 – 22 Oracle Workflow Guide . You can also create new workflow processes using only base Release 2. Continue defining your workflow process using only base Release 2. Force save the process definition to the database with base standalone Oracle Workflow Server Release 2. the version of the Standard item type used by the Oracle Workflow Builder Release 2.6 components. Create a new workflow process definition.6 version of the Standard item type.6 embedded in Oracle Applications. 2. If you want to save a new process definition to a database with base standalone Oracle Workflow Server Release 2. and save the definitions to a database with base standalone Oracle Workflow Server Release 2. and do not select the Event Parameter property in any of the following standard Workflow activities: • Get Event Property • Set Event Property • Compare Event Property You can open existing process definitions that were created with the base Release 2. 3. view or modify these process definitions using only the base Release 2.6.6 components.Using the Release 2. perform the following steps: 1. Do not use the Event Parameter lookup code in any custom activities. because this feature was added in the version of Release 2. The process definition now includes the base Release 2. Force delete the Standard item type from your data store. Reopen the process definition from the database. 4.6 components.6.2 contains some later Release 2.6.6 components.6 Oracle Workflow Builder.2 Oracle Workflow Builder with a Release 2.6 Standalone Server If you are using the Oracle Workflow Builder with the base standalone version of Oracle Workflow Server Release 2.6.

2 contains some Release 2. 4. Reopen the process definition from the database. However.2 Oracle Workflow Builder with a Release 2. the version of the Standard item type used by the Oracle Workflow Builder Release 2. If you want to save a new process definition to a database with Oracle Workflow Server Release 2.6. Create your workflow process definition. You must not use any of the following new features introduced in Release 2. perform the following steps: 1.5 components.5 Standalone or Embedded Server If you are using the Oracle Workflow Builder with either the standalone or the embedded version of Oracle Workflow Server Release 2. you must include only Release 2.6 components. Force delete the Standard item type from your data store.5. Force save the process definition to the database with Oracle Workflow Server Release 2.5 version of the Standard item type. Defining a Workflow Process 3 – 23 .5. 2.5 components. view or modify these process definitions using only Release 2.6.5 features in your workflow processes. and save the definitions to a database with Oracle Workflow Server Release 2.6: • Event activities • Item attributes of type Event • External Java function activities You can open existing process definitions that were created with the Release 2.Using the Release 2. The process definition now includes the Release 2.5.5 Oracle Workflow Builder. You can also create new workflow processes using only Release 2.5. 3.

See: Setting Global User Preferences: page 2 – 14. The Item Type Definition page then appears. so that you can review the contents easily and effectively. Enter the following URL in your web browser: <webagent>/wf_item_definition. The right frame displays the details of the object you select in the navigator tree. " To Query an Item Type 1. events. The page provides a detailed view of the attributes. functions.Item Type Definition Web Page The Web–based Item Type Definition page provides you with distributed access to workflow definitions stored in your Oracle Workflow database. processes. allowing you to present or do a design review of your workflow process.find_item_type Replace <webagent> with the base URL of the web agent configured for Oracle Workflow in your Web server. The information is displayed in two frames. modeled like the Oracle Workflow Builder. messages. . and lookup types that are associated with a given item type. notifications. you use the Find Item Type web page to first query for an item type. You can query for an item type based on an effective date and time. To display an item type definition. You can also select either frame at any time and use your web browser to print all the information in that frame. The left frame lists all the objects in your item type definition in an expandable navigator tree.

See: Accessing the Oracle Workflow Home Page: page 9 – 2. Attention: This URL accesses a secured page. so if you have not yet logged on as valid user in the current web session. you will be prompted to do so before the page appears. Note: You can also access the Find Item Type web page from the Oracle Workflow home page. 3 – 24 Oracle Workflow Guide .

2. See: Setting User Preferences: page 9 – 6. Use the Item Type poplist field to select an item type. Specify the effective date and time of the item type definition you want to display using the format specified in the Date Format field of your User Preferences web page. Choose Find to display the item type in the Item Type Definition web page. 4. Defining a Workflow Process 3 – 25 . 3.

Click on any component link in the left hand frame to display the details of that component in the right hand frame. 2. 3 – 26 Oracle Workflow Guide ." To Review an Item Type Definition 1. The frame on the left lists the components of an item type definition in hierarchical format similar to the navigator tree in Oracle Workflow Builder. The frame on the right lists the details of each component. The Item Type Definition web page displays two frames.

CHAPTER 4 Defining Workflow Process Components his chapter tells you how to use Oracle Workflow Builder to define the components necessary to compose a workflow process diagram. T Defining Workflow Process Components 4–1 .

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. Applications as well as function activities can reference and set item type attributes using the Oracle Workflow Engine APIs.” An activity in our example Requisition Approval process requires the value of this item type attribute to determine if a selected approver has the authority to approve a requisition of that amount. you need to define all or some of the following types of components to make up the process: • Item Types • Lookup Types • Messages • Activities • Attributes • Roles Item Types An item type is a classification of the components that make up a workflow process. An item type attribute often provides information about an item that is necessary for the workflow process to complete. or any information that 4–2 Oracle Workflow Guide . with a particular item type. any information that will be required by an activity in your process. It acts as a global variable that can be referenced or updated by any activity within a process. Item Type Attributes An item type attribute is a property associated with a given item type. For example. the ”Workflow Demonstration” item type has an item type attribute called ”Requisition Amount. You should define as an item type attribute. For example. Often it makes sense to define an item type so that it describes the item being managed by your workflow process. You must associate any component that you create for a process. You can define and maintain as many item type attributes as necessary for an item type. such as a function activity or a message.Workflow Process Components Depending on the workflow process you wish to create.

• Text—The attribute value is a string of text. If you reference a URL attribute in a notification message as a message attribute. Oracle Applications Developer’s Guide. • Date—The attribute value is a date with the optional format mask you specify. when viewed from the Notification Details web page or as an HTML–formatted e–mail. as shown below. The type determines what values are acceptable and how the attribute is used.will need to be sent in a notification message. the notification. displays an anchor to the URL specified by the URL attribute. If you include a form–type attribute in a notification message as a message attribute. The user can complete an activity or see additional information related to the activity by accessing that URL. displays an attached form icon that lets users drill down to the referenced form. See: Overview of Menus and Function Security. • Number—The attribute value is a number with the optional format mask you specify. See Also Item Attributes: page C – 3 Attribute Types There are ten attribute types. when viewed from the Notification Details web page. You can specify the following types of documents in the default value field: Defining Workflow Process Components 4–3 . • Lookup—The attribute value is one of the lookup code values in a specified lookup type. • Document—The attribute value is an attached document. the notification. This attribute type is not relevant for the standalone version of Oracle Workflow. See: To Define a Message Attribute: page 4 – 34. • URL—The attribute value is a Universal Resource Locator (URL) to a network location. • Form—The attribute value is an Oracle Applications internal form function name and its optional form function parameters.

To set a default value for the attribute. Persistence Type When you define an item type. • Role—The attribute value is the internal name of a role. After the ’n’ days of persistence. you must initially load roles from the database. • Attribute—The attribute value is the internal name of another existing item type attribute that you want to maintain references to in a process. 4–4 Oracle Workflow Guide . you must also specify its persistence type. the role display name is a hypertext link to the e–mail address for that role. If a message attribute of type role is included in a notification message. See: SetItemAttribute: page 8 – 48. If you set Persistence to Permanent. you can access the event data within that event message by creating an item attribute of type URL and setting the value of the URL attribute to reference the event data.– PL/SQL document—a document representing data from the database as a character string. If you set an item type’s Persistence to Temporary. you can then use any of the WF_PURGE APIs to purge the item type’s runtime status information. 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. the runtime status information is maintained indefinitely until you specifically purge the information by calling the procedure WF_PURGE. See: Event Message Structure: page 8 – 242. See: WF_PURGE: page 8 – 111. generated from a PL/SQL procedure. eliminating the need for you to maintain separate attributes for the role’s internal and display names. – PL/SQL CLOB document—a document representing data from the database as a character large object (CLOB). Also when you view the notification from a web browser.TotalPerm( ). generated from a PL/SQL procedure. the attribute automatically resolves to the role’s display name. • Event—The attribute value is a Business Event System event message in the standard WF_EVENT_T structure. Note: If you store an event message in an item attribute of type event. See: To Define a Document Attribute: page 4 – 14. you must also specify the number of days of persistence (’n’). See: Roles: page 5 – 24. The persistence type controls how long a status audit trail is maintained for each instance of the item type.

Note: If you are using the version of Oracle Workflow embedded in Oracle Applications.If you set an item type’s Persistence to Synchronous. Since no runtime status information is maintained. See: Synchronous. the selector/callback function can perform whatever logic necessary to determine whether it Defining Workflow Process Components 4–5 . Forced synchronous processes complete in a single SQL session from start to finish and never insert into or update any database tables. WF_PURGE: page 8 – 111. you do not normally need to perform any purging for a process with the Synchronous persistence type. The executable name for this concurrent program is ”Oracle Workflow Purge Obsolete Data” and its short name is FNDWFPR. For example. Item Type Selector Function If your item type has or will have more than one runnable process activity associated with it. if you run the process with a unique item key in asynchronous mode for testing or debugging purposes. Oracle Workflow does maintain runtime status information for that process instance. However. and Forced Synchronous Processes: page 8 – 14. define a PL/SQL function that determines which process activity to run in a particular situation. See: Purge Obsolete Workflow Runtime Data: page 8 – 119. In ’TEST_CTX’ mode. Your selector function would determine which process would be appropriate in any given situation. you may also use the Purge Obsolete Workflow Runtime Data concurrent program to purge obsolete item type runtime status information. you may have two different requisition approval process activities associated with the same item type. Asynchronous. Oracle Workflow calls the selector/callback function for your item type in ’TEST_CTX’ mode to test the Oracle Applications context before turning the form launch over to the Oracle Application Object Library function security system. You can also extend the Selector function to be a general callback function so that item type context information can be reset as needed if the SQL session is interrupted during the execution of a process. This is particularly important in the Oracle Applications scenario when you view a notification from the Notification Details web page and attempt to launch another form that is associated with the notification. Oracle Workflow expects instances of that item type to be run as forced synchronous processes with an item key of #SYNCH. and Purging for Performance: page C – 8. Then change the item type’s Persistence back to Synchronous. You can purge this information by changing the item type’s Persistence to Temporary and running any of the WF_PURGE APIs. The process that Oracle Workflow executes may vary depending on how and where the requisition originates.

In a workflow process. electronic documents of a wide variety of formats. you can attach documents generated by a PL/SQL procedure. The document generated by the PL/SQL procedure is simply displayed within the text of a notification. including non–printed media. See: Attribute Types: page 4 – 3.is appropriate to launch the form. are forcing organizations to address the management of these documents. To Define an Item Type or Activity Attribute: page 4 – 8 and To Define a Message Attribute: page 4 – 34. See: Standard APIs for ”PL/SQL” and ”PL/SQL CLOB” Documents: page 7 – 17. For PL/SQL documents and PL/SQL CLOB documents. 4–6 Oracle Workflow Guide . With the explosion of digital media and the worldwide web. The PL/SQL procedure must follow an Oracle Workflow standard interface. External Document Integration Documents have an enormous impact in the operations of an organization. See: Standard API for an Item Type Selector or Callback Function: page 7 – 13. which we call PL/SQL or PL/SQL CLOB documents. The value of information in these documents can be maintained only if the documents can be managed and shared. the item or message attribute’s value would be the name of the PL/SQL package and procedure used to generate the document. You attach a document to a workflow process by referencing the document in a predefined item attribute or message attribute of type Document.

An Item Type property page appears. If you do not already have a data store open. Then define a new item type in the navigator tree by choosing New Item Type from the Edit menu. . select New from the File menu to create a new data store to define this new item type. and PL/SQL procedures refer to the internal name when identifying an item type. which is a maximum of eight characters long. Every item type has an all–uppercase internal name. You should only use this script to correct errors in an item type’s internal name during design time.sql. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. Do not use this script to rename item types that are involved in running instances of processes." To Create an Item Type 1. Attention: To update the internal name for an item type once it is defined. See: Wfchitt.sql: page 16 – 8. you must use a special SQL script called wfchitt. SQL scripts. All Oracle Workflow APIs. 2.

then specify the number of days Defining Workflow Process Components 4–7 . You can also supply a description for the item type. Specify a persistence type of Temporary or Permanent. Enter a translatable Display Name that is longer and more descriptive. If you set the persistence type to Temporary. 3. 4.

Choose Apply to save your changes. 6. If your item type has or will have more than one workflow process associated with it. A secondary branch appears in the navigator tree that represents the item type you just created. See: To Define an Item Type or Activity Attribute: page 4 – 8. (This functionality will be supported in a future release. See Also Using the Edit Button in a Property Page: page 3 – 8 " To Define an Item Type or Activity Attribute 1. You can review or edit the properties of this item type at any time by double–clicking on the item type in the navigator tree or by selecting the item type and choosing Properties from the Edit menu. Define as many item type attributes as necessary to use as global variables in your process.from the time the item instance completes before its status audit trail can be purged. 9. 10. then choose New Attribute from the Edit menu. you may specify a selector function using the syntax <package_name>. and event activities. To create an item type attribute.<procedure_name>. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. 11.) Select the Access tab page to set the access and customization levels for this item type. See: Standard API for an Item Type Selector or Callback Function: page 7 – 13. You can also extend the selector function to be a general callback function that resets context information each time the Workflow Engine establishes a new database session to execute activities. 8. select an item type in the navigator tree. Choose Apply to save your changes. notification. See: Allowing Access to an Object: page 4 – 17. 5. Select the Roles tab page to specify the roles that have access to this item type. You use these item type attributes to pass values to and from your function. The selector function is a PL/SQL stored procedure that automatically identifies the specific process definition the Workflow Engine should execute when a workflow is initiated for this item type. 7. 4–8 Oracle Workflow Guide . See: Persistence Type: page 4 – 4.

2. select an activity in the navigator tree and choose New Attribute from the Edit menu.To create an activity attribute. and PL/SQL procedures refer to the internal name when identifying an attribute. Provide an Internal Name in all uppercase with no leading/trailing spaces. SQL scripts. All Oracle Workflow APIs. An Attribute property page appears in both cases. Defining Workflow Process Components 4–9 .

.

3. Specify an optional developer form function name and optional argument strings (form function parameters) in the Default Value field. provide the following default value information: • Text—Specify the maximum length of the text attribute and an optional default text string. 6. Note: The Frame Target field is applicable only for message attributes of type URL. Form. You should only use these scripts to correct errors in an attribute’s internal name during design time. Select the data type of the attribute. and document data types are not relevant if you are defining an activity attribute. 4 – 10 Oracle Workflow Guide . • URL—Specify an optional Universal Resource Locator (URL) to a network location in the Default Value field and specify the frame target for the URL. • Lookup—Choose a predefined Lookup Type from which to draw values. • Number—Optionally provide a format mask for your number and a default value. See: Wfchita. URL. It is not used for item type attributes or activity attributes. Enter an optional description. See: Overview of Menus and Function Security. 4. See: To Define a URL Attribute: page 4 – 12. This is the name that appears in the navigator tree. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. Enter a Display Name. Attention: To update the internal name for an attribute once it is defined. Depending on the data type of your attribute. 5.sql and wfchacta. • Form—This attribute is relevant only for the version of Oracle Workflow embedded in Oracle Applications. • Date—Optionally supply a format mask for the date and a default value.sql.sql: page 16 – 8 and Wfchacta. Choose a lookup code from that lookup type for the default value. Oracle Applications Developer’s Guide and To Define a Form Attribute: page 4 – 13. Do not use these scripts to rename attributes that are involved in running instances of processes. you must use special SQL scripts called wfchita.sql: page 16 – 7.

Choose Apply to save your changes. Note: The Frame Target field is not applicable for attributes of type document. you can only specify an event item type attribute as the default value. Defining Workflow Process Components 4 – 11 . may be a text string that allows for token substitution at runtime. See: To Define a Document Attribute: page 4 – 14. For activity attributes. Note: For attributes of type Lookup. select the Access tab page to set the access levels allowed to modify this attribute. 8. If you are defining an activity attribute. If you want the default to acquire its entire value from an item type attribute. Choose Apply to save your changes. then use the adjacent poplist field to choose the item type attribute. however. For item type attributes. 9. • Role—Specify a role name. For document attributes. • Event—If you are defining an item type attribute. this field is reserved for future use. See: Roles: page 5 – 24. 10. See: Allowing Access to an Object: page 4 – 17. Activity attributes assume the access/protection level of their parent activity. The item type attribute you select must also be of the same data type as the activity attribute. the default value must be a lookup code belonging to that lookup type. 7. choose Item Attribute in the Default Value region. Note: An activity attribute type of ’Text’ is compatible with any item attribute type. The constant. • Attribute—Specify the name of an item type attribute that you want to maintain references to in a process by choosing from the list of existing item type attributes.• Document—Enter an optional string that identifies the document in the default value field. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. If you are defining an item type attribute. but all other activity attribute types must match the item attribute type exactly. the optional default value may be a constant or an item type attribute. The item type attribute you select must be associated with the same item type that the activity itself is associated with. the optional default value is a constant that you enter or select from a list of values. you cannot specify any default value for an event attribute.

Any item type attribute you create appears beneath the Attributes branch in the navigator tree. . Any function activity attribute you define appears beneath the activity you defined it for in the navigator tree. You can review or edit the properties of an attribute at any time by double–clicking on the attribute in the navigator tree or by selecting the attribute and choosing Properties from the Edit menu.11.

specify the message attributes as follows: –&message_attr– 2.com?arg1=–&msgattr1–&arg2=–&msgattr2– Note: If you are defining a message attribute of type URL. or select an attribute and choose Move Attribute Up or Move Attribute Down from the Edit menu. The message attributes used for token substitution can have constant values or can reference the values returned from item type attributes. To token substitute other message attributes in an argument string. You can use the drag and drop feature of the navigator tree to reorder a set of attributes. The URL can be a constant or a value returned from another item attribute. See: To Define a Message Attribute: page 4 – 34 and To Token Substitute an Attribute: page 4 – 41. the following string represents a URL with two arguments called arg1 and arg2 that are token substituted with the runtime value of message attributes msgattr1 and msgattr2.oracle. Specify a Universal Resource Locator (URL) to a network location in the Default Value field of the Attribute property page. Additionally. Using the Edit Button in a Property Page: page 3 – 8 " To Define a URL Attribute 1. See Also Attention: The order that you list these attributes in the navigator tree correlate to the order in which they appear in any list of values that draw upon these attributes. You can include argument strings in your URL that are text strings. you can also include a special token in your argument string called 4 – 12 Oracle Workflow Guide . respectively: http://www. For example. you can include argument strings that are token substituted with other message attributes. if you are defining a message attribute of type URL.

. If your URL attribute contains an argument string. the month portion of the DD–MON–YYYY format could potentially translate to a value that is not acceptable across a URL. Similarly. This formatting is required because in multibyte databases. However. Note: If you are defining a message attribute of type Form. If your form attribute contains an argument string. the argument string for the other attribute is not further token substituted. If you need to pass a date and time as an argument to a URL.argN=valueN 2. you can also include a special token in your argument string called &#NID which Oracle Workflow substitutes with the notification ID of the runtime notification. enclosed in quotes (” ”) or can be token substituted with another item type attribute in any of the following ways. using TO_DATE. 4. 5. • You can token substitute that argument string with another Form attribute or URL attribute. you must adhere to the following restrictions: Defining Workflow Process Components 4 – 13 . Specify a developer form function name and any optional argument string (form function parameters) in the Default Value field of the form Attribute property page. The default value must be entered using the following format: function_name:arg1=value1 arg2=value2 . you need to do the correlating format translation in the function that the URL calls. The value of argN can be a text string. where &item_attr represents the internal name of the item type attribute: • argN=”&item_attr” • argN=”Value &item_attr” See: To Token Substitute an Attribute: page 4 – 41. you should use TO_CHAR to format the string as YYYY/MM/DD+HH24:MI:SS. " To Define a Form Attribute 1. 3. you must adhere to the following restrictions: • You cannot token substitute that argument string with another item attribute of type Document. 3..–&#NID– which Oracle Workflow substitutes with the notification ID of the runtime notification. Choose OK when you are done.

Enter a string that identifies the document in the default value field of the Attribute property page. The argument string should identify the document. generated from a PL/SQL procedure. Replace <procedure> with the PL/SQL package and procedure name. Note: The PL/SQL procedure must follow a standard API format. Specify the default value of a PL/SQL CLOB document as 4 – 14 Oracle Workflow Guide . 3. Specify the default value of a PL/SQL document as plsql:<procedure>/<document_identifier>. • You can token substitute the value of that argument string with another Form attribute or URL attribute. To Define a Document Attribute 1. you should use a PL/SQL CLOB document to hold the data instead. 4. plsql:po_wf. A PL/SQL document represents data from the database as a character string. You can identify the following types of document for a document attribute: • A PL/SQL document • A PL/SQL CLOB document 2. A PL/SQL CLOB document represents data from the database as a character large object (CLOB). See: Standard APIs for ”PL/SQL” and ”PL/SQL CLOB” Documents: page 7 – 17. For example. however. generated from a PL/SQL procedure.show_req/po_req:2034 Note: The maximum length of the data that a PL/SQL document can contain is 32 kilobytes. " Choose OK when you are done. the following string represents the PL/SQL document. generated by the procedure po_wf. Replace <document_identifier> with the PL/SQL argument string that you want to pass directly to the procedure. po_req:2034. separated by a period.• You cannot token substitute the value of argN with another item attribute of type Document.show_req. If you expect your document to exceed 32 Kb. the argument string for the other attribute is not further token substituted.

2. " Choose OK when you are done. Note: The PL/SQL procedure must follow a standard API format. Defining Workflow Process Components 4 – 15 . Replace <procedure> with the PL/SQL package and procedure name.show_req/&ITEM_ATTR1:&ITEM_ATTR2 Note: If you are defining a message attribute of type Document. See: Standard APIs for ”PL/SQL” and ”PL/SQL CLOB” Documents: page 7 – 17. you can token substitute the document identifier with other item type attributes. 4. the following string represents the PL/SQL CLOB document. The contents of the CLOB are printed in the message body as they are generated by the PL/SQL procedure.plsqlclob:<procedure>/<document_identifier>. If you wish to generate the document identifier for a PL/SQL or PL/SQL CLOB document dynamically. • Ensure that the PL/SQL procedure performs any formatting you require. generated by the procedure po_wf. to the data store or workspace you want to copy it to. 5. po_req:2036. Replace <document_identifier> with the PL/SQL argument string that you want to pass directly to the procedure. You can also use the Copy and Paste commands in the Edit menu. holding down your select mouse button. Drag the item type. To Copy an Item Type 1. plsqlclob:po_wf. For example.show_req_clob. you can also include a special token in your argument string called &#NID which Oracle Workflow substitutes with the notification ID of the runtime notification. Select the item type to copy in the navigator tree. The item attribute names must be in uppercase and must be separated by a colon. separated by a period.show_req_clob/po_req:2036 PL/SQL CLOB documents do not support further substitution of message attribute tokens. The argument string should identify the document. • Do not use tokens within the CLOB. See: To Token Substitute an Attribute: page 4 – 41. For example: plsql:po_wf.

Since most components must also have unique internal and display names. you may get prompted to update those components’ internal and display names in their property pages as well. you also copy all the components associated with the item type. If you plan to copy that item type and the Standard item type to a new data store. 4. Note that when you copy an item type. When you are done. Attention: The order in which you drag two or more item types to a new store is important. For example. choose OK. otherwise the other item type will have unresolved references to the Standard item type. If you copy this item type back to the same data store. This is because every item type must have a unique internal and display name. you update the existing version of the item type in that target data store with the changes in the version of the item type you are copying. If you copy an item type to a data store where a previous version of the same item type already exists.3. you get prompted to enter a new internal and display name for the item type in the Item Type property page. suppose an item type references objects in the Standard item type. you should first drag the Standard item type to the new data store before dragging the other item type over. .

choose OK. Drag the attribute. If you copy an attribute to a component associated with the same item type. 3. Select the attribute to copy in the navigator tree. See Also Using the Edit Button in a Property Page: page 3 – 8 4 – 16 Oracle Workflow Guide . 2. Note: You can also use the Copy and Paste options in the Edit menu. to the component branch you want to copy it to. Enter a new unique internal name and display name for the attribute. When you are done. " To Copy an Attribute 1. the property page for the attribute appears. holding down your select mouse button.

Oracle Workflow Builder is operating in ’upgrade’ mode. The shaded area represents the access levels that can edit the object. or shaded with any combination of solid green and crosshatch grey. The levels depicted by grey crosshatches represent levels that usually cannot modify customized objects. while the vertical bar represents your current access level. Upload mode means that Oracle Workflow Builder can save your edits. This indicates that when you save your work.Allowing Access to an Object In the Access tab page. but can now do so because Oracle Workflow Builder is operating in ’upload’ mode. only saving edits to protected objects that you have access to change Defining Workflow Process Components 4 – 17 . overwriting any protected objects that you have access to modify as well as any previously customized objects. • Unchecked—The range of editable access levels appears as a solid green area. the ’Range of Editable Access Levels’ indicator bar provides a relative indication of the range of access levels that can edit the object. The indicator bar can be shaded solid green. If the ”Allow modifications of customized objects” check box in the ”About Oracle Workflow Builder” dialog box of the Help menu is: • Checked—The range of editable access levels can appear as a combination of solid green and crosshatch grey areas. See: Overview of Oracle Workflow Access Protection: page 2 – 101.

Protection = 1000 4 – 18 Oracle Workflow Guide . Object may only be updated by access levels from 100–1000. Table 4 – 1 (Page 1 of 2) Customization = 0. use the ’Preserve Customizations’ and ’Lock at this Access Level’ check boxes to define the access levels that can modify this object. Preserve Customizations— Disallow customized objects from being overwritten during a workflow definition upgrade. In the Options region. The options that you check in this region directly affect the values that appear in the Levels region. If the ”Allow modifications of customized objects” checkbox is checked. Selected Checkbox Resulting Levels Levels Allowed to Modify the Object NONE—Object can be updated at any time. This table assumes that the user setting the options has an access level of 100. Select the Access tab of the property page. Access = 100. Access = 100. Protection = 1000 Object may be updated by any access level (0–1000). by anyone. 2. These two modes match the upgrade and upload behavior of the Workflow Definitions Loader program. See: To Set the Access Level for an Object: page 4 – 18 and Using the Workflow Definitions Loader: page 2 – 107. Customization = 100. customized objects can also be updated by access levels 0–99. The following table illustrates how the customization and protection levels of an object are affected when you check different combinations of these options.and leaving objects that have been previously customized untouched. as represented by grey crosshatches in the indicator bar. " To Set the Access Level for an Object 1.

when you create an activity or an attribute. 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. Protection = 100 Object may only be updated by access levels from 0–100. Defining Workflow Process Components 4 – 19 . an activity can reference a lookup type for its possible result values. See: To Create Lookup Types: page 4 – 20. you associate it with an particular item type. regardless of the item type that the lookup type is associated with. Access = 100. These lists can be referenced by activities and by item type.Selected Checkbox Resulting Levels Levels Allowed to Modify the Object Lock at this Access Level—Protect the object at the current access level and do not allow the object to be customized. BOTH—Object can only be updated by the access level at which the object is protected. message or activity attributes. Table 4 – 1 (Page 2 of 2) 3. Choose the Apply button to save your changes. that is. Access = 100. Note: An object appears with a small red lock over its icon in the navigator tree to indicate that it is a read–only if you are operating at an access level that does not have permission to edit an object. you can reference any lookup type in your current data store. When you define a lookup type. lookup types are not item type specific. Protection = 100 Object cannot be updated by any access level other than 100. Lookup Types A lookup type is a static list of values. If the ”Allow modifications of customized objects” checkbox is checked. However. as represented by grey crosshatches in the indicator bar. Customization = 100. your access level is in a white area of the ’Range of Editable Access Levels’ indicator bar. Customization = 0. customized objects can also be updated by access levels 0–99. For example.

you must use a special SQL script called wfchlut. Select an item type from the navigator tree and choose New Lookup Type from the Edit menu. Do not use this script to rename lookup types that are involved in running instances of processes. A Lookup Type property page appears. SQL scripts." To Create Lookup Types 1. All Oracle Workflow APIs. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. Attention: To update the internal name for a lookup type once it is defined. and PL/SQL procedures refer to the internal name when identifying a lookup type. Lookup types have an all–uppercase Internal Name with no leading/trailing spaces and a translatable Display Name.sql. See: Wfchlut. .sql: page 16 – 9. 2. You can supply an optional description for this lookup type. You should only use this script to correct errors in a lookup type’s internal name during design time.

4. Choose Apply to save your changes. 4 – 20 Oracle Workflow Guide . 3. See: Allowing Access to an Object: page 4 – 17. Select the Access tab page to set the access levels allowed to modify this lookup type. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page.

and PL/SQL procedures refer to the internal name when identifying a lookup code. All Oracle Workflow APIs. " To Create Lookup Codes for a Lookup Type 1. 2. . you must use a special SQL script called wfchluc. See: To Create Lookup Codes for a Lookup Type: page 4 – 21. Do not use this script to rename lookup codes that are involved in running instances of processes. A Lookup Code property page appears. Now define the lookup codes for your lookup type. You can review or edit the properties of this lookup type at any time by double–clicking on the lookup type in the navigator tree or by selecting the lookup type and choosing Properties from the Edit menu. You can also enter an optional description. SQL scripts. Attention: To update the internal name for a lookup code once it is defined.sql. The lookup type you just defined now appears beneath the Lookup Types branch in the navigator tree. Enter an Internal Name with no leading/trailing spaces and a Display Name for the lookup code. Select a lookup type from the navigator tree and choose New Lookup Code from the Edit menu. 6.sql: page 16 – 8.5. See: Wfchluc. You should only use this script to correct errors in a lookup code’s internal name during design time.

Defining Workflow Process Components 4 – 21 .

5. " To Copy a Lookup Code 1. then the new lookup type is copied with the same internal and display name as the original. " To Copy a Lookup Type 1. Choose Apply to save your changes. and that lookup type does not yet exist in any item type in that data store. You can review or edit the properties of this lookup code at any time by double–clicking on the lookup code in the navigator tree or by selecting the lookup code and choosing Properties from the Edit menu. You can also drag and drop the lookup type to the item type you want. Use the Copy and Paste options in the Edit menu to copy and paste the lookup type to the item type you want. 4 – 22 Oracle Workflow Guide . You do not have to enter new names.Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. by doing so. Note: Copying a lookup type also copies any lookup codes assigned to it. or if you copy a lookup type to an item type in a different data store when the lookup type already exists in any item type in that data store. choose OK. Select the lookup type to copy in the navigator tree. 3. • If you copy a lookup type to an item type in a different data store. When you are done. Repeat step 1 if you wish to create additional lookup codes for a specific lookup type. Select the lookup code to copy in the navigator tree. you actually move the lookup type to the new item type. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. 4. 2. The lookup code you just defined now appears beneath the lookup type you created it for in the navigator tree. you can drag and drop a lookup type to another item type in the same data store. However. • If you copy a lookup type back to the same item type. then the property page appears for you to enter a unique internal and display name for the new lookup type. Note: You cannot use the Copy and Paste options to copy a lookup type to another item type in the same data store.

a properties page appears for you to enter a unique internal and display name the new lookup code. then when you release your mouse button. A message is what a notification activity sends to a role in a workflow process. You can also attach message attributes that represent entire documents or URLs to a notification message. 3. You can also drag a message directly onto an existing notification activity to update the message that the activity sends. You can drag a message onto the Notifications branch to create a new notification activity that sends that message. Each message is associated with a particular item type. choose OK. In addition. 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. Note: You can also use the Copy and Paste options in the Edit menu. This allows the message to reference the item type’s attributes for token replacement at runtime when the message is delivered. Messages The Messages branch of the navigator tree lists all available workflow messages for the current item type. 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. When you are done. you can create message attributes that generate a response section that is unique to the message. 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. Hold down your mouse select button as you drag the lookup code to the lookup type you want to copy it to.2. When you define a message. If you drag the lookup code to the same lookup type or to a lookup type where this code already exists. A message function lets you include a formatted table of message attributes or a notification history table in the message body. Defining Workflow Process Components 4 – 23 . The recipient of a workflow message is called the performer.

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. When you define a message attribute with a source of ’Send’. complete the Result tab in the message’s property page. 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. You can. The source (Send or Respond) of a message attribute determines how the message attribute is used. specify the internal name of the message attribute using the format &MESGATTR within the subject or body text. you can embed the message attribute in the subject and/or body of the message for token substitution. To embed a message attribute in a message’s subject or body for token substitution. Document message attributes embedded in the subject will be ignored. 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. you can define as many message attributes as necessary for that message. The value of a ’Send’ message attribute can be a constant or can be a value returned by an item type attribute of that same data type. If it does. The information you enter creates a special ’Respond’ message attribute for the message that has an internal name of RESULT. Note: You should not embed a message attribute of type Document in a message’s subject. Send and Respond Message Attributes Once you create a message. since Document message attributes cannot be be token substituted in the subject.Message Result When you create a message for a notification activity. To create a message that prompts for this special response. 4 – 24 Oracle Workflow Guide . you should make note of whether the notification activity has a Result Type specified. embed Document message attributes within the body of a message for token substitution. Message attributes are listed beneath a message in the navigator tree. In addition. Each message attribute has a specific data type. you can attach the message attribute to the message when the notification is sent. however. The Workflow Engine uses that result to determine how it should branch to the next eligible activity in the process.

If you want to prevent users from reassigning a notification. specify the value Y as a constant. • If you only want to hide the Reassign button in certain cases. you must specify the data type of the attribute. set the value of this attribute to Y. if you have a notification that informs an approver that a requisition was submitted. you can set the requisition preparer as the From Role for the message. If a notification with this attribute is Defining Workflow Process Components 4 – 25 . To hide the Reassign button. Message Attributes: page C – 5 #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. The #HIDE_REASSIGN attribute must be of type text. For example. you can add the #HIDE_REASSIGN attribute to control whether the Reassign button is displayed or hidden. specify an item type attribute as the value.A message attribute defined with a source of ’Respond’ constitutes the response section of a message. 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. the response frame in the Notification Detail page includes the Reassign button by default. To display the Reassign button. See Also To Reassign a Notification to Another User: page 10 – 22 #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. You can also provide an optional default value for the response. • If you always want to hide the Reassign button for notifications using a particular message. set the value to N. When you define a ’Respond’ message attribute. When users view a notification from their Worklist web page. A ’Respond’ message attribute provides instructions that prompts a recipient for a response. The default value can be a constant or a value returned from an item type attribute of the same data type. respectively.

The From Role for each notification is displayed in the Worklist web page to give users additional information for reviewing and responding to the notifications. Depending on the parameters you provide. you can also use a special message function called WF_NOTIFICATION() to add context–sensitive content to a message body. Additionally. the Find Notifications page lets you search for notifications based on the From Role. the WF_NOTIFICATION() function can produce either a table of message attributes or a notification history table. Oracle Workflow automatically sets the From Role to the original recipient when sending the notification to the new recipient.reassigned. 4 – 26 Oracle Workflow Guide . The tables are created in a standard Oracle Workflow format. To specify the From Role for a message. create a message attribute with the following properties: • Internal Name—#FROM_ROLE • Display Name—From Role • Description—From Role • Type—Role • Source—Send • Default Type—Item Attribute • Default Value—The item attribute that holds the value you want to set as the From Role for the message See Also To View Notifications from the Worklist: page 10 – 17 To Find Notifications: page 10 – 15 WF_NOTIFICATION() Message Function In addition to message attribute tokens.

.Message Attribute Table To include a table of message attributes in a message body.. The message attribute table contains a row for each message attribute listed in the WF_NOTIFICATION() call. as well as a row for the initial submission of the process.<attribute1>.<attribute3>. For example. for a requisition approval notification that is sent to several approvers in turn. call WF_NOTIFICATION() with the HISTORY option in the following format: WF_NOTIFICATION(HISTORY) The notification history table contains a row for each previous execution of the notification activity in the process..<attribute2>. call WF_NOTIFICATION() with the ATTRS option followed by the internal names of the message attributes.) Note: You must not include any spaces or carriage returns in the call to WF_NOTIFICATION(). You only need to use a comma to delimit the parameters in the list. separated by commas. showing the display name and the value for each attribute. Notification History Table To include a notification history table in a message body. Use the following format: WF_NOTIFICATION(ATTRS. the Defining Workflow Process Components 4 – 27 .

The WF_NOTIFICATION() function retrieves the note text stored in the WF_NOTE attribute and displays it in the notification history table. The notification history table includes the following columns: • Sequence—The order in which the executions of the notification activity took place. or if the WF_NOTE message attribute was not defined for the notification. • Note—An additional note from the recipient. • Date—The notification date.notification history table would contain a row for each approver to whom the notification was sent. Note: The process owner cannot add a note for the notification history table when submitting the process. beginning at zero (0) for the initial submission of the process by the process owner. • Action—The action with which the recipient responded to the notification. • Who—The notification recipient or process owner. and the recipient can enter a note there when responding to the notification. as well as a row for the process owner. If the recipient did not enter a note. it appears as part of the notification response section. 4 – 28 Oracle Workflow Guide . Only a notification recipient can add a note when responding to the notification. you must create a special ’Respond’ message attribute with the internal name WF_NOTE. To allow a recipient to add a note for the notification history table. then the Note column in the notification history table is left blank. Define the message attribute with the following properties: – Internal Name—WF_NOTE – Display Name—Note – Description—Note – Type—Text – Source—Respond When the WF_NOTE attribute is defined with a source of ’Respond’.

2. and PL/SQL procedures refer to the internal name when identifying a message. you must use a special SQL script called wfchmsg. Select the item type that you want to create a message for in the navigator tree. and provide a display name. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. Provide an internal name for the message that is all uppercase with no leading/trailing spaces. You may also enter an optional description. and choose New Message from the Edit menu. Attention: To update the internal name for a message once it is defined. SQL scripts. See: Wfchmsg. You should only use this script to correct errors in a message’s internal name during design time.sql. All Oracle Workflow APIs.sql: page 16 – 9. . Do not use this script to rename messages that are involved in running instances of processes. A Message property page appears." To Create a Message 1.

3. or Low for the default priority of the message. Normal. The priority level simply informs the recipient of the urgency of the message. Choose High. It does not affect the processing or delivery of the message. Note: When you assign this message to a notification activity and you incorporate the notification activity into a process Defining Workflow Process Components 4 – 29 .

and 67–99=Low.diagram as a node. use an ampersand (&) followed by the message attribute’s internal name. To include a message attribute in the subject. The subject gets its default value from the display name that you entered in the Message tab. you can assign a message attribute the same name as the item type attribute it references. the message priority was represented as a numeric value between 1 (high) and 99 (low). 5. Suggestion: For clarity. you can override this default message priority with a new priority that is constant or dynamically determined at runtime. See: To Define Nodes in a Process: page 5 – 6. Oracle Workflow now automatically converts the priority values of all message definitions defined in earlier versions as follows: 1–33 = High. 4 – 30 Oracle Workflow Guide . 6. Select the Body tab to display the Body property page of the message. 34–66=Normal. You can choose to keep the default subject or enter a new subject for the message. Note: In earlier versions of Oracle Workflow. The subject can include message attributes that get token replaced with runtime values when the message is delivered. Choose Apply to save your changes. See: Send and Respond Message Attributes: page 4 – 24 and To Define a Message Attribute: page 4 – 34. 4.

Enter a plain text message body in the Text Body field. You can select the ellipsis button (.) to expand the view of the Subject and Text Body fields in another window. . Oracle Workflow uses the content you enter in the Text Body field to generate a plain text version of the notification message. The plain text message can be viewed from the from an e–mail reader that displays plain text messages...7.

Attention: Make sure you enter a plain text message body in the Text Body field.. Attention: Oracle Workflow Builder does not verify the HTML formatting of the message body. Oracle Workflow simply extracts the content between these tags to use as the HTML message body. Oracle Workflow ignores any HTML tags or content prior to the <Body> tag.) to expand the view of the Subject and HTML Body fields in another window.. If you do include these tags.HTM or .. Attention: When you enter or import the HTML message body. You can also select the ellipsis button (.. you do not need to include the <Body>.HTML file. If Text Body is null. you get an empty notification when you view your message from a plain text e–mail reader. .</Body> HTML tags. or by selecting Import to import the content from a . As a result. 8. You may enter an optional HTML–formatted message body in the HTML Body field by selecting the HTML Body tab and typing in the content.

.

. You can view an HTML–formatted notification message from the Notification Details web page.. It inserts the plain text between the <pre>. Oracle Workflow uses the content you enter in the HTML Body field to generate an HTML–formatted version of the notification message..</pre> HTML tags. Note: If HTML Body is null. or from an e–mail reader that displays HTML–formatted messages or HTML–formatted message attachments. Oracle Workflow uses the message body entered in Text Body to generate the notification message.

Defining Workflow Process Components 4 – 31 . Attention: Oracle Workflow does not fully support references to icon and image files in the HTML message body. Although your web server may be able to resolve the location of these files for proper display in the Notification Details web page. the Notification Mailer and third party e–mail applications are not able to identify the location of these files when users view the HTML version of their notifications in e–mail.

Oracle Workflow substitutes this token with the notification ID of the runtime notification. . You can embed message attributes in the text or HTML body. Attention: The text in a message body must be less than 4000 bytes. If you include message attributes in the text for token substitution. you can use the message function WF_NOTIFICATION() to include a formatted table of message attributes or a notification history table in the text or HTML message body. Oracle Workflow token replaces the message attributes with runtime values when it delivers the notification. Note: You can also include a special token in the message subject or body called &#NID. Additionally. enter an ”&” followed by the message attribute’s internal name. then the final message body can increase up to 32000 bytes.9. To embed a message attribute.

Select the Access tab page to set the access levels allowed to modify this message. 13. (This functionality will be supported in a future release. 10. Oracle Workflow uses the information you specify in the Result tab page to create a special ’Respond’ message attribute called RESULT. Select the Roles tab page to specify the roles that have access to this message. 11. See: Message Result: page 4 – 24 4 – 32 Oracle Workflow Guide . select the Result tab page and complete the information requested. See: Allowing Access to an Object: page 4 – 17.) 12. Choose Apply to save your changes. If you want the notification message to prompt the performer for a response value and you want Oracle Workflow to interpret that response value as the result of the notification activity.

Choose Apply to save your changes. select the referenced item type attribute in the navigator tree. The lookup code you select appears as the default value of the RESULT message attribute. 14. Note: To create any other type of message attribute. then its message icon in the Navigator tree has a red question mark overlay to help you distinguish it from messages that do not have a Result defined. Select a lookup code in the Default Value region. You can review or edit the properties of this message at any time by double–clicking on the message in the navigator tree or by selecting the message and choosing Properties from the Edit menu. You must now define all the message attributes that you have included in the subject and body of this message. If a message has a Result defined. 16. 17.Specify a display name and description for RESULT. Select a lookup type from the poplist field. see: To Define a Message Attribute: page 4 – 34. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. The lookup type you select should be identical to the lookup type specified for the notification activity’s result type. The message you just defined now appears beneath the Message branch in the navigator tree. and Defining Workflow Process Components 4 – 33 . 15. To create a message attribute that references an item type attribute.

Attention: To update the internal name for a message attribute once it is defined. 18. 2. " To Define a Message Attribute 1. and PL/SQL procedures refer to the internal name when identifying an attribute. Do not use this script to rename message attributes that .hold down your mouse select button as you drag the item type attribute to your message. The Default Value region is automatically set to Item Attribute and references the originating item attribute. You can also create message attributes that are not based on existing item type attributes. Provide an Internal Name in all uppercase with no leading/trailing spaces. select a message in the navigator tree and choose New Attribute from the Edit menu. Edit the property page that appears. To create a message attribute that does not reference an existing item type attribute. making sure the message attribute has the proper Source.sql. An Attribute property page appears. You should only use this script to correct errors in a message attribute’s internal name during design time. SQL scripts. All Oracle Workflow APIs. See: To Define a Message Attribute: page 4 – 34. you must use a special SQL script called wfchmsga.

4 – 34 Oracle Workflow Guide .

are involved in running instances of processes. This is the name that appears in the navigator tree. See: Wfchmsga. the Display Name of the attribute appears in plain text e–mail notifications only if the attribute is of type URL to describe what the URL drills down to. 3. . Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. If this is a ’Respond’ message attribute. then this display name is also used as the response prompt. 4. Specify ’Send’ or ’Respond’ in the Source field to indicate whether this attribute should send information to the notification recipient or prompt a notification message recipient for a response. Enter a Display Name. Attention: For ’Send’ message attributes.sql: page 16 – 9. respectively.

• Number—Optionally provide a format mask for your number and a default number value. 5. If this is a ’Respond’ message attribute. 6. . Depending on the Type of your attribute. 7. See: To Define a URL Attribute: page 4 – 12. • URL—Specify a Universal Resource Locator (URL) to a network location in the Default Value field. • Date—Optionally supply a format mask for the date and a default date value. Select the data type of the attribute. provide the following default information: • Text—Specify the maximum length of the text attribute. Enter an optional description. use this field to elaborate on response instructions. • Lookup—Choose the name of a predefined Lookup Type from which to draw values. Choose a lookup code for the default value.

.

You should advise your workflow users to view their notifications from the Notification Details web page if you plan to create messages with ’Respond’ message attributes of type URL. Attention: A single ’Respond’ message attribute of type URL replaces the Notification Details web page response frame and Defining Workflow Process Components 4 – 35 . Attention: ’Respond’ message attributes of type URL do not appear properly when you view the notification from a plain text e–mail reader.

See: Overview of Menus and Function Security. and must also include a call to the Workflow Engine CompleteActivity( ) API to inform the Workflow Engine when the notification response is complete. including the special RESULT attribute. Specify a developer form function name and any optional argument string (form function parameters) in the Default Value field. • Form—This attribute is relevant only with the version of Oracle Workflow embedded in Oracle Applications. Your custom HTML response document must include references to all your ’Respond’ message attributes. Oracle Applications Developer’s Guide and To Define a Form Attribute: page 4 – 13.takes the notification recipient to a custom HTML page to complete the notification response. . if one is defined.

.

Also when you view the notification from a web browser. 4 – 36 Oracle Workflow Guide . The attached form icon is enabled if a notification message includes a ’Send’ message attribute of type Form. • Document—Enter a string that identifies the document in the Default Value field. eliminating the need for you to maintain separate attributes for the role’s internal and display names. the attached form icon that appears in the notification’s Response section simply drills down directly to the designated form function. Attention: ’Send’ and ’Respond’ message attributes of type Form appear only when your Notifications web pages are launched from Oracle Applications. the role display name is a hypertext link to the e–mail address for that role. If a message attribute of type role is included in a notification message. To set a default value for the attribute. See: Workflow Engine APIs: page 8 – 19. See: To Define a Document Attribute: page 4 – 14. the attribute automatically resolves to the role’s display name. you must initially load roles from the database. • Event—Specify an event item type attribute as the default value. See: Roles: page 5 – 24. The notification recipient can click on the attached form icon to drill down to the form function defined by the message attribute. • Role—Specify a role name. This form function must be coded with a call to the Workflow Engine CompleteActivity( ) API to inform the Workflow Engine that the notification response is complete. Attention: If a message includes a ’Respond’ message attribute of type Form.

.

.

If your message attribute type is URL. you can check Attach Content to append an attachment called Notification References to the notification message. original window. When you view your notification from the Notification web page interface. If you view your notification from e–mail. document. See: Reviewing Notifications via Electronic Mail: page 10 – 2. as well as embed (by token substitution) Document attributes in the notification message and are not limited to one or the other. respectively. the URL opens according to what you specify as the frame target. Text. ’Respond’ message attributes of type Lookup prompt the notification recipient to select a response from a list of values. If your message attribute is a Send attribute and is of type Document. text value. Note: You can attach. thus cancelling all other frames. Attention: Do not specify a message attribute’s data type as Attribute. • Full Window—the URL loads into the full. Attention: ’Respond’ message attributes of type Date. you can check Attach Content to attach the content of the attribute to the notification message. 8. specify a Frame Target. When you reference this message attribute in a message. as it serves no purpose in a notification message and is also not supported by the Workflow Notification System. role (internal or display name). you see a document icon following the notification message body that displays the contents of the attached message attribute when you click on it. 10. This attachment includes a link to each URL attribute for the message Defining Workflow Process Components 4 – 37 . number. the presentation of the attachment will vary depending on what your e–mail notification preference setting is. This value is equivalent to Same Frame if the current frame has no parent. The frame target can be: • New Window—the URL loads in a new. • Parent Frameset—the URL loads into the immediate FRAMESET parent of the current frame. Number. 9. This value is equivalent to Same Frame if the current frame has no parent. • Same Frame—the URL loads in the same frame as the element that references the URL attribute. unnamed browser window. Document or Role prompt the notification recipient to respond with a date. If your message attribute is a Send attribute and is of type URL.

12. Choose Apply to save your changes. choose Item Attribute. For message attributes. but all other message attribute types must match the item attribute type exactly. Note: Message attributes assume the access/protection level of their parent message. You can review or edit the properties of an attribute at any time by double–clicking on the attribute in the navigator tree or by selecting the attribute and choosing Properties from the Edit menu. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. The item type attribute you select must be associated with the same item type that the message itself is associated with. . 13. Respond message attribute icons in the Navigator tree have a red question mark overlay to help you distinguish them from Send message attribute icons. as well as embed (by token substitution) URL attributes in the notification message and are not limited to one or the other.that has Attach Content checked. If the default references its entire value directly from an item type attribute. Any message attribute you define appears beneath the respective message you defined it for in the navigator tree. the default value may be a constant or an item type attribute. The item type attribute you select must also be of the same data type as the message attribute. then use the poplist field to choose an item type attribute. Note: A message attribute type of ’Text’ is compatible with any item attribute type. 11. You can navigate to a URL by choosing its link. Note: You can attach.

See Also Example ’Respond’ Message Attributes: page 4 – 39 Using the Edit Button in a Property Page: page 3 – 8 4 – 38 Oracle Workflow Guide . Attention: The order that you list ’Respond’ message attributes in the navigator tree correlate to the order in which they appear in the response section of the notification message. or select an attribute and choose Move Attribute Up or Move Attribute Down from the Edit menu. You can use the drag and drop feature of the navigator tree to reorder a set of attributes.

Internal Name Type Format/Lookup Type Display Name Description RESULT COMMENT REQDATE MAXAMT lookup text date number WFSTD_APPROVAL 2000 DD–MON–YYYY Action Review Comments Required Date Maximum Amount Do you approve? If there is no required date. The following table lists some sample ’Respond’ message attributes. Table 4 – 2 (Page 1 of 1) For the templated response method.Reviewing Notifications via Electronic Mail: page 10 – 2 Example ’Respond’ Message Attributes Following are examples of how the Notification System generates the Response section of an e–mail notification using a sample set of ’Respond’ message attributes that have no default values. leave this blank. the following boilerplate text is used to generate the Response template section of an e–mail notification: <Description> <Display Name>: ” ” <list of lookup codes> Defining Workflow Process Components 4 – 39 . This is the maximum approved amount.

leave this blank. if the message attribute matches one of these data types: Type Lookup Date Number Text Type_Hint Value must be one of the following: <list of lookup codes> Value must be a date [in the form ”<format>”]. Value must be a number [in the form ”<format>”]. <Description> is replaced with the Description of the message attribute. <Type_Hint> is replaced with one of the following statements. 4 – 40 Oracle Workflow Guide . the presence of ’Send’ message attributes is ignored when determining the sequence). In addition. the following boilerplate text is used to generate the Response section of an e–mail notification: Enter the <Display Name> on line <Sequence>. <Sequence> is replaced with the relative sequence number of the ’Respond’ message attribute as it appears in the Navigator tree among all ’Respond’ message attributes (that is. <Description> <Type_Hint> <Display Name> is replaced with the Display Name of the message attribute. Value must be <format> bytes or less. Required Date: ” ” This is the maximum approved amount. Maximum Amount: ” ” For the direct response method.Portion of Resulting Response Template as Shown in a Templated Response E–mail Notification Do you approve? Action: ” ” Approve Reject Review Comments: ” ” If there is no required date.

Enter the Required Date on line 3. Value must be 2000 bytes or less. Oracle Workflow fetches the internal name of the attribute and its value. Value must be a date in the form ”DD–MON–YYYY”. If there is no required date. Oracle Workflow orders the nested list of attributes according to the length of their internal attribute names and then begins substituting the attributes with the longest internal names first. To embed an attribute. If an attribute requiring token substitution is nested with another attribute. specify the attribute that you want to have token substituted as &attr_name. You can embed attributes within an attribute as well as embed attributes within a message subject and body.Portion of Resulting Response Section as Shown in a Direct Response E–mail Notification Enter the Action on line 1. where attr_name is the internal name of the attribute. " To Token Substitute an Attribute H Oracle Workflow supports runtime token substitution of attributes. leave this blank. Do you approve? Value must be one of the following: Approve Reject Enter the Review Comments on line 2. Value must be a number. Enter the Maximum Amount on line 4. This is the maximum approved amount. When performing token substitution. .

See: External Document Integration: page 4 – 6. you should investigate creating a PL/SQL document–type message attribute. " Attention: If you find that you need to nest message attributes more than two layers deep to display the necessary message body content. Defining Workflow Process Components 4 – 41 . Select the message to copy in the navigator tree. To Copy a Message 1.

The message may simply provide the user with information or request the user to take some action. edit. or Events headings in the navigator tree. When you release your mouse button. Make any additional modifications to the properties of the message. or sends a business event. Notifications. raises. A function activity calls a PL/SQL stored procedure or some external program to perform an automated function. See: Standard Activities: page 6 – 2. An activity can be a notification. Note: Copying a message also copies any message attributes assigned to it. and delete activity definitions in the navigator tree. Note: You can also use the Copy and Paste options in the Edit menu. Activities are organized beneath their respective Processes. an event. Enter a new internal name and display name. Activities An activity is a unit of work that contributes toward the accomplishment of a process. Hold down your mouse select button as you drag the message to the item type branch you want to copy to. a function. a property page appears for the new message. which can be included as an activity in another process to represent a sub–process. 4. A notification activity sends a message to a workflow user. or a process. choose OK. some of the activities perform standard functions such as comparing two values. A process activity is a modelled workflow process. 6. For example. An event activity receives. You can assign an error process to a process 4 – 42 Oracle Workflow Guide . 3. 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. Functions. When you are done. 5. You can create.2. 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.

You can either designate the performer to be a specific role or an item type attribute that dynamically returns the name of a role. When you define a notification activity.activity. you can also optionally: • Check Expand Roles to send an individual copy of the notification message to each user in the role. When a performer responds to a notification activity. You define the message that the notification sends. See: To Create a Notification Activity: page 4 – 48. See: To Define Nodes: page 5 – 8 and Roles: page 5 – 24. If an error occurs. it issues a Send( ) API call to the Notification System to send the message to an assigned performer. Notification Activity When the workflow engine reaches a notification activity. You specify the performer of a notification activity when you include the notification activity as a node in the process. The message can be an informative note or it can prompt the performer for a response. the error process informs Oracle Workflow how to handle the error. 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: Default Error Process: page 6 – 26. The notification remains in a user’s notification queue until the user responds or closes the notification.

Attention: You should expand roles to send out a broadcast–type message that you want all users of that role to see. If one user in that role responds or closes that notification. respectively. or transfers the notification. The Workflow Engine runs the post–notification function in RESPOND. forwards. If you do not expand the role for a notification activity. When the Notification System completes execution of the Defining Workflow Process Components 4 – 43 . the notification is removed from the notification queue of all other users in that role. • Specify a post–notification function that the Workflow Engine executes in response to an update of the notification’s state after the notification is delivered. FORWARD. TRANSFER. Oracle Workflow sends one copy of the notification message to the assigned performer role and that notification is visible in the notification queue of all the users in that role. or whether the notification times out. or TIMEOUT mode depending on whether the notification recipient responds to.

By both checking Expand Roles and specifying a post–notification function. For example. See: Post–notification Functions: page 8 – 13 and Notification Model: page 8 – 192. The results of the Java program are enqueued into an inbound queue that the Workflow Engine consumes and processes. As a PL/SQL stored procedure. If you pass a parameter for the stored procedure. if you wish to restrict the roles that a notification can be forwarded to. a function activity is able to enqueue payload information into an Oracle Advanced Queuing outbound queue for some external agent to dequeue and consume. 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. you can expose that parameter as an activity attribute. See: Voting Activity: page 4 – 61. Function Activity A function activity is defined by the PL/SQL stored procedure or external program that it calls. you should use the same PL/SQL API required for function activities. This functionality is 4 – 44 Oracle Workflow Guide . As an external Java program. See: To Define Activity Attribute Values: page 5 – 17. Function activities are typically used to perform fully automated steps in the process. 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: Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3. you can specify a post–notification function that the Workflow Engine executes in FORWARD mode when the notification recipient attempts to forward the notification. As an external program. the Workflow Engine then runs the post–notification function again in RUN mode. you can create your own custom vote tallying activity. The post–notification function would audit the role and either allow the forward to occur or reject it with an error.post–notification function in RESPOND mode. The external agent can similarly enqueue updated attributes and a completion result into an inbound queue that the Workflow Engine consumes and processes. a function activity accepts standard arguments and can return a completion result. To create a post–notification function.

• A Raise event activity retrieves information about the event and raises the event to the Business Event System. The activity retrieves the event name. or send a business event. the item type and item key for that process are included in the parameter list within the event message. If the event was originally raised by a Raise event activity in another workflow process. a Receive event activity can be placed within the process. • A Receive event activity can be marked as a Start activity for a process.currently only available for the standalone version of Oracle Workflow. event key. and then continues the thread of execution from the event activity. If that activity has already received an event. See: SetItemParent: page 8 – 79. as specified in the node’s event details. Alternatively. raise. Defining Workflow Process Components 4 – 45 . event key. You can also specify the event name as a predefined constant for the event activity node. See: To Create a Function Activity: page 4 – 50. the Workflow Engine automatically sets the specified process as the parent for the process that receives the event. When the activity receives an event. See: Managing Business Events: page 13 – 2. which will then execute subscriptions to the event. Event Activity An event activity represents a business event from the Business Event System within a workflow process. overriding any existing parent setting. In this case. and event message in item type attributes. sets any parameters in the event message parameter list as item type attributes for the process. the Workflow Engine stores the event name. so that it is only enabled to receive events after the process transitions to that activity. 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. then the On Revisit flag for the activity determines whether the Workflow Engine reexecutes the activity. meaning it is always enabled to receive events. and event data as specified in the node’s event details. See: To Define Optional Activity Details: page 4 – 59. An event activity can either receive. The event details can be dynamically determined at runtime using item type attributes. creating new item type attributes if a corresponding attribute does not already exist for any parameter.

event message. In other words. The event details can be dynamically determined at runtime using item type attributes. When a process activity is contained in another process it is called a subprocess. If the event message is later received by another process. outbound agent. See: To Create a Process Activity: page 4 – 57. so no subscription processing is performed. the Workflow Engine uses that item type and item key to automatically set the process that raised the event as the parent for the process that receives the event. and inbound agent as predefined constants for the event activity node.Additionally. activities in a process can also be processes themselves. as specified in the node’s event details. Caution: Oracle Workflow does not support using a subprocess activity multiple times within a process hierarchy. outbound agent. • A Send event activity retrieves the event name. Process Activity A process activity represents a collection of activities in a specific relationship. the Workflow Engine sets the event parameters as item type attributes for that process. event key. There is no restriction on the depth of this hierarchy. You can also specify the event name. Then the Send event activity sends the event directly from the outbound agent to the inbound agent. See: SetItemParent: page 8 – 79. See: To Create an Event Activity: page 4 – 54 and To Define Event Details for an Event Node: page 5 – 12. See Also Subprocesses: page C – 5 4 – 46 Oracle Workflow Guide . If no correlation ID is initially specified in the event message. the correlation ID is automatically set to the item key of the process. See: Event Message Structure: page 8 – 242. If the event message is later received by another process. the activity retrieves the names and values of any activity attributes defined for it and sets these attributes as parameters in the parameter list for the event message. Note: A Send event activity does not raise the event to the Business Event System. and inbound agent. The activity also automatically sets the item type and item key for the current workflow process in the parameter list for the event message.

000. . Generally.000. The valid range for cost is 0.Activity Cost Each function activity and event activity has a cost associated with it.00. you should assign complex. The cost is a value representing the number of seconds it takes for the Workflow Engine to execute the activity.00 to 1. long running activities a high cost. you can enter an estimated cost and update it later as you accumulate more information about its performance. If you do not know how long it takes for the Workflow Engine to perform the activity.

In some cases. Attention: Although the cost is entered and displayed in seconds in Oracle Workflow Builder. A background engine can be customized to execute only certain types of activities. You can define your Workflow Engine to defer activities with a cost higher than a designated threshold to a background process. and Deferring Activities: page C – 7. See: Setting Up Background Workflow Engines: page 2 – 43. You can set the workflow engine threshold through SQL*Plus. Defining Workflow Process Components 4 – 47 . Activities with a cost higher than this are deferred to background engines. it is actually converted and stored in the database as hundredths of a second. the Workflow Engine completes the execution of a single activity before continuing to a subsequent activity. To Set Engine Thresholds: page 2 – 47. In normal processing. The default threshold for the Workflow Engine is 50 hundredths of a second. an activity might take so long to process that background processing would be more appropriate. The engine then continues processing the next pending eligible activity that may occur in another parallel branch of the process.

2." To Create a Notification Activity 1.sql: page 16 – 7. which is the translatable name that appears in your process diagram. You can also select a message in the navigator tree and drag and drop the message into the Notifications branch of the same item type to create a notification activity that sends that message. Attention: To update the internal name for an activity once it is defined.sql. . A notification activity must have an Internal Name (all uppercase and no leading/trailing spaces) and a Display Name. Do not use this script to rename activities that are involved in running instances of processes. See: Wfchact. then choose New Notification from the Edit menu. Define your notification activity in the Activity property page that appears. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. Select the item type that you want to create a notification for in the navigator tree. Use the description to provide an explanation about this activity. you must use a special SQL script called wfchact. You should only use this script to correct errors in an activity’s internal name during design time.

Indicate the result type (a predefined Lookup Type) for this activity. Your workflow diagram may branch depending on the value returned 4 – 48 Oracle Workflow Guide . 3. Result types list the possible results returned by this activity.

FORWARD. Select the name of the message you want this notification to send. You can optionally specify a PL/SQL stored procedure in the Function field. Choose an icon that identifies your activity. then check Expand Roles. You can use any icon. TRANSFER or TIMEOUT mode depending on whether the recipient responds to. Defining Workflow Process Components 4 – 49 . then only one copy of the notification is delivered to the role as a whole. 5. The procedure is known as a post–notification function and lets you couple processing logic to the notification activity. to symbolize the action of an activity. the Workflow Engine then runs the post–notification function again in RUN mode. 6.<procedure_name>. See: Notification Activity: page 4 – 43. as long as the icon is stored in a . then use the Function field to specify the name of a custom PL/SQL stored procedure that tallies the responses you get back from each of the recipients of this notification. If you check Expand Roles and you assign a message that has a special Result. See: To Create Lookup Types: page 4 – 20. If you plan to assign this notification to a role consisting of multiple users and you want to send an individual copy of this notification to each user in the role. to this notification activity. If you uncheck Expand Roles. See: Voting Activity: page 4 – 61. forwards.by your completed activity. See: Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 and Post–Notification Functions: page 8 – 13. or transfers the notification or whether the notification times out. or if your workflow process does not depend on the value returned. 7. You can choose <None> as the result type if your activity does not return a value. When the Notification System completes execution of the post–notification function in RESPOND mode. The Workflow Engine executes this post–notification function in RESPOND. You can also drag and drop icon files from the Windows Explorer or File Manager onto an activity in your navigator tree to assign that icon to the activity. Choose Browse to view the icon files listed in the workflow icons subdirectory. 4. Specify the procedure using the format: <package_name>. See: Adding Custom Icons to Oracle Workflow: page 2 – 85. See: To Create a Message: page 4 – 29.ico file.

Choose Apply to save your changes. Choose OK to save your changes and close the property pages. 13. Select the Details tab to display and modify optional Details of the activity. Select the Access tab page to set the access levels allowed to modify this notification. See: Allowing Access to an Object: page 4 – 17. See: To Define Optional Activity Details: page 4 – 59. Select the item type that you want to create a function for in the navigator tree. You can review or edit the properties of this activity at any time by double–clicking on the activity in the navigator tree or by selecting the activity and choosing Properties from the Edit menu or by pressing Enter on your keyboard. 10.) 11. The notification activity now appears beneath Notifications in the navigator tree.8. 12. then choose New Function from the Edit menu. 9. Select the Roles tab page to specify the roles that have access to this notification activity. (This functionality will be supported in a future release. See Also Using the Edit Button in a Property Page: page 3 – 8 " To Create a Function Activity 1. 4 – 50 Oracle Workflow Guide .

you must use a special SQL script called wfchact. specify whether the function is a PL/SQL function. 2.Define your function activity in the Activity property page that appears.sql. For an external function activity. A function activity must have an Internal Name (all uppercase and no leading/trailing spaces) and a Display Name. 3. which is the translatable name that appears in your process diagram. an External function. or an External Java function. See: Wfchact.sql: page 16 – 7. Attention: To update the internal name for an activity once it is defined. For a PL/SQL function. In the Type field. See: Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3. Do not use this script to rename activities that are involved in running instances of processes. You should only use this script to correct errors in an activity’s internal name during design time. set the function type to External. Enter the name of the function you want this activity to execute. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name.<procedure_name>. The Workflow Engine enqueues an entry in the ”Outbound” queue and sets the correlation value of that entry to a value composed of the Workflow schema name and the item type in the following format: <schema_name><item_type> . set the function type to PL/SQL and specify the function as <package_name>. The function must be defined according to a standard API. Use the description to provide an explanation about this activity.

The queue handler must execute the action associated with the record and seed the result of the action onto the ”Inbound” queue. If the custom class is Defining Workflow Process Components 4 – 51 . For an external Java function activity. set the function type to External Java and enter the class name of your custom Java class as the function name. This functionality is currently only available for the standalone version of Oracle Workflow. See: Deferred Processing: page 8 – 9. The background engine then takes care of messages on the inbound queue and restarts your original workflow process. You must create your own queue handler to search for this type of record on the ”Outbound” queue. See: Workflow Queue APIs: page 8 – 162.

Note: These ’Outbound’ and ’Inbound’ queues are separate from the queues used for the Business Event System. to symbolize the action of an activity. The Java Function Activity Agent dequeues messages of this type. Your workflow diagram may branch depending on the value returned by your completed activity. Note: To execute external Java function activities. You can also drag and drop icon files from the Windows Explorer or File Manager onto an activity in your navigator tree to assign that icon to the activity. as long as the icon is stored in a . prefix the class name with the package name in the following format: <customPackage>. Specify the cost of this function activity. 4. you must include your JAR files in your CLASSPATH. See: Activity Cost: page 4 – 47.ico file. 7. and enqueues the results onto the ’Inbound’ queue. executes your Java program. Result types list the possible results returned by this activity. The background engine then takes care of messages on the inbound queue and restarts your original workflow process. You can choose <None> as the result type if your activity does not return a value. See: To Create Lookup Types: page 4 – 20. See: Standard API for Java Procedures Called by Function Activities: page 7 – 8. 4 – 52 Oracle Workflow Guide . See: Workflow Queue APIs: page 8 – 162. See: Setting Up the Java Function Activity Agent: page 2 – 86 and Deferred Processing: page 8 – 9.<customClass> The Java class must be defined according to a standard API. Choose Apply to save your changes. Indicate the result type (a predefined Lookup Type) for this activity. Choose an icon that identifies your activity. or if your workflow process does not depend on the value returned. 5.within a package. Choose Browse to view the icon files listed in the workflow icons subdirectory. See: Adding Custom Icons to Oracle Workflow: page 2 – 85. The Workflow Engine enqueues an entry in the ’Outbound’ queue. You can use any icon. 6.

9. Select the Details tab to display and modify the optional details of the activity. 12. The Default Value region is automatically set to Item Attribute and references the originating item attribute. See: Allowing Access to an Object: page 4 – 17. You can review or edit the properties of this activity at any time by double–clicking on the activity in the navigator tree or by selecting the activity and choosing Properties from the Edit menu or by pressing Enter on your keyboard. select the referenced item type attribute in the navigator tree. you can expose those arguments in Oracle Workflow Builder as attributes of the function activity. To create a function activity attribute that references an item type attribute. Function activity attributes are specific to a function activity and are not global to a process. See: To Define Optional Activity Details: page 4 – 59. Select the Access tab page to set the access levels allowed to modify this function. When you include a function activity as a node in a process.) 10. See: To Define Activity Attribute Values: page 5 – 17. and hold down your mouse select button as you drag the item type attribute to your function activity. The function activity now appears beneath Functions in the navigator tree. Function activity attributes behave as parameters whose values you can modify for each usage of the activity in a process. See Also Using the Edit Button in a Property Page: page 3 – 8 Defining Workflow Process Components 4 – 53 . you can assign a value to the function activity attribute that is specific to that node. 11. (This functionality will be supported in a future release.8. See: To Define an Item Type or Activity Attribute: page 4 – 8. If your function requires input arguments. Select the Roles tab page to specify the roles that have access to this function activity.

Use the description to provide an explanation about this activity. Attention: To update the internal name for an activity once it is defined. An event activity must have an Internal Name (all uppercase and no leading/trailing spaces) and a Display Name. You should only use this script to correct errors in an activity’s internal name during design time. which is the translatable name that appears in your process diagram. Define your event activity in the Activity property page that appears. . Select the item type that you want to create an event for in the navigator tree. 2. See: Wfchact. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name.sql: page 16 – 7. Do not use this script to rename activities that are involved in running instances of processes." To Create an Event Activity 1. then choose New Event from the Edit menu. you must use a special SQL script called wfchact.sql.

See: Adding Custom Icons to Oracle Workflow: page 2 – 85. as long as the icon is stored in a . to symbolize the action of an activity. Choose an icon that identifies your activity.ico file. Choose Browse to view the icon files listed in the workflow icons subdirectory. 3. 4 – 54 Oracle Workflow Guide . You can use any icon.

The event filter cannot be an event group. you may need to define item type attributes for some or all of the following event details: – Event Name – Event Key – Event Message – Event Data – Out Agent – To Agent When you include the event activity as a node in a process.You can also drag and drop icon files from the Windows Explorer or File Manager onto an activity in your navigator tree to assign that icon to the activity. you can use the cost to defer long Defining Workflow Process Components 4 – 55 . Enter an optional cost for the activity. enter the full internal event name. • Receive—Receive an event from the Business Event System. you can use the item type attributes to specify where to store or retrieve the required event detail information for that node. • Raise—Raise an event to the Business Event System. See: To Define an Item Type or Activity Attribute: page 4 – 8 and To Define Event Details for an Event Node: page 5 – 12. 5. leave the Event Filter field blank. Note: Depending on the event action you select. 6. For event activities with the event actions Raise or Send. See: To Define an Event: page 13 – 5. The item type attributes that you use for event details must be associated with the same item type that the event activity itself is associated with. 4. Note: You can only specify an individual event as the event filter. you can optionally enter an Event Filter to specify the event that the activity can receive. Select the Event Action for the activity. • To allow any event for the activity. If you are defining a Receive event activity. • To allow only a specified event for the activity. • Send—Send an event directly from one Event agent to another agent without re–raising the event to the Business Event System.

The event activity now appears beneath Events in the navigator tree. See: Allowing Access to an Object: page 4 – 17. select the referenced item type attribute in the navigator tree. If the event message is later received by another process. Note: A Raise event activity also automatically sets the item type and item key for the current workflow process in the parameter list for the event message.) 10. 9. See: To Define Activity Attribute Values: page 5 – 17. If the event message is later received by another process. Choose Apply to save your changes. See: To Define an Item Type or Activity Attribute: page 4 – 8. You can modify the values of the attributes for each usage of the Raise event activity in a process. Select the Roles tab page to specify the roles that have access to this function activity. To create an event activity attribute that references an item type attribute. the Workflow Engine uses that item type and item key to automatically set the process 4 – 56 Oracle Workflow Guide . (This functionality will be supported in a future release. you can define those parameters as attributes of the Raise event activity. and hold down your mouse select button as you drag the item type attribute to your event activity. When you include an event activity as a node in a process. See: Activity Cost: page 4 – 47.running activities to a background engine. The Default Value region is automatically set to Item Attribute and references the originating item attribute. 8. See: To Define Optional Activity Details: page 4 – 59. Event activity attributes are specific to an event activity and are not global to a process. you can assign a value to the event activity attribute that is specific to that node. if the event raised by the activity requires additional parameters to be included in the event message. the activity attributes are set as parameters in the parameter list for the event message. 7. When the event is raised. You can review or edit the properties of this activity at any time by double–clicking on the activity in the navigator tree or by selecting the activity and choosing Properties from the Edit menu or by pressing Enter on your keyboard. For a Raise event activity. 11. the Workflow Engine sets the event parameters as item type attributes for that process. Select the Access tab page to set the access levels allowed to modify this event. Select the Details tab to display and modify the optional details of the activity. 12.

1.sql. Define your process activity in the Activity property page that appears. you must first create a process activity in the navigator tree to represent the process diagram. Select the item type that you want to create a process activity for in the navigator tree. which is the translatable name that appears in your process diagram. If a process activity is closed and you want to redisplay it. You should only use this script to correct errors in an activity’s internal name during design time. Attention: To update the internal name of an activity once it is defined. then choose New Process from the Edit menu. 2. you must use a special SQL script called wfchact. Use the description to provide an explanation about this activity. A process activity must have an Internal Name (all uppercase and no leading/trailing spaces) and a Display Name.that raised the event as the parent for the process that receives the event. Do not use this script to . select the process activity in the navigator tree and press Enter or select Properties from the mouse menu button. " To Create a Process Activity Before you can draw a workflow process diagram. See: SetItemParent: page 8 – 79.

Defining Workflow Process Components 4 – 57 .

If you wish to use a subprocess more than once in a process. See: To Create Lookup Types: page 4 – 20. Result types list the possible results returned by this process. Choose Apply to save your changes. Indicate the result type (a predefined Lookup Type) for this activity. 4 – 58 Oracle Workflow Guide . you must create a distinct copy of the subprocess for each instance needed. 9. Caution: Oracle Workflow does not support reusing a subprocess activity multiple times within a process hierarchy. 8. You can also drag and drop icon files from the Windows Explorer or File Manager onto an activity in your navigator tree to assign that icon to the activity. You can choose <None> as the result type if you do not need to record any specific result for the completion of your process. Choose an icon that identifies your activity. The access you set for a process activity determines who has access to edit its process diagram. Select the Details tab to display and modify the optional details of the activity. If your process activity represents a subprocess that should only be executed if it is called from a higher level process. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. 3. then uncheck Runnable. as long as the icon is stored in a . OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. 5. See: Adding Custom Icons to Oracle Workflow: page 2 – 85.rename activities that are involved in running instances of processes. See: To Define Optional Activity Details: page 4 – 59. Choose Browse to view the icon files listed in the workflow icons subdirectory. Choose Apply to save your changes.ico file. Select the Access tab page to set the access levels allowed to modify this process.sql: page 16 – 7. 6. 4. See: Allowing Access to an Object: page 4 – 17. See: CreateProcess: page 8 – 21. 7. You can use any icon. to symbolize the action of an activity. Check Runnable so that the process that this activity represents can be initiated as a top–level process and run independently. See: Wfchact.

3. If you are creating a process activity. Defining Workflow Process Components 4 – 59 . you can specify an error process to execute in the event that an error occurs in the current process. the activity is effective immediately. The process activity now appears beneath Processes in the navigator tree. Enter the internal name of the item type that owns the error process and then specify the internal name of the error process activity to execute. See Also Using the Edit Button in a Property Page: page 3 – 8 " To Define Optional Activity Details 1. See: Default Error Process: page 6 – 26. The effective date tells you when this version of the activity is available for the Workflow Engine to execute. Note that the error process item type does not need to be open in your current Oracle Workflow Builder session for you to define it here. If the Effective Date field is blank.10. Select the Details tab of the activity’s property page. You can review or edit the properties of this activity at any time by selecting the activity and choosing Properties from the Edit menu or by pressing Enter on your keyboard. 2.

the Workflow Engine executes the activity only once. If On Revisit is set to Loop. All your activity modifications share the same effective date when you save. a property page will appear prompting you for a new unique internal and display name for the copied activity. Select a value for On Revisit to determine how the Workflow Engine handles this activity when it is transitioned to more than once. You can include special logic in each function’s CANCEL mode to undo prior operations. If you copy the activity within the same item type. The Workflow Engine then traverses through the loop in forward order. If On Revisit is set to Reset. reexecuting each activity. you should set On Revisit to specify how you want the Workflow Engine to process the loop. Choose Apply to save your changes.You set the effective date when you save your changes using the Save As option in the File menu. the Workflow Engine resets the completed activities in the loop by traversing through the loop in reverse order from the pivot activity. 5. the value of On Revisit is irrelevant. The engine ensures that it uses the most recent updates to an activity by using the latest effective version number of that activity. If this activity is the first activity that is revisited. 3. executing each activity in CANCEL mode. as in a loop. as if they have never been executed before. the Workflow Engine simply reexecutes the pivot activity and all activities that follow in the loop. 2. 6. For all other activities in a loop. Select the activity to copy in the navigator tree. 4 – 60 Oracle Workflow Guide . starting with the pivot activity. Hold down your mouse select button as you drag the activity to the item type branch you want to copy it to. Note: You can also use the Copy and Paste options in the Edit menu. and ignores the activity for all subsequent revisits. If On Revisit is set to Ignore. The version number identifies which revision of the activity you are examining. See: Looping: page 8 – 10. 4. The first activity in a loop is also called the pivot activity. without resetting. " To Copy an Activity 1. in RUN mode.

Create a voting lookup type that contains the responses you want to tally in your voting activity. 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 " Creating a Voting Activity 1. Create a voting message that prompts a recipient to respond with one of the values in the voting lookup type. Defining Workflow Process Components 4 – 61 . 3. When you are done. 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).4. Set the lookup type in the Result tab to the voting lookup type defined in Step 1. event. 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. or notification activity also copies any attributes or message associated with it. See: To Create a Message: page 4 – 29 Select the item type that you want to create a voting activity for in the navigator tree. respectively. Note: Copying a function. then choose New Notification from the Edit menu. 4. choose OK. Complete the Result tab for the message. See: To Create Lookup Types: page 4 – 20. 2. Specify an Internal Name (all uppercase and no leading/trailing spaces) and a Display Name. Use the description to provide an explanation about this voting activity.

.

You can use the PL/SQL procedure WF_STANDARD. Choose an icon that identifies your voting activity. Caution: Do not include colons ”:” or leading/trailing spaces in your internal name. you can specify your own custom tallying function. 5. The Result Type that you specify for the voting activity defines the possible responses for the function to tally.<procedure_name>. Specify the procedure using the format: <package_name>. 9. 4 – 62 Oracle Workflow Guide . You should only use this script to correct errors in an activity’s internal name during design time. Alternatively. In the Message field. Choose Apply to save your changes. See: Vote Yes/No Activity: page 6 – 10. The Result Type field must contain the lookup type that lists the responses that you want the voting activity to tally. See: Notification Activity: page 4 – 43.sql. Select the Details tab to display and modify the Details property page of the activity. you must use a special SQL script called wfchact. In the Function field. 6.VOTEFORRESULTTYPE that the Standard Vote Yes/No activity calls. Do not use this script to rename activities that are involved in running instances of processes. specify a function that tallies the responses from users. The voting message prompts the recipient for a response. 8. This is the voting lookup type defined in Step 1. Check Expand Roles so that the Workflow Engine polls for responses from the multiple users in the role rather than just from the first user in the role that replies. The response choices are one of the predefined values specified in your voting lookup type. Attention: To update the internal name for an activity once it is defined. 10. select the name of the voting message you created in Step 2. but you should make sure it conforms to the standard API for function activities. See: Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3. The activity attributes that you define for the voting activity determine how the function tallies the responses. WF_STANDARD. 11.VOTEFORRESULTTYPE is a generic tallying function. 7. See: Wfchact. See: To Define Optional Activity Details: page 4 – 59.sql: page 16 – 7.

whose internal name must be VOTING_OPTION. 15. the result is #NOMATCH. but a tie occurs among the default responses. Select the Roles tab page to specify the roles that have access to this notification activity. If no <Default> transition exists. If a <No Match> transition from the voting activity exists. Select the Access tab page to set the access levels allowed to modify this notification. then the Workflow Engine takes this transition. create a custom activity attribute of type Number for each possible voting response. the internal name of the activity attribute must match the internal name of the lookup code.12. Hence. See: Allowing Access to an Object: page 4 – 17. The value of the activity attribute can either be blank or a number that represents the percentage of votes required for a particular result. If you use the WF_STANDARD.VOTEFORRESULTTYPE tallying function. otherwise. If you provide a percentage. that is. the response value. If you leave an activity attribute value blank.) 13. If a <Tie> transition from the voting activity exists.VOTEFORRESULTTYPE tallying function. Remember that each possible voting response is a lookup code associated with the voting activity’s result type. In other words. then the Workflow Engine takes this transition. then the response that received the highest number of votes among those associated with a blank activity attribute becomes the result. (This functionality will be supported in a future release. then the Workflow Engine treats the response for that activity attribute as a default. 14. Note: If the tallied votes satisfy more than one response percentage or if no response percentage is satisfied. otherwise. the result is #TIE. You can Defining Workflow Process Components 4 – 63 . If no <Default> transition exists. If you use the WF_STANDARD. it takes the <Default> transition. when you define your custom activity attribute. if no particular percentage is satisfied after the votes are tallied. you must also define an activity attribute called Voting Option. it takes the <Default> transition. Note: If the tallied votes do not satisfy any response percentages and there are no default responses (blank activity attributes) specified. it raises an error that no transition for the result is available (ERROR:#NOTRANSITION). then the result is matched if the actual tallied percentage for that response is greater than your specified percentage. then in addition to defining your set of custom activity attributes. it raises an error that no transition for the result is available (ERROR:#NOTRANSITION).

the Workflow Engine progresses along the standard timeout transition. Note that this option is meaningless if any of the custom response activity attributes have a blank value. Response Custom Response Activity Attribute Value A B C Table 4 – 3 (Page 1 of 1) 50 50 50 4 – 64 Oracle Workflow Guide . • ”Tally on Every Vote”—the Workflow Engine keeps a running tally of the cumulative responses as a percentage of all the users notified. See Also Vote Yes/No Activity: page 6 – 10 Example Voting Methods 1. If a timeout condition occurs. raises an error. then the responses are tallied as a percentage of the total number of votes cast. If a timeout condition occurs. or if none is available. and does not tally any votes. • ”Require All Votes”—the Workflow Engine evaluates the responses as a percentage of all users notified only after all votes are cast. Simple Majority The following table shows the custom response activity attribute value assigned to each response for a simple majority voting method. If a timeout condition occurs. the Workflow Engine calculates the resulting votes as a percentage of the total votes cast before the timeout occurred. The possible values are: • ”Wait for All Votes”—the Workflow Engine waits until all votes are cast before tallying the results as a percentage of all the users notified.also copy the Voting Option activity attribute from the Vote Yes/No standard activity. The Voting Option activity attribute specifies how the votes are tallied.

Similarly if response B gets more than fifty percent of the votes. 3. then the result is a tie (#TIE). Simple Majority with Multiple Defaults The following table shows the custom response activity attribute value assigned to each response for a simple majority with multiple defaults voting method. then response B or C is the result depending on which of the two received the higher number of votes. Response Custom Response Activity Attribute Value A B C Table 4 – 4 (Page 1 of 1) 50 50 blank If response A gets more than fifty percent of the votes. 2. the result is that no match is found (#NOMATCH). A is the result. If A gets fifty percent of the votes. 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. B is the result.The result is any response that gets more than fifty percent of the votes. and both B and C receive the same number of votes. A is the result. If A gets fifty percent of the votes. If no response gets more than fifty percent. If neither response A nor B gets more than fifty percent of the votes. Defining Workflow Process Components 4 – 65 . then C is the result. or less. or less. Response Custom Response Activity Attribute Value A B C Table 4 – 5 (Page 1 of 1) 50 blank blank If response A gets more than fifty percent of the votes.

Response Custom Response Activity Attribute Value YES NO Table 4 – 7 (Page 1 of 1) 100 0 Any vote for response NO makes NO the result. Response Custom Response Activity Attribute Value A B C Table 4 – 6 (Page 1 of 1) blank blank blank The result is the response that gets the highest number of votes. Jury The following table shows the custom response activity attribute value assigned to each response for a jury voting method.4. 6. Popularity The following table shows the custom response activity attribute value assigned to each response for a popularity voting method. Black Ball The following table shows the custom response activity attribute value assigned to each response for a black ball voting method. otherwise no match is found (#NOMATCH). 5. Response Custom Response Activity Attribute Value GUILTY NOT_GUILTY Table 4 – 8 (Page 1 of 1) 100 100 A unanimous response is required. 4 – 66 Oracle Workflow Guide .

See Also Vote Yes/No Activity: page 6 – 10 Defining Workflow Process Components 4 – 67 .

and displays it in a validation error message when you load the process definition. warning you about the foreign key references that will break. 4 – 68 Oracle Workflow Guide . You can restore a broken foreign key reference in a process definition by recreating the deleted object with its original internal name under its original item type.Deleting Objects in Oracle Workflow Builder You can delete an object in Oracle Workflow Builder even if the object is referenced by other objects. Oracle Workflow Builder preserves the original internal name reference for any missing foreign key. a Workflow Error dialog box appears. reporting all broken foreign key references that exist in the definition. assuming the object is not protected against customizations. you can load workflow definitions with invalid foreign keys into Oracle Workflow Builder to correct. Note: You can also delete an entire item type definition in Oracle Workflow Builder. If you choose to delete. If the object you want to delete is referenced by other objects. a Workflow Error dialog box appears. As a result of this behavior. You can proceed to delete the object anyway or cancel the action. then when you save or verify the workflow process definition.

and end date. begin date. the previous definition of the object is updated and only the modified definition exists in the database. work items that are initiated between January 1. Any active work items that reference that object will use the modified object after the change. both the original version and the new version exist in the database. versioning means that either the object itself or the object that owns it supports multiple occurrences of the same object in the database.Modifying Objects in Oracle Workflow Builder Before you modify the definitions of any Workflow objects. whether the work items are completed before January 1. In the above example. 1998 and December 31. Note: All process definition information is versioned. 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. To avoid such errors. the following table shows two versions of a VOTE activity that could exist simultaneously in the WF_ACTIVITIES table. distinguished only by a version number. 1998 will send the message Vote Message with result options of Yes or No. Only new work items initiated after the change will use the new version. Only work items that are initiated on or after January 1. 1999 or not. Name Version Begin Date End Date Message Lookup Type Vote Vote 1 2 01–JAN–1998 01–JAN–1999 31–DEC–1998 <blank> Vote Message New Vote Message Yes/No Approval Table 4 – 9 (Page 1 of 1) When you modify a Workflow object that supports versioning. 1999 will send the message New Vote Message with result options of Approve or Reject. When you modify a Workflow object that does not support versioning. you must take all references to the object into consideration Defining Workflow Process Components 4 – 69 . Changes to Oracle Workflow objects have different effects on active work items depending on whether or not the objects support versioning. however. For example. you should ensure that your changes will not adversely affect any active work items that are based on those definitions. errors may arise. For a Workflow object. If the modified object is no longer compatible with the rest of the workflow definition used by the work item.

the function will be versioned. Instead. Workflow Objects That Support Versioning The following Workflow objects support versioning: • Notifications • Functions • Events • Processes and subprocesses • Process activities (nodes) • Activity attributes • Activity attribute values • Activity transitions When you modify any of these objects in the Workflow Builder and save them to the database. you can avoid the risk of backward incompatibility by aborting and restarting all active work items after you make your changes. the notification will be versioned. • If you update a function activity to reference a new API. you can modify any of these objects without affecting active work items that were initiated before the change. For example: • If you update a notification activity to reference a new message.when planning your changes to ensure that the changes do not cause any incompatibility. • If you update a function activity to reference a new lookup type. including those that support versioning as well as those that do not. This method forces the restarted work items to use the modified definitions of all Workflow objects. the function will be versioned. a new version of the object or owning object is created. Note: If your situation allows. As a result. 4 – 70 Oracle Workflow Guide . the Workflow Loader does not update the existing definition of the object.

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. The modifications in all of these examples will affect only work items that are initiated after the changes are made.• If you remove a process activity. Also. Item Attributes When a work item is initiated. Note: The Workflow Builder does not support the editing of PL/SQL code. as well as all the process activities that exist within the process. the Workflow Loader updates the existing definition of the object. However. Plan your changes carefully to ensure that the changes do not cause any backward incompatibility. from a process diagram. if you modify the existing PL/SQL API for a function activity. or lookups in the Workflow Builder and save them to the database. the owning process will be versioned. these work items will not Defining Workflow Process Components 4 – 71 . Workflow Objects That Do Not Support Versioning The following Workflow objects do not support versioning: • Item attributes • Messages • Lookups • PL/SQL code referenced by function activities When you modify any item attributes. the owning activity will be versioned. • If you add an activity attribute to an activity. or node. Adding a new item attribute after work items have been initiated will not affect the active work items. PL/SQL code is listed as a Workflow object here solely for the purpose of explaining the consequences of changing the code referenced by a Workflow function activity. if you modify any of these objects. As a result. Oracle Workflow creates a runtime copy of each item attribute that is defined for that item type. the function activity will reference the updated API stored in the database. messages. your changes immediately affect any active work items that reference the object.

those references may cause errors in active work items that do not include the attribute. without making special provisions for active work items. when the notification is displayed to the user. since these work items have already passed through this code. add references to new item attributes in the API that starts a workflow process. the Notification System creates a notification attribute in the notification tables for every message attribute. the function activity will fail for active work items that do not have the new item attribute defined.include the new item attribute unless you specifically create the attribute for them by calling the AddItemAttr() or AddItemAttributeArray APIs. For example. See: PL/SQL Code: page 4 – 74. if you change the PL/SQL API for a function activity by calling a Workflow Engine API to communicate with a new item attribute. Instead. The notification attribute rows contain the variable data that will be token–replaced into the message body. is not copied into the notification tables. Note: You can. including the subject line and body text. the message body is referenced by the various Notification System APIs at runtime. as well as notifications that are sent after the change. however. If you also add references to the new item attribute in the existing PL/SQL code within the workflow process. These modifications include: • Adding static text • Editing static text • Removing static text • Removing message attribute tokens 4 – 72 Oracle Workflow Guide . The message body. As a result. Active work items will not be affected by such changes. at runtime. You should plan carefully when making any modifications to the existing PL/SQL code within a workflow process to ensure that you do not add references to a new item attribute without also creating the item attribute for active work items that require it. You can make certain types of modifications to a message body without risking incompatibility errors. however. Messages When the Workflow Engine requests the Notification System to send a message. For example. any modifications to a message body will affect notifications in active work items that were sent before the change. you can call the SetItemAttribute or SetItemAttributeArray APIs to populate the new item attributes at the start of the process.

For example. the notification activity will be versioned. You can attach the new message to your existing notification activity without affecting active work items. instead of modifying the original message body.For example. and attach the new message to your notification activity. However. inappropriate modifications. all notifications in active work items will include the new token when you access the notifications. When you save your changes. and the incompatible token will not appear in those notifications. Then active work items will continue to reference the old version of the notification activity. you should create a new message that includes the new message attribute. if you add a static sentence such as ”Please approve within five days” to a message body. Defining Workflow Process Components 4 – 73 . add the token for the new attribute to the body of the new message. The Notification System can display the modified message body without any errors because no further information is required to resolve the additional sentence. Lookup Types and Codes Lookup types have the following important uses in Oracle Workflow: • Determining the possible completion statuses (lookup codes) for workflow activities • Determining the possible completion statuses (lookup codes) for ’Respond’ message attributes. since notification activities support versioning. may cause notifications in active work items to be displayed incorrectly. notifications that were sent before the change will not include the new message attribute Approver Name as a notification attribute. you should implement the change by creating a new message rather than by modifying the existing message. such as adding tokens for newly created message attributes. If you need to add tokens for new message attributes to a message body. However. In this example. if you create a new message attribute such as Approver Name and you add a token for that attribute in the message body. all notifications in active work items will include the additional sentence when you access the notifications. The Notification System will not be able to resolve the reference to the new message attribute and will display the token ”&APPROVER_NAME” in the notifications instead. You should plan your changes carefully to avoid errors. Inappropriate modifications to lookup types may cause active work items that reference those lookup types to fail.

To avoid errors caused by backward incompatibility. you should not attach new lookup types to existing message attributes. follow these guidelines for lookup types that are referenced by active work items: • Do not delete lookup types. You can attach new lookup types to existing activities without affecting active work items. you should plan your changes carefully to ensure that the changes do not cause any backward incompatibility. users will no longer be able to choose that result code to respond to a notification. the new lookup code will be available for users to select as a response to a notification. • Do not add lookup codes to existing lookup types. • If you delete a lookup code from a lookup type that is referenced by a ’Respond’ message attribute. If a user selects the new code. However. unless you implement versioning for your code yourself. 4 – 74 Oracle Workflow Guide . Modifying PL/SQL code without versioning changes the business flow for active work items that reference that code. • Do not delete lookup codes from existing lookup types. the process will enter an ’ERROR’ state. However. since Workflow messages do not support versioning. If you need to modify an existing API and you cannot create a new API instead. you should implement the changes by creating a new API rather than by modifying the existing API. you should implement the change by creating a new lookup type rather than by modifying the existing lookup type. PL/SQL Code Although function activities support versioning. Inappropriate modifications may cause these work items to fail. previous versions of the notification activity will not have branching logic modeled for the new lookup code. The following examples show some errors that can be caused by inappropriate lookup type modifications: • If you add a lookup code to a lookup type that is referenced by a ’Respond’ message attribute. the underlying PL/SQL code does not support versioning. since activities support versioning. To prevent changes in the PL/SQL API for a function activity from affecting active work items. If you need to make any of the above changes. since function activities support versioning. You can attach the new API to your existing function activity without affecting active work items.

SetItemAttrText • wf_engine. write and execute a custom upgrade script that creates and populates the new item attribute for any active work items that reference that API.SetItemAttrDate • wf_engine.GetItemAttrEvent To create copies of a new item attribute for active work items.’ that the Workflow Engine can follow when the API returns that value. Defining Workflow Process Components 4 – 75 . if you plan to add a lookup code to the group of values that an API can return. the function activity will fail for active work items which do not have the new item attribute defined. You can place this call either in a custom upgrade script or in an exception handler.SetItemAttrNumber • wf_engine. Otherwise. • Upgrade script – Before you modify your API. if you change the existing PL/SQL API for a function activity by calling a Workflow Engine API to communicate with a new item attribute. Calls to any of the following APIs with newly created item attributes as parameters may cause the function activity to fail if active work items do not have the item attributes defined: • wf_engine. you should first ensure that the function activity node has an outgoing transition.SetItemAttrDateArray • wf_engine. such as ’Default. If there is no appropriate outgoing transition.For example.GetItemAttrText • wf_engine. Otherwise. Also. the process will enter an ’ERROR’ state when that value is returned.SetItemAttrTextArray • wf_engine. you should ensure that you also create the new item attribute for active work items. call AddItemAttr() or one of the AddItemAttributeArray APIs.SetItemAttrEvent • wf_engine.GetItemAttrNumber • wf_engine.SetItemAttrNumberArray • wf_engine. you must implement the change in a new API and update the process to model branching logic for the additional return value.GetItemAttrDate • wf_engine. The following example shows one way to structure an upgrade script.

itemkey.END_DATE is null.for <each active work item> begin wf_engine. procedure <procedure_name>( itemtype in varchar2. The following example shows one way to structure such an exception handler. ’<Existing attribute value>’). add an exception handler to create and populate the attribute when the attribute does not already exist. funcmode in varchar2. ’<New attribute value>’). itemkey. itemkey.SetItemAttrText(itemtype. result in out varchar2) is begin –– –– RUN mode – normal process execution –– if (funcmode = ’RUN’) then –– your run code goes here null. ’<new_attribute_name>’.AddItemAttr(itemtype. wf_engine. ’<new_attribute_name>’. Note: Active work items are identified as those items for which WF_ITEMS.SetItemAttrText(itemtype. actid in number. • Exception handler – After the reference to the new item attribute in your modified API. end. 4 – 76 Oracle Workflow Guide . itemkey.SetItemAttrText(itemtype. ’<new_attribute_name>’). wf_engine. begin wf_engine. ’<existing_attribute_name>’. itemkey in varchar2. ’<New attribute value>’). end loop.

–– by returning null –– result := ’’. else raise. –– no result needed result := ’COMPLETE’. exception when others then Your –– activity will indicate that it does not implement a mode Defining Workflow Process Components 4 – 77 .exception when others then if (wf_core. return. –– –– Other execution modes may be created in the future. end if.AddItemAttr(itemtype. return. –– for example when a process is reset to an earlier point –– due to a loop back. –– –– CANCEL mode – activity ’compensation’ –– –– This is in the event that the activity must be undone. end if. end. ’<New attribute value>’). wf_engine. return. itemkey. –– if (funcmode = ’CANCEL’) then –– your cancel code goes here null.setitemattrtext(itemtype. ’<new_attribute_name>’.error_name = ’WFENG_ITEM_ATTR’) then wf_engine. itemkey. –– example completion result := ’COMPLETE:’. end if. ’<new_attribute_name>’).

itemkey. end <procedure_name>.–– The line below records this function call in the error –– system in the case of an exception. ’<procedure_name>’. wf_core. itemtype. raise. to_char(actid). funcmode).context(’<package_name>’. See Also Item Attributes: page 4 – 71 4 – 78 Oracle Workflow Guide .

CHAPTER 5 Defining a Workflow Process Diagram his chapter tells you how to use Oracle Workflow Builder to define a workflow process diagram and how to load roles from the database so you can assign notification activities to specific roles. T Defining a Workflow Process Diagram 5–1 .

This allows you to include a generic activity in the process that the Workflow Engine executes in parallel with the result–specific activity. that process activity is known as a subprocess. Each activity is a node. function. The result that the activity returns when it completes then determines what the next eligible activity is. event. a logical step that contributes toward the completion of a process. you must associate the transition arrow that you create with one of the activity’s possible results. the process transitions to the next activity. as defined by the results–based transitions that originate from the completed activity.” See: Requisition Process Activities: page 15 – 15. <Any>. any transition that you draw from it simply appears as an arrow to the next activity. To display the subprocess diagram in a Process window. You define transitions between activities by drawing arrows from one node to the next using the secondary mouse button. and process activities make up the nodes of a process. For an activity that completes with a result type of <None>. indicating that as long as the originating activity completes. There is no restriction on the depth of this hierarchy. The Workflow Engine follows an <Any> transition regardless of what completion result the activity returns. Transitions Transitions appear as arrows in your diagram and represent the completion of one activity and the activation of another. If a process contains a process activity in its diagram. You can also create a <Default>. double–click on the subprocess activity node in the parent Process window.Process Window The Process window in Oracle Workflow Builder graphically represents the activities (icons) and transitions (arrows) for a particular process. or <Timeout> transition for an activity that has a defined result type. Notification. For an activity that has a defined result type. You can drag and drop activities from the navigator tree into the Process window or create activities directly in the Process window. For example. The properties for an activity node may be viewed or edited by double clicking on the node in the Process window with the select mouse button. The Workflow Engine follows a <Timeout> transition if the notification 5–2 Oracle Workflow Guide . ”Notify Approver” with a result of ’REJECTED’ transitions to ”Reject Requisition. The Workflow Engine follows a <Default> transition if no other transition matching the completion result exists.

See: To Define Optional Activity Details: page 4 – 59. Sometimes these multiple transitions indicate that there are multiple ways that the process can transition to this one node and you may want the node to execute just once. The On Revisit flag for an activity determines whether the activity reexecutes when it is revisited more than once.activity times out before completion. Note: You must have a background engine set up to process timed out activities. If a timed out activity does not have a <Timeout> transition originating from it. When an activity times out. However. Activities can have multiple transitions for a single result to create parallel branches. the multiple transitions may indicate that the activity may be transitioned to multiple times because it is the starting point of a loop. On Revisit is set initially in an activity’s Details property page. In other cases. See: Setting Up Background Workflow Engines: page 2 – 43. See: To Define Nodes in a Process: page 5 – 8. you want the activity to be reexecuted each time it is revisited. Processing then continues along the <Timeout> transition as indicated by your process definition. Oracle Workflow executes the error process associated with the timed out activity or its parent process(es). In these cases. See: Setting Up Background Workflow Engines: page 2 – 43. Oracle Workflow marks the activity as timed out and then cancels any notification associated with the timed out activity. 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. for each usage of an activity in a process. you may change On Revisit for that node in the activity’s Node property page. You can also use the standard Loop Counter Defining a Workflow Process Diagram 5–3 . 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. Creating Multiple Transitions to a Single Activity You can create multiple transitions to a single activity in a process diagram. It is an important flag to set for the pivot activity of a loop.

An End activity should return a result that represents the completion result of the process. you want to create a loop in your process. 5–4 Oracle Workflow Guide . A subprocess is started when the Workflow Engine transitions to a process activity that represents the subprocess. The result is one of the possible values from that process activity’s result type. This is especially true if after merging the parallel branches. Start activities are marked with a small green arrow. The engine may execute acceptable Start activities in any order.activity as the initial activity in a loop to control how many times a process can transition through a loop. You may designate any node from which it is logical to begin the process as a Start activity. When initiating a process. See: Looping: page 8 – 10 and Loop Counter Activity: page 6 – 7. follow these steps: 1. you should always use an AND. the engine runs each possible Start activity and transitions through the process until an End result is reached. Processes may contain multiple branches that each have an End activity. OR. 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. By using a joining activity to merge parallel branches and designating the following activity as the start of the loop. or custom join activity to merge those branches. the entire process ends even if there are parallel branches still in progress. To launch a workflow process using the Business Event System. and End activities by a red arrow that appear in the lower right corner of the activity node’s icon in the Process window. you create a less complicated process for the engine to execute. Define a business event. When the Workflow Engine reaches an End activity. Designating Start and End Activities Each process has to have a Start activity that identifies the beginning point of the process. Suggestion: If you have multiple incoming transitions from parallel branches. the Workflow engine begins at the Start activity with no IN transitions (no arrows pointing to the activity). See: Standard Activities: page 6 – 2. If more than one Start activity qualifies.

In the subscription properties. Oracle Workflow uses the event key as the item key for the workflow process that is launched. Define a subscription to this business event. By default. create a function that populates the correlation ID in the event message with the item key you want. See Also Workflow Engine APIs: page 8 – 19 Raise: page 8 – 261 Managing Business Events: page 13 – 2 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 Defining a Workflow Process Diagram 5–5 . and assign that function as the subscription’s rule function. Add the Raise() API to your custom application code at the point where you want to launch the workflow process. If you want to generate the item key based on a custom rule. 3.2. specify the workflow item type and process that you want to launch.

• Select a predefined process activity and press Ctrl + E. • Use the Quick Start Wizard to create a new process activity. 5–6 Oracle Workflow Guide . To begin drawing a process diagram. you must first display the Process window for your process activity." To Add Nodes to a Workflow Process 1. • Select a predefined process activity and choose Process Details from the Edit menu. or process activity from the navigator tree into the Process window. The activity you drag must belong to the same data store as the process you are dragging it to. To display a process window. Create a new node in a process by using one of the following methods: • Drag and drop a notification. function. See: To Use the Quick Start Wizard: page 3 – 18. event. A Process window opens with the name of your process in the window title. 2. you can do one of several things: • Double–click on a predefined process activity on the navigator tree.

• Choose Create Activity from the right mouse button menu while your cursor is in the Process window to create a new activity node. <Any>. no label appears on the transition. 3. Defining a Workflow Process Diagram 5–7 . See: To Create and Edit a Transition: page 5 – 18. 7. event. • Choose the New Function. You can also drag and drop a lookup code from the navigator tree onto an existing transition in the Process window to change the result of that transition. If you specifically choose to show the label for such a transition. appears in a ”tool–tip”–style display. New Event. Create an arrow (transition) between two activity nodes by holding down your right mouse button and dragging your mouse from a source activity to destination activity.Note: If you want to drag an activity into a process. An Activities property page appears for you to select the activity for this node. if the activity returns any result. 4. The Label Name. or <Timeout> to define a transition to take if the activity returns a result that does not match the result of any other transition. You can create a new function. Internal Name. then you must first copy the item type that the activity belongs to into the same data store as the process. 5. then by default. Oracle Workflow Builder expands the navigator tree and highlights the master activity of the node you select. Display Name. the label <Default> appears. then a list of lookup values appears when you attempt to create a transition to the destination activity. You can also select the values <Default>. If you single click on an activity node in the Process window. Comment and Performer. or process. If the source activity has a result code associated with it. If the source activity has no result code associated with it. or if the activity times out. 6. notification. where the activity is in a different data store than the process you are dragging it to. or New Notification toolbar button to create a new activity. New Process. you can display information about an activity by moving your mouse over the activity. See: To Define Nodes in a Process: page 5 – 8. You can also create a new node using the right mouse button menu. The lookup code you drag and drop must belong to the same data store and same lookup type as the lookup code you replace. respectively. Select a value to assign to the transition. In the Process window.

Grid snap is initially turned on by default until you change the setting. Next. Note: You can also create a new node by dragging and dropping a predefined activity from the navigator tree into the process window. See Also Process Window Toolbar: page A – 8 " To Define Nodes in a Process 1. notification. To create a new function. In the Item Type field. If you wish to use a subprocess more than once in a process. 5–8 Oracle Workflow Guide . Double–click on the node and skip to Step 5 to further edit its property page. click on the position within the Process window where you want to place this new node. and make a copy of the selection by holding down the Control or Shift key as you drag the selection to a new position in the Process window. or process node. • Select either the internal name or display name of a predefined activity. 2. 9. The property page for the new node appears. New Notification. Choose one of the following methods to define the remaining information for the node. New Event. you must create a distinct copy of the subprocess for each instance needed. first select the New Function.8. Caution: Oracle Workflow does not support reusing a subprocess activity multiple times within a process hierarchy. You can select an entire region of a process diagram. Oracle Workflow Builder then populates all the fields with predefined information from the master activity as shown in the Navigator window. event. select the item type that you want this activity node to be associated with. containing multiple activity nodes and transitions. 3. at which point the latest setting becomes your default. This automatically populates the node’s property page with predefined information. Open the Process window for your process activity. or New Process icon from the Process window toolbar. You should turn on grid snap from the View menu to snap your activity icons to the grid when you complete your diagram. 4.

the label name is the activity name. are local and specific to the current node activity. but if the Defining a Workflow Process Diagram 5–9 . 5. Select the Node tab to specify information that is specific to this node. Specify a Label for the node. the Label field lets you give a unique name to the instance of this particular activity in the process. and to the Event Details tab for an event activity. By default. choose the New button to define a new activity.• Alternatively. Only changes that you make to the Node and Node Attributes tabs. – Access—To Set the Access Level for an Object: page 4 – 18 Caution: Any changes that you make to the any of the above tabs automatically propagate to the master activity and affect all other instances of that activity. refer to the sections listed: – Process—To Create a Process Activity: page 4 – 57 – Function—To Create a Function Activity: page 4 – 50 – Notification—To Create a Notification Activity: page 4 – 48 – Event—To Create an Event Activity: page 4 – 54 – Details—To Define Optional Activity Details: page 4 – 59 – Roles—The information in this tab is currently not supported. To complete the following tabs of the property page. Since an activity can be used more than once in any given process.

activity is used more than once in the process. where N represents the ’Nth’ instance of the activity in use. . –N is appended to the activity name.

’NORMAL’ is the default if it is neither. Indicate if the current node is a start or end activity in your process. . 6. See: Workflow Engine APIs: page 8 – 19. You may have multiple START and END nodes in your process. Attention: When you call most Oracle Workflow APIs. and an End activity is marked (End) and has a red arrow in its activity icon. A Start activity is marked (Start) and has a small green arrow in its activity icon. respectively. you must pass the activity’s label name and not its activity name. by choosing ’START’ or ’End’.

or a blocking function activity. an event activity with an event action of Receive. If the activity is not completed by a given time. Even if you use the Standard Start or Standard End activity. 7. in the unit of MINUTES. A relative timeout value of zero means no timeout. Choose ’No Timeout’ if the activity does not have to be completed by a given time. For a notification that requires a response. Note that you must first create an item attribute of type number to store 8. hours and minutes to specify when the activity times out. a process activity that is a subprocess within another process. specify whether the activity must be completed by some specified time. You can enter any combination of days. you can redirect the parent process to transition to a different activity. See: Timeout Transitions: page 5 – 3. Attention: The Start/End field is always set to Normal by default for all activity nodes. The list of values for the final process result is derived from the lookup type specified as the process activity’s result type. The value you enter is interpreted as a relative offset from the begin date of the activity. 5 – 10 Oracle Workflow Guide . For an END node. respectively. you must manually edit the Start/End field to be either Start or End. 9. Choose ’Relative Time’ if you want the activity to be completed by some constant relative time. You can provide a comment to yourself about this node. you must also select a value for the final process result if the overall process activity has a result type associated with it. Choose ’Item Attribute’ if you want the activity to be completed by some relative time that is computed dynamically at runtime.

the computed timeout value and reference that predefined item attribute here. . See: Item Type Attributes: page 4 – 2 and To Define an Item Type or Activity Attribute: page 4 – 8.

the role will be resolved to the appropriate role data stored in the database based on the role display name you entered. Choose ’Default’ to keep the default priority of the message. See: Item Type Attributes: page 4 – 2 and To Define an Item Type or Activity Attribute: page 4 – 8. or for an event activity node with an event action of Send. Choose ’Constant’ to override the default priority with the new specified priority level. Note that you must first create an item attribute of type role to store the computed role name and reference that predefined item attribute here. To Define an Item Type or Activity Attribute: page 4 – 8. You may either select a constant role name or an item type attribute that dynamically determines the role at runtime. and 67–99=Low. See: Item Type Attributes: page 4 – 2. you can select a constant role name from the Performer poplist. you can directly type in a valid role display name in the Performer field. in the unit of MINUTES. you can override the priority assigned to the activity’s message. specify the performer of the activity. 34–66=Normal. 10. and Roles: page 5 – 24. For a notification activity node. If you are working in a . Note that you must first create an item attribute of type number to store the computed priority value and reference that predefined item attribute here. Note: The computed priority value can be any number between 1–99. A null timeout value or a value of zero means no timeout. When you upload the file to a database. For a notification activity node. Attention: The dynamic timeout value stored in this attribute is interpreted as a relative offset from the begin date of the activity. Oracle Workflow automatically converts the number to a priority level as follows: 1–33 = High. Note: If you set the Performer Type to Constant and you are connected to the database and have loaded roles from the database. Note: When you assign a notification to a multi–user role. 11. the Workflow Engine keeps track of the individual from that role Defining a Workflow Process Diagram 5 – 11 . The performer is the role to whom the notification is sent. Choose ’Item Attribute’ to override the default priority with a new priority level that is dynamically determined at runtime.wft file data store without any open connection to the database.

For each event detail. See: To Define Event Details for an Event Node: page 5 – 12. a corresponding master activity is also created under the appropriate branch in the navigator tree. Note: Although Oracle Workflow Builder allows you to specify a performer for any type of node activity. Choose Apply to save your changes. then a small subprocess overlay icon appears over the upper right corner of process activity icon. 13. or event activity and the activity has activity attributes. When you save and close your property page. 12. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. If the node is a process activity. it is either required or optional to use an item type attribute to store or retrieve the detail information. If this is a new activity you created. If the node is a function. See: To Define Activity Attribute Values: page 5 – 17. The item type attributes you use for event details must be associated with the same item type that the event activity itself is associated with.that actually responds to the notification. If the node is an event activity. notification. 5 – 12 Oracle Workflow Guide . 14. you can specify additional required event information by choosing the Event Details tab. Note that you must first create item type attributes of the appropriate types before you can reference those predefined item attributes here. See Also To Find an Object in the Navigator Tree: page 3 – 6 Using the Edit Button in a Property Page: page 3 – 8 " To Define Event Details for an Event Node The event action defined for the event activity determines which event details you must define for an event node. The subprocess overlay icon identifies the node as a subprocess within the process diagram. 15. you can assign values to those activity attributes by choosing the Node Attributes tab. See: Respond API: page 8 – 211. Oracle Workflow only considers the value of Performer for notification activity nodes. the activity node appears in the position you specified in the Process window. See: Item Type Attributes: page 4 – 2 and To Define an Item Type or Activity Attribute: page 4 – 8.

event key. See: To Define Optional Activity Details: page 4 – 59. and event message in the item type attributes you specify. For an activity with the event action Receive. See: To Create an Event Activity: page 4 – 54. Defining a Workflow Process Diagram 5 – 13 . Display the property pages of an event activity node. creating new item type attributes if a corresponding attribute does not already exist for any parameter. 2.1. Select the Event Details tab. the Workflow Engine stores the event name. and also sets any parameters in the event message parameter list as item type attributes for the process. 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. • Event Message—Optionally select an item type attribute of type event where you want to store the event message that the node receives. Note: When the activity receives an event. • Event Key—Optionally select an item type attribute of type text where you want to store the event key that the node receives.

If the event data exceeds 4000 bytes. the item type and item key for that process are included in the parameter list within the event message. if the event was originally raised by a Raise event activity in another workflow process. In this case. you should assign a Generate function in the event definition to generate the 5 – 14 Oracle Workflow Guide . 3. 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 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 – 79. You cannot raise event groups. The maximum length of the data you can enter in a text attribute is 4000 bytes. • Event Key—Select the item type attribute of type text that contains the event key for the event that the node raises. For an activity with the event action Raise. Note: You can only raise an individual event.Additionally. • Event Data—Optionally select an item type attribute of type text that contains the event data for the event that the node raises. enter the following event details: • Event Name—Enter the name of the event that the node raises.

See: To Define an Event: page 13 – 5. the Workflow Engine sets the event parameters as item type attributes for that process. For an activity with the event action Send. Defining a Workflow Process Diagram 5 – 15 . If the event message is later received by another process. enter the following event details: • Event Message—Select the item type attribute of type event that contains the event message that the node sends. rather than providing the event data through a text attribute. 4. See: To Define Activity Attribute Values: page 5 – 17. you can use the activity attributes for a Raise event activity node to specify parameters that you want to include in the parameter list for the event message. See: SetItemParent: page 8 – 79. the Workflow Engine uses that item type and item key to automatically set the process that raised the event as the parent for the process that receives the event. Note: The Event Name and Event Key are required for a Raise event activity. a Raise event activity automatically sets the item type and item key for the current workflow process in the parameter list for the event message. Note: In addition to these event details. If the event message is later received by another process.event data. Also.

Specify both the agent name and the system name for the agent using the following format: <agent_name>@<system_name> You can either specify a constant To Agent name or select an item type attribute of type text that dynamically determines the To Agent name at runtime. 5 – 16 Oracle Workflow Guide . Specify both the agent name and the system name for the agent using the following format: <agent_name>@<system_name> You can either specify a constant Out Agent name or select an item type attribute of type text that dynamically determines the Out Agent name at runtime. • Event Key—Optionally select an item type attribute of type text that contains the event key of the event that the node sends. • To Agent—Optionally enter the inbound agent to which the node sends the event. Oracle Workflow automatically sets the correlation ID to the item key of the process. the event cannot be sent. The Out Agent that you enter here overrides the previous outbound agent value in the event message. Note: The Event Message is required for a Send event activity. or specify a To Agent or an Out Agent in the event details for this node. Additionally. The To Agent that you enter here overrides the previous inbound agent value in the event message. The event name that you enter here overrides the previous event name value in the event message. The event key that you enter here overrides the previous event key value in the event message. you must either include a To Agent or a From Agent within the event message. 5. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page.• Event Name—Optionally enter the name of the event that the node sends. Note: If no correlation ID is initially specified in the event message. Choose Apply to save your changes. If you neither specify an inbound agent nor an outbound agent. 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. • Out Agent—Optionally enter the outbound agent from which the node sends the event.

1. See: To Define an Item Type or Activity Attribute: page 4 – 8. enter the value for this attribute. The value you enter must match the data type of the activity attribute. 2. value type. description.See Also Using the Edit Button in a Property Page: page 3 – 8 Event Activity: page 4 – 45 To Create an Event Activity: page 4 – 54 " To Define Activity Attribute Values Activity attribute values for a function or notification activity are used by the PL/SQL stored procedure that the activity calls. Activity attribute values for a Raise event activity are set as parameters in the parameter list for the event message. 3. and value of each attribute in the attributes summary region. and of the actual activity parameter itself as it is defined in the PL/SQL function associated with the activity. Select an attribute. The attribute type is displayed along with the name. The value can be a constant or a value stored in an item type attribute. Display the property pages of an activity node. Defining a Workflow Process Diagram 5 – 17 . In the Value region. Select the Node Attributes tab.

4. OK to save your changes and close the property page or Cancel to cancel your changes and close the property page. To create a transition between two activities. The label snaps onto the transition.. You can reposition any vertex point to create a bend in the transition. simply select the label with your mouse and drag it to its new position. you cannot add or delete vertex points along the transition. non–overlapping transitions. use this option to change the result label on the transition. 5.. If a transition is locked. 5 – 18 Oracle Workflow Guide .—if the transition has a result assigned to it. hold down your right mouse button and drag your mouse from a source activity to a destination activity. 6. Choose Apply to save your changes. but you can delete the transition. • Hidden Label—toggles between displaying and hiding the transition label. To edit a transition. You can create a transition that loops back to its source activity node in one of two ways: • Hold down your right mouse button and drag your mouse from a source activity back to itself to create a self loop. • Straighten—straightens the transition by removing the extra vertex points that can cause bends in the transition. select the transition. An additional menu appears that lists the possible result labels you can choose. To bend a transition. 3. • Locked—toggles between locking and unlocking the transition from further edits. 4. You can bring up the following menu of editing options at any time by selecting a transition with your mouse and clicking on the right mouse button: • Delete Transition—deletes the selected transition. " To Create and Edit a Transition 1. Note: Overlapping transitions appear in a different color than single. • Results. To reposition a transition label. create a vertex point by selecting the transition and dragging the transition as you hold down your left mouse button. 2.

Add a vertex point to create a bend in the transition. Place your cursor in the Process window and choose Overview from the right mouse button menu. select the vertex and drag it over another vertex to combine the two points. You can resize the Overview dialog window to get a better view of the process sketch. Defining a Workflow Process Diagram 5 – 19 . An Overview dialog window of your process appears. 2. " To Display a Process Overview 1. The upper pane of the window shows a size–reduced sketch of your entire process. Then select and drag the arrowhead of the transition back to the source activity node. create a transition to another arbitrary activity node.• From a source activity node. To remove a single vertex point from a transition. Create additional vertex points as necessary to improve the visual display of the looping transition. 3. 7. while the bottom pane is a list of the activities in your process.

5 – 20 Oracle Workflow Guide . 2. you may get a Print dialog box that lets you scale your image down to one page for printing. " To Print a Process 1. Single click on an activity in the lower pane to move the cross hairs cursor to that activity within the sketch. your printer driver may either substitute a similar font or not print any text. depending on the printer driver you use. The Print Diagram option captures your process diagram as a picture (metafile). However. This copies the process to the clipboard in the form of a metafile and a bitmap diagram. 5.4. choose Print Diagram from the File menu or from the right mouse button menu. With the Process window selected as the active window. To edit a bitmap image. To paste the metafile–version or bitmap–version of the process diagram into another application window. enlarges it to the correct size to print and sends it to a printer. A cross hairs cursor that you can drag appears in the process sketch pane. Display the Process window containing the process you wish to print. " To Copy a Process Diagram to the Clipboard 1. you should consult the other application’s documentation on how to paste metafiles or bitmaps. Display and make the Process window containing the process you wish to copy active. Choose OK to close the dialog window and to jump to that activity in the Process window. Use the cross hairs cursor to pinpoint an area in your process that you want the Process window to display. Choose Copy Design from the Edit menu or from the right mouse button menu. You can also drag and double–click on the cross hairs cursor in the upper pane to close the dialog window and to jump to the resulting region in the Process window. Note: If your process diagram uses a font that the printer cannot find. it may span more that one page when printed. If your diagram is large. 2. 3. you must paste the image into an application that can edit bitmaps.

If an activity completes with a result that is not associated with an outgoing transition. • Restricts the same subprocess from being used twice in a process. • For processes that reference objects from another item type." To Validate a Process Definition 1. the activity enters an ’ERROR’ state. • Validates that a notification activity’s result type matches the lookup type defined for the message’s ’RESULT’ message attribute. • Validates that activity nodes marked as END nodes do not have any outgoing transitions. The following list is an example of some of the validation that the Verify command performs: • Checks that a process has at least one Start and one End activity. Choose Verify from the File menu to validate all process definitions for the currently selected data store. • Validates that all possible activity results are modelled as outgoing transitions. verifies that the requisite item attributes associated with the referenced item type exists. and a <Default> transition doesn’t exist for that activity. 2. • Verifies that message attributes referenced in a message body for token substitution exist in the message definition. . • Verifies that a process does not contain itself as a process activity.

Attention: You should always validate any new process definition you create as it helps you to identify any potential problems with the definition that might prevent it from executing successfully. Any change you make applies to all windows within the program. Modifying Fonts in Oracle Workflow Builder You can modify the font that is used by the windows in Oracle Workflow Builder. Defining a Workflow Process Diagram 5 – 21 .

Select the Underline or Strikeout check boxes to apply that effect. Choose OK when you are done. Select the font to use as the label for your icons. Bold. Italic or Bold Italic. Some fonts have a limited selection of font sizes. 6. The Sample region shows the appearance of the font you select. The shortcut can start Oracle Workflow Builder by 5 – 22 Oracle Workflow Guide . 4. Indicate the font size to use. Choose the font style: Regular. Some fonts have a limited selection of font styles. These font settings take effect immediately and are also used the next time you start Oracle Workflow Builder." To Modify Fonts 1. Creating a Shortcut Icon for a Workflow Process You can create a shortcut to Oracle Workflow Builder on your Windows desktop. 3. Choose Font from the View menu to display the Fonts properties page. This font is used for all icons in Workflow Builder. 5. 2.

Start Oracle Workflow Builder. If the data store for the shortcut is a database. Enter a name for the shortcut. Defining a Workflow Process Diagram 5 – 23 .automatically connecting to a designated data store and opening specific Process windows from that data store. " To Create an Oracle Workflow Builder Shortcut 1. 4. as you want it to appear on your desktop. Optionally expand the Process branch and double–click on one or more process activities to open the Process windows for those processes. the shortcut will prompt you for the password to the database. 2. When you double–click on the new shortcut icon on your desktop. 5. Choose Open from the File menu to open a data store. Choose Create Shortcut from the File menu. it automatically starts Oracle Workflow Builder opening the data store that was selected and any process windows that were open when you created the shortcut. 3. 6.

You must assign that node to a performer. but Oracle Workflow Builder can display and reference the roles stored in a database. you must initially load the roles from your Oracle Workflow database into your Oracle Workflow Builder session. Referencing Roles in a Workflow Process One example of how roles are referenced in a workflow process is when you include a notification activity in a process as a node. The performer can be a designated role or an item type attribute that dynamically returns a role. See Also To Load Roles: page 5 – 25 To Display the Directory Service in Oracle Workflow Builder: page 5 – 26 5 – 24 Oracle Workflow Guide . Note: Referencing roles in a workflow process is currently supported in Oracle Workflow Builder. See: Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 and Workflow Directory Service APIs: page 8 – 121. The purpose of the Roles tab page is to give a role access to a certain object. new workflow roles cannot be created in Oracle Workflow Builder. you define a function activity that makes a server–side call to the appropriate WF_DIRECTORY API and include that function activity in your process diagram. Currently. in the Oracle Workflow directory service. Ad Hoc Users and Roles Oracle Workflow allows you to create new ad hoc users and roles within a workflow process. To assign a performer to a role. To do so. although the Roles tab page seen in the property pages of certain workflow objects will not be supported until a future release.Roles Oracle Workflow roles are stored in the database. See: Setting Up an Oracle Workflow Directory Service: page 2 – 21 and To Define Nodes in a Process: page 5 – 8. to add to your directory service.

A Role Selection window appears. choose Open from the File menu to connect to the database and open your item type. Alternatively. Defining a Workflow Process Diagram 5 – 25 . Choose OK to load the selected roles into Oracle Workflow Builder and make them available to the workflow objects in your open item type. Load Roles from Database. You can enter search criteria using SQL query syntax in the Find Roles field to find a subset of roles. 3. 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. 2. Choose from the File menu. or just choose Find without specifying any search criteria to identify all roles. If you are not connected to an Oracle Workflow database." To Load Roles 1. The Role Selection window finds the roles you specify and displays them in the Query Results list box. as shown in the following Node property page example. just choose Add All to add all the roles in the Query Results list to the Loaded Roles list. Select the roles you want to load from the Query Results list and choose Add to add them to the Loaded Roles list.

When you select a role from one of these poplist fields.4. Expand the Directory Service branch in the navigator tree. Note that the Directory Service branch does not currently allow you to view the participant users of a role. 3. " To Display the Directory Service in Oracle Workflow Builder 1. All the roles that you loaded from the database appear. you can also choose the Edit button to the right of the field to display the property sheet of the selected role. 5 – 26 Oracle Workflow Guide . 2. Note: When you reopen a saved process definition in Oracle Workflow Builder. 5. The Role property page that appears lists read–only information about that role. See: To Load Roles: page 5 – 25. Once you load your roles from the database in Oracle Workflow Builder. Double–click on a role to display read–only information about that role as shown below. you can display your directory service information in the navigator tree. any role information that the process references automatically gets loaded even if you open the process definition from a file and are not connected to the database.

Defining a Workflow Process Diagram 5 – 27 .

5 – 28 Oracle Workflow Guide .

T Predefined Workflow Activities 6–1 .CHAPTER 6 Predefined Workflow Activities his chapter tells you how to use Oracle Workflow’s predefined activities.

Note: If you want to drag an activity into a process. Use the Or activity as the node for several converging branches to allow the process to continue whenever any one of the branches completes. Use the And activity as the node for several converging branches to ensure that all branches complete before continuing. you can decide whether that node should transition forward when any of those parallel branches complete or when all of the parallel branches complete. where the activity is in a different data store than the process you are dragging it to. Calls a PL/SQL procedure named WF_STANDARD. First you need to open both files as data stores in Oracle Workflow Builder. Note: Predefined activities are also available for the predefined workflows shipped with Oracle Applications and Oracle Self–Service Web Applications. Suppose you are modifying a process that is stored in wfexample.wft. For more information on Oracle Applications–specific workflow activities. And/Or Activities In cases where multiple parallel branches transition to a single node. Now you can drag any standard activity in the wfexample data store into your process. consult the documentation or help for that specific Oracle Application product. And Completes when the activities from all converging branches complete.ANDJOIN. then you must first copy the item type that the activity belongs to into the same data store as the process. 6–2 Oracle Workflow Guide . The Standard item type is automatically installed on your Oracle Workflow server.Standard Activities Oracle Workflow provides some generic activities you can use to control your process. The activities are associated with the Standard item type but can be used within any process you define. then you need to copy the Standard item type in wfstd and paste it into the wfexample data store.wft located on your PC in the \<ORACLE_HOME>\Wf\data\<language>\ subdirectory.wft and you want to add some standard activities into the process that are stored in wfstd. You can also access the Standard item type from the file wfstd.

or text string which to compare to a reference value. See: To Define Activity Attribute Values: page 5 – 17. Compare Date Compare Number Compare Text Use to compare the value of an item type attribute of type Date with a constant date.” ”Less Than.ORJOIN.Or Completes when the activities from at least one converging branch complete.COMPARE. All the Comparison activities call a PL/SQL procedure named WF_STANDARD. Compare Execution Time Activity The Compare Execution Time activity provides a standard way to compare the elapsed execution time of a process with a constant test time. date.” if the item type attribute is null. dates. Use to compare the value of an item type attribute of type Number with a constant number. Comparison Activities The comparison activities provide a standard way to compare two numbers. You can guide your workflow process based on how the value of an item type attribute compares to a given value that you set.” ”Equal.” or ”Null. Activity Attributes Each comparison activity has two activity attributes: • Test Value—a constant number. or Text. • Reference Value—an item type attribute of type Number. The comparison activities use the Comparison lookup type for a result code. Calls a PL/SQL procedure named WF_STANDARD. Possible values are ”Greater Than. Use to compare the value of two item type attributes of type Text. Date. Predefined Workflow Activities 6–3 . or text strings.

” ”Less Than. – Relative Time—to pause the activity until the number of days specified in the Relative Time activity attribute passes.” or ”Null. The activity uses the Comparison lookup type for a result code. 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. A value of ”Root” compares the test time with the elapsed execution time of the current root process. ”Root” or ”Parent”.” ”Equal.” if the test time is null. See: To Define Activity Attribute Values: page 5 – 17. Possible values are ”Greater Than. • Parent Type—takes as its value. Wait Activity The Wait activity pauses the process for the time you specify. A value of ”Parent” compares the test time with the elapsed execution time of just the immediate parent process. Activity Attributes The Wait activity has six activity attributes: • Wait Mode—use this attribute to specify how to calculate the wait.The Compare Execution Time activity calls a PL/SQL procedure named WF_STANDARD.WAIT. 6–4 Oracle Workflow Guide . 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. which can be a subprocess.COMPAREEXECUTIONTIME. the lookup codes. 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.

• Day of Week—If Wait Mode is set to Day of Week. enter an absolute date. For example. such as the completion of a concurrent program. 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. Predefined Workflow Activities 6–5 .5 for a wait time of half a day (12 hours). as indicated in the Day of Month activity attribute. as indicated in the Day of Week activity attribute.BLOCK. If the day you choose has already passed in the current month. then the activity waits until that day in the following month. See: CompleteActivity: page 8 – 69 This activity calls the PL/SQL procedure named WF_STANDARD. unless you use this Time of Day activity attribute to specify a time other than midnight that the Wait activity should pause until. • Absolute Date—If Wait Mode is set to Absolute Date. See: To Define Activity Attribute Values: page 5 – 17. If the day you choose has already passed in the current week.<fraction of days>. Use the Block activity to delay a process until some condition is met. Make sure your program issues a CompleteActivity call when it completes to resume the process at the Block activity. • Day of Month—If Wait Mode is set to Day of Month. then the activity waits until that day in the following week. • Time of Day—The Wait activity always pauses until midnight of the time specified. choose a day of the month from the list. • Relative Time—If Wait Mode is set to Relative Time. enter a relative time expressed in <days>. – Day of Week—to pause the activity until a specified day of the week.– Day of Month—to pause the activity until a specified day of the month. choose a day of the week from the list. enter 0.

it continues to execute until completion or until one of 6–6 Oracle Workflow Guide . • Process name—the internal name of the process to launch. • Owner—a role designated as the owner of the process to launch. If you do not specify a value. even if the thread is already deferred.LAUNCHPROCESS. the item key defaults to <current_item_type>:<current_item_key>–<n>. so once the process is launched. This activity calls the PL/SQL procedure named WF_STANDARD. • Item Key—an item key for the process to launch. The default is NO. starting at 1. • User Key—a user defined key for the process to launch. This activity attribute requires a value. Specify the item type’s internal name. Activity Attributes The Launch Process activity has six activity attributes: • Item Type—the item type of the process to launch. This activity calls the PL/SQL procedure named WF_STANDARD. the activity will check the item type selector function of the process to launch for a process name.Defer Thread Activity The Defer Thread activity defers the subsequent process thread to the background queue without requiring you to change the cost of each activity in that thread to a value above the Workflow Engine threshold. Launch Process Activity The Launch Process activity lets you launch another workflow process from the current process. and n is the number of processes launched by the current process instance.DEFER. where current_item_type and current_item_key identify the current process instance. This activity always interrupts the process thread by causing a disconnect to occur in the current database session. • Defer immediate—choose between YES or NO to determine whether the process to launch should be immediately deferred to the background engine. If a process name is not specified.

You can change the display name of this activity to something meaningful when you include it in a process. See: To Define Activity Attribute Values: page 5 – 17. Activity Attribute The Loop Counter activity has an activity attribute called Loop Limit. so that it reminds you of what you want this activity to do in the future. as shown in the diagram below. 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. This activity calls the PL/SQL procedure named WF_STANDARD. the Loop Counter activity will complete with a result of Loop and the engine will take the ’Loop’ transition to the next activity. you can include a Loop Counter activity as the initial activity in a loop. the activity will complete with a result of Exit and the engine will take the ’Exit’ transition to an alternative activity. This Loop Counter activity calls the PL/SQL procedure named WF_STANDARD. Loop Counter Activity Use the Loop Counter activity to limit the number of times the Workflow Engine transitions through a particular path in a process. If the number of times that the Workflow Engine transitions to the Loop Counter activity is less than the value specified in Loop Limit. If the number of times that the Workflow Engine transitions to the Loop Counter activity exceeds the value of Loop Limit.its activities is deferred. Noop Activity The Noop activity acts as a place holder activity that performs no action.NOOP. then the process moves along the ’Exit’ transition to the designated activity. You can use this activity anywhere you want to place a node without performing an action.LOOPCOUNTER. If the number of visits to the Loop Counter activity exceeds the value set in Loop Limit. See: To Define Activity Attribute Values: page 5 – 17. The Loop Counter activity can have a result of Loop or Exit. For example. Predefined Workflow Activities 6–7 .

and 4 in the loop. the engine moves from the Loop Counter activity through Activities 1. 3. Start Activity The Start activity marks the start of a process and does not perform any action. you may include it in your process diagram to visually mark the start of a process as a separate node. if the result is ’Rejected. You can use it to return a result for a completed process by specifying a Result Type for the activity. End Activity The End activity marks the end of a process and does not perform any action.’ the process moves along the ’Rejected’ transition to return to the Loop Counter activity. This activity calls the PL/SQL procedure named WF_STANDARD. Although it is not necessary.’ the process moves along the ’Accepted’ transition. If the item is rejected multiple times. 2. you may include it in your process diagram to visually mark the end of 6–8 Oracle Workflow Guide . Otherwise. Although it is not necessary.NOOP. If the result of Activity 4 is ’Accepted. once the number of visits to the Loop Counter activity exceeds the Loop Limit value.In this example. the process moves along the ’Exit’ transition and ends.

NOOP. The Role Resolution activity selects a single user from that role and assigns the notification activity to that user. you must model a prerequisite function activity into the process that selects one of several predefined messages for the Notify activity to send. place the Role Resolution activity in front of a notification activity and specify the performer of that notification activity to be a role consisting of several users.ROLERESOLUTION.your process as a separate node. where the message being sent is determined dynamically at runtime by a prior function 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. . Activity Attributes Use the Method activity attribute in the Role Resolution activity to specify how you want to resolve the role. To use the Notify activity. This activity calls the PL/SQL procedure named WF_STANDARD. 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. In a process diagram. This activity calls the PL/SQL procedure named WF_STANDARD. Notify Activity The Notify function activity lets you send a notification. See: To Define Activity Attribute Values: page 5 – 17. Role Resolution Activity The Role Resolution activity lets you identify a single user from a role comprised of multiple users.

.

the message that the function activity dynamically selects must not have a result type. Therefore. then you must copy and create your Predefined Workflow Activities 6–9 . Attention: If you want the Notify activity to send a message that requires a response. it can only be an informative message that does not illicit a response. Attention: Since the Notify activity is locked against modifications at access level 0. that is. you cannot change the result type from its value of <None>.

Alternatively. Note: If you want to define an activity that always sends the same message.own version of the Notify activity. • Expand Roles—takes as its value. Activity Attributes The Notify activity has two activity attributes: • Message Name—the name of the predefined message to send. you can select a constant role as the performer. you should define a notification activity and not use this Notify function activity. you must model into your process all the possible notification results that can be returned. the lookup codes ”Yes” or ”No”. The Message Name activity attribute should reference that item attribute to determine the name of the message to send. Set Expand Roles to Yes if you wish to send an individual copy of the notification message to every user in the role. The prerequisite function activity that determines which message to send should store the name of that message in an item attribute. 6 – 10 Oracle Workflow Guide . The Notify activity calls a PL/SQL procedure named WF_STANDARD. classified as a notification activity. 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). Since any one of several messages (with response attributes) can be sent by your version of the Notify activity. The Vote Yes/No activity. you can set the performer to an item attribute that returns the name of a role at runtime. The results of the tally determine the activity that the process transitions to next. If you load the roles from your database. • Performer—the name of the role to which to send the notification message.NOTIFY. Vote Yes/No Activity The Vote Yes/No activity lets you send a notification to a group of users in a role and tally the Yes/No responses from those users. See: To Define Activity Attribute Values: page 5 – 17.

– ”Require All Votes”—the Workflow Engine evaluates the responses as a percentage of all users notified only after all votes are cast. Note that this option is meaningless if any of the custom response activity attributes have a blank value. See: Example Voting Methods: page 4 – 64 • Voting Option—specify how the votes are tallied by selecting one of three values: – ”Wait for All Votes”—the Workflow Engine waits until all votes are cast before tallying the results as a percentage of all the users notified. then the responses are tallied as a percentage of the total number of votes cast. See: To Define Activity Attribute Values: page 5 – 17. If a timeout condition occurs. – ”Tally on Every Vote”—the Workflow Engine keeps a running tally of the cumulative responses as a percentage of all the users notified. or if none is available. For example. If a timeout condition occurs.Activity Attributes The Vote Yes/No activity has three activity attributes: • Percent Yes—The percentage of Yes votes cast in order for the activity to complete with a result of Yes. and does not tally any votes. If a timeout condition occurs. See Also Voting Activity: page 4 – 61 Master/Detail Coordination Activities The Master/Detail coordination activities let you coordinate the flow of master and detail processes. • Percent No—The percentage of No votes cast in order for the activity to complete with a result of No Note: The values for the Percent Yes and Percent No attributes are both defined as null in order to use a Popularity voting method. the Workflow Engine calculates the resulting votes as a percentage of the total votes cast before the timeout occurred. the Workflow Engine progresses along the standard timeout transition. a master process may spawn Predefined Workflow Activities 6 – 11 . in which the result is the response with the highest number of votes. raises an error.

upon completion. One activity lets you pause a process and the other signals the halted process to continue.CONTINUEFLOW. Wait for Flow Activity Place this activity in a master or detail process to pause the flow until the other corresponding detail or master process completes a specified activity. To use these activities. you want the halted process to continue. When you spawn a detail process from a master process in Oracle Workflow. The default value is CONTINUEFLOW. You can then use the two activities described below to coordinate the flow in the master and detail processes. • Continuation Activity—specify the label of the activity node that must complete in the corresponding process before the current process continues. 6 – 12 Oracle Workflow Guide . you place one activity in the master process and the other in each detail process. you are in effect creating a separate process with its own unique item type and item key. You define the master/detail relationship between the two processes by making a call to the Workflow Engine SetItemParent API after you call the CreateProcess API and before you call the StartProcess API when you create the detail process. See: To Define Activity Attribute Values: page 5 – 17. This activity calls a PL/SQL procedure named WF_STANDARD. Continue Flow Activity Use this activity to mark the position in the corresponding detail or master process where.WAITFORFLOW. Both activities contain two activity attributes that you use to identify the coordinating activity in the other process(es).detail processes that need to be coordinated such that the master process continues only when every detail process has reached a certain point in its flow or vice versa. 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. This activity calls a PL/SQL procedure named WF_STANDARD. See: SetItemParent: page 8 – 79.

Master Process Detail Process Note: You can include a Wait for Flow activity in a master process without using a Continue Flow activity in one or more of its corresponding detail process. An example of one of the detail processes below shows that after the detail process begins with the Start activity. The detail process itself then transitions to Activity B and finally ends. • Waiting Activity—specify the label of the activity node in the halted process that is waiting for this activity to complete. it signals to the Workflow Engine that the master process can now continue from the Wait For Flow activity. the Start Detail Flows activity initiates several detail processes. it completes Activity A. In the master process example. after the process begins with the Start activity. See: To Define Activity Attribute Values: page 5 – 17. The Workflow Engine Predefined Workflow Activities 6 – 13 . When it reaches the Continue 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. Example The following figures show an example of how these coordination activities can be used.Activity Attributes The Continue Flow activity contains two activity attributes: • Waiting Flow—specify whether the halted process that is waiting for this activity to complete is a ”Master” or ”Detail” flow. The master process then completes Activity 1 before it pauses at the Wait For Flow activity.

If it does not matter when any of the detail processes complete before a master process continues (or when a master process completes before all the detail processes continue).simply continues the master process as soon as all the other detail processes that do contain a Continue Flow activity complete the Continue Flow activity. then you simply omit both of the coordination activities from your master/detail processes. .

or Text Value activity attribute to specify the value that you want to assign to the item attribute. This activity calls the PL/SQL procedure named WF_STANDARD. 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.GETURL. Get Monitor URL Activity The Get Monitor URL activity generates the URL for the Workflow Monitor diagram window and stores it in an item attribute that you specify.ASSIGN. Numeric Value. The Assign activity lets you assign a value to an item attribute. If you set Administration Mode to 6 – 14 Oracle Workflow Guide . Use Item Attribute to choose the item attribute that you want to assign a value to. Activity Attributes The Assign activity has an activity attribute called Item Attribute. • Administration Mode—determine how the URL displays the Workflow Monitor window. Assign Activity Attention: If you include a Continue Flow activity in a process. you must also include a Wait for Flow activity in its corresponding master or detail process as defined by the activity attributes in the Continue Flow activity. This activity calls the PL/SQL procedure named WF_STANDARD. use the Date Value. Depending on the item attribute’s format type.

leave this attribute blank.” ”Send Date. Set Event Property Activity The Set Event Property activity lets you set the value of a property in an event message from the Business Event System. • Property—the event property whose value you want to retrieve. 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.” ”To Agent Name. enter the name of the parameter whose value you want to retrieve.” ”From Agent.” ”From Agent Name. Oracle Workflow uses this name to identify the parameter within the event message’s parameter list. otherwise it displays the Workflow Monitor in ’USER’ mode. If you choose any property other than Event Parameter.” See: Event Message Structure: page 8 – 242. This attribute takes as its value a lookup code from the Event Property lookup type.”Yes”. • Item Attribute—the item attribute where you want to store the event property value.GETEVENTPROPERTY. See: To Define Activity Attribute Values: page 5 – 17. • Event Parameter—if you choose the Event Parameter property in the Property attribute.” ”Event Parameter.” ”Receive Date. See: To Define Activity Attribute Values: page 5 – 17.” ”To Agent. Possible values are ”Priority.” ”Event Name. Get Event Property Activity The Get Event Property activity lets you retrieve a property of an event message from the Business Event System and store the property value in an item attribute. This activity calls the PL/SQL procedure named WF_STANDARD. the URL displays the Workflow Monitor in ’ADMIN’ mode.” ”Event Key.” ”Correlation ID. This activity calls Predefined Workflow Activities 6 – 15 .” and ”To Agent System.” ”From Agent System.

” ”To Agent.” ”Event Parameter. Possible values are ”Priority. Event Key. See: To Define Activity Attribute Values: page 5 – 17. • Property—the event property whose value you want to set. • Event Parameter—if you choose the Event Parameter property in the Property attribute. To Agent Name.” ”To Agent Name. Oracle Workflow uses this name to identify the parameter within the event message’s parameter list. • Text Value—the value of type text that you want to set for the event property. • Date Value—the value of type date that you want to set for the event property. enter the name of the parameter whose value you want to set.the PL/SQL procedure named WF_STANDARD.SETEVENTPROPERTY.” ”Event Name. Compare Event Property Activity The Compare Event Property activity lets you compare a property of an event message from the Business Event System with a test value that 6 – 16 Oracle Workflow Guide .” and ”To Agent System. if you choose the Correlation ID. if you choose the Send Date or Receive Date property. This attribute takes as its value a lookup code from the Event Property lookup type. If you choose any property other than Event Parameter.” ”From Agent System. leave this attribute blank. 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.” ”Send Date.” ”Event Key. From Agent Name. Event Name. • Numeric Value—the value of type number that you want to set for the event property. Note: You must enter the value to set in the activity attribute that matches the data type of the event property you choose. or To Agent System property. From Agent System.” ”From Agent Name.” ”From Agent.” ”Correlation ID.” ”Receive Date. Event Parameter. if you choose the Priority property.” See: Event Message Structure: page 8 – 242.

leave this attribute blank. This activity calls the PL/SQL procedure named WF_STANDARD. • Text Value—the test value of type text with which to compare the event property value. enter the name of the parameter whose value you want to compare to a test value. • Event Parameter—if you choose the Event Parameter property in the Property attribute. if you choose the Send Date or Receive Date property. See: To Define Activity Attribute Values: page 5 – 17. Oracle Workflow uses this name to identify the parameter within the event message’s parameter list.” ”From Agent.” ”Equal.” ”Event Key.” ”Event Name. 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.” ”Send Date. You can guide your workflow process based on how the event property value compares to the test value.” or ”Null. or To Agent System property.” ”To Agent Name.COMPAREEVENTPROPERTY. if you choose the Priority property.” ”Correlation ID. Note: You must enter the test value in the activity attribute that matches the data type of the event property you choose. If you choose any property other than Event Parameter. This attribute takes as its value a lookup code from the Event Property lookup type. From Agent Name. Event Parameter.” and ”To Agent System. • Property—the event property whose value you want to compare to a test value.” ”To Agent. If Predefined Workflow Activities 6 – 17 . • Date Value—the test value of type date with which to compare the event property value. • Numeric Value—the test value of type number with which to compare the event property value.you specify.” ”From Agent Name. if you choose the Correlation ID. To Agent Name. Event Name. Event Key.” See: Event Message Structure: page 8 – 242.” ”Less Than. Possible values are ”Greater Than. Possible values are ”Priority.” ”Event Parameter.” ”From Agent System. From Agent System. The Compare Event Property activity uses the Comparison lookup type for a result code.” if the test activity attribute value is null.” ”Receive Date.

You must then run a background engine to process the ’Inbound’ queue and complete the function activity. the Compare Event Property activity returns the ”Null” result code. which calls the appropriate Java function and places the result on the ’Inbound’ queue. For example. This functionality is currently only available for the standalone version of Oracle Workflow. Note: When the Workflow Engine encounters an external Java function activity. XML Get Tag Value Activity Use the XML Get Tag Value activity to retrieve data from the contents of an event message from the Business Event System. Specify the tag set in XPath notation. 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. The XML Get Tag Value activity calls the external Java function named oracle. you must run the Java Function Activity Agent.fnd. • Tag—the tag set within the event message from which you want to retrieve data. for an XML document containing a purchase order. it places an entry on the ’Outbound’ queue. See: Setting Up the Java Function Activity Agent: page 2 – 86 and Setting Up Background Engines: page 2 – 43.wf.” The notation // indicates that the 6 – 18 Oracle Workflow Guide . To continue executing the activity. the XML path for the order number tag could be specified in the following format: /order/header/ordernumber The following example path locates the ITEMNO node on the third line of the purchase order document: /order/orderlines/line[3]/itemno The following example path locates the COST node on the second line of the purchase order document whose currency attribute is set to ”AUD.apps. This activity retrieves the data contained within a particular XML tag set in the event message and stores the data in an item attribute that you specify.you enter the test value in an inappropriate activity attribute.XMLGetTagValue.

or text where you want to store the data. Use this activity to compare number values. The type of the item attribute must match the type of the data that you want to retrieve. To continue executing the activity. All the XML Compare Tag Value activities call the external Java function named oracle. These activities compare the data contained within a particular XML tag set in the event message with the test value that you specify.apps. This functionality is currently only available for the standalone version of Oracle Workflow. //line[2]/cost[@currency=”AUD”] For more information. You must then run a background engine to process the ’Inbound’ queue and complete the function activity. Predefined Workflow Activities 6 – 19 . Use this activity to compare text values. it places an entry on the ’Outbound’ queue.wf. number.fnd. you must run the Java Function Activity Agent. see the W3C Recommendation XML Path Language (XPath). Note: When the Workflow Engine encounters an external Java function activity. See: To Define Activity Attribute Values: page 5 – 17.specified node is located among the descendants of the root node. which calls the appropriate Java function and places the result on the ’Inbound’ queue. XML Compare Tag Value Activities Use the XML Compare Tag Value activities to compare data from an event message received through the Business Event System with a test value.XMLCompareTag. See: Setting Up the Java Function Activity Agent: page 2 – 86 and Setting Up Background Engines: page 2 – 43. XML Compare Tag Value (Date) XML Compare Tag Value (Number) XML Compare Tag Value (Text) Use this activity to compare date values. • Item Attribute—choose the item attribute of type date.

XSLTTransform. XML Transform Activity The XML Transform activity lets you apply an XML style sheet to the payload of an event message from the Business Event System. Possible values are ”Greater Than. for an XML document containing an order. The XML Compare Tag Value activities use the Comparison lookup type for a result code.” The notation // indicates that the specified node is located among the descendants of the root node. //line[2]/cost[@currency=”AUD”] For more information. • Tag—the tag set within the event message that contains the data you want to compare to a test value. This activity calls the external Java function named oracle.apps. 6 – 20 Oracle Workflow Guide .fnd. the XML path for the order number tag could be specified in the following format: /order/header/ordernumber The following example path locates the ITEMNO node on the third line of the purchase order document: /order/orderlines/line[3]/itemno The following example path locates the COST node on the second line of the purchase order document whose currency attribute is set to ”AUD. For example. The resulting document is stored in an item attribute of type event.Activity Attributes Each XML Compare Tag Value activity has three activity attributes: • Event—choose the item attribute of type event that contains the event message whose data you want to compare. • Value—the test value of type date. You can guide your workflow process based on how the event message data compares to the test value. number.” or ”Null.” ”Less Than. This functionality is currently only available for the standalone version of Oracle Workflow. See: To Define Activity Attribute Values: page 5 – 17.wf. Specify the tag set in XPath notation. see the W3C Recommendation XML Path Language (XPath).” ”Equal.” if the test activity attribute value is null. or text with which to compare the event message data.

Note: When the Workflow Engine encounters an external Java function activity. which calls the appropriate Java function and places the result on the ’Inbound’ queue. 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. See: Setting Up the Java Function Activity Agent: page 2 – 86 and Setting Up Background Engines: page 2 – 43. it places an entry on the ’Outbound’ queue. See: To Define Activity Attribute Values: page 5 – 17. you must run the Java Function Activity Agent. 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. • Stylesheet—a reference to the location of the style sheet that you want to apply. You must then run a background engine to process the ’Inbound’ queue and complete the function activity. Predefined Workflow Activities 6 – 21 . To continue executing the activity.

You should make sure all of these results are modelled into your process diagram. at which point it updates the status of the activity and returns execution of the workflow process to the background engine.wft located in the $FND_TOP/admin/import subdirectory. You can also access this item type from the file fndwfaol.Concurrent Manager Standard Activities Oracle Applications provides some generic activities you can use to control your process if you are using the version of Oracle Workflow embedded in Oracle Applications. The concurrent program can complete with any of the following results. or TERMINATED. Execute Concurrent Program Activity The Execute Concurrent Program activity is available only in the version of Oracle Workflow embedded in Oracle Applications. ERROR. CANCELLED. It submits an Oracle Applications concurrent program from your workflow process and waits for it to complete. as defined by the Concurrent Program Status lookup type: NORMAL. . WARNING. These activities are associated with the Concurrent Manager Functions item type but can be used within any process you define: • Execute Concurrent Program Activity • Submit Concurrent Program Activity • Wait for Concurrent Program Activity The Concurrent Manager Functions item type is automatically installed on your Oracle Applications workflow server.

.

Oracle Applications Developer’s Guide. for example. the context for your process’ item type is always set if your session is initiated from an Oracle Applications form. you must ensure that the context is set by calling FND_GLOBAL. See: Standard API for an Item Type Selector or Callback Function: page 7 – 13 and FNDSQF Routine APIs. However. Attention: To use the Execute Concurrent Program activity. resp_id.APPS_INITIALIZE(user_id. you must ensure that the background engine is set up to run. 6 – 22 Oracle Workflow Guide . if an interrupt occurs in your session. Attention: Generally. resp_appl_id) in SET_CTX mode in your Selector/Callback function. due to a notification or blocking activity.

The Execute Concurrent Program activity calls the standard Oracle Application Object Library API FND_WF_STANDARD. but you should only specify as many argument values as you define in the Number of Arguments activity attribute.EXECUTECONCPROGRAM. 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. Argument2. • Number of Arguments—Number of arguments required for the concurrent program. . It submits an Oracle Applications concurrent program from your workflow process. ordered to match the correct syntax of the concurrent program.Argument100—Value of each concurrent program argument. See: To Define Activity Attribute Values: page 5 – 17. the Workflow Engine continues with the next activity in the process. • Program Short Name—Short name of the concurrent program to run.. Submit Concurrent Program Activity The Submit Concurrent Program activity is available only in the version of Oracle Workflow embedded in Oracle Applications. but does not wait for it to execute or complete. Once this activity submits a concurrent request. • Item Attribute Name—Optional name of the item attribute to store the concurrent program request ID. • Argument1... Up to 100 arguments are allowed.

if an interrupt occurs in your session. resp_appl_id) in SET_CTX mode in your Selector/Callback function. you must ensure that the context is set by calling FND_GLOBAL.APPS_INITIALIZE(user_id. However. See: Standard API for an Item Type Selector or Callback Function: page 7 – 13. Attention: Generally. for example. resp_id. Predefined Workflow Activities 6 – 23 . due to a notification or blocking activity. the context for your process’ item type is always set if your session is initiated from an Oracle Applications form.

Up to 100 arguments are allowed. See: To Define Activity Attribute Values: page 5 – 17. but you should only specify as many argument values as you define in the Number of Arguments activity attribute. .The Submit Concurrent Program activity calls the standard Oracle Application Object Library API FND_WF_STANDARD. You should make sure all of these results are modelled into your process diagram. ordered to match the correct syntax of the concurrent program.. • Number of Arguments—Number of arguments required for the concurrent program. this activity clears the block by updating the status of the activity and returning execution of the workflow process to the background engine. Wait for Concurrent Program Activity The Wait for Concurrent Program activity is available only in the version of Oracle Workflow embedded in Oracle Applications. as defined by the Concurrent Program Status lookup type: NORMAL. If you submit a concurrent program from your workflow process. you can use the Wait for Concurrent Program activity as a means of blocking the process from further execution until the concurrent program completes. CANCELLED. or TERMINATED. WARNING. 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.. Argument2. When the concurrent program completes. • Argument1. ERROR. • Item Attribute Name—Name of the item attribute to store the concurrent program request ID.SUBMITCONCPROGRAM. • Program Short Name—Short name of the concurrent program to run.. The concurrent program can complete with any of the following results.Argument100—Value of each concurrent program argument.

6 – 24 Oracle Workflow Guide Attention: To use the Wait for Concurrent Program activity. . you must ensure that the background engine is set up to run.

See: To Define Activity Attribute Values: page 5 – 17.The Wait for Concurrent Program activity calls the standard Oracle Application Object Library API FND_WF_STANDARD. 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. Predefined Workflow Activities 6 – 25 .WAITFORCONCPROGRAM.

or event activity’s Details property page. and instead rely on the error to activate an error process. You specify the internal names of both the item type that owns the error handling process and the error handling process. that you cannot customize the error processes in the System: Error item type. you should create your own custom error handling process in your own item type. If you want to incorporate functionality that is not available in these error processes. Note: Rather than relying on an error process to handle errors due to specific business rule incompatibilities. you might model your process to send a notification to an appropriate role to correct that situation if it occurs. If you do not model this situation into your workflow process. the entire workflow 6 – 26 Oracle Workflow Guide . For example. function. you should try to model those situations into your workflow process definition. which contains three error processes that you can use for generic error handling in any of your processes. so that the workflow process can progress forward. Oracle Workflow provides a special item type called System: Error. if a function activity can potentially encounter an error because a business prerequisite is not met. Oracle Workflow permits you to specify an error handling process to execute if an error is detected in your current process. Note however. You indicate the error handling process in your process.Default Error Process At design time.

System: Error Item Type and Item Attributes To view the details of the System: Error item type. The System: Error item type contains the following item attributes: • Error Activity ID • Error Activity Label • Error Assigned User • Error Item Type • Error Item Key • Error User Key • Error Message • Error Name • Error Notification ID • Error Result Code • Error Stack • Error Monitor URL • Timeout Value • Event Name • Event Details • Event Message • Event Key • Event Data URL • Event Subscription • Error Type Predefined Workflow Activities 6 – 27 . then connect to the database and select the System: Error item type or connect to a file called wferror.process will have an ’Error’ status and will halt until a workflow administrator handles the error. choose Open from the File menu.wft in the <drive>:\<ORACLE_HOME>\wf\Data\<Language> subdirectory.

and event activities that make up the error processes called Default Error Process.These item attributes are referenced by the function. . notification. and Default Event Error Process. Retry–only.

such as in a message. if you want to reference these item attributes in your error handling process. or resolve the problem that caused the error to occur Although you cannot customize the Default Error Process. However. The purpose of this error handling process is to: • send an administrator a notification when an error occurs in a process • provide information to the administrator about the error • allow the administrator to abort the process. By defining two item type attributes called WF_ADMINISTRATOR and ERROR_TIMEOUT in your item type that calls the Default Error Process. Attention: If you create a custom error handling process in your own item type. Oracle Workflow creates them. you must first create them as item attributes in your process’s item type using Oracle Workflow Builder. If these item attributes do not already exist in your process. you can define who the error process sends the notification to and whether the error notification times out. 6 – 28 Oracle Workflow Guide . the process is flexible enough for you to customize its behavior. Oracle Workflow automatically sets the above item attributes when it calls your error handling process. retry the errored activity. respectively. Default Error Process DEFAULT_ERROR is the internal name of the Default Error Process.

to resolve any problems that arise from this workflow. it sets the performer of the subsequent notification activity. For example.’Initialize Error’ Function Activity The Initialize Error activity calls a PL/SQL procedure named WF_STANDARD.INITIALIZEERRORS. the subsequent notification activity remains set to the default performer. to the role stored in WF_ADMINISTRATOR. which may be PO_ADMIN. If it does not. ’Notify Administrator’ Notification Activity The Notify Administrator activity sends the Default Retry Error message to a performer (the System Administrator or whatever role is Predefined Workflow Activities 6 – 29 . You can define an item attribute called WF_ADMINISTRATOR in the item type that owns your requisition approval workflow and set WF_ADMINISTRATOR to the purchasing administrator’s role. If it does. not the system administrator. By checking for an item attribute called WF_ADMINISTRATOR in your errored process’s item type. the Initialize Error activity lets you specify who you want a notification to be sent to in the case of an error in your specific process without modifying the error process. suppose you have a requisition approval workflow and you want the purchasing administrator. This procedure determines if the item type of the errored process has an item type attribute defined with an internal name of WF_ADMINISTRATOR. Notify Administrator. System Administrator.

You can perform actions such as retrying. The subject and body of the Default Retry Error message are as follows: Subject: Error in Workflow &ERROR_ITEM_TYPE/&ERROR_ITEM_KEY &ERROR_MESSAGE Body: An Error occurred in the following Workflow. • Retry the process—executes the Error Still Active activity to verify if the error is still present and if it is. Item Type = &ERROR_ITEM_TYPE Item Key = &ERROR_ITEM_KEY User Key =&ERROR_USER_KEY Error Name = &ERROR_NAME Error Message = &ERROR_MESSAGE Error Stack = &ERROR_STACK 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 Notify Administrator notification activity has a dynamic timeout value assigned to it. Note: The notification message’s embedded monitor URL displays the process in error in the Workflow Monitor with full administrator privileges. skipping or rolling back part of your process to resolve the error.stored in your item type’s WF_ADMINISTRATOR item attribute). calls the Retry function activity and ends the default error process. • Resolved the process—ends the default error process because you addressed the errored process directly through some external means or using the embedded URL link to the Workflow Monitor. The response options and their resulting actions are: • Abort the process—executes the Error Still Active activity to verify if the error is still present and if it is. It checks the item type of the errored process for 6 – 30 Oracle Workflow Guide . calls the Abort function activity and ends the default error process. The message indicates that an error has occurred in the specified process and that a response is needed.

’Error Still Active’ Function Activity The Workflow Engine initiates the Error Still Active function activity if the Notify Administrator activity times out or returns Abort or Retry as a result. The Workflow Engine interprets the value of this attribute as a relative offset from the begin date of the activity. The Error Still Active activity calls a PL/SQL procedure called WF_STANDARD. ERROR_TIMEOUT must be an attribute of type NUMBER.AbortProcess API to abort the process that encountered the error.CHECKERRORACTIVE. If the errored process is no longer in error.an item type attribute whose internal name is ERROR_TIMEOUT.ABORTPROCESS. ’Retry’ Function Activity The Retry function activity executes the PL/SQL procedure WF_STANDARD.HandleError API to rerun the activity. See Also Workflow Core APIs: page 8 – 101 Predefined Workflow Activities 6 – 31 . then Notify Administrator has no timeout. This procedure calls the WF_ENGINE. ’Abort’ Function Activity The Abort function activity executes the PL/SQL procedure WF_STANDARD. The purpose of the Error Still Active activity is to determine whether the errored process is still in error before continuing with the error handling. a value of zero. as modelled in the process diagram. in the unit of MINUTES to determine the timeout value of Notify Administrator. If it is. or is not defined at all. which in turn calls the WF_ENGINE. If ERROR_TIMEOUT contains a null value.RESETERROR to clear the activity that was in error and run it again. Error Still Active returns TRUE and the Workflow Engine takes the appropriate transition to either send another notification or abort or retry the errored process. this activity returns False and the error handling process ends.

This procedure determines if the item type of the errored process has an item type attribute defined with an internal name of WF_ADMINISTRATOR. System Administrator. For example. You can define an item attribute called WF_ADMINISTRATOR in the item type that owns your requisition approval workflow and set 6 – 32 Oracle Workflow Guide . not the system administrator. ’Initialize Error’ Function Activity The Initialize Error activity calls a PL/SQL procedure named WF_STANDARD. If it does. By checking for an item attribute called WF_ADMINISTRATOR in your errored process’ item type. The purpose of this error handling process is to alert an administrator when an error occurs in a process and prompt the administrator to retry the process in error. the subsequent notification activity remains set to the default performer. suppose you have a requisition approval workflow and you want the purchasing administrator. to the role stored in WF_ADMINISTRATOR. If it does not. NTF with RETRY Only.Retry–only Process RETRY_ONLY is the internal name of the Retry–only error process. the Initialize Error activity lets you specify who you want a notification to be sent to in the case of an error in your specific process without modifying the error process.INITIALIZEERRORS. it sets the performer of the subsequent notification activity. to resolve any problems that arise from this workflow.

skipping or rolling back part of your process within the Workflow Monitor to resolve the error. You can perform actions such as retrying. The subject and body of the Retry As Only Option message are as follows: Subject: Error in Workflow &ERROR_ITEM_TYPE/&ERROR_ITEM_KEY &ERROR_MESSAGE Body: An Error occurred in the following Workflow. ERROR_TIMEOUT must be an attribute of type NUMBER.WF_ADMINISTRATOR to the purchasing administrator’s role. ’NTF with RETRY Only’ Notification Activity The NTF with RETRY Only activity sends the Retry As Only Option message to a performer (the System Administrator or whatever role is stored in your item type’s WF_ADMINISTRATOR item attribute). The Predefined Workflow Activities 6 – 33 . Note: The notification message’s embedded URL link displays the process in error in the Workflow Monitor with full administrator privileges. The message indicates that an error has occurred in the specified process and prompts the administrator to retry the activity that errored. The error process then transitions to the Retry function activity and ends the Retry–only error process. It checks the item type of the process in error for an item attribute that has an internal name called ERROR_TIMEOUT. which may be PO_ADMIN. Item Type = &ERROR_ITEM_TYPE Item Key = &ERROR_ITEM_KEY User Key =&ERROR_USER_KEY Error Name = &ERROR_NAME Error Message = &ERROR_MESSAGE Error Stack = &ERROR_STACK 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.

a value of zero.HandleError API to rerun the activity. This procedure calls the WF_ENGINE. or is not defined at all. Error Still Active returns TRUE and the Workflow Engine transitions back to the NTF with RETRY Only notification activity to send another notification to the administrator. If the errored process is no longer in error. ’Error Still Active’ Function Activity The Workflow Engine initiates the Error Still Active function activity if the NTF with RETRY Only activity times out. The purpose of the Error Still Active activity is to determine whether the errored process is still in error before continuing with the error handling.Workflow Engine interprets the timeout value of this attribute as a relative offset from the begin date of the activity. If it is. See Also Workflow Core APIs: page 8 – 101 Default Event Error Process DEFAULT_EVENT_ERROR is the internal name of the Default Event Error Process for the Business Event System.CHECKERRORACTIVE. The Error Still Active activity calls a PL/SQL procedure called WF_STANDARD. ’Retry’ Function Activity The Retry function activity executes the PL/SQL procedure WF_STANDARD. The purpose of this error handling process is to: • send an administrator a notification when an error or warning condition occurs during event subscription processing • provide information to the administrator about the error • allow the administrator to abort or retry the event subscription processing 6 – 34 Oracle Workflow Guide . then NTF with RETRY Only has no timeout. in the unit of MINUTES. as modelled in the process diagram. If ERROR_TIMEOUT contains a null value.RESETERROR to clear the activity that was in error and run it again. this activity returns False and the error handling process ends.

event key. the Workflow Engine sends the Event Warning Notification. For this error type. if a subscription rule function returns an ERROR or WARNING status code. or if an unexpected event is received. • Event Warning—A warning condition occurred. See: Predefined Workflow Events: page 14 – 2.’Receive Errored Queue Message’ Event Activity The Receive Errored Queue Message activity receives an event message that has encountered an error or warning condition during subscription processing. The Receive Errored Queue Message activity stores the event name.INITIALIZEEVENTERROR. ’Initialize Event Error’ Function Activity The Initialize Error activity calls a PL/SQL procedure named WF_STANDARD. • External Event Error—An error occurred to halt subscription processing for an event received from an external source. For instance. This procedure determines the error type. and the complete event message in item type attributes. For this Predefined Workflow Activities 6 – 35 . the Event Manager executes default subscriptions that send the event message to the Default Event Error process. but subscription processing continued.

This message is an FYI message and does not require a response. if the event data contained in an event message is corrupted. The activity sends the Default External Event Error message to the system administrator. This message indicates that an error has occurred during subscription processing for an event received from an external source.error type. • Local Event Error—An error occurred to halt subscription processing for an event raised on the local system. the Workflow Engine sends the External Event Error Notification. ’Event Warning Notification’ Activity The Workflow Engine initiates the Event Warning Notification activity when the errored event has an error type of Event Warning. For example. and that a response is needed. the Workflow Engine sends the Local Event Error Notification. The activity sends the Default Event Warning message to the system administrator to indicate that a warning condition has occurred during subscription processing. For this error type. the system administrator can abort subscription processing on that event message. 6 – 36 Oracle Workflow Guide . The response options and their resulting actions are: • Abort—aborts subscription processing and ends the Default Event Error process. The subject and body of the Default Event Warning message are as follows: Subject: Event WARNING : &EVENT_NAME / &EVENT_KEY Body: A Warning occurred in the following Event Subscription: &EVENT_SUBSCRIPTION Event Error Name: &ERROR_NAME Event Error Message: &ERROR_MESSAGE Event Error Stack: &ERROR_STACK Event Data: &EVENT_DATA_URL Other Event Details: &EVENT_DETAILS ’External Event Error Notification’ Activity The Workflow Engine initiates the External Event Error Notification activity when the errored event has an error type of External Event Error.

The subject and body of the Default External Event Error message are as follows: Subject: External Event &ERROR_TYPE : &EVENT_NAME / &EVENT_KEY Body: An Error occurred in the following Event Subscription: &EVENT_SUBSCRIPTION Event Error Name: &ERROR_NAME Event Error Message: &ERROR_MESSAGE Event Error Stack: &ERROR_STACK Event Data: &EVENT_DATA_URL Other Event Details: &EVENT_DETAILS ’Local Event Error Notification’ Activity The Workflow Engine initiates the Local Event Error Notification activity when the errored event has an error type of Local Event Error. • Raise Event with Event Key—executes the Retry Process Event activity to reraise the event with only the event name and event key. and ends the Default Event Error process. and ends the Default Event Error process. For example. and that a response is needed. • Raise Event with Event Key and Event Data—executes the Retry Process Event activity to reraise the event with only the event Predefined Workflow Activities 6 – 37 .• Enqueue Event—executes the Retry Process Event activity to enqueue the event message back onto the queue where it was originally received. This message indicates that an error has occurred during subscription processing for an event raised on the local system. The response options and their resulting actions are: • Abort—aborts subscription processing and ends the Default Event Error process. the system administrator can create a subscription to handle an unexpected event and then re–enqueue the event message to trigger the new subscription. The event message is enqueued with a priority of –1 so that it will be the first message to be dequeued the next time the listener runs. The activity sends the Default Local Event Error message to the system administrator. The system administrator can attempt to correct the error before re–enqueuing the event.

event data. • Raise Event with Event Key. and parameters. and ends the Default Event Error process. The subject and body of the Default Local Event Error message are as follows: Subject: Local Event &ERROR_TYPE : &EVENT_NAME / &EVENT_KEY Body: An Error occurred in the following Event Subscription: &EVENT_SUBSCRIPTION Event Error Name: &ERROR_NAME Event Error Message: &ERROR_MESSAGE Event Error Stack: &ERROR_STACK Event Data: &EVENT_DATA_URL Other Event Details: &EVENT_DETAILS ’Retry Process Event’ Function Activity The Retry Process Event activity executes the PL/SQL procedure WF_STANDARD. event key. Depending on the notification response selected by the system administrator. and event data. event key. The system administrator can also attempt to correct the error before reraising the event. this procedure either re–enqueues or reraises an errored event. forcing the Event Manager to regenerate the event data using the event’s Generate function. The event message is enqueued with a priority of –1 so that it will be the first message to be dequeued the next time the listener runs. 6 – 38 Oracle Workflow Guide .name. if an error exists in the event data that was originally provided. Event Data and Parameters— executes the Retry Process Event activity to reraise the event with the event name. The responses that can initiate the Retry Process Event activity and their resulting actions are: • Enqueue Event—enqueues an errored external event message back onto the queue where it was originally received. The system administrator can choose the level of information to provide to the Event Manager when reraising the event. the event can be reraised with only the event name and the event key.RETRYRAISE. For example. • Raise Event with Event Key—reraises a local errored event with only the event name and event key. and ends the Default Event Error process.

and event data. and parameters. event data.• Raise Event with Event Key and Event Data—reraises a local errored event with only the event name. event key. Event Data and Parameters— reraises a local errored event with the event name. • Raise Event with Event Key. See Also Workflow Core APIs: page 8 – 101 Managing Business Events: page 13 – 2 Predefined Workflow Activities 6 – 39 . event key.

6 – 40 Oracle Workflow Guide .

CHAPTER 7 Defining Procedures and Functions for Oracle Workflow his chapter describes the standard APIs to use for Oracle Workflow PL/SQL and Java procedures and functions. T Defining Procedures and Functions for Oracle Workflow 7–1 .

To ensure that Oracle Workflow can properly execute your custom code.Defining Procedures and Functions for Oracle Workflow Oracle Workflow lets you integrate your own custom PL/SQL and Java procedures and functions at certain points in your workflow processes and in the Business Event System. follow these standard APIs when developing your procedures and functions. • Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 • Standard API for Java Procedures Called by Function Activities: page 7 – 8 • Standard API for an Item Type Selector or Callback Function: page 7 – 13 • Standard APIs for ”PL/SQL” and ”PL/SQL CLOB” Document: page 7 – 17 • Standard API for an Event Data Generate Function: page 7 – 21 • Standard APIs for a Queue Handler: page 7 – 23 • Standard API for an Event Subscription Rule Function: page 7 – 25 7–2 Oracle Workflow Guide .

Standard API for PL/SQL Procedures Called by Function Activities All PL/SQL stored procedures that are called by function or notification activities in an Oracle Workflow process should follow this standard API format so that the Workflow Engine can properly execute the activity. .

Defining Procedures and Functions for Oracle Workflow 7–3 . you should never commit within the PL/SQL procedure of a function activity. return. and sets the activity to the ERROR status. For environments such as database triggers or distributed transactions that do not allow savepoints. The Workflow Engine never issues a commit as it is the responsibility of the calling application to commit. the engine performs a rollback to the savepoint. 1⇒ procedure <procedure name> (itemtype in varchar2. 5⇒ if ( funcmode = ’RESPOND’ ) then <your RESPOND executable statements> resultout := ’COMPLETE’. For this reason. The example in this section is numbered with the notation 1⇒ for easy referencing. If an activity produces an unhandled exception. itemkey in varchar2. return. the Workflow Engine automatically traps ”Savepoint not allowed” errors and defers the execution of the activity to the background engine. funcmode in varchar2. 4⇒ if ( funcmode = ’CANCEL’ ) then <your CANCEL executable statements> resultout := ’COMPLETE’. end if. Attention: The Workflow Engine traps errors produced by function activities by setting a savepoint before each function activity. end if. The numbers and arrows themselves are not part of the procedure. resultout out varchar2) is 2⇒ 3⇒ <local declarations> begin if ( funcmode = ’RUN’ ) then <your RUN executable statements> resultout := ’COMPLETE:<result>’. actid in number.

return. return.eng_timedout. 1⇒ When the Workflow Engine calls a stored procedure for a function activity. <itemkey>. 10⇒ exception when others then WF_CORE.CONTEXT (’<package name>’. 7–4 Oracle Workflow Guide . else resultout := wf_engine. 9⇒ if ( funcmode = ’<other funcmode>’ ) then resultout := ’ ’. Item types are defined in the Oracle Workflow Builder. end if. 8⇒ if ( funcmode = ’TIMEOUT’ ) then <your TIMEOUT executable statements> if (<condition_ok_to_proceed>) then resultout := ’COMPLETE’.return. return. <funcmode>). end if. raise. The string uniquely identifies the item within an item type. 6⇒ if ( funcmode = ’FORWARD’ ) then <your FORWARD executable statements> resultout := ’COMPLETE’. end if. end if. A string that represents a primary key generated by the workflow–enabled application for the item type. The parameters are defined here: itemtype itemkey The internal name for the item type. end if. 11⇒ end <procedure name>. end if. return. to_char(<actid>). it passes four parameters to the procedure and may expect a result when the procedure completes. ’<procedure name>’. 7⇒ if ( funcmode = ’TRANSFER’ ) then <your TRANSFER executable statements> resultout := ’COMPLETE’. <itemtype>.

wf_engine. DEFERRED:<date>—activity is deferred to a background engine for execution until a given date. then the mode can be ’RESPOND’. ’FORWARD’. The possible results are: COMPLETE:<result_code>—activity completes with the indicated result code. 2⇒ This section declares any local arguments that are used within the procedure. or ’RUN’. ’TIMEOUT’. 3⇒ The procedure body begins in this section with an IF statement. Note that the external entity must call CompleteActivity( ) to inform the Workflow Engine when the action completes. The result code must match one of the result codes specified in the result type of the function activity. with a post–notification function. The execution mode of the activity. waiting on another activity to complete before it completes. If the activity is a function activity.actid funcmode The ID number of the activity from which this procedure is called. the mode is either ’RUN’ or ’CANCEL’. ERROR:<error_code>—activity encounters an error and returns the indicated error code. This section contains one or more executable statements that run if the value of funcmode is ’RUN’. WAITING—activity is pending. If the activity is a notification activity. One of the executable statements can Defining Procedures and Functions for Oracle Workflow 7–5 . Other execution modes may be added in the future. An example is the Standard ’AND’ activity.date_format) resultout NOTIFIED:<notification_id>:<assigned_user>—a n external entity is notified that an action must be performed. this parameter represents the expected result that is returned when the procedure completes. A notification ID and an assigned user can optionally be returned with this result. If a result type is specified in the Activities properties page for the activity in the Oracle Workflow Builder. <date> must be of the format: to_char(<date_string>. ’TRANSFER’.

7⇒ This section is needed only for post–notification functions. Often. The RUN mode executable statements can perform processing such as vote tallying and determine what result to return for the notification activity. 5⇒ This section is needed only for post–notification functions. a result can be ’COMPLETE:APPROVED’. include execution statements that validate the role to which the notification is being transferred. 4⇒ This section clears the activity and can contain executable statements that run if the value of funcmode is ’CANCEL’. Use this section to include execution statements that run if the value of funcmode is ’FORWARD’. when a RESPOND operation is performed. include execution statements that validate the response of the notification. that is. this section contains no executable statements to simply return a null value. that is. Next. If the flag is set. See: Looping: page 8 – 10 and Loop Counter Activity: page 6 – 7. The first activity in a loop must always have the Loop Reset flag checked in the Activities properties Detail page. 7–6 Oracle Workflow Guide . that is. When the Workflow Engine encounters an activity that has already run. the Workflow Engine then runs the post–notification function again in RUN mode. the engine transitions through the loop in reverse order and executes each activity in ’CANCEL’ mode to clear all prior results for the activities so they can run again. For example. After the Notification System completes execution of the post–notification function in RESPOND mode. it verifies whether the activity’s Loop Reset flag is set. 6⇒ This section is needed only for post–notification functions. Use this section to include execution statements that run if the value of funcmode is ’TRANSFER’. See: Post–notification functions: page 8 – 13. the engine then identifies the activities that belong in that loop and sets funcmode to ’CANCEL’ for those activities. For example. when a notification’s state changes to ’FORWARD’. but this section also provides you with the chance to ’undo’ something if necessary. Use this section to include execution statements that run if the value of funcmode is ’RESPOND’. include execution statements that validate the role to which the notification is being forwarded. For example. Note: The Workflow Engine automatically runs a post–notification function in RUN mode after the Notification System completes execution of the post–notification function in RESPOND mode. An activity can have a funcmode of ’CANCEL’ in the special case where the activity is part of a loop that is being revisited. when a notification’s state changes to ’TRANSFER’. For example.return a result for the procedure.

it should simply return null. if a Voting activity times out before all recipients respond. or ’TIMEOUT’. Model any subsequent behavior in your process diagram using a <Timeout> transition to another activity. and ’TRANSFER’ funcmodes. – Raise an exception directly in your procedure with a more informative error message. For example. Forward or Transfer operation to occur after having executed your post–notification function. ’FORWARD’. except if the returned value looks something like ’ERROR%’.eng_timedout if the workflow cannot proceed normally. if you do not want the Respond. ’RESPOND’. 9⇒ This section handles execution modes other than ’RUN’. Since your activity does not need to implement any of these other possible modes. Use this section to include execution statements that run if a notification activity times out. 10⇒ This section calls WF_CORE. you can include logic that determines how to interpret the responses based on the current response pool and completes the activity with the appropriate result. ’FORWARD’. See: Post–notification Functions: page 8 – 13 and Notification Model: 8 – 192 8⇒ This section is needed only for post–notification functions. You can include logic to test whether the workflow can proceed normally. the resultout parameter is ignored. and if so.CONTEXT( ) if an exception occurs. Defining Procedures and Functions for Oracle Workflow 7–7 . Therefore. See: CONTEXT: page 8 – 108. to complete the activity so that the workflow can continue to the next activity. ’TRANSFER’. ’CANCEL’. so that you can include context information in the error stack to help you locate the source of an error.Note: For ’RESPOND’. you can do one of two things: – Return ’ERROR:<errcode>’ in the resultout parameter to convert it to a generic exception with the errcode mentioned in the message. Other execution modes may be added in the future. The Workflow Engine will follow the <Timeout> transition when the result wf_engine.eng_timedout is returned. You should also include logic to return a result of wf_engine.

Standard API for Java Procedures Called by Function Activities You can create custom Java classes to be called by external Java function activities in an Oracle Workflow process. Java procedures that are called by function activities are implemented as classes that extend the WFFunctionAPI class. . This functionality is currently only available for the standalone version of Oracle Workflow. The custom Java classes should follow a standard API format so that they can be properly executed by the Oracle Workflow Java Function Activity Agent.

the Java Function Activity Agent enqueues the results onto the ’Inbound’ queue. 7–8 Oracle Workflow Guide . create an external Java function activity that calls the class. just as with PL/SQL procedures. For this reason. and sets the activity to the ERROR status. When the Java procedure is complete. The WFFunctionAPI and WFAttribute classes also contain methods that your Java program can call to access item type and activity attributes. The Java Function Activity Agent monitors this queue and calls the class indicated in the Function Name property for the function activity. If an activity produces an unhandled exception. Attention: The Workflow Engine traps errors produced by function activities by setting a savepoint before each function activity. the Workflow Engine places a message on the Workflow ’Outbound’ queue. Note: These ’Outbound’ and ’Inbound’ queues are separate from the queues used for the Business Event System. Workflow Function APIs: page 8 – 82. this function processing will be implemented within the Business Event System using a specialized queue handler to handle dequeue and enqueue operations. See: Setting Up the Java Function Activity Agent: page 2 – 86. To invoke a custom Java class from within a workflow process. Java function activities are implemented as external procedures. When the Workflow Engine reaches an external Java function activity. See: Oracle Workflow Java Interface: page 8 – 5. and Workflow Attribute APIs: page 8 – 90. In a future release. See: Workflow Queue APIs: page 8 – 162. See: To Create a Function Activity: page 4 – 50. The Workflow Engine never issues a commit as it is the responsibility of the calling application to commit. the engine performs a rollback to the savepoint. you should never commit within the Java procedure of a function activity. Many Workflow Engine and Notification APIs have corresponding Java methods that your Java program can call to communicate with Oracle Workflow.

jdbc.BigDecimal. 1⇒ 2⇒ package oracle.wf. import oracle. the activity will remain in the DEFERRED status.*. import oracle.common. You must include the JAR files containing your custom classes in your CLASSPATH to make the classes accessible to the Java Function Activity Agent.wf. import oracle. The numbers and arrows themselves are not part of the procedure. See: Setting Up Background Engines: page 2 – 43.sql. lIAttr = getItemAttr(”IATTR”).driver.apps. Otherwise. import java.apps.io.*.*.getWFErrorStack(). The example in this section is numbered with the notation 1⇒ for easy referencing.apps.After a Java procedure completes.fnd.*. itemType. actID). 3⇒ 4⇒ 5⇒ public class className extends WFFunctionAPI { public boolean execute(WFContext pWCtx){ ErrorStack es = pWCtx. itemKey. loadItemAttributes(pWCtx).*.sql.fnd. import java. try { 6⇒ WFAttribute lAAttr = new WFAttribute(). 8⇒ lAAttr = getActivityAttr(”AATTR”). 7⇒ loadActivityAttributes(pWCtx.*.fnd. you must run a background engine to process the ’Inbound’ queue and complete the function activity.fnd. import oracle. 9⇒ <your executable statements> Defining Procedures and Functions for Oracle Workflow 7–9 .apps.*. import java.wf. however. The custom class files should reside on the same platform where the Java Function Activity Agent is run. WFAttribute lIAttr = new WFAttribute().engine.math. import oracle. The Java Function Activity Agent does not need to reside on the same tier as the database.

return false.addToken(”MODULE”.toString()). es. es. 1⇒ By default.getMessage()). 11⇒ } catch (Exception e) { es. es.apps. 2⇒ For correct operation. This section is optional. The contents of the errorStack variable can be set by using the ErrorStack class within the WFContext class. setItemAttrValue(pWCtx. then the activity status will be set to ERROR. lIAttr).addToken(”ITEMKEY”. es. They are initialized prior to the call of the boolean execute() method.10⇒ lIAttr.fnd.addToken(”FUNCMODE”. The parameters that are normally supplied to a PL/SQL function activity are available to the custom class as class variables.addToken(”ITEMTYPE”.addToken(”ACTID”. 7 – 10 Oracle Workflow Guide . you must include the listed packages. Java classes supplied by Oracle Workflow will be in the oracle. The resultOut and the errorStack are then passed back to the Oracle Workflow Engine.wf package.this.”WF_FN_ERROR”).getName()).funcMode).itemKey).actID. } 12⇒ } } return true. The predefined class variables include: itemType The internal name for the item type. es.getClass(). This class provides class variables and methods that are essential to the operation of your function activity.e.value((Object)”NEWVALUE”). es. The status of the completed activity will be set to COMPLETE unless a value is present in the errorStack variable.addToken(”ERRMESSAGE”. Refer also to sections 5 and 11 of this API for catching exceptions. Item types are defined in the Oracle Workflow Builder.itemType). If there is a value in this variable. 3⇒ The custom Java class must extend the WFFunctionAPI class.addMessage(”WF”.

If you have not explicitly loaded the values of the attributes. Refer also to section 11 of this API for catching exceptions. they will be automatically loaded at this point. The string uniquely identifies the item within an item type. The values can be loaded explicitly with the void loadItemAttributes(WFContext) or the void loadActivityAttributes(WFContext) methods. Defining Procedures and Functions for Oracle Workflow 7 – 11 . ActID funcMode resultOut Note: Unlike the resultout for a PL/SQL procedure called by a function activity. only the result type value is required. The values are also loaded implicitly when you call the WFAttribute getItemAttr(String) or WFAttribute getActivityAttr(String) methods. this parameter represents the expected result that is returned when the procedure completes. Currently the only supported mode for external Java function activities is the ’RUN’ mode. The execution mode of the activity. On successful completion. If a result type is specified in the Activities properties page for the activity in the Oracle Workflow Builder. a WFAttribute class is provided. the resultOut for a Java procedure does not include a status code. 6⇒ To access item and activity attributes. This section is optional. 8⇒ The actual values of the item and activity attributes are accessed via the WFAttribute getItemAttr(String) and WFAttribute getActivityAttr(String) methods. In the Java API. 4⇒ The custom Java class must implement the boolean execute() method. 7⇒ The values of the item attributes are not automatically available to the Java class. They are loaded on demand. The status of the activity will be set automatically by the Workflow Engine depending on whether there is a value in the errorStack variable. This will be the main entry point for your Java class. this method should return true. The ID number of the activity from which this procedure is called.itemKey A string that represents a primary key generated by the workflow–enabled application for the item type. 5⇒ It is important to catch exceptions with your custom Java class and pass them back to the engine via the ErrorStack class.

11⇒ It is important to catch exceptions within your custom Java class and pass them back to the engine via the ErrorStack class. 12⇒ A successfully executed external Java function activity will return true. you add these executable statements after retrieving the required item and activity attribute details (section 8) and before setting item attribute values (section 10). WFAttribute) method writes the value of your local WFAttribute to the database. Usually. An unsuccessful execution of the external Java function activity will return false. Note that any message in the WFContext.9⇒ This section contains your own executable statements.value(Object) method.wErrorStack class variable will be passed back to the Workflow Engine and will cause the activity to be assigned a completion status of ERROR. You need to set the values of the WFAttribute class with the WFAttribute. 7 – 12 Oracle Workflow Guide . 10⇒ Setting the value of an item attribute with the void setItemAttrValue(WFContext.

• SET_CTX—to establish any context information for an item type and item key combination that a function activity in the item type needs in order to execute. the selector/callback function in TEST_CTX mode lets you check if a form can be launched with the current context information just before the Notification Details web page launches a reference form. This section is numbered with the notation 1⇒ for easy referencing. resultout in out varchar2) is Defining Procedures and Functions for Oracle Workflow 7 – 13 . item_key in varchar2.CreateProcess. For example.CompleteActivity with no prior call to WF_ENGINE. You can define one PL/SQL procedure that includes both selector and callback functionality by following a standard API. you can define a single function that operates as both a selector and a callback function. See: To View the Details of a Notification: page 10 – 19. 1⇒ procedure <procedure name> (item_type in varchar2. command in varchar2.Standard API for an Item Type Selector or Callback Function For any given item type. – A process is implicitly started by WF_ENGINE. The standard API for the selector/callback function is as follows. A selector function is a PL/SQL procedure that automatically identifies the specific process definition to execute when a workflow is initiated for a particular item type but no process name is provided. the form cannot be launched and a message is displayed to that effect. Oracle Workflow also supports using a callback function to reset or test item type context information. If the context is incorrect. to ensure that the correct context information is always set. • TEST_CTX—to determine if the current item type context information is correct before executing a function. The Workflow Engine calls the selector/callback function with this command each time it encounters a new item type and item key combination.CreateProcess. activity_id in number. The numbers and arrows themselves are not part of the procedure. Oracle Workflow can call the selector/callback function with the following commands: • RUN—to select the appropriate process to start when either of the following two conditions occur: – A process is not explicitly passed to WF_ENGINE.

CONTEXT (’<package name>’. end if. ’<procedure name>’. 1⇒ When the Workflow Engine calls the selector/callback function. 5⇒ if ( command = ’TEST_CTX’ ) then <your executable statements for testing the validity of the current context information> resultout := ’<TRUE or FALSE> ’.2⇒ 3⇒ <local declarations> begin if ( command = ’RUN’ ) then <your RUN executable statements> resultout := ’<Name of process to run>’. <command>). The ID number of the activity that this procedure is called from. A string that represents a primary key generated by the workflow–enabled application for the item type. end if. return. 6⇒ if ( command = ’<other command>’ ) then resultout := ’ ’. raise. 4⇒ if ( command = ’SET_CTX’ ) then <your executable statements for establishing context information> return. Item types are defined in the Oracle Workflow Builder. actid 7 – 14 Oracle Workflow Guide . to_char(<actid>). <itemkey>. Note that this parameter is always null if the procedure is called with the ’RUN’ command to execute the selector functionality. end if. 8⇒ end <procedure name>. end if. return. <itemtype>. 7⇒ exception when others then WF_CORE. The string uniquely identifies the item within an item type. return. it passes four parameters to the procedure and may expect a result when the procedure completes. The parameters are defined here: itemtype itemkey The internal name for the item type.

this callback functionality executes when the Notification Details web page is just about to launch a reference form. For example. or ’TEST_CTX’. resultout 2⇒ This section declares any local arguments that are used within the procedure. Defining Procedures and Functions for Oracle Workflow 7 – 15 . the name of the process to run must be returned through the resultout parameter. If the function is called with ’SET_CTX’. 4⇒ This section contains one or more executable statements that set item type context information if the value of command is ’SET_CTX’. For example. Oracle Workflow assumes that this command is not implemented by the callback. One of the executable statements should return a result for the procedure that reflects the process to run. 5⇒ This section contains one or more executable statements that validate item type context information if the value of command is ’TEST_CTX’. It executes if the value of command is ’RUN’. before executing any function activities for that combination. If the function is called with ’TEST_CTX’. 3⇒ The procedure body begins in this section with an IF statement.command The command that determines how to execute the selector/callback function. A result may be returned depending on the command that is used to call the selector/callback function. If the function is called with ’RUN’. ’SET_CTX’. The Workflow Engine calls the selector/callback function with this command to validate that the current database session context is acceptable before the Workflow Engine executes an activity. The Workflow Engine calls the selector/callback function with this command each time it encounters a new item type and item key combination. Either ’RUN’. For example. then no return value is expected. Other commands may be added in the future. If any other value is returned. which is the name of a process activity. This command is useful when you need to set item type context information in a database session before the activities in that session can execute as intended. The code in this section should return ’TRUE’ if the context is correct. a result can be ’REQUISITION_APPROVAL’. then the code must return ’TRUE’ if the context is correct or ’FALSE’ if the context is incorrect. you might need to set up the responsibility and organization context for function activities that are sensitive to multi–organization data. This section contains one or more executable statements that make up your selector function.

CONTEXT( ) if an exception occurs. If the context is incorrect. See: CONTEXT: page 8 – 108. 6⇒ This section handles execution modes other than ’RUN’.and ’FALSE’ if the context is incorrect. The raised exception is also printed in an error message in the form. Since your function does not need to implement any of these other possible commands. it should simply return null. ’SET_CTX’ or ’TEST_CTX’ as others may be added in the future. you can raise an exception and place a message in the WF_CORE error system to indicate the reason the context is invalid. so that you can include context information in the error stack to help you locate the source of an error. 7⇒ This section calls WF_CORE. 7 – 16 Oracle Workflow Guide .

<procedure> should be replaced with the PL/SQL package and procedure name in the form of package. document in out varchar2. display_type in varchar2. ”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. For example: plsql:po_wf. The PL/SQL procedures that generate PL/SQL and PL/SQL CLOB documents must follow standard API formats.procedure. You can embed a PL/SQL document–type message attribute in a message body to display the document in a notification. create another item attribute. Oracle Workflow supports document types called ”PL/SQL” documents and ”PL/SQL CLOB” documents. document_type in out varchar2) The arguments for the procedure are as follows: document_id A string that uniquely identifies a document. The argument string should identify the document. and Defining Procedures and Functions for Oracle Workflow 7 – 17 . while a PL/SQL CLOB document represents data as a character large object (CLOB). If you wish to generate the PL/SQL argument string value dynamically. This is the same string as the value that you specify in the default value field of the Attribute property page for a ”PL/SQL” document (plsql:<procedure>/<document_identifier>). A PL/SQL document represents data as a character string.Standard APIs for ”PL/SQL” and ”PL/SQL CLOB” Documents You can integrate a document into a workflow process by defining an attribute of type document for an item type. or activity. The document–type attribute that you create tells Oracle Workflow how to construct a dynamic call to a PL/SQL procedure that generates the document. The phrase <document_identifier> should be replaced with the PL/SQL argument string that you want to pass directly to the procedure.show_req/2034. message.

some of the plain text document that the procedure generates may get truncated.show_req/&POREQ_NUMBER. Then before any activity that references this other item attribute gets executed. but should not include top level HTML tags like <HTML> or <BODY> since the HTML page that the document is being inserted into already contains these tags. text/html—the document is embedded inside an HTML representation of the notification as viewed from the Notification Web page. document document_type The outbound text buffer where up to 32K of document text is returned. Also referred to as the 7 – 18 Oracle Workflow Guide . display_type One of three values that represents the content type used for the notification presentation.SetItemAttribute API to dynamically set the PL/SQL argument string value. call the WF_ENGINE. so depending on how large your e–mail template is. or the HTML attachment to an e–mail message. If you include top level HTML tags accidentally.reference that item attribute as ”&ITEM_ATTRIBUTE” in place of the PL/SQL argument string. The outbound text buffer where the document content type is returned. Oracle Workflow removes the tags for you when the document attribute is referenced in a message body. For example: plsql:po_wf. The procedure must generate a HTML representation of the document of up to 32K. as the notification system can automatically surround plain text with the appropriate HTML tags to preserve formatting. The entire e–mail message must be less than or equal to 32K. See: Modifying Your Message Templates: page 2 – 69. also referred to as the requested type: text/plain—the document is embedded inside a plain text representation of the notification as viewed from an e–mail message. Any content type may be returned. Note that the procedure can alternatively generate a plain text document. ’ ’—the document is presented as a separate attachment to the notification.

call the WF_ENGINE. If no type is supplied.returned type. This is the same string as the value that you specify in the default value field of the Attribute property page for a ”PL/SQL CLOB” document (plsqlclob:<procedure>/<document_identifier>). See Also To Define a Document Attribute: page 4 – 14 ”PL/SQL CLOB” Documents The PL/SQL procedure that generates a PL/SQL CLOB document must have the following standard API: procedure <procedure name> (document_id in varchar2. document_type in out varchar2) The arguments for the procedure are as follows: document_id A string that uniquely identifies a document. <procedure> should be replaced with the PL/SQL package and procedure name in the form of package. and reference that item attribute as ”&ITEM_ATTRIBUTE” in place of the PL/SQL argument string.show_req_clob/2036. The argument string should identify the document. Then before any activity that references this other item attribute gets executed. If you wish to generate the PL/SQL argument string value dynamically. For example: plsqlclob:po_wf. create another item attribute. display_type in varchar2.show_req_clob/&POREQ_NUMBER. The phrase <document_identifier> should be replaced with the PL/SQL argument string that you want to pass directly to the procedure.SetItemAttribute API to dynamically set the PL/SQL argument string value.procedure. document in out clob. For example: plsqlclob:po_wf. then ’text/plain’ is assumed. Defining Procedures and Functions for Oracle Workflow 7 – 19 .

WriteToClob() to help build the CLOB by appending a string of character data to it. ’ ’—the document is presented as a separate attachment to the notification. Note: You can call WF_NOTIFICATION. If you include top level HTML tags accidentally. Also referred to as the returned type. See: WriteToClob: page 8 – 234. text/html—the document is embedded inside an HTML representation of the notification as viewed from the Notification Web page. If no type is supplied. The outbound text buffer where the document content type is returned. Note that the procedure can alternatively generate a plain text document. also referred to as the requested type: text/plain—the document is embedded inside a plain text representation of the notification. The procedure must generate a HTML representation of the document. as the notification system can automatically surround plain text with the appropriate HTML tags to preserve formatting. Any content type may be returned. document document_type The outbound text buffer where the document text is returned. but should not include top level HTML tags like <HTML> or <BODY> since the HTML page that the document is being inserted into already contains these tags.display_type One of three values that represents the content type used for the notification presentation. See Also To Define a Document Attribute: page 4 – 14 7 – 20 Oracle Workflow Guide . then ’text/plain’ is assumed. Oracle Workflow removes the tags for you when the document attribute is referenced in a message body.

you can assign the event a Generate function that can produce the complete event data from the event name. Note: If the event data is required but no Generate function is defined for the event. p_event_key in varchar2 p_parameter_list in wf_parameter_list_t default null) return clob. and an optional parameter list. The event key uniquely identifies a specific instance of the event. the Event Manager checks each subscription before executing it to determine whether the subscription requires the event data. p_parameter_list Defining Procedures and Functions for Oracle Workflow 7 – 21 . A string generated when the event occurs within a program or application. The arguments for the function are as follows: p_event_name p_event_key The internal name of the event. The PL/SQL function that generates the event data must have the following standard API: function <function_name> (p_event_name in varchar2.Standard API for an Event Data Generate Function When you define an event in the Business Event System. you can defer all the subscriptions that require the complete event data. Then the Event Manager will not run the Generate function until those subscriptions are executed at a later time. The event data gives additional details to describe what occurred and can be structured as an XML document. An optional list of additional parameter name and value pairs for the event. See: Deferred Subscription Processing: page 13 – 41. the Event Manager calls the Generate function for the event to produce the event data. The Generate function returns the event data in character large object (CLOB) format. and you want to return control to the calling application more quickly after raising the event. If the event data is required but is not already provided. Oracle Workflow creates a default set of event data using the event name and event key. Note: If the Generate function is costly. When an event is raised locally. event key. You should specify a Generate function if the application that raises the event will not produce the event data itself.

See Also To Define an Event: page 13 – 5 To Define an Event Subscription: page 13 – 45 Parameter List Structure: page 8 – 241 7 – 22 Oracle Workflow Guide .

When an event message is being sent. Additionally. Oracle Workflow provides two standard queue handlers for queues that use the WF_EVENT_T format. The Enqueue procedure transforms the event message’s header information if necessary to enqueue the message in the format required by the queue. Defining Procedures and Functions for Oracle Workflow 7 – 23 . the event message is enqueued on the From Agent specified within the message. you must provide the following standard APIs in your package: • Enqueue() • Dequeue() See Also Event Message Structure: page 8 – 242 Agents: page 13 – 22 Setting Up the WF_EVENT_OMB_QH Queue Handler: page 2 – 100 Enqueue The Enqueue procedure in a queue handler package must enqueue an event message onto a queue associated with an outbound agent. WF_EVENT_QH for normal processing and WF_ERROR_QH for error queues. The queue handler is a package that translates between the standard Workflow event message format defined by the WF_EVENT_T datatype and the message format required by the queue associated with the agent.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. Otherwise. If you create a custom queue handler. you must assign the agent a queue handler. You can optionally specify an override agent where you want to enqueue the event message. you can create your own custom queue handlers for queues that use other formats. the generic WF_EVENT. Oracle Workflow also provides a standard queue handler named WF_EVENT_OMB_QH which you can set up and use if you implement Oracle Message Broker in Oracle8i to propagate event messages between systems.Standard APIs for a Queue Handler When you define an agent in the Business Event System.

The outbound agent on whose queue the event message should be enqueued. The event message. selecting the message to dequeue by the message priority. p_event 7 – 24 Oracle Workflow Guide . When an event message is being received. The procedure transforms the event message’s header information if necessary and returns the event message in the standard WF_EVENT_T structure. The arguments for the procedure are as follows: p_agent_guid The globally unique identifier of the inbound agent from whose queue the event message should be dequeued. The PL/SQL Dequeue procedure must have the following standard API: procedure dequeue (p_agent_guid in raw. The arguments for the procedure are as follows: p_event p_out_agent_ override The event message.The PL/SQL Enqueue procedure must have the following standard API: procedure enqueue (p_event in WF_EVENT_T. p_out_agent_override in WF_AGENT_T). Dequeue The Dequeue procedure in a queue handler package must dequeue an event message from the queue associated with the specified inbound agent. the WF_EVENT. the Dequeue procedure can set the date and time when the message is dequeued into the RECEIVE_DATE attribute of the event message. Additionally. p_event out WF_EVENT_T).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.

A rule function may read from or write to the event message or perform any other database action. you should never commit within a rule function. The default rule function includes the following actions: • Sending the event message to a workflow process. either by calling this function within your custom rule function or by defining another subscription that uses Defining Procedures and Functions for Oracle Workflow 7 – 25 . Note: If your rule function writes to the event message. including security and NLS settings.AddCorrelation to add a correlation ID to the event message. you can use WF_EVENT_FUNCTIONS_PKG. If you want to specify a different correlation ID. the Event Manager uses the event key as the correlation ID for the event message when no other correlation ID is specified. if specified in the subscription definition See: Default_Rule: page 8 – 281. any subsequent subscriptions executed on the event will access the changed message.Standard API for an Event Subscription Rule Function When you define an event subscription. However. the rule function must not change the connection context in any way. See: Event Subscription Rule APIs: page 8 – 279. you may find it advantageous to define multiple subscriptions to the event with simple rule functions that you can reuse. If the subscription processing that you want to perform for an event includes several successive steps. you can choose to run a PL/SQL function called a rule function on the event message. You can extend your subscription processing by creating custom rule functions. This function is executed by default if no other rule function is specified for the subscription. The Event Manager never issues a commit as it is the responsibility of the calling application to commit. Oracle Workflow provides a standard default rule function to perform basic subscription processing. rather than creating complex specialized rule functions that cannot be reused. Oracle Workflow also provides some standard rule functions that you can use for testing and debugging or other purposes. if specified in the subscription definition • Sending the event message to an agent. Custom rule functions must be defined according to a standard API. Additionally. You can enter phase values for the subscriptions to specify the order in which they should be executed. By default.

• Call WF_ENGINE.CONTEXT(’<package name>’. p_event in out WF_EVENT_T) return varchar2 is <local declarations> begin <your executable statements> <optional code for WARNING> WF_CORE.WF_EVENT_FUNCTIONS_PKG.setErrorInfo(p_event. WF_EVENT.AddCorrelation as its rule function. If you want to send the event message to a workflow process or to an agent after running custom code on the message. you must either include the send processing in your rule function. you can define the workflow item type. 7 – 26 Oracle Workflow Guide . The standard API for a rule function is as follows. return ’ERROR’. as well as defining the rule function. you must explicitly include the send processing in your custom rule function if you want to send the event from the same subscription. to agent. but if you do not use the default rule function. ’ERROR’).getEventName( ).setErrorInfo(p_event. 1⇒ 2⇒ 3⇒ 4⇒ function <function_name> (p_subscription_guid in raw. ’<function name>’. priority. Note: When you define a subscription in the Event Manager. p_event. p_event.Default_Rule() to include the default subscription processing that can send the event message both to a workflow process and to an agent. return ’WARNING’. Any rule function can access these send attributes. See: AddCorrelation: page 8 – 294. exception when others then WF_CORE. The numbers and arrows themselves are not part of the procedure. p_subscription_guid). WF_EVENT. or define a separate subscription that uses the default rule function to perform the send processing. • Call WF_EVENT. ’<function name>’. workflow process name.getEventName( ). This section is numbered with the notation 1⇒ for easy referencing.Send() to send the event message to an agent.Event() to send the event message to a workflow process.CONTEXT(’<package name>’. • Call WF_RULE. 5⇒ 6⇒ return ’SUCCESS’. and parameters for your send processing. ’WARNING’). out agent. p_subscription_guid).

2⇒ This section declares any local arguments that are used within the function. See: CONTEXT: page 8 – 108. so that you can include context information in the error stack to help you locate the source of an error. The parameters are defined here: p_subscription_ guid p_event The globally unique identifier for the subscription. Defining Procedures and Functions for Oracle Workflow 7 – 27 . The rule function reports a warning message using the Workflow Core error APIs and sets the warning information into the event message.CONTEXT( ) if an exception occurs. 4⇒ This optional section calls WF_CORE. but subscription processing continues. 6⇒ This section calls WF_CORE. The rule function reports an error message using the Workflow Core error APIs and sets the error information into the event message.CONTEXT( ) if a warning condition occurs. The Event Manager halts subscription processing for this event.7⇒ end. The event message. and places the event message on the WF_ERROR queue. it passes two parameters to the function and expects a return code when the function completes. See: CONTEXT: page 8 – 108. It also sets the error information into the event message and returns the status code ’ERROR’. 1⇒ When the Event Manager calls the rule function. 5⇒ This section returns the status code ’SUCCESS’ when the rule function’s normal processing completes successfully. so that you can include context information in the error stack to help you locate the source of an error. The Event Manager places a copy of the event message on the WF_ERROR queue. • WARNING—A warning condition occurred. rolls back any subscriptions already executed for the event. 3⇒ The procedure body begins in this section with one or more executable statements that make up your rule function. It also sets the warning information into the event message and returns the status code ’WARNING’. • ERROR—An error occurred. The function must return one of the following status codes: • SUCCESS—The rule function completed successfully.

Note: If you raise an exception in the rule function. In this case the event message is not placed on the WF_ERROR queue. See Also To Define an Event Subscription: page 13 – 45 Event Message Structure: page 8 – 242 Workflow Core APIs: page 8 – 101 Event Subscription Rule APIs: page 8 – 279 Event(): page 8 – 75 Send(): page 8 – 265 Default_Rule(): page 8 – 281 SetErrorInfo(): page 8 – 273 7 – 28 Oracle Workflow Guide . the Event Manager rolls back all subscription processing for the event and raises the error to the calling application.

the Business Event System. T Oracle Workflow APIs 8–1 . the Notification System. and workflow data. The APIs consist of views and PL/SQL and Java functions and procedures that you can use to access the Workflow Engine.CHAPTER 8 Oracle Workflow APIs his chapter describes the APIs for Oracle Workflow.

Oracle Workflow Procedures and Functions Oracle Workflow supplies a list of public PL/SQL and Java procedures and functions that you can use to set up a workflow process. They are grouped within the following packages and classes: • WF_ENGINE: page 8 – 19 • WFFunctionAPI: page 8 – 82 • WFAttribute: page 8 – 90 • WF_CORE: page 8 – 101 • WF_PURGE: page 8 – 111 • WF_DIRECTORY: page 8 – 121 • WF_LDAP: page 8 – 144 • WF_PREF: page 8 – 148 • WF_MONITOR: page 8 – 149 • Oracle Workflow Views: page 8 – 157 • WF_QUEUE: page 8 – 162 • FND_DOCUMENT_MANAGEMENT: page 8 – 185 • WF_NOTIFICATIONS: page 8 – 197 • WF_EVENT: page 8 – 260 • WF_RULE: page 8 – 279 • WF_EVENT_FUNCTIONS_PKG: page 8 – 290 • WF_EVENTS_PKG: page 8 – 300 • WF_EVENT_GROUPS_PKG: page 8 – 300 • WF_SYSTEMS_PKG: page 8 – 300 • WF_AGENTS_PKG: page 8 – 300 • WF_EVENT_SUBSCRIPTIONS_PKG: page 8 – 300 8–2 Oracle Workflow Guide .

and in particular. • It automatically executes function activities (execution is either immediate or deferred to a background engine) and sends notifications. • It maintains a history of an activity’s status. Workflow Engines can be set up as background tasks to perform activities that are too costly to execute in real time. The state of a workflow item is defined by the various states of all activities that are part of the process for that item. Additionally. The engine is implemented in server–side PL/SQL and is activated whenever a call to a workflow procedure or function is made. if the Workflow server goes down for any reason. Since the engine is embedded inside the Oracle database server. The Workflow Engine performs the following services for a client application: • It manages the state of all activities for an item. The API calls that update activity states are: • CreateProcess: page 8 – 21 • StartProcess: page 8 – 28 • CompleteActivity: page 8 – 69 • CompleteActivityInternalName: page 8 – 72 • AssignActivity: page 8 – 74 • HandleError: page 8 – 77 • SuspendProcess: page 8 – 32 • ResumeProcess: page 8 – 34 • AbortProcess: page 8 – 36 Oracle Workflow APIs 8–3 . • It detects error conditions and executes error processes. The engine changes activity states in response to an API call to update the activity. determines which new activity to transition to whenever a prerequisite activity completes. the Oracle database server is able to manage the recovery and transactional integrity of any workflow transactions that were running at the time of the failure.Overview of the Workflow Engine The Workflow Engine manages all automated aspects of a workflow process for each item.

. • Error—activity completed with error. the engine attempts to execute the next activity directly. An activity may have the following status: • Active—activity is running. • Waiting—activity is waiting to run.Based on the result of a previous activity. • Notified—notification activity is delivered and open. • Deferred—activity is deferred. • Suspended—activity is suspended. • Complete—activity completed normally.

the engine performs a rollback to the savepoint. you are restricted from updating workflow–specific data in an autonomous transaction. Attention: The Workflow Engine traps errors produced by function activities by setting a savepoint before each function activity. the Workflow Engine automatically traps ”Savepoint not allowed” errors and defers the execution of the activity to the background engine. note that Oracle Workflow handles errors by rolling back the entire procedure and setting its status to ERROR. The Workflow Engine never issues a commit as it is the responsibility of the calling application to commit. and because you may have lock contentions with the main session. If an activity produces an unhandled exception. you can perform commits and rollbacks independently of the main transaction. for instance. This subprocedure must be capable of being rerun. then embed your SQL in a subprocedure and declare it as an autonomous block. Oracle Workflow will not support autonomous commits in any procedure it calls directly. By embedding the pragma AUTONOMOUS_TRANSACTION in your procedure. you cannot set item attributes. You cannot access this data because the item itself has not yet been committed. and sets the activity to the ERROR status. you will not have access to any database changes that were made in the main session but are not yet committed. Note: The Oracle database server release 8i and higher offers autonomous transactions. If you need to perform commits. Consequently. Oracle treats this as a separate session. Database updates performed by autonomous commits 8–4 Oracle Workflow Guide . Additionally. For environments such as database triggers or distributed transactions that do not allow savepoints. For this reason. you should never commit within the PL/SQL procedure of a function activity. as such.

fnd. Java programs that integrate with Oracle Workflow should include the following import statements to provide access to classes required by Oracle Workflow: import java. If a Workflow Engine or Notification API has a corresponding Java method. See: Workflow Function APIs: page 8 – 82 and Workflow Attribute APIs: page 8 – 90.io.math. its Java method syntax is displayed immediately after its PL/SQL syntax in the documentation.cannot be rolled back. The custom classes must follow a standard API format so that they can be properly executed by the Oracle Workflow Java Function Activity Agent. Oracle Workflow APIs 8–5 . The Java methods directly reference the WF_ENGINE and WF_NOTIFICATION PL/SQL package procedures and views and communicate with the Oracle Workflow database through JDBC. see: Autonomous Transactions. See: Standard API for Java Procedures Called by Function Activities: page 7 – 8 and Function Activity: page 4 – 44. These classes are defined in the Java package ’oracle. in the Java package ’oracle. Oracle Workflow Java Interface The Oracle Workflow Java interface provides a means for any Java program to integrate with Oracle Workflow. Oracle Database Concepts.sql.apps. See: Workflow Engine APIs: page 8 – 19 and Notification APIs: page 8 – 197. The Oracle Workflow Java interface exposes those APIs as Java methods that can be called by any Java program to communicate with Oracle Workflow. The Oracle Workflow Engine and Notification APIs are accessible through public server PL/SQL packages and published views.*.fnd. The custom Java classes for these activities are implemented as classes that extend the WFFunctionAPI class. Additionally.wf. import java. so you will need to write your own compensatory logic for error handling. For more information.engine’. The WFFunctionAPI class and the WFAttribute class also contain methods that can be called to communicate with Oracle Workflow. Java functions can be incorporated within Workflow processes as external Java function activities.apps. This functionality is currently only available for the standalone version of Oracle Workflow.wf’.*. The methods are defined within the EngineAPI class and the NotificationAPI class. import java.BigDecimal.

Oracle Workflow Context Each Oracle Workflow Java method that accesses the database requires an input of a WFContext object. m_charSet = System. You can retrieve the system property CHARSET to specify the character set for the database session.driver.common.engine. if (m_charSet == null) { // cannot be null m_charSet = ”UTF8”.fnd.jdbc. WFDB myDB. The following code excerpt shows an example of how to instantiate these objects. m_pwd.*. } catch (Exception e) { 8–6 Oracle Workflow Guide . WFContext ctx.getDB(). import oracle.*. To call one of these Workflow Java APIs in your Java program. import oracle. Then you must instantiate the WFContext object with the database variable. import oracle.getProperty(”CHARSET”).fnd. The WFContext object consists of database connectivity information which you instantiate and resource context information that the WFContext class instantiates.wf.*. m_jdbcStr.apps.*.fnd.sql. you must first instantiate a database variable of class WFDB with your database username. } // We now have a connection to the database.apps. password and alias. } try { ctx = new WFContext(myDB. You can also optionally supply a JDBC string. myDB = new WFDB(m_user.apps.getConnection() == null) { // connection failed return.wf. import oracle. // m_charSet is ’UTF8’ by default if (ctx. m_conStr). m_charSet).import oracle.*.

// exit Message for this exception } If you have already established a JDBC connection.jar:${ORACLE_HOME}/jdbc/ lib/classes111. set and get attributes and suspend. For example. make sure you define CLASSPATH and LD_LIBRARY_PATH for the Oracle JDBC implementation and a supported version of Oracle. you can simply set that connection into the WFContext object. // m_conn is a pre–established JDBC connection Sample Java Program Oracle Workflow provides an example Java program that illustrates how to call most of the Workflow Engine and Notification Java APIs. // m_charSet is ’UTF8’ by default ctx.setJDBCConnection(m_conn).getProperty(”CHARSET”). It calls the various Java APIs to launch the WFDEMO process. resume and abort the process. Before running the WFTest Java program. If you are using the version of Oracle Workflow embedded in Oracle Applications. as shown in the following example: WFContext ctx. m_charSet = System. use the following commands: setenv CLASSPATH <Workflow_JAR_file_directory>/wfapi. as well as the APIs to send a notification. the Workflow JAR files are located in the <ORACLE_HOME>/jlib directory.zip setenv LD_LIBRARY_PATH ${ORACLE_HOME}/lib:${LD_LIBRARY_PATH} Note: If you are using the standalone version of Oracle Workflow with Oracle9i. } ctx = new WFContext(m_charSet). The Java program is named WFTest. set and get notification attributes. the Workflow JAR files are located in the Oracle Workflow APIs 8–7 . if (m_charSet == null) { // cannot be null m_charSet = ”UTF8”. and delegate and transfer the notification. on UNIX.

When the process as a whole completes. For example. run Java against oracle. Additional Workflow Engine Features In addition to managing a process. the Workflow Engine also supports the following features: • Completion Processing: page 8 – 8 • Deferred Processing: page 8 – 9 • Error Processing: page 8 – 10 • Looping: page 8 – 10 • Version/Effective Date: page 8 – 11 • Item Type Attributes: page 8 – 12 • Post–notification functions: page 8 – 13 • Synchronous. For example.apps. Note: A process as a whole can complete but still contain activities that were visited but not yet completed. 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.java and is located in the <ORACLE_HOME>/wf/java/oracle/apps/fnd/wf/ directory.wf.apps.WFTest. The source file is named WFTest. on UNIX. enter the following statement on the command line: $java oracle. The engine then attempts to execute (or mark for deferred execution) all activities that are dependent on the completed activity.<ORACLE_HOME>/wf/java/oracle/apps/fnd/wf/jar/ directory.fnd. 8–8 Oracle Workflow Guide . To initiate the WFTest program. Asynchronous. and Forced Synchronous Processes: page 8 – 14 • Business Events: page 8 – 17 Completion Processing Engine processing is triggered whenever a process activity completes and calls the Workflow Engine API.wf.WFTest The source file for this program is also included in your Oracle Workflow installation so that you can view the sample code.fnd.

See Also Activity Cost: page 4 – 47 Deferring Activities: page C – 7 Oracle Workflow APIs 8–9 . 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. or you may set it to be very high if the activity performs a resource–intensive operation. The Workflow Engine integrates with Oracle Advanced Queues to carry out deferred processing. Some sites may have multiple background engines operating at different thresholds or item type specifications.the Workflow Engine marks these incomplete activities as having a status of COMPLETE and a result of #FORCE. You can set this cost to be small if the activity merely sets an item attribute. At least one background engine must be set up to run at all times. Deferring the execution of activity functions to background engines allows the Workflow Engine to move forward to process other activities that are currently active. to processing nothing and marking all transitions as deferred. The engine can be set up to operate anywhere on a continuum between processing all eligible work immediately. to avoid tying up all background processing with long–running operations. Each activity has a user–defined processing cost. first out ordering of an activity’s enqueue time. The order in which the deferred activities are processed are based on the first in. you might want to defer the execution of that costly function to a background engine. This distinction is important when you review your process status through the Workflow Monitor. A special queue processor called the background engine checks and processes the activities in the ’deferred’ queue. If a function activity has a cost that exceeds the main threshold cost. the Workflow Engine marks that activity with a status of ’DEFERRED’ in the workflow status tables and enqueues the deferred activity to a special queue for deferred activities. If the result of a completed activity triggers the execution of a costly function.

The error process can include branches based on error codes. The Workflow Engine never issues a commit as it is the responsibility of the calling application to commit. the caller may be a background engine with no human operator). and attempt to deal with the error using automated rules for resetting. Once you define an error process.Error Processing Errors that occur during workflow execution cannot be directly returned to the caller. • Reset the loop to the loop point before reexecuting by first running logic to undo the activities within the loop. so in effect. See: Default Error Process: page 6 – 26. The error process is then initiated whenever an error occurs for that activity. If an activity produces an unhandled exception. the activity can only run once. 8 – 10 Oracle Workflow Guide . The Workflow Engine can handle a revisited activity in one of three ways: • Ignore the activity. you can associate it with any activity. The Workflow Engine traps errors produced by function activities by setting a savepoint before each function activity. Note: For this reason. You can use Oracle Workflow Builder to define the processing you want to occur in case of an error. See: To Define Optional Activity Details: page 4 – 59. send notifications. The Workflow Engine then attempts to locate an error process to run by starting with the activity which caused the error. the engine performs a rollback to the savepoint. Use Oracle Workflow Builder to modify the Default Error Process associated with the System:Error item type or create your own custom error process. retrying. you should never commit within the PL/SQL procedure of a function activity. and sets the activity to the ERROR status. • Reexecute the loop point and all activities within the loop without running any logic. The first activity that gets detected as a revisited activity is also called a loop point or pivot activity. since the caller generally does not know how to respond to the error (in fact. or skipping the failed activity. and then checking each parent process activity until an associated error process is located. and stop further processing of the thread. Looping Looping occurs when the completion of an activity causes a transition to another activity that has already been completed.

• Traverse the list of activities. cancelling each activity and resetting its status. but you want to first reset the status of the activities in the loop. You can include compensatory logic in ”CANCEL” mode that reverses any operation performed earlier in ”RUN” mode. Loop causes the Workflow Engine to reexecute the activity in ”RUN” mode without executing any ”CANCEL” mode logic for the activity. Version / Effective Date Certain workflow objects in a process definition are marked with a version number so that more than one version of the object can be in use at any one time. Setting On Revisit to Ignore is useful for implementing activities that should only run once. For example. previous notifications remain open when the Workflow Engine reexecutes the loop and sends a new notification to the current performer of the notification activity. Cancelling an activity is similar to executing the activity. even though they can be transitioned to from multiple sources. the Workflow Engine cancels the previous notification before reexecuting the loop and sending a new notification to the current performer of the notification activity. except that the activity is executed in ”CANCEL” mode rather than ”RUN” mode. functions. Setting On Revisit to Reset for an activity is useful when you want to reexecute activities in a loop. and processes Oracle Workflow APIs 8 – 11 . These objects are: • Activities—notifications. this mode allows you to implement a ”logical OR”–type of activity which is transitioned to multiple times. Reset causes the Workflow Engine to do the following: • Build a list of all activities visited following the pivot activity.Every activity has an On Revisit poplist field in its Oracle Workflow Builder Details property page. The On Revisit poplist lets you specify the behavior of the Workflow Engine when it revisits the activity in a workflow process. Setting On Revisit to Loop for an activity is useful when you want to simply reexecute activities in a loop without resetting the status of the activities in the loop. or Loop. If you set On Revisit to Loop for the pivot activity of a loop that includes an FYI notification activity. Reset. You can set the field to Ignore. but completes after the first transition only. If you set On Revisit to Reset for the pivot activity of a loop that includes an FYI notification activity.

the underlying PL/SQL code does not. An effective date controls which version of a definition the engine uses when executing a process. Note that Oracle Workflow does not maintain versions for other workflow objects. the process instance continues to run using the version of the workflow object definitions with which it was originally initiated. Any modifications that you save to the following objects overwrites the existing definition of the object: • Item attributes • Messages • Lookup types Item Type Attributes A set of item type attributes is defined at both design–time and runtime for each item. you can save it with an immediate or future effective date. These attributes provide information to the function and notification activities used in the processes associated with the item type. When you edit a process.Note: Although function activities support versioning. then the original objects are overwritten. When you define item type attributes at runtime. If you save edits to any of the above objects to an existing file. If you have a process instance that is still running and you upgrade the underlying workflow definition in your Workflow server. Oracle Workflow automatically creates a new version of that object or the owning object by incrementing the version number by one. Any new process instance that is initiated always uses the version that is specified to be effective at that point in time. you can add either individual attributes or arrays containing several attributes of the same type. You should avoid adding references to new activity attributes or returning result lookup codes not modelled by existing activities in your PL/SQL code. Similarly. • Activity attributes • Process activity nodes • Activity attribute values • Activity transitions If you edit and save any of the above objects in Oracle Workflow Builder to the database. unless implemented by your developer. See: Opening and Saving Item Types: page 3 – 12. using the appropriate Workflow Engine APIs. you can 8 – 12 Oracle Workflow Guide .

See: AddItemAttributeArray: page 8 – 46 and SetItemAttributeArray: page 8 – 53. The post–notification function could perform back–end logic to either validate the legitimacy of the forward/transfer or execute some other supporting logic. if the post–notification function gets called in FORWARD or TRANSFER mode. Note: These array APIs handle arrays that are composed of multiple item type attributes grouped together by type.context_text = new recipient_role.context_nid = notification_ID. This variable is the new role to which the notification gets forwarded/transferred. responder is Oracle Workflow APIs 8 – 13 .set the values of existing attributes either individually or in arrays containing several attributes of the same type. Use the array APIs whenever you need to add or set the values of large numbers of item type attributes at once. The Workflow Engine executes the post–notification function in response to an update of the notification’s state after the notification is delivered. you can specify a post–notification function that executes when the notification recipient forwards or transfers the notification. For example. These APIs improve performance by using the bulk binding feature in Oracle8i and higher to reduce the number of database operations. The post–notification function should be a PL/SQL procedure written to the same API standards required for function activities.context_text = responder. If the recipient responds using the Notification web page. • WF_ENGINE. or WF_ENGINE. if the post–notification function gets called in RESPOND mode. 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: • WF_ENGINE. See: Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3. Oracle Workflow does not support individual item type attributes that consist of arrays themselves. Note: The value of responder varies depending on the notification interface the recipient uses to respond. Post–Notification Functions You can associate a post–notification function with a notification activity.

If a notification activity times out. When the post–notification function completes. As a final step. the post–notification function can perform additional processing such as vote tallying. You may reference these global engine variables in your PL/SQL function. For a Voting activity. . if the post–notification function is run in TRANSFER mode and Expand Roles is not checked for the notification activity. the Workflow Engine automatically runs the post–notification function again in RUN mode. a notification callback function executes the post–notification function in the mode that matches the notification’s state: RESPOND. If the recipient responds via e–mail. the Workflow Engine erases the two global engine variables. FORWARD. the TIMEOUT mode logic should identify how to tally the votes received up until the timeout. or TRANSFER. the Workflow Engine runs the post–notification function for the activity in TIMEOUT mode. Then when the notification’s state changes. the Workflow Engine sets the assigned user for the notification to the new role name specified. When the Notification System completes execution of the post–notification function in RESPOND mode. responder is set to ”email:responder_email_address”.set to the role name of the responder. In this mode.

The notification recipient is then prompted again to take some type of action. Asynchronous. if the post–notification function is executed in FORWARD mode and it raises an exception because the role being forwarded to is invalid. or transfer operation. See Also Notification Model: page 8 – 192 Synchronous. an error is displayed to the user and the Forward operation does not get executed. forward. and Forced Synchronous Processes A workflow process can be either synchronous or asynchronous. A synchronous process is a process that can be executed without 8 – 14 Oracle Workflow Guide . Attention: If the post–notification function returns ERROR:<errcode> as a result or raises an exception. the Workflow Engine aborts the respond. For example.

no audit trail is recorded. For example. the user does not have to wait for the process to complete to continue using the application. in Oracle Applications. As a result. such as when an event message is dequeued from an inbound queue and sent to the workflow process. The process results are available immediately upon completion. The Workflow Engine does not return control to the calling application that initiated the workflow until it completes the process. There may be cases when your application requires a forced synchronous process to generate a specific result quickly when recording an audit trail is not a concern. blocking activities. The workflow process is left in an unfinished state until it is started again. such as function activities that are not deferred to the background engine. by the background engine. Rather than waiting indefinitely when it encounters one of these activities. you can immediately check for process results that were written to item attributes or directly to the database. However. notifications with responses. An asynchronous process is a process that the Workflow Engine cannot complete immediately because it contains activities that interrupt the flow. However. The process can be restarted by the Notification System. and wait activities. the results of the process are not available until the process is completed at a later time. With an asynchronous process. the execution speed of a forced synchronous process is significantly faster than a typical synchronous process. the user must wait for the process to complete. such as when a user responds to a notification. several products require Account Generator workflows to generate a meaningful flexfield code derived from a series of concatenated segments pulled from various tables. In addition to regular synchronous and asynchronous processes. The Account Generator workflows are forced synchronous processes that compute and pass back completed flexfield codes to the calling applications instantaneously.interruption from start to finish. the Workflow Engine also supports a special class of synchronous processes called forced synchronous processes. Examples of activities that force an asynchronous process include deferred activities. Oracle Workflow APIs 8 – 15 . The Workflow Engine executes a process synchronously when the process includes activities that can be completed immediately. However. the Workflow Engine sets the audit tables appropriately and returns control to the calling application. A forced synchronous process completes in a single SQL session from start to finish and never inserts into or updates any database tables. such as when a deferred activity is executed. or by the Business Event System. With a synchronous process.

To create a forced synchronous process. A process can block and restart with a call to WF_ENGINE. which returns the #SYNCH constant. must adhere to the following set of restrictions: • No notification activities are allowed. • Limited blocking–type activities are allowed. • No Master/Detail coordination activities are allowed. Loops are allowed in the process.CompleteActivity only if the blocking and restarting activities: – Occur in the same database session.eng_synch. – Contain no intervening commits. This also means that no <Any> transitions are allowed since they cause parallel flows. – Contain no intervening calls to Oracle Workflow. that is. 8 – 16 Oracle Workflow Guide . • No parallel flows are allowed in the process. you need to set the itemkey of your process to #SYNCH or to wf_engine. Your process definition. as transitions from each activity must have a distinct result. and is run in non–cancelling mode.) – Defer Thread – Wait – Continue Flow/Wait for Flow – Role Resolution – Voting – Compare Execution Time – Notify • No use of the background engine. • None of the following Standard activities are allowed: – And – Block (restricted by the conditions stated in the Limited Blocking bullet point above. regardless of its actual On Revisit setting. • No Error Processes can be assigned to the process or the process’ activities. activities are never deferred. when you call the necessary WF_ENGINE APIs. using a non–unique itemkey such as #SYNCH is not an issue. Since a forced synchronous process never writes to the database. however. • Each function activity behaves as if On Revisit is set to Loop.

GetItemAttribute – WF_ENGINE. .GetActivityAttribute – WF_ENGINE. • Only the following WF_ENGINE API calls are allowed to be made.StartProcess – WF_ENGINE. and in all cases.CompleteActivity (for the limited usage of blocking–type activities) • WF_ENGINE API calls for any item besides the item for the current synchronous item are not allowed. – No auditing is available for the process.eng_synch: – WF_ENGINE. the itemkey supplied to these APIs must be specified as #SYNCH or wf_engine.• No data is ever written to the Oracle Workflow tables and as a result: – The process cannot be viewed from the Workflow Monitor.CreateProcess – WF_ENGINE.SetItemAttribute – WF_ENGINE.

sql. An event activity can either raise. If the synchronous process completes successfully. you should rerun the process with a unique item key in asynchronous mode and check the error stack using the Workflow Monitor or the script wfstat. Asynchronous. and Forced Synchronous Workflows: page C – 2 Business Events Events from the Business Event System are represented within workflow processes as event activities. Oracle Workflow APIs 8 – 17 . See: Raise: page 8 – 261.Raise API to raise the event. send. A Raise event activity raises an event to the Event Manager.sql: page 16 – 16. the error you encountered in the forced synchronous process is probably due to a violation of one of the above listed restrictions. triggering any subscriptions to that event. See Also Synchronous. or receive a business event. Attention: If you encounter an error from a forced synchronous process. See: Wfstat. The Workflow Engine calls the WF_EVENT.

In this case. The Workflow Engine can receive an event into an activity in an existing process instance that is waiting for the event.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. See Also Managing Business Events: page 13 – 2 Event Activities: page 4 – 54 8 – 18 Oracle Workflow Guide . which then continues the thread of execution from that activity. Note: If the event received by a Receive event activity was originally raised by a Raise event activity in another workflow process. overriding any existing parent setting. The WF_ENGINE. 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. See: Event: page 8 – 75. A Receive event activity receives an event from the Event Manager into a workflow process.Send API to send the event. See: Send: page 8 – 265. the item type and item key for that process are included in the parameter list within the event message. using the correlation ID in the event message to match the event with the process to which it belongs.Event API is used to receive an event into a workflow process. See: SetItemParent: page 8 – 79. the Workflow Engine automatically sets the specified process as the parent for the process that receives the event.

or both. .Workflow Engine APIs The Workflow Engine APIs can be called by an application program or a workflow function in the runtime phase to communicate with the engine and to change the status of each of the activities. These APIs are defined in a PL/SQL package called WF_ENGINE. The following list indicates whether the Workflow Engine APIs are available as PL/SQL functions/procedures. Many of these Workflow Engine APIs also have corresponding Java methods that you can call from any Java program to integrate with Oracle Workflow. as Java methods.

Attention: Java is case–sensitive and all Java method names begin with a lower case letter to follow Java naming conventions. • CreateProcess: page 8 – 21—PL/SQL and Java • SetItemUserKey: page 8 – 23—PL/SQL • GetItemUserKey: page 8 – 24—PL/SQL • GetActivityLabel: page 8 – 25—PL/SQL • SetItemOwner: page 8 – 26—PL/SQL and Java • StartProcess: page 8 – 28—PL/SQL and Java • LaunchProcess: page 8 – 30—PL/SQL and Java • SuspendProcess: page 8 – 32—PL/SQL and Java • ResumeProcess: page 8 – 34—PL/SQL and Java • AbortProcess: page 8 – 36—PL/SQL and Java • CreateForkProcess: page 8 – 38—PL/SQL • StartForkProcess: page 8 – 40—PL/SQL • Background: page 8 – 41—PL/SQL • AddItemAttribute: page 8 – 43—PL/SQL and Java • AddItemAttributeArray: page 8 – 46—PL/SQL • SetItemAttribute: page 8 – 48—PL/SQL and Java • SetItemAttrDocument: page 8 – 51—PL/SQL and Java • SetItemAttributeArray: page 8 – 53—PL/SQL • getItemTypes: page 8 – 56—Java • GetItemAttribute: page 8 – 57—PL/SQL Oracle Workflow APIs 8 – 19 .

• GetItemAttrDocument: page 8 – 59—PL/SQL • GetItemAttrClob: page 8 – 60—PL/SQL • getItemAttributes: page 8 – 61—Java • GetItemAttrInfo: page 8 – 62—PL/SQL • GetActivityAttrInfo: page 8 – 63—PL/SQL • GetActivityAttribute: page 8 – 64—PL/SQL • GetActivityAttrClob: page 8 – 66—PL/SQL • BeginActivity: page 8 – 67—PL/SQL • CompleteActivity: page 8 – 69—PL/SQL • CompleteActivityInternalName: page 8 – 72—PL/SQL • AssignActivity: page 8 – 74—PL/SQL • Event: page 8 – 75—PL/SQL • HandleError: page 8 – 77—PL/SQL • SetItemParent: page 8 – 79—PL/SQL • ItemStatus: page 8 – 80—PL/SQL and Java • getProcessStatus: page 8 – 81—Java See Also Standard API for PL/SQL Procedures Called by a Function Activities: page 7 – 3 8 – 20 Oracle Workflow Guide .

String itemKey. The string uniquely identifies the item within an item type. When a particular requisition is created.CreateProcess PL/SQL Syntax procedure CreateProcess (itemtype in varchar2. process in varchar2 default ’’. If you do not specify a Oracle Workflow APIs 8 – 21 . and Forced Synchronous Processes: page 8 – 14. Required for the Java method only. a Requisition item type may have a Requisition Approval Process as a top level process. Arguments (input) wCtx Workflow context information. user_key in varchar2 default null. See: Oracle Workflow Context: page 8 – 6. Java Syntax public static boolean createProcess (WFContext wCtx. owner_role in varchar2 default null). A string derived usually from the application object’s primary key. an application calls CreateProcess to set up the information needed to start the defined process. Item types are defined in the Workflow Builder. For example. Provide the process internal name. itemkey in varchar2. the item type’s selector function is used to determine the top level process to run. If process is null. String itemType. See: Synchronous. process An optional argument that allows the selection of a particular process for that item. itemtype itemkey Note: You can pass #SYNCH as the itemkey to create a forced synchronous process. The item type and key together identify the new process and must be passed to all subsequent API calls for that process. Asynchronous. String process) Description Creates a new runtime process for an application item. A valid item type.

user_key A user–friendly key to assign to the item identified by the specified item type and item key. if a database entity has headers. This argument is optional. owner_role Caution: Although you can make a call to CreateProcess( ) and StartProcess( ) from a database trigger to initiate a workflow process. For example. lines and details. This argument is optional. 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. you should avoid doing so in certain circumstances.selector function and this argument is null. A valid role to set as the owner of the item. an error will be raised.

the Workflow Engine immediately defers the initial start activities to a background engine.java program.showError(ctx).println(”createProcess failed”). else { System.println(”Created Item”).createProcess(ctx.out. iKey. If you initiate a workflow process from a database trigger. so that they are no longer executing from a database trigger. The example code is from the WFTest. iType. } 8 – 22 Oracle Workflow Guide . Attention: The Workflow Engine always issues a savepoint before executing each activity in a process so that it can rollback to the previous activity in case an error occurs. // create an item if (WFEngineAPI. Example The following code excerpt shows an example of how to call createProcess() in a Java program.out. the Workflow Engine automatically traps ”Savepoint not allowed” errors and defers the execution of the activity. WFEngineAPI. pr)) System. For environments such as database triggers or distributed transactions that do not allow savepoints.

SetItemUserKey PL/SQL Syntax procedure SetItemUserKey (itemtype in varchar2. See: CreateProcess: page 8 – 21. which is initially identified by an item type and item key. userkey Oracle Workflow APIs 8 – 23 . The user key to assign to the item identified by the specified item type and item key. The string uniquely identifies the item within an item type. 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. itemkey in varchar2. Description Lets you set a user–friendly identifier for an item in a process. A string generated usually from the application object’s primary key. The item type and key together identify the item in a process. Arguments (input) itemtype itemkey A valid item type. userkey in varchar2).

Arguments (input) itemtype itemkey A valid item type. See: CreateProcess: page 8 – 21.GetItemUserKey PL/SQL Syntax function GetItemUserKey (itemtype in varchar2. The user key is a user–friendly identifier to locate items in the Workflow Monitor and other user interface components of Oracle Workflow. Description Returns the user–friendly key assigned to an item in a process. The string uniquely identifies the item within an item type. itemkey in varchar2) return varchar2. 8 – 24 Oracle Workflow Guide . The item type and key together identify the item in a process. identified by an item type and item key. A string generated usually from the application object’s primary key.

such as CompleteActivity and HandleError. The label returned has the following format. that accept activity labels as arguments: <process_name>:<instance_label> Arguments (input) actid An activity instance ID. given the internal activity instance ID.GetActivityLabel PL/SQL Syntax function GetActivityLabel (actid in number) return varchar2. Oracle Workflow APIs 8 – 25 . Description Returns the instance label of an activity. which is suitable for passing to other Workflow Engine APIs.

A string derived from the application object’s primary key. See: Oracle Workflow Context: page 8 – 6. String itemType. The owner must be a valid role. Arguments (input) wCtx Workflow context information. A valid role. String owner) Description A procedure to set the owner of existing items. the role that initiates a transaction is assigned as the process owner. Typically. Required for the Java method only.out.setItemOwner(ctx. itemtype itemkey owner Example The following code excerpt shows an example of how to call setItemOwner() in a Java program. // set item owner if (WFEngineAPI. String itemKey.println(”Set Item Owner: ”+owner). A valid item type.”). The string uniquely identifies the item within an item type.java program.SetItemOwner PL/SQL Syntax procedure SetItemOwner (itemtype in varchar2. iKey. The item type and key together identify the new process and must be passed to all subsequent API calls for that process. so that any participant in that role can find and view the status of that process instance in the Workflow Monitor. Item types are defined in the Workflow Builder. 8 – 26 Oracle Workflow Guide .println(”Cannot set owner. itemkey in varchar2. The example code is from the WFTest. Java Syntax public static boolean setItemOwner (WFContext wCtx.out. else { System. owner)) System. owner in varchar2). iType.

} Oracle Workflow APIs 8 – 27 .WFEngineAPI.showError(ctx).

String itemKey) Description Begins execution of the specified process. and you initiate a workflow process from an AFTER INSERT trigger at the header–level of that entity. lines and details. For example. See: Oracle Workflow Context: page 8 – 6. itemkey in varchar2). Because of this feature. Java Syntax public static boolean startProcess (WFContext wCtx. you should avoid doing so in certain circumstances. See: CreateProcess: page 8 – 21. String itemType. 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. 8 – 28 Oracle Workflow Guide . Arguments (input) wCtx Workflow context information. CreateProcess( ) must first be called to define the itemtype and itemkey before calling StartProcess( ). 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. The string uniquely identifies the item within an item type. The item type and key together identify the process. The engine locates the activity marked as START and then executes it.StartProcess PL/SQL Syntax procedure StartProcess (itemtype in varchar2. A string derived from the application object’s primary key. itemtype itemkey Caution: Although you can make a call to CreateProcess( ) and StartProcess( ) from a trigger to initiate a workflow process. if a database entity has headers. A valid item type. you should avoid initiating a workflow process from a database trigger because savepoints and rollbacks are not allowed in a database trigger. Required for the Java method only.

.startProcess(ctx. WF_ENGINE..println(”Process Started successfully”). iKey)) System.out. WF_ENGINE.. See: Synchronous. Note: You can pass #SYNCH as the itemkey to create a forced synchronous process.StartProcess(. end (This method has the same effect as the previous method. To accomplish this: – Set the cost of the process start activities to a value greater than the Workflow Engine threshold (default value is 0. Example The following code excerpt shows an example of how to call startProcess() in a Java program..). you must immediately defer the initial start activities to a background engine.threshold := –1. } Oracle Workflow APIs 8 – 29 . WFEngineAPI.showError(ctx).If you must initiate a workflow process from a database trigger.println(”launch failed”).java program. or – Set the Workflow Engine threshold to be less than 0 before initiating the process: begin save_threshold := WF_ENGINE. ––Always reset threshold or all activities in this ––session will be deferred.CreateProcess(. WF_ENGINE.). iType. WF_ENGINE. // start a process if (WFEngineAPI. so that they are no longer executing from a database trigger.threshold. but is more secure as the initial start activities are always deferred even if the activities’ costs change.5).out. and Forced Synchronous Processes: page 8 – 14. Asynchronous. else { System.threshold := save_threshold. The example code is from the WFTest.

See: Synchronous. Arguments (input) wCtx Workflow context information. itemkey in varchar2. This is a wrapper that combines CreateProcess and StartProcess. and Forced Synchronous Processes: page 8 – 14. String itemType. process An optional argument that allows the selection of a particular process for that item. userkey in varchar2 default ’’. process in varchar2 default ’’. String userKey. Asynchronous. Required for the Java method only. This argument defaults to null. See: Oracle Workflow Context: page 8 – 6. owner in varchar2 default ’’). The string uniquely identifies the item within an item type. the item type’s selector function is used to determine the top level process to run. A string derived from the application object’s primary key. Java Syntax public static boolean LaunchProcess (WFContext wCtx.LaunchProcess PL/SQL Syntax procedure LaunchProcess (itemtype in varchar2. String itemKey. 8 – 30 Oracle Workflow Guide . The item type and key together identify the new process and must be passed to all subsequent API calls for that process. itemtype itemkey Note: You can pass #SYNCH as the itemkey to create a forced synchronous process. String process. A valid item type. If process is null. String owner) Description Launches a specified process by creating the new runtime process and beginning its execution. Provide the process internal name.

if a database entity has headers. then no owner is assigned to the process and only the workflow administrator role can monitor the process. . owner Caution: Although you can make a call to CreateProcess( ) and StartProcess( ) from a database trigger to initiate a workflow process. For example.userkey The user key to assign to the item identified by the specified item type and item key. If userkey is null. then no userkey is assigned to the item instance. A valid role designated as the owner of the item. you should avoid doing so in certain circumstances. lines and details. 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. and you initiate a workflow process from an AFTER INSERT trigger at the header–level of that entity. If owner is null.

If you initiate a workflow process from a database trigger. the Workflow Engine automatically traps ”Savepoint not allowed” errors and defers the execution of the activity. For environments such as database triggers or distributed transactions that do not allow savepoints. Attention: The Workflow Engine always issues a savepoint before executing each activity in a process so that it can rollback to the previous activity in case an error occurs. the Workflow Engine immediately defers the initial start activities to a background engine. so that they are no longer executing from a database trigger. Oracle Workflow APIs 8 – 31 .

See: CreateProcess: page 8 – 21. The item type and key together identify the process. itemtype itemkey process Example The following code excerpt shows an example of how to call suspendProcess() in a Java program. the top level process for the item is suspended. but the workflow does not transition to the next activity. String process) Description Suspends process execution so that no new transitions occur. String itemKey. Java Syntax public static boolean suspendProcess (WFContext wCtx. An optional argument that allows the selection of a particular subprocess for that item. This argument defaults to null.SuspendProcess PL/SQL Syntax procedure SuspendProcess (itemtype in varchar2. itemkey in varchar2. 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. Restart suspended processes by calling ResumeProcess( ). Provide the process activity’s label name. 8 – 32 Oracle Workflow Guide . Arguments (input) wCtx Workflow context information. String itemType.java program. For example. See: Oracle Workflow Context: page 8 – 6. process in varchar2 default ’’). Required for the Java method only. If this argument is null. A valid item type. A string generated from the application object’s primary key. <parent_process_internal_name>:<label_name>. Outstanding notifications can complete by calling CompleteActivity( ). The string uniquely identifies the item within an item type. The example code is from the WFTest.

null)) System. } Oracle Workflow APIs 8 – 33 ..out.. if (WFEngineAPI.”). else { System. WFEngineAPI.out.showError(ctx).println(”suspend failed”). iType. status should become SUSPEND System.println(”Suspend Process ” + iType +”/”+ iKey + ” . iKey.suspendProcess(ctx.// suspend.out.println(”Seems to suspend successfully”).

the top level process for the item is resumed. Required for the Java method only. Any activities that were transitioned to while the process was suspended are now executed. process in varchar2 default ’’). String process) Description Returns a suspended process to normal execution status. See: CreateProcess: page 8 – 21. 8 – 34 Oracle Workflow Guide . The example code is from the WFTest. An optional argument that allows the selection of a particular subprocess for that item type. A valid item type. A string generated from the application object’s primary key. Arguments (input) wCtx Workflow context information. String itemKey. If this argument is null. String itemType. <parent_process_internal_name>:<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. The string uniquely identifies the item within an item type. itemtype itemkey process Example The following code excerpt shows an example of how to call resumeProcess() in a Java program. The item type and key together identify the process. See: Oracle Workflow Context: page 8 – 6.java program. This argument defaults to null. Java Syntax public static boolean resumeProcess (WFContext wCtx.ResumeProcess PL/SQL Syntax procedure ResumeProcess (itemtype in varchar2. Provide the process activity’s label name. For example. itemkey in varchar2.

showError(ctx)..// resume process and status should be ACTIVE System. else { System.println(”Resume Process ” + iType +”/”+ iKey + ” .out.resumeProcess(ctx.out.. if (WFEngineAPI. iType. null)) System.out.println(”resume failed”).println(”Seems to resume successfully”).”). WFEngineAPI. iKey. } Oracle Workflow APIs 8 – 35 .

Also. A valid item type. String result) Description Aborts process execution and cancels outstanding notifications. any outstanding notifications or subprocesses are set to a status of COMPLETE with a result of force. An optional argument that allows the selection of a particular subprocess for that item type. If this argument is null. Java Syntax public static boolean abortProcess (WFContext wCtx. See: CreateProcess: page 8 – 21. The string uniquely identifies the item within an item type. <parent_process_internal_name>:<label_name>.AbortProcess PL/SQL Syntax procedure AbortProcess (itemtype in varchar2. Arguments (input) wCtx Workflow context information. itemtype itemkey process 8 – 36 Oracle Workflow Guide . String itemKey. This argument defaults to null. A string generated from the application object’s primary key. result in varchar2 default eng_force). The item type and key together identify the process. process in varchar2 default ’’. For example. regardless of the result argument. 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. String itemType. with a result specified by the result argument. itemkey in varchar2. The process status is considered COMPLETE. the top level process for the item is aborted. See: Oracle Workflow Context: page 8 – 6. Provide the process activity’s label name. Required for the Java method only. String process.

// abort process.java program. The result must be one of the values defined in the process Result Type..” + iType + ”/” + iKey). pr. The example code is from the WFTest.result A status assigned to the aborted process.out.showError(ctx).”).println(”Abort Process . null)) { System.. iKey.. Example The following code excerpt shows an example of how to call abortProcess() in a Java program. should see status COMPLETE with result // code force System. WFEngineAPI. } Oracle Workflow APIs 8 – 37 .abortProcess(ctx..out. or one of the following standard engine values: eng_exception eng_timeout eng_force eng_mail eng_null This argument defaults to ”eng_force”. if (!WFEngineAPI.println(”Seemed to have problem aborting. iType.

The item type and new item key together identify the new process. The new process will have the same item type. same_version in boolean default TRUE). Specify TRUE or FALSE to indicate whether the new runtime process uses the same version as the original or the latest version. The copy item type and key together identify the original process to be copied. The string uniquely identifies the item within an item type. Description Forks a runtime process by creating a new process that is a copy of the original. The string uniquely identifies the item within an item type. you can use CreateForkProcess() to fork a new transaction for the backorder quantity. SetItemUserKey(). A string generated from the application object’s primary key. new_itemkey in varchar2. you can call APIs such as SetItemOwner(). Note that any approval notification will be copied.CreateForkProcess PL/SQL Syntax procedure CreateForkProcess (copy_itemtype in varchar2. CreateForkProcess() copies the item attributes and status of the original process to the new process. copy_itemkey in varchar2. Then you must call StartForkProcess() to start the new process. If you specify TRUE. Arguments (input) copy_itemtype A valid item type for the original process to be copied. CreateForkProcess() copies the item attributes of the original process to the new copy_itemkey new_itemkey same_version 8 – 38 Oracle Workflow Guide . A string generated from the application object’s primary key. Use CreateForkProcess() when you need to change item specific attributes during the course of a process. If you specify FALSE. if an order cannot be met due to insufficient inventory stock. or the SetItemAttribute APIs to reset any item properties or modify any item attributes that you want for the new process. For example. After calling CreateForkProcess(). The result is as if two items were created for this transaction.

Oracle Workflow APIs 8 – 39 . 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. Oracle Workflow automatically creates an item attribute called #FORKED_FROM for the new item and sets the attribute to the item key of the original item.process but does not not copy the status. Defaults to TRUE. This attribute provides an audit trail for the forked item. Note: When you fork an item.

Any open notifications in the original process are copied and sent again in the new process. You can modify the item attributes of the new process before calling StartForkProcess(). The item type and key together identify the process. 8 – 40 Oracle Workflow Guide . then StartForkProcess() executes StartProcess(). itemkey in varchar2). activity by activity. These APIs do not copy any branches parallel to their own branch that are not active. Description Begins execution of the new forked process that you specify. Arguments (input) itemtype itemkey A valid item type. If the new process uses the latest version. The string uniquely identifies the item within an item type.’ You must call CompleteActivity() afterwards to continue the process. If the new process uses the same version as the original. any function activity in the process that had a status of ’Active’ is updated to have a status of ’Notified. Caution: Do not call CreateForkProcess() and StartForkProcess() from within a parallel branch in a process.StartForkProcess PL/SQL Syntax procedure StartForkProcess (itemtype in varchar2. StartForkProcess() automatically refreshes any notification attributes that are based on item attributes. Closed notifications are copied but not resent.’ Any Wait activities in the new process are activated at the same time as the original activities. For example. StartForkProcess() copies the status and history of each activity in the forked process. you must first call CreateForkProcess( ) to create the new process. the new Wait activity is also eligible in two hours. Before you call StartForkProcess( ). A string generated from the application object’s primary key. if a 24 hour Wait activity in the original process is due to be eligible in two hours. If you call StartForkProcess() from within a process. their status remains remains ’Complete.

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. in hundredths of a second.sql to get a list of the activities waiting to be processed by the next background engine run. minthreshold in number default null. maxthreshold in number default null.sql: page 16 – 7. timed out activities. and stuck processes using the parameters specified. process_deferred in boolean default TRUE. 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.Background PL/SQL Syntax procedure Background (itemtype in varchar2. Optional maximum cost threshold for an activity that this background engine processes in hundredths of a second. Optional minimum cost threshold for an activity that this background engine processes. To Schedule Background Engines: page 2 – 45 Arguments (input) itemtype minthreshold A valid item type. See: Wfbkgchk. process_timeout in boolean default FALSE. so you must restart this procedure periodically. The background engine executes all activities that satisfy the given arguments at the time that the background engine is invoked. There is no minimum cost threshold if this parameter is null. 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. If you are using the standalone version of Oracle Workflow. There is no maximum cost threshold if this parameter is null. This procedure does not remain running long term. process_stuck in boolean default FALSE). maxthreshold Oracle Workflow APIs 8 – 41 . You may run a script called wfbkgchk. If the item type is null the Workflow engine will run for all item types. Description Runs a background engine for processing deferred activities.

sql and is available on your server in the Oracle Workflow admin/sql subdirectory.csh <username/password> Replace <username/password> with the Oracle database account username and password where you want to run the background engine. 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> Replace <username/password> with the Oracle database account username and password where you want to run the background engine.csh and is available on your server in the Oracle Home bin subdirectory. 8 – 42 Oracle Workflow Guide . go to the directory where the file is located and type the following command at your operating system prompt: wfbkg. Defaults to TRUE. For the standalone version of Oracle Workflow you can use one of two example scripts to repeatedly run the background engine regularly. Defaults to FALSE. The first example is a sql script stored in a file called wfbkg. To run this script. Specify TRUE or FALSE to indicate whether to run timed out processes. Specify TRUE or FALSE to indicate whether to run stuck processes. To run this script.process_deferred process_timeout process_stuck Example Background Engine Looping Scripts Specify TRUE or FALSE to indicate whether to run deferred processes. The second example is a shell script stored in a file called wfbkg. Replace <min> with the number of minutes you want the background engine to run and replace <sec> with the number of seconds you want the background engine to sleep between calls. Defaults to FALSE.

String itemKey.AddItemAttribute PL/SQL Syntax procedure AddItemAttr (itemtype in varchar2. number_value in number default null. Oracle Workflow APIs 8 – 43 . number. or date value for a new item type attribute when the attribute is created. String aName) public static boolean addItemAttrText (WFContext wCtx. String itemType. Java Syntax public static boolean addItemAttr (WFContext wCtx. itemkey in varchar2. Although most item type attributes are defined at design time. String itemType. date_value in date default null). String aName. You can optionally set a default text. String itemType. String aName. BigDecimal aValue) public static boolean addItemAttrDate (WFContext wCtx. String itemKey. String aName. String aValue) public static boolean addItemAttrNumber (WFContext wCtx. aname in varchar2. you can create new attributes at runtime for a specific process. String itemKey. String itemType. String aValue) Description Adds a new item type attribute variable to the process. String itemKey. text_value in varchar2 default null.

use addItemAttr(). . To add an empty item type attribute. choose the correct method for your attribute type.Note: If you are using Java. use addItemAttrText() for all attribute types except number and date. When adding an item type attribute with a default value.

Required for the Java methods only. The default date value for the item type attribute. addItemAttrNumber(). Required for the addItemAttrText(). See: CreateProcess: page 8 – 21. Defaults to null. Arguments (input) wCtx Attention: If you need to add large numbers of item type attributes at once. use the AddItemAttributeArray APIs rather than the AddItemAttribute APIs for improved performance. Defaults to null. The item type and key together identify the process. The internal name of the item type attribute. The default value for the item type attribute. See: AddItemAttributeArray: page 8 – 46 Workflow context information. The default number value for the item type attribute. See: Oracle Workflow Context: page 8 – 6. A valid item type. The string uniquely identifies the item within an item type. Using AddItemAttr() to create the new attribute and SetItemAttrText() to set the value of the attribute. and addItemAttrDate() Java methods only. The default text value for the item type attribute. Required for the PL/SQL procedure only. itemtype itemkey aname text_value number_value date_value aValue 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. A string generated from the application object’s primary key. Defaults to null. Required for the PL/SQL procedure only. Required for the PL/SQL procedure only. the following calls are required: 8 – 44 Oracle Workflow Guide .

’new text values’). ’NEWCHAR_VAR’. only the following call is required: AddItemAttr(’ITYPE’. ’IKEY’. ’new text values’).AddItemAttr(’ITYPE’. Using AddItemAttr() both to create the new attribute and to set its value. ’NEWCHAR_VAR’). ’NEWCHAR_VAR’. ’IKEY’. SetItemAttrText(’ITYPE’. Oracle Workflow APIs 8 – 45 . ’IKEY’.

PL/SQL Table Type Column Datatype Definition NameTabTyp TextTabTyp Table 8 – 1 (Page 1 of 2) Wf_Item_Attribute_Values.NameTabTyp. procedure AddItemAttrDateArray (itemtype in varchar2.TextTabTyp). itemkey in varchar2.TEXT_VALUE%TYPE 8 – 46 Oracle Workflow Guide . aname in Wf_Engine. Although most item type attributes are defined at design time. itemkey in varchar2.NAME%TYPE Wf_Item_Attribute_Values. Description Adds an array of new item type attributes to the process. The following table shows the column datatype definition for each PL/SQL table type. avalue in Wf_Engine. Note: The AddItemAttributeArray APIs use PL/SQL table composite datatypes defined in the WF_ENGINE package.AddItemAttributeArray PL/SQL Syntax procedure AddItemAttrTextArray (itemtype in varchar2. Use the correct procedure for your attribute type. 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.NameTabTyp. All attribute types except number and date use AddItemAttrTextArray. aname in Wf_Engine. procedure AddItemAttrNumberArray (itemtype in varchar2.NameTabTyp.NumTabTyp). itemkey in varchar2. avalue in Wf_Engine. avalue in Wf_Engine. aname in Wf_Engine.DateTabTyp). you can create new attributes at runtime for a specific process.

aname avalue Oracle Workflow APIs 8 – 47 . See: CreateProcess: page 8 – 21. A string generated from the application object’s primary key. An array of the internal names of the new item type attributes. The string uniquely identifies the item within an item type.PL/SQL Table Type Column Datatype Definition NumTabTyp DateTabTyp Table 8 – 1 (Page 2 of 2) Wf_Item_Attribute_Values. An array of the values for the new item type attributes.NUMBER_VALUE%TYPE Wf_Item_Attribute_Values.DATE_VALUE%TYPE Arguments (input) itemtype itemkey A valid item type. The item type and key together identify the process.

String aValue) public static boolean setItemAttrNumber (WFContext wCtx. String aName.SetItemAttribute PL/SQL Syntax procedure SetItemAttrText (itemtype in varchar2. procedure SetItemAttrDate (itemtype in varchar2. String itemType. avalue in varchar2). aname in varchar2. procedure SetItemAttrNumber (itemtype in varchar2. aname in varchar2. event in wf_event_t). String itemKey. avalue in number). itemkey in varchar2. Java Syntax public static boolean setItemAttrText (WFContext wCtx. procedure SetItemAttrEvent (itemtype in varchar2. name in varchar2. avalue in date). itemkey in varchar2. itemkey in varchar2. String aName. String itemType. itemkey in varchar2. BigDecimal aValue) public static boolean setItemAttrDate 8 – 48 Oracle Workflow Guide . aname in varchar2. String itemKey.

String itemType. All attribute types except number. and event use SetItemAttrText. Use the correct procedure for your attribute type. String itemKey. String aValue) Description Sets the value of an item type attribute in a process. .(WFContext wCtx. String aName. date.

println(”Requestor: ”+owner). iType. itemtype itemkey Note: You can pass #SYNCH as the itemkey to create a forced synchronous process. The example code is from the WFTest. Arguments (input) wCtx Attention: If you need to set the values of large numbers of item type attributes at once. See: Synchronous. Asynchronous. and Forced Synchronous Processes: page 8 – 14. } Oracle Workflow APIs 8 – 49 . See: Oracle Workflow Context: page 8 – 6. Required for the Java method only. The value for the item type attribute.java program. iKey. See: CreateProcess: page 8 – 21. else { WFEngineAPI. The following code excerpt shows an example of how to call setItemAttrText() in a Java program. use the SetItemAttributeArray APIs rather than the SetItemAttribute APIs for improved performance. aname or name avalue or event Example 1 The internal name of the item type attribute.setItemAttrText(ctx.showError(ctx). See: SetItemAttributeArray: page 8 – 53 Workflow context information.out. The string uniquely identifies the item within an item type. A valid item type. if (WFEngineAPI. ”REQUESTOR_USERNAME”. owner)) System. The item type and key together identify the process. A string generated from the application object’s primary key.

Example 2

If an event message is stored within an item attribute of type event, you can access the event data CLOB within that event message by creating an item attribute of type URL for the event data. The following sample PL/SQL code shows how to set the value of the URL attribute to reference the event data.
l_eventdataurl := Wfa_html.base_url||’Wf_Event_Html. EventDataContents?P_EventAttribute=EVENT_MESSAGE’||’&’|| ’P_ItemType=’||itemtype||’&’||’P_ItemKey=’||itemkey||’&’|| ’p_mime_type=text/xml’; WF_ENGINE.SetItemAttrText(’<item_type>’, ’<item_key>’, ’EVENTDATAURL’, l_eventdataurl);

If you have applied a stylesheet to the event data XML document to create HTML, set the p_mime_type parameter in the URL to text/html instead. If you omit the p_mime_type parameter from the URL, the MIME type defaults to text/xml.

See Also
Event Message Structure: page 8 – 242

8 – 50

Oracle Workflow Guide

SetItemAttrDocument

PL/SQL Syntax

Attention: Document management functionality is reserved for future use. This description of the SetItemAttrDocument API is provided for reference only.

procedure SetItemAttrDocument (itemtype in varchar2, itemkey in varchar2, aname in varchar2, documentid in varchar2);

Java Syntax

public static boolean setItemAttrDocument (WFContext wCtx, String itemType, String itemKey, String aName, String documentId)

Description Arguments (input)

Sets the value of an item attribute of type document, to a document identifier.

wCtx

Workflow context information. Required for the Java method only. See: Oracle Workflow Context: page 8 – 6. A valid item type. 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 – 21.

itemtype itemkey

Note: You can pass #SYNCH as the itemkey to create a forced synchronous process. See: Synchronous, Asynchronous, and Forced Synchronous Processes: page 8 – 14. aname documentid The internal name of the item type attribute. The value for the item type attribute as a fully concatenated string of the following values:
DM:<node_id>:<doc_id>:<version>

Oracle Workflow APIs

8 – 51

<node_id> is the node ID assigned to the document

management system node as defined in the Document Management Nodes web page.
<doc_id> 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.

8 – 52

Oracle Workflow Guide

SetItemAttributeArray
PL/SQL Syntax
procedure SetItemAttrTextArray (itemtype in varchar2, itemkey in varchar2, aname in Wf_Engine.NameTabTyp, avalue in Wf_Engine.TextTabTyp); 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.
PL/SQL Table Type Column Datatype Definition

NameTabTyp TextTabTyp NumTabTyp DateTabTyp Table 8 – 2 (Page 1 of 1)

Wf_Item_Attribute_Values.NAME%TYPE Wf_Item_Attribute_Values.TEXT_VALUE%TYPE Wf_Item_Attribute_Values.NUMBER_VALUE%TYPE Wf_Item_Attribute_Values.DATE_VALUE%TYPE

Oracle Workflow APIs

8 – 53

Arguments (input) itemtype itemkey A valid item type. 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 – 21. An array of the internal names of the item type attributes. An array of the values for the item type attributes.

aname avalue 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’); // Multiple calls to update the database.

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;

8 – 54

Oracle Workflow Guide

// Only one call to update the database.

Oracle Workflow APIs

8 – 55

getItemTypes
Java Syntax
public static WFTwoDDataSource getItemTypes (WFContext wCtx)

Description Arguments (input)

Returns a list of all the item types defined in the Oracle Workflow database as a two dimensional data object.

wCtx

Workflow context information. Required for the Java method only. See: Oracle Workflow Context: page 8 – 6.

8 – 56

Oracle Workflow Guide

GetItemAttribute
PL/SQL Syntax
function GetItemAttrText (itemtype in varchar2, itemkey in varchar2, aname in varchar2) return varchar2; function GetItemAttrNumber (itemtype in varchar2, itemkey in varchar2, aname in varchar2) return number; function GetItemAttrDate (itemtype in varchar2, itemkey in varchar2, aname in varchar2) return date; 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 itemkey A valid item type. 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 – 21.

Note: Pass #SYNCH as the itemkey to create a forced synchronous process. See: Synchronous, Asynchronous, and Forced Synchronous Processes: page 8 – 14. aname The internal name of an item type attribute, for GetItemAttrText(), GetItemAttrNumber(), and GetItemAttrDate(). The internal name of an item type attribute, for GetItemAttrEvent().

name

Oracle Workflow APIs

8 – 57

See Also
Event Message Structure: page 8 – 242

8 – 58

Oracle Workflow Guide

GetItemAttrDocument

PL/SQL Syntax

Attention: Document management functionality is reserved for future use. This description of the GetItemAttrDocument API is provided for reference only.

function GetItemAttrDocument (itemtype in varchar2, itemkey in varchar2, aname in varchar2) return varchar2;

Description

Returns the document identifier for a DM document–type item attribute. The document identifier is a concatenated string of the following values:
DM:<nodeid>:<documentid>:<version> <nodeid> is the node ID assigned to the document management system node as defined in the Document Management Nodes web page. <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. Arguments (input) itemtype itemkey A valid item type. 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 – 21.

Note: Pass #SYNCH as the itemkey to create a forced synchronous process. See: Synchronous, Asynchronous, and Forced Synchronous Processes: page 8 – 14. aname The internal name of the item type attribute.

Oracle Workflow APIs

8 – 59

GetItemAttrClob
PL/SQL Syntax
function GetItemAttrClob (itemtype in varchar2, itemkey in varchar2, aname in varchar2) return clob;

Description Arguments (input)

Returns the value of an item type attribute in a process as a character large object (CLOB).

itemtype itemkey

A valid item type. 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 – 21. The internal name of an item type attribute.

aname

8 – 60

Oracle Workflow Guide

getItemAttributes
Java Syntax
public static WFTwoDDataSource getItemAttributes (WFContext wCtx, String itemType, String itemKey)

Description Arguments (input)

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.

wCtx

Workflow context information. Required for the Java method only. See: Oracle Workflow Context: page 8 – 6. A valid item type. 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 – 21.

itemtype itemkey

Oracle Workflow APIs

8 – 61

GetItemAttrInfo
PL/SQL Syntax
procedure GetItemAttrInfo (itemtype in varchar2, aname in varchar2, atype out varchar2, subtype out varchar2, format out varchar2);

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 aname A valid item type. The internal name of a item type attribute.

8 – 62

Oracle Workflow Guide

GetActivityAttrInfo
PL/SQL Syntax
procedure GetActivityAttrInfo (itemtype in varchar2, itemkey in varchar2, actid in number, aname in varchar2, atype out varchar2, subtype out varchar2, format out varchar2);

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 itemkey A valid item type. 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 – 21. The activity ID for a particular usage of an activity in a process definition. Also referred to as the activity ID of the node The internal name of an activity attribute.

actid

aname

Oracle Workflow APIs

8 – 63

GetActivityAttribute
PL/SQL Syntax
function GetActivityAttrText (itemtype in varchar2, itemkey in varchar2, actid in number, aname in varchar2) return varchar2; 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 itemkey A valid item type. 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 – 21.

8 – 64

Oracle Workflow Guide

Note: Pass #SYNCH as the itemkey to create a forced synchronous process. See: Synchronous, Asynchronous, and Forced Synchronous Processes: page 8 – 14. 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. The internal name of an activity attribute, for GetActivityAttrText(), GetActivityAttrNumber(), and GetActivityAttrDate(). The internal name of an activity attribute, for GetActivityAttrEvent().

aname

name

See Also
Event Message Structure: page 8 – 242

Oracle Workflow APIs

8 – 65

GetActivityAttrClob
PL/SQL Syntax
function GetActivityAttrClob (itemtype in varchar2, itemkey in varchar2, actid in number, aname in varchar2) return clob;

Description Arguments (input)

Returns the value of an activity attribute in a process as a character large object (CLOB).

itemtype itemkey

A valid item type. 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 – 21. The activity ID for a particular usage of an activity in a process definition. Also referred to as the activity ID of the node. The internal name of an activity attribute.

actid

aname

8 – 66

Oracle Workflow Guide

BeginActivity
PL/SQL Syntax
procedure BeginActivity (itemtype in varchar2, itemkey in varchar2, activity in varchar2);

Description

Determines if the specified activity can currently be performed on the process item and raises an exception if it cannot. The CompleteActivity() procedure automatically performs this function as part of its validation. However, you can use BeginActivity to verify that the activity you intend to perform is currently allowed before actually calling it. See: CompleteActivity: page 8 – 69.

Arguments (input) itemtype itemkey A valid item type. 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. 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>.

activity

Example

/*Verify that a credit check can be performed on an order. If it is allowed, perform the credit check, then notify the Workflow Engine when the credit check completes.*/ begin wf_engine.BeginActivity(’ORDER’, to_char(order_id),’CREDIT_CHECK’); OK := TRUE; exception when others then WF_CORE.Clear; OK := FALSE; end; if OK then –– perform activity ––

Oracle Workflow APIs

8 – 67

wf_engine.CompleteActivity(’ORDER’, to_char(order_id), ’CREDIT_CHECK’ :result_code); end if;

8 – 68

Oracle Workflow Guide

itemkey in varchar2. Other ’Start’ activities in the process are not completed. however. This procedure requires that the activity currently has a status of ’Notified’. StartProcess(). 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. – CompleteActivity() only completes the single ’Start’ activity with which it is called. Oracle Workflow APIs 8 – 69 . The item type and key specified in this call must be passed to all subsequent calls that operate on this item. StartProcess() executes only ’Start’ activities that do not have any incoming transitions. An optional activity completion result can also be passed. 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. 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. 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. activity in varchar2. The result can determine what transition the process takes next. ’Start’ activities are designated as the beginning of a process in the Workflow Builder. • To create and start an item—You can call CompleteActivity() for a ’Start’ activity to implicitly create and start a new item. Description Notifies the Workflow Engine that the specified activity has been completed for a particular item. For example. Use CompleteActivity() if you cannot use CreateProcess() and StartProcess() to start your process. executes every activity in the process that is marked as a ’Start’ activity and does not have any incoming transitions.CompleteActivity PL/SQL Syntax procedure CompleteActivity (itemtype in varchar2. result_code in varchar2).

the item type of the activity being completed must either have a selector function defined to choose a root process. 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. it simply marks the activity as complete.– CompleteActivity() does not execute the activity with which it is called. A string generated from the application object’s primary key. activity result_code 8 – 70 Oracle Workflow Guide . or one of the engine standard results. <parent_process_internal_name>:<label_name>. – When you use CompleteActivity() to start a new process. Arguments (input) itemtype itemkey A valid item type. StartProcess() does execute the ’Start’ activities with which it starts a process. This activity node must be marked as a ’Start’ activity. The name of the activity node that is completed. For example. Provide the activity node’s label name. Possible values are determined by the process activity’s Result Type. The item type and key together identify the process. The string uniquely identifies the item within an item type. You cannot explicitly specify a root process as you can with StartProcess(). See: AbortProcess: page 8 – 36. or have exactly one runnable process with the activity being completed marked as a ’Start’ activity. An optional activity completion result.

*/ wf_engine.CompleteActivity(’ORDER’. Oracle Workflow APIs 8 – 71 . ’ORDER_PROCESS:BLOCK–3’. Example 3 /*Complete the BLOCK activity which is used in multiple subprocesses in parallel splits. ’1003’. ’1003’. The item must already exist. ’APPROVED’).order_id). so the item is created by this call as well.CompleteActivity(’ORDER’. NULL).*/ wf_engine.*/ wf_engine.Example 1 /*Complete the ’ENTER ORDER’ activity for the ’ORDER’ item type. Example 2 /*Complete the ’LEGAL REVIEW’ activity with status ’APPROVED’. The ’ENTER ORDER’ activity allows creation of new items since it is the start of a workflow. to_char(order. ’LEGAL_REVIEW’. ’ENTER_ORDER’. ’null’).CompleteActivity(’ORDER’.

activity in varchar2. You should only use CompleteActivityInternalName() when you do not know the activity node label name. The result can determine what transition the process takes next. result in varchar2). This procedure requires that the activity currently has a status of ’Notified’. while CompleteActivity() identifies the activity by the activity node label name. use CompleteActivity() instead. For example. there must be exactly one instance of the specified activity with a status of ’Notified’. CompleteActivityInternalName() is similar to CompleteActivity() except that CompleteActivityInternalName() identifies the activity to be completed by the activity’s internal name. The item type and key together identify the process. Description Notifies the Workflow Engine that the specified activity has been completed for a particular item. you cannot use CompleteActivityInternalName() to start a process. Note: Unlike CompleteActivity(). If there are multiple instances of the activity with ’Notified’ statuses. If you do know the activity node label name. An optional activity completion result can also be passed. you cannot use CompleteActivityInternalName() with a synchronous process. See: CompleteActivity: page 8 – 69. activity 8 – 72 Oracle Workflow Guide . The string uniquely identifies the item within an item type. <parent_process_internal_name>:<activity_internal_ name>. Arguments (input) itemtype itemkey A valid item type. the process enters an ’ERROR’ state. 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. When CompleteActivityInternalName() is executed. itemkey in varchar2. Also.CompleteActivityInternalName PL/SQL Syntax procedure CompleteActivityInternalName (itemtype in varchar2. A string generated from the application object’s primary key. The internal name of the activity that is completed.

See: AbortProcess: page 8 – 36. Oracle Workflow APIs 8 – 73 . Possible values are determined by the process activity’s Result Type.result An optional activity completion result. or one of the engine standard results.

The label name of the activity node. Arguments (input) itemtype itemkey A valid item type. performer in varchar2). This procedure may be called before the activity is transitioned to.Transfer. activity performer 8 – 74 Oracle Workflow Guide . the outstanding notification is canceled and a new notification is generated for the new user by calling WF_Notification. Description Assigns or reassigns an activity to another performer. <parent_process_internal_name>:<label_name>.AssignActivity PL/SQL Syntax procedure AssignActivity (itemtype in varchar2. activity in varchar2. The string uniquely identifies the item within an item type. The item type and key together identify the process. The name should be a role name from the Oracle Workflow directory services. If a new user is assigned to a notification activity that already has an outstanding notification. For example. The name of the user who will perform the activity (the user who receives the notification). 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. A string generated from the application object’s primary key. itemkey in varchar2. a function activity earlier in the process may determine the performer of a later activity. For example.

For each eligible Receive event activity. Additionally. the procedure returns an exception and an error message. Description Receives an event from the Business Event System into a workflow process. Event() stores the event name. process_name in varchar2 default null. the event is received into that item. • A normal activity can only receive an event if its activity status is NOTIFIED. the procedure searches for eligible Receive event activities. Oracle Workflow APIs 8 – 75 . Then the Workflow Engine begins a thread of execution from the event activity. Additionally. the procedure sets any parameters in the event message parameter list as item type attributes for the process. itemkey in varchar2. If no eligible Receive event activity exists for a received event. event key. the item type and item key for that process are included in the parameter list within the event message. but the specified process includes an eligible Receive event activity marked as a Start activity. In this case. event_message in wf_event_t). if they have been defined. If the item key does not already exist. • An activity marked as a Start activity can only receive an event if it has never been executed. Note: If the event received by a Receive event activity was originally raised by a Raise event activity in another workflow process. the activity must have an appropriate status. If the specified item key already exists. and event message in the item type attributes specified in the event activity node. An activity is only eligible to receive an event if its event filter is either blank or set to that particular event. the Workflow Engine creates a new item running that process. the Workflow Engine automatically sets the specified process as the parent for the process that receives the event. meaning the process has transitioned to that activity and is waiting to receive the event. Within the workflow process that receives the event.Event PL/SQL Syntax procedure Event (itemtype in varchar2. creating new item type attributes if a corresponding attribute does not already exist for any parameter.

If this argument is null. An optional argument that allows the selection of a particular subprocess for that item type. For example. Arguments (input) itemtype itemkey A valid item type. process_name event_message 8 – 76 Oracle Workflow Guide . A string that uniquely identifies the item within an item type. The item type and key together identify the process. The event message containing the details of the event. Provide the process activity’s label name. <parent_process_internal_name>:<label_name>.overriding any existing parent setting. This argument defaults to null. 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. See: SetItemParent: page 8 – 79. the top level process for the item is started.

this procedure clears the activity specified and all activities following it that have already been transitioned to by reexecuting each activity in ’Cancel’ mode. this procedure resets any parent processes of the specified activity to a status of ’Active’.HandleError PL/SQL Syntax procedure HandleError (itemtype in varchar2. Description This procedure is generally called from an activity in an ERROR process to handle any process activity that has encountered an error. The activity can also be in a subprocess. Once the activities are cleared. If the activity node label name does not uniquely identify the subprocess you can activity Oracle Workflow APIs 8 – 77 . The string uniquely identifies the item within an item type. 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. command in varchar2. If the On_Revisit flag is set to Reset. itemkey in varchar2. result in varchar2). activity in varchar2. You can also call this procedure for any arbitrary activity in a process. See: Looping: page 8 – 10. The activity node that encountered the error or that you want to undo. to rollback part of your process to that activity. The item type and key together identify the process. Arguments (input) item_type item_key A valid item type. there are no other executed activities following it. The procedure then handles the specified activity based on the command you provide: SKIP or RETRY. so the procedure simply clears the errored activity. A string generated from the application object’s primary key. For an activity in the ’Error’ state. <parent_process_internal_name>:<label_name>. The activity that you call this procedure with can have any status and does not have to have been executed. Provide the label name of the activity node. For example. if they are not already active.

<parent_process_internal_name>:<label_name>. For example. – Purge the existing item by calling WF_ENGINE. – Revise the process. – Recreate the item by calling WF_ENGINE. 8 – 78 Oracle Workflow Guide . you may want to use HandleError to manually make changes to your process for an existing item. but mark the activity as complete with the supplied result and continue execution of the process from that activity.HandleError( ). you can use HandleError to manually push an item through activities that will error or redirect the item to take different transitions in the process. If the changes you make to a process are minor. – Restart the revised process at the appropriate activity by calling WF_ENGINE.precede the label name with the internal name of its parent process. Note: An item’s active date and the version number of the process that the item is transitioning through can never change once an item is created. however.Items( ). then you need to perform at least the following steps: – Abort the process by calling WF_ENGINEAbortProcess( ). If the changes you want to make to a process are extensive. Occasionally. RETRY—reexecute the activity and continue execution of the process from that activity. result The result you wish to supply if the command is SKIP.CreateProcess( ). command One of two commands that determine how to handle the process activity: SKIP—do not reexecute the activity.

The string uniquely identifies the item within an item type. parent_itemtype parent_itemkey parent_context Oracle Workflow APIs 8 – 79 . but before you call the StartProcess API for the detail process. Description Defines the parent/child relationship for a master process and a detail process. A string generated from the application object’s primary key. parent_itemtype in varchar2. This API must be called by any detail process spawned from a master process to define the parent/child relationship between the two processes. The item type and key together identify the child process. The parent item type and key together identify the parent process. Arguments (input) itemtype itemkey A valid item type. A valid item type for the parent process.SetItemParent PL/SQL Syntax procedure SetItemParent (itemtype in varchar2. A string generated from the application object’s primary key to uniquely identify the item within the parent item type. Context information about the parent. You make a call to this API after you call the CreateProcess API. itemkey in varchar2. parent_itemkey in varchar2. parent_context in varchar2).

Arguments (input) wCtx Workflow context information. The example code is from the WFTest. // get status and result for this item dataSource = WFEngineAPI. The string uniquely identifies the item within an item type. System. then the item key does not exist and will thus cause the procedure to raise an exception. A string generated from the application object’s primary key. itemtype itemkey Example The following code excerpt shows an example of how to call itemStatus() in a Java program. The item type and key together identify the item instance. or SUSPENDED.java program. status out varchar2. result out varchar2). String itemKey) Description Returns the status and result for the root process of the specified item instance. ERROR.out. A valid item type. If the root process does not exist. dataSource). 8 – 80 Oracle Workflow Guide .itemStatus(ctx. Required for the Java method only. iType. COMPLETE. displayDataSource(ctx.ItemStatus PL/SQL Syntax procedure ItemStatus (itemtype in varchar2. itemkey in varchar2.print(”Status and result for ” + iType + ”/” + iKey + ” = ”). Possible values returned for the status are: ACTIVE. See: Oracle Workflow Context: page 8 – 6. String itemType. Java Syntax public static WFTwoDDataSource itemStatus (WFContext wCtx. iKey).

wCtx Workflow context information. String itemType. you can simply provide any negative number and the method will return the process status for the root process. If the instance ID is unknown. See: Oracle Workflow Context: page 8 – 6. A string generated from the application object’s primary key. A valid item type. See: CreateProcess: page 8 – 21. The string uniquely identifies the item within an item type. String itemKey. Required for the Java method only. A process instance ID for the item type. The item type and key together identify the process. itemType itemKey process Oracle Workflow APIs 8 – 81 . BigDecimal process) Description Arguments (input) Returns the process status for the given item type instance as a two dimensional data object.getProcessStatus Java Syntax public static WFTwoDDataSource getProcessStatus (WFContext wCtx.

as well as the execute() method which forms the main entry point function of the external Java function activity being implemented.Workflow Function APIs The WFFunctionAPI Java class is the abstract class from which the Java procedures for all external Java function activities are derived. The following list shows the APIs available in this class.fnd.apps. .wf Java package. The WFFunctionAPI class is stored in the oracle. This class contains methods for accessing item type and activity attributes.

Attention: Java is case–sensitive and all Java method names begin with a lower case letter to follow Java naming conventions. • loadItemAttributes: page 8 – 83 • loadActivityAttributes: page 8 – 84 • getActivityAttr: page 8 – 85 • getItemAttr: page 8 – 87 • setItemAttrValue: page 8 – 88 • execute: page 8 – 89 See Also Standard API for Java Procedures Called by Function Activities: page 7–8 Function Activity: page 4 – 44 8 – 82 Oracle Workflow Guide .

See: Oracle Workflow Context: page 8 – 6. this method throws a SQLException. 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.loadItemAttributes Java Syntax public void loadItemAttributes (WFContext pWCtx) throws SQLException Description Retrieves the item attributes from the database for the item type from which the external Java function was called. Oracle Workflow APIs 8 – 83 . If a database access error occurs. Arguments (input) pWCtx Workflow context information.

The item type and key together identify the process. The string uniquely identifies the item within an item type. See: CreateProcess: page 8 – 21. String iType. See: Oracle Workflow Context: page 8 – 6. actid 8 – 84 Oracle Workflow Guide . This method is called by default when the function activity is instantiated and before the execute() function is called.loadActivityAttributes Java Syntax public void loadActivityAttributes (WFContext pWCtx. A string generated from the application object’s primary key. BigDecimal actid) throws SQLException Description Retrieves the activity attributes from the database for the specified activity. An activity instance ID. String iKey. Arguments (input) pWCtx iType iKey Workflow context information. A valid item type. If a database access error occurs. this method throws a SQLException.

and if the activity attribute points to an item attribute. which also becomes the activity attribute value. For example. you can first use getActivityAttr(String aName) to retrieve the item attribute name.getActivityAttr Java Syntax public WFAttribute getActivityAttr (String aName) Java Syntax public WFAttribute getActivityAttr (WFContext pWCtx. or if the item attributes have not been loaded. this method returns the activity attribute. if you want to write information back to the item attribute. the method calls loadItemAttributes(WFContext pWCtx) to load them. With the item attribute name. the method attempts to resolve the reference by retrieving the value of that item attribute. • If you call getActivityAttr(String aName) with only the activity attribute name. You can use getActivityAttr(WFContext pWCtx. String aName) with both the Workflow context and the activity attribute name. this method returns the activity attribute value but does not attempt to resolve any reference to an item attribute. These methods return the activity attribute information for the specified activity attribute. • If you call getActivityAttr(WFContext pWCtx. this method throws a SQLException. See: setItemAttrValue: page 8 – 88. and you do not need to know which item attribute it references. String aName) throws SQLException Description There are two implementations of getActivityAttr(). WFAttribute pAttr) to set the item attribute value. String aName) when you want to obtain the actual activity attribute value. Then use setItemAttrValue(WFContext pWCtx. If an activity attribute does point to an item attribute. If a database access error occurs. See: loadItemAttributes: page 8 – 83. you can then perform additional processing based on the item attribute. this method returns the internal name of the item attribute. This method attempts to resolve the reference within the previously loaded item attributes. Oracle Workflow APIs 8 – 85 .

See: Oracle Workflow Context: page 8 – 6. Required for the second method only.Arguments (input) pWCtx Workflow context information. The internal name of an activity attribute. aName 8 – 86 Oracle Workflow Guide .

getItemAttr Java Syntax public WFAttribute getItemAttr (String aName) Description Arguments (input) Returns the item attribute information for the specified item attribute. aName The internal name of an item attribute. Oracle Workflow APIs 8 – 87 .

WFException Description Sets the value of the specified item attribute in the database.setItemAttrValue Java Syntax public void setItemAttrValue (WFContext pWCtx. The attribute information for an item attribute. See: Oracle Workflow Context: page 8 – 6. Arguments (input) pWCtx pAttr Workflow context information. 8 – 88 Oracle Workflow Guide . WFAttribute pAttr) throws NumberFormatException. The method throws a WFException if it encounters an error while setting an attribute of type document or text. This method throws a NumberFormatException if it cannot convert the value to the appropriate format for an attribute of type number or date.

Arguments (input) pWCtx Workflow context information.execute Java Syntax public abstract boolean execute (WFContext pWCtx) 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: Oracle Workflow Context: page 8 – 6. See: Standard API for Java Procedures Called by Function Activities: page 7 – 8. Oracle Workflow APIs 8 – 89 .

attribute value. and default value type.wf Java package. This class also contains methods for accessing the attribute information.apps.fnd. The attribute value is stored as an Object type. format information. attribute data type. The following list shows the APIs available in this class. . The WFAttribute class is stored in the oracle.Workflow Attribute APIs The WFAttribute Java class contains descriptive information for an item or activity attribute. which can be called by a Java application or the Java procedure for an external Java function activity. including the internal name of the attribute.

8 – 90 Oracle Workflow Guide . • WFAttribute: page 8 – 92 • value: page 8 – 93 • getName: page 8 – 94 • getValue: page 8 – 95 • getType: page 8 – 96 • getFormat: page 8 – 97 • getValueType: page 8 – 98 • toString: page 8 – 99 • compareTo: page 8 – 100 See Also Standard API for Java Procedures Called by Function Activities: page 7–8 WFAttribute Class Constants The WFAttribute class contains several constants. The following table shows the constants that can be used to represent the data type of an attribute. except the constructor method names. Attention: Java is case–sensitive and all Java method names. begin with a lower case letter to follow Java naming conventions.

for an activity attribute. a reference to an item type attribute. The default value can be either a constant or.Constant Variable Declaration Constant Value public static final String TEXT public static final String NUMBER public static final String DATE public static final String LOOKUP public static final String FORM public static final String URL public static final String DOCUMENT public static final String ROLE public static final String EVENT Table 8 – 3 (Page 1 of 1) ”TEXT” ”NUMBER” ”DATE” ”LOOKUP” ”FORM” ”URL” ”DOCUMENT” ”ROLE” ”EVENT” The following table shows the constants that can be used to represent the type of the default value for an attribute. Constant Variable Declaration Constant Value public static final String CONSTANT public static final String ITEMATTR Table 8 – 4 (Page 1 of 1) ”CONSTANT” ”ITEMATTR” Oracle Workflow APIs 8 – 91 .

The data type of the attribute. Required for the second method only. value. and value type. pValueType) Description There are two constructor methods for the WFAttribute class. The second constructor creates a new WFAttribute object and initializes it with the specified attribute name. Required for the second method only. for an activity attribute. pValue. Required for the second method only. The type of the default value for the attribute. The attribute value. 8 – 92 Oracle Workflow Guide . attribute type. a reference to an item type attribute. The default value can be either a constant or. Required for the second method only. Arguments (input) pName pType pValue pValueType The internal name of an item or activity attribute. The first constructor creates a new WFAttribute object.WFAttribute Java Syntax Java Syntax public WFAttribute() public WFAttribute (String String Object String pName pType.

value Java Syntax public void value (Object pValue) Description Sets the value of the item or activity attribute within a WFAttribute object. . The value must be cast to the Object type.

See: setItemAttrValue: page 8 – 88.setItemAttrValue(). Oracle Workflow APIs 8 – 93 . use WFFunctionAPI. To set the value of an item attribute in the database. The attribute value. Arguments (input) pValue Attention: Using value() to set the attribute value within a WFAttribute object does not set the attribute value in the database.

getName Java Syntax Description public String getName() Returns the internal name of the item or activity attribute. 8 – 94 Oracle Workflow Guide .

getValue Java Syntax Description public Object getValue() Returns the value of the item or activity attribute as type Object. Oracle Workflow APIs 8 – 95 .

8 – 96 Oracle Workflow Guide . See: Attribute Types: page 4 – 3.getType Java Syntax Description public String getType() Returns the data type of 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.getFormat Java Syntax Description public String getFormat() Returns the format string for the item or activity attribute. Oracle Workflow APIs 8 – 97 .

getValueType Java Syntax Description public String getValueType() Returns the type of the default value for the item or activity attribute. for an activity attribute. a reference to an item type attribute. The default value can be either a constant or. 8 – 98 Oracle Workflow Guide . See: To Define an Item Type or Activity Attribute: page 4 – 8.

toString Java Syntax Description public String toString() Returns the internal name and the value of the item or activity attribute as a string in the following format: <name>=<value> This method overrides the toString() method in the Object class. Oracle Workflow APIs 8 – 99 .

compareTo Java Syntax public int compareTo (String pValue) throws Exception Description Compares the value of the item or activity attribute with the specified value. 8 – 100 Oracle Workflow Guide . –1 if the attribute value is less than the specified value. compareTo() returns 0 if the two values are equal. Arguments (input) pValue The test value to compare to the attribute 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. or 1 if the attribute value is greater than the specified value.

or returns a result beginning with ’ERROR:’. the information in these columns. These APIs are stored in the PL/SQL package called WF_CORE. Note: The columns ERROR_NAME. ERROR_MESSAGE. and ERROR_STACK are also defined as item type attributes for the System: Error predefined item type. • CLEAR: page 8 – 102 • GET_ERROR: page 8 – 103 • TOKEN: page 8 – 104 • RAISE: page 8 – 105 • CONTEXT: page 8 – 108 • TRANSLATE: page 8 – 110 See Also Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 Oracle Workflow APIs 8 – 101 . and ERROR_STACK in the table WF_ITEM_ACTIVITY_STATUSES to reflect the error. ERROR_MESSAGE.Workflow Core APIs PL/SQL procedures called by function activities can use a set of core Oracle Workflow APIs to raise and catch errors. the Workflow Engine sets the function activity’s status to ERROR and sets the columns ERROR_NAME.CONTEXT( ). See: Default Error Process: page 6 – 26. You can reference from the error process that you associate with an activity. The columns ERROR_NAME and ERROR_MESSAGE get set to either the values returned by a call to WF_CORE. The following APIs can be called by an application program or workflow function in the runtime phase to handle error processing. regardless of the error source. When a PL/SQL procedure called by a function activity either raises an unhandled exception. or to the SQL error name and message if no call to RAISE( ) is found. The column ERROR_STACK gets set to the contents set by a call to WF_CORE.RAISE( ).

Clears the error buffers. See Also GET_ERROR: page 8 – 103 8 – 102 Oracle Workflow Guide .CLEAR Syntax Description procedure CLEAR.

end if. Also clears the error stack. exception when others then wf_core. Returns null if there is no current error. . /*Handle unexpected errors in your workflow code by raising WF_CORE exceptions. include an exception handler to deal with unexpected errors. –– Wf error occurred. else –– Not a wf error. if (err_name is not null) then wf_core.. Example 1 See Also CLEAR: page 8 – 102 Oracle Workflow APIs 8 – 103 . end.. When calling any public Workflow API.get_error(err_name. Signal error as appropriate. Wf_Engine. Handle otherwise.GET_ERROR Syntax procedure GET_ERROR (err_name out varchar2.*/ declare errname varchar2(30). errstack varchar2(32000).. err_msg.clear. result_code). itemkey. begin . err_stack). err_message out varchar2 err_stack out varchar2). errmsg varchar2(2000).CompleteActivity(itemtype. Description Returns the name of a current error message and the token substituted error message. activity..

This is an alternative to raising PL/SQL standard exceptions or custom–defined exceptions. Calls to TOKEN( ) and RAISE( ) raise predefined errors for Oracle Workflow that are stored in the WF_RESOURCES table. Value to substitute for the token.TOKEN Syntax procedure TOKEN (token_name in varchar2. The error messages contain tokens that need to be replaced with relevant values when the error message is raised. Description Defines an error token and substitutes it with a value. token_value in varchar2). Arguments (input) token_name token_value Name of the token. See Also RAISE: page 8 – 105 CONTEXT: page 8 – 108 8 – 104 Oracle Workflow Guide .

Error messages for Oracle Workflow are initially defined in message files (. type: wfresgen [–v] –f <resourcefile> <source_file> Oracle Workflow APIs 8 – 105 . During the installation of the Oracle Workflow server. Description Raises an exception to the caller by supplying a correct error number and token substituted message for the name of the error message provided.RAISE Syntax procedure RAISE (name in varchar2). The error messages contain tokens that need to be replaced with relevant values when the error message is raised. This is an alternative to raising PL/SQL standard exceptions or custom–defined exceptions. The message files are located in the res/<language> subdirectory of the Oracle Workflow server directory structure for the standalone version of Oracle Workflow or on your server in the resource/<language> subdirectory under $FND_TOP for the Oracle Applications–embedded version of Oracle Workflow. Run the program from your operating system prompt as follows: • To generate a binary resource file from a source file (. The Workflow Resource Generator program is located in the bin subdirectory of the Oracle Home directory structure. See Also TOKEN: page 8 – 104 CONTEXT: page 8 – 108 " To run the Workflow Resource Generator For the standalone version of Oracle Workflow: 1. Calls to TOKEN( ) and RAISE( ) raise predefined errors for Oracle Workflow that are stored in the WF_RESOURCES table. 2. a program called Workflow Resource Generator takes the designated message files and imports the messages into the WF_RESOURCES table.msg).msg). Arguments (input) name Internal name of the error message as stored in the table WF_RESOURCES.

Destination Type Destination 8 – 106 Oracle Workflow Guide . Submit the Workflow Resource Generator concurrent program as a request. If you specify ”Database” for Destination Type. Oracle Applications User’s Guide. Note: 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. enter values for the following parameters: Specify ”Database”. then the program automatically uses the current database account as its destination. See: Submitting a Request. In the Parameters window.msg) to the database table WF_RESOURCES. navigate to the Submit Requests form. or ”File”. • To upload seed data from a source file (. password and Oracle Net connect string or alias to your database and <source_file> with the full path and name of the source file you want to upload. The optional –v flag causes the program to validate the source file against the database. 4. type: wfresgen [–v] –u <username/password@database> <lang> <source_file> Replace <username/password@database> with the username. To run the concurrent program from the Submit Requests form. If you specify ”File” for Destination Type. then enter the full path and name of the resource file you wish to generate. See: Overview of Concurrent Programs and Requests. For Oracle Workflow embedded in Oracle Applications: 1. 3. You can run the Workflow Resource Generator concurrent program from the Submit Requests form or from the command line. 2.msg).Replace <resourcefile> with the full path and name of the resource file you want to generate. to upload seed data to the database table WF_RESOURCES from a source file (. and <source_file> with the full path and name of your source file. Oracle Applications System Administrator’s Guide. The Workflow Resource Generator program is registered as a concurrent program. The optional –v flag causes the program to validate the source file against the binary resource file. to generate a resource file from a source file.

you can also run the Workflow Resource Generator concurrent program from the command line using one of two commands. When you finish modifying the print and run options for this request. type: WFRESGEN apps/pwd 0 Y DATABASE source_file Replace apps/pwd with the username and password to the APPS schema.. and replace source_file with the file specification of a source file (. choose Submit to submit the request.msg). replace res_file with the file specification of a resource file. A file specification is specified as: @<application_short_name>:[<dir>/. To generate a resource file from a source file. 7. Choose OK to close the Parameters window. 6.ext or <native path> Oracle Workflow APIs 8 – 107 . type: WFRESGEN apps/pwd 0 Y FILE res_file source_file To upload seed data to the database table WF_RESOURCES from a source file. Specify the full path and name of your source file.. Rather than use the Submit Requests form.Source 5./]file.

with custom–defined exceptions. Procedure or function name. VARCHAR2 DEFAULT VARCHAR2 DEFAULT VARCHAR2 DEFAULT VARCHAR2 DEFAULT VARCHAR2 DEFAULT ’*none*’. /*PL/SQL procedures called by function activities can use the WF_CORE APIs to raise and catch errors the same way the Workflow Engine does.. nth IN argument.CONTEXT Syntax procedure CONTEXT (pkg_name proc_name arg1 arg2 arg3 arg4 arg5 IN IN IN IN IN IN IN VARCHAR2. begin if (<error condition>) then Wf_Core. Use this procedure with predefined errors raised by calls to TOKEN( ) and RAISE( ).. ’*none*’. ’*none*’.Token(’ARG2’. ’*none*’)...*/ package My_Package is procedure MySubFunction( arg1 in varchar2.Token(’ARG1’. or even without exceptions whenever an error condition is detected. arg2). Arguments (input) pkg_name proc_name arg1 argn Example 1 Name of the procedure package. arg2 in varchar2) is .Raise(’ERROR_NAME’). end if. . Description Adds an entry to the error stack to provide context information that helps locate the source of an error. exception when others then 8 – 108 Oracle Workflow Guide . First IN argument. Wf_Core. ’*none*’. arg1). VARCHAR2. Wf_Core.

funmode). end.Wf_Core. itemkey. ’MySubFunction’. itemkey in varchar2. See Also TOKEN: page 8 – 104 RAISE: page 8 – 105 Oracle Workflow APIs 8 – 109 . begin MySubFunction(arg1. ’MyFunction’. procedure MyFunction( itemtype in varchar2.Context(’My_Package’. itemtype.. funcmode in varchar2. else raise.Error_Name = ’ERROR_NAME’) then –– This is an error I wish to ignore.Context(’My_Package’. arg2). end MyFunction. . exception when others then if (Wf_Core.Clear.. result out varchar2) is .. end MySubFunction. exception when others then Wf_Core. arg1. Wf_Core. actid in number... end if. arg2). to_char(actid). raise.. begin . raise.

tkn_name Token name. Description Arguments (input) Translates the string value of a token by returning the value for the token as defined in WF_RESOURCES for your language setting.TRANSLATE Syntax function TRANSLATE (tkn_name IN VARCHAR2) return VARCHAR2. 8 – 110 Oracle Workflow Guide .

has expired. See: Persistence Type: page 4 – 4. with the exception of TotalPerm( ). you should use the procedure TotalPerm( ). These APIs are defined in the PL/SQL package called WF_PURGE. in days. . Persistence_type is set to TEMP by default and should not be changed. the WF_Purge APIs only purge data associated with Temporary item types.Workflow Purge APIs The following APIs can be called by an application program or workflow function in the runtime phase to purge obsolete runtime data. and to purge information for obsolete activity versions that are no longer in use. You may want to periodically purge this obsolete data from your system to increase performance. If you need to purge runtime data for item types with Permanent persistence. When the variable is set to TEMP. A PL/SQL variable called ”persistence_type”in the WF_PURGE package defines how all the WF_PURGE APIs behave. whose persistence. WF_PURGE can be used to purge obsolete runtime data for completed items and processes.

WF_PURGE. The three most commonly used procedures are: WF_PURGE. and notifications sent by them WF_PURGE.ITEMS – purge all runtime data associated with completed items. and can be used in circumstances where a full purge is not desired.TOTAL – purge both item data and activity data The other auxiliary routines purge only certain tables or classes of data. you may inadvertently violate the persistence period for Temporary item types. Attention: You cannot run any WF_PURGE API for a future end date. their processes.ACTIVITIES – purge obsolete versions of activities that are no longer in use by any item. By entering a future end date. The complete list of purge APIs are as follows: • Items: page 8 – 113 • Activities: page 8 – 114 • Notifications: page 8 – 115 • Total: page 8 – 116 • TotalPERM: page 8 – 117 Oracle Workflow APIs 8 – 111 . The WF_PURGE APIs will display an error message if you enter a future end date.

you can also use the ”Purge Obsolete Workflow Runtime Data” concurrent program to purge obsolete item type runtime status information. For more information. Note: If you are using the standalone version of Oracle Workflow available with Oracle9i Release 2. See Also Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 Purging for Performance: page C – 8 8 – 112 Oracle Workflow Guide . See: Purge Obsolete Workflow Runtime Data: page 8 – 119. please refer to the Oracle Workflow Manager online help.• AdHocDirectory: page 8 – 118 Note: If you are using the version of Oracle Workflow embedded in Oracle Applications. you can use the standalone Oracle Workflow Manager component available through Oracle Enterprise Manager to submit and manage Workflow purge database jobs.

If you want Items() to commit data as it purges to reduce rollback segments and improve performance. and end date.Items Syntax procedure Items (itemtype in varchar2 default null. Specified date to delete up to. If null. Leave this argument null to delete all item types. specify TRUE. WF_ITEM_ACTIVITY_STATUSES. docommit in boolean default TRUE). Specify TRUE or FALSE to indicate whether to commit data while purging. Description Deletes all items for the specified item type. A string generated from the application object’s primary key. Deletes from the tables WF_NOTIFICATIONS. the procedure purges all items in the specified itemtype. Arguments (input) itemtype itemkey Item type to delete. enddate in date default sysdate. itemkey in varchar2 default null. including process status and notification information. The string uniquely identifies the item within an item type. Defaults to TRUE. and/or item key. If you do not want to perform automatic commits. specify FALSE. WF_ITEM_ATTRIBUTE_VALUES and WF_ITEMS. enddate docommit Oracle Workflow APIs 8 – 113 .

enddate in date default sysdate). Specified date to delete up to. Leave this argument null to delete all activities for the specified item type. have an END_DATE less than or equal to the specified end date and are not referenced by an existing item as either a process or activity. and WF_ACTIVITIES that are associated with the specified item type. WF_ACTIVITY_TRANSITIONS. WF_ACTIVITY_ATTRIBUTES_TL. Internal name of activity to delete. Leave this argument null to delete activities for all item types. Description Deletes old versions of eligible activities from the tables WF_ACTIVITY_ATTR_VALUES. WF_ACTIVITY_ATTRIBUTES. WF_PROCESS_ACTIVITIES. name enddate 8 – 114 Oracle Workflow Guide . Arguments (input) itemtype Item type associated with the activities you want to delete. WF_ACTIVITIES_TL. Note: You should call Items( ) before calling Activities( ) to avoid having obsolete item references prevent obsolete activities from being deleted. name in varchar2 default null.Activities Syntax procedure Activities (itemtype in varchar2 default null.

enddate in date default sysdate). Description Deletes old eligible notifications from the tables WF_NOTIFICATION_ATTRIBUTES and WF_NOTIFICATIONS that are associated with the specified item type. Leave this argument null to delete notifications for all item types. enddate Oracle Workflow APIs 8 – 115 . Note: You should call Items( ) before calling Notifications( ) to avoid having obsolete item references prevent obsolete notifications from being deleted. Arguments (input) itemtype Item type associated with the notifications you want to delete. have an END_DATE less than or equal to the specified end date and are not referenced by an existing item. Specified date to delete up to.Notifications Syntax procedure Notifications (itemtype in varchar2 default null.

Specified date to delete up to. Total() also deletes ad hoc roles and users that are no longer in use by calling AdHocDirectory(). 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. Defaults to TRUE. Specify TRUE or FALSE to indicate whether to commit data while purging. Use Total() as part of your routine maintenance during periods of low activity. docommit in boolean default TRUE). use Items(). Arguments (input) itemtype Item type associated with the obsolete runtime data you want to delete. it is more costly in performance than Items(). specify FALSE. If null. The string uniquely identifies the item within an item type.Total Syntax procedure Total (itemtype in varchar2 default null. If you want Total() to commit data as it purges to reduce rollback segments and improve performance. If you want to purge a specific item key. See: Items: page 8 – 113. A string generated from the application object’s primary key. enddate in date default sysdate. If you do not want to perform automatic commits. itemkey enddate docommit 8 – 116 Oracle Workflow Guide . the procedure purges all items in the specified itemtype. specify TRUE. Because Total() purges all activities and ad hoc role information. Leave this argument null to delete obsolete runtime data for all item types. See: AdHocDirectory: page 8 – 118. itemkey in varchar2 default null.

Defaults to TRUE. enddate in date default sysdate. 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. the procedure purges all items in the specified itemtype. Specify TRUE or FALSE to indicate whether to commit data while purging. A string generated from the application object’s primary key. See: Total: page 8 – 116. The string uniquely identifies the item within an item type. Arguments (input) itemtype Item type associated with the obsolete runtime data you want to delete. specify TRUE. specify FALSE. TotalPERM() is similar to Total() except that TotalPERM() deletes only items with a persistence type of ’PERM’. itemkey in varchar2 default null. If null. Leave this argument null to delete obsolete runtime data for all item types. itemkey enddate docommit Oracle Workflow APIs 8 – 117 .TotalPERM Syntax procedure TotalPERM (itemtype in varchar2 default null. Specified date to delete up to. docommit in boolean default TRUE). If you do not want to perform automatic commits. If you want TotalPERM() to commit data as it purges to reduce rollback segments and improve performance.

8 – 118 Oracle Workflow Guide .AdHocDirectory Syntax procedure AdHocDirectory (end_date in date default sysdate). 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.

" To Purge Obsolete Workflow Runtime Data 1.Purge Obsolete Workflow Runtime Data Concurrent Program If you are using the version of Oracle Workflow embedded in Oracle Applications. Navigate to the Submit Requests form in Oracle Applications to submit the Purge Obsolete Workflow Runtime Data concurrent program. See: Submitting a Request. 2. For more information. you can use Oracle Workflow Manager to submit and manage the Purge Obsolete Workflow Runtime Data concurrent program. Minimum age of data to purge. enter values for the following parameters: Item type associated with the obsolete runtime data you want to delete. Note: If you are using the version of Oracle Workflow embedded in Oracle Applications and you have implemented Oracle Applications Manager. the program purges all items in the specified itemtype. Item Type Item Key Age Oracle Workflow APIs 8 – 119 . The string uniquely identifies the item within an item type. Submit the Purge Obsolete Workflow Runtime Data concurrent program as a request. Use the Submit Requests form in Oracle Applications to submit this concurrent program. The executable name for this concurrent program is ”Oracle Workflow Purge Obsolete Data” and its short name is FNDWFPR. Oracle Applications System Administrator’s Guide. If null. in days. Oracle Applications User’s Guide. if the persistence type is set to ’TEMP’. A string generated from the application object’s primary key. The default is 0. In the Parameters window. When you install and set up Oracle Applications and Oracle Workflow. please refer to the Oracle Applications Manager online help. Leave this argument null to delete obsolete runtime data for all item types. See: Overview of Concurrent Programs and Requests. 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. you can submit the Purge Obsolete Workflow Runtime Data concurrent program to purge obsolete item type runtime status information. 3.

When you finish modifying the print and run options for this request. 8 – 120 Oracle Workflow Guide . 5. either ’TEMP’ for Temporary or ’PERM’ for Permanent. Persistence type to be purged. choose Submit to submit the request. The default is ’TEMP’. Choose OK to close the Parameters window.Persistence Type 4.

Workflow Directory Service APIs The following APIs can be called by an application program or a workflow function in the runtime phase to retrieve information about existing users and roles. • GetRoleUsers: page 8 – 123 • GetUserRoles: page 8 – 124 • GetRoleInfo: page 8 – 125 • GetRoleInfo2: page 8 – 126 • IsPerformer: page 8 – 127 • UserActive: page 8 – 128 • GetUserName: page 8 – 129 • GetRoleName: page 8 – 130 • GetRoleDisplayName: page 8 – 131 • SetAdHocUserStatus: page 8 – 132 • SetAdHocRoleStatus: page 8 – 133 • CreateAdHocUser: page 8 – 134 • CreateAdHocRole: page 8 – 136 • AddUsersToAdHocRole: page 8 – 138 • SetAdHocUserExpiration: page 8 – 139 • SetAdHocRoleExpiration: page 8 – 140 • SetAdHocUserAttr: page 8 – 141 • SetAdHocRoleAttr: page 8 – 142 • RemoveUsersFromAdHocRole: page 8 – 143 . as well as create and manage new ad hoc users and roles in the directory service. These APIs are defined in a PL/SQL package called WF_DIRECTORY.

Attention: If you implement OID integration. because you risk discrepancies in your user information and unpredictable results if you use any tool other than OID to maintain users after integrating with OID. SetAdHocUserStatus( ). you must maintain your users only through OID. You must not create ad hoc users in the WF_LOCAL_USERS table. Oracle Workflow APIs 8 – 121 . you must not use the CreateAdHocUser( ). Consequently. SetAdHocUserExpiration( ). if you implement OID integration. or SetAdHocUserAttr( ) APIs in the WF_DIRECTORY package.

since Workflow roles are not maintained through OID. See Also Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 8 – 122 Oracle Workflow Guide . however.You can still use ad hoc roles.

role A valid role name. Oracle Workflow APIs 8 – 123 . Description Arguments (input) Returns a table of users for a given role. users out UserTable).GetRoleUsers Syntax procedure GetRoleUsers (role in varchar2.

GetUserRoles Syntax procedure GetUserRoles (user in varchar2. roles out RoleTable). 8 – 124 Oracle Workflow Guide . user A valid username. Description Arguments (input) Returns a table of roles that a given user is assigned to.

’MAILHTML’. Notification_Preference out varchar2. ’SUMMARY’) • Language • Territory Arguments (input) role A valid role name. ’MAILTEXT’. Territory out varchar2). Display_Name out varchar2.GetRoleInfo Syntax procedure GetRoleInfo (Role in varchar2. Description Returns the following information about a role: • Display name • E–mail address • Notification Preference (’QUERY’. Oracle Workflow APIs 8 – 125 . Email_Address out varchar2. ’MAILATTH’. Language out varchar2.

’SUMMARY’) • Language • Territory • E–mail address • FAX • Status • Expiration Date Arguments (input) role A valid role name. 8 – 126 Oracle Workflow Guide . ’MAILATTH’.GetRoleInfo2 Syntax procedure GetRoleInfo2 (Role in varchar2. Description Returns the following information about a role in a SQL table: • Display name • Description • Notification Preference (’QUERY’. Role_Info_Tbl out wf_directory. ’MAILTEXT’.wf_local_roles_tbl_type). ’MAILHTML’.

user role A valid username. A valid role name. Oracle Workflow APIs 8 – 127 . Description Arguments (input) Returns true or false to identify whether a user is a performer of a role. role in varchar2).IsPerformer Syntax function IsPerformer (user in varchar2.

Description Determines if a user currently has a status of ’ACTIVE’ and is available to participate in a workflow. Returns TRUE if the user has a status of ’ACTIVE’.UserActive Syntax function UserActive (username in varchar2) return boolean. Arguments (input) username A valid username. 8 – 128 Oracle Workflow Guide . otherwise it returns FALSE.

p_display_name out varchar2). p_orig_system_id in varchar2. Oracle Workflow APIs 8 – 129 . p_name out varchar2. p_orig_system_id ID of a row in the original repository table. Description Arguments (input) Returns a Workflow display name and username for a user given the system information from the original user and roles repository. p_orig_system Code that identifies the original repository table.GetUserName Syntax procedure GetUserName (p_orig_system in varchar2.

8 – 130 Oracle Workflow Guide . p_orig_system_id ID of a row in the original repository table. p_orig_system_id in varchar2.GetRoleName Syntax procedure GetRoleName (p_orig_system in varchar2. Description Arguments (input) Returns a Workflow display name and role name for a role given the system information from the original user and roles repository. p_name out varchar2. p_orig_system Code that identifies the original repository table. p_display_name out varchar2).

WNPS). pragma restrict_references(GetRoleDisplayName.GetRoleDisplayName Syntax function GetRoleDisplayName (p_role_name in varchar2) return varchar2. Oracle Workflow APIs 8 – 131 . p_role_name The internal name of the role. WNDS. Description Arguments (input) Returns a Workflow role’s display name given the role’s internal name.

status in varchar2 default ’ACTIVE’). .SetAdHocUserStatus Syntax procedure SetAdHocUserStatus (user_name in varchar2. Description Sets the status of an ad hoc user as ’ACTIVE’ or ’INACTIVE’.

Arguments (input) Attention: If you implement Oracle Internet Directory integration. 8 – 132 Oracle Workflow Guide . you must maintain your users only through OID. You must not use the SetAdHocUserStatus( ) API to update user information in the WF_LOCAL_USERS table. If null. A status of ’ACTIVE’ or ’INACTIVE’ to set for the user. the status is ’ACTIVE’. because you risk discrepancies in your user information and unpredictable results if you use any tool other than OID to maintain users after integrating with OID. user_name status The internal name of the user.

SetAdHocRoleStatus Syntax procedure SetAdHocRoleStatus (role_name in varchar2. If null. A status of ’ACTIVE’ or ’INACTIVE’ to set for the role. role_name status The internal name of the role. status in varchar2 default ’ACTIVE’). the status is ’ACTIVE’. Description Arguments (input) Sets the status of an ad hoc role as ’ACTIVE’ or ’INACTIVE’. Oracle Workflow APIs 8 – 133 .

language in varchar2 default null. territory in varchar2 default null. display_name in out varchar2. expiration_date in date default sysdate).CreateAdHocUser Syntax procedure CreateAdHocUser (name in out varchar2. . email_address in varchar2 default null. Description Creates a user at runtime by creating a value in the WF_LOCAL_USERS table. This is referred to as an ad hoc user. description in varchar2 default null. fax in varchar2 default null. status in varchar2 default ’ACTIVE’. notification_preference in varchar2 default ’MAILHTML’.

If you do not provide an display name. Arguments (input) name Attention: If you implement Oracle Internet Directory integration. the system generates one for you where the display name contains a prefix of ’~WF_ADHOC–’ followed by a sequence number. This procedure checks that the name provided does not already exist in WF_USERS and returns an error if the name already exists. the system generates an internal name for you where the name contains a prefix of ’~WF_ADHOC–’ followed by a sequence number. If you do not provide an internal name. you must maintain your users only through OID. An internal name for the user. The name must less than 30 characters long and is all uppercase. The display name of the user. because you risk discrepancies in your user information and unpredictable results if you use any tool other than OID to maintain users after integrating with OID. display_name 8 – 134 Oracle Workflow Guide . 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. You must not use the CreateAdHocUser( ) API to create new users in the WF_LOCAL_USERS table.

the procedure resolves this to the language setting of your current session. the procedure defaults the expiration date to sysdate. ’EXTLEAVE’. ’INACTIVE’. and ’TMPLEAVE’. ’QUERY’ or ’SUMMARY’. the procedure sets the notification preference to ’MAILHTML’. The date at which the user is no longer valid in the directory service. territory description notification_ preference email_address fax status expiration_date See Also Setting Up an Oracle Workflow Directory Service: page 2 – 21 Oracle Workflow APIs 8 – 135 . If null. If null. If null. The possible statuses are ’ACTIVE’. the procedure sets the status to ’ACTIVE’. ’MAILHTML’. An optional description for the user. the procedure resolves this to the territory setting of your current session. ’MAILATTH’. If null. A optional electronic mail address for this user. The availability of the user to participate in a workflow process.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 value of the database NLS_TERRITORY initialization parameter that specifies the default territory–dependant date and numeric formatting used in the user’s notification session. Indicate how this user prefers to receive notifications: ’MAILTEXT’. An optional Fax number for the user.

expiration_date in date default sysdate).CreateAdHocRole Syntax procedure CreateAdHocRole (role_name in out varchar2. fax in varchar2 default null. The name must less than 30 characters long and is all uppercase. language in varchar2 default null. The display name of the role. role_users in varchar2 default null. The value of the database NLS_TERRITORY initialization parameter that specifies the default role_display_ name language territory 8 – 136 Oracle Workflow Guide . If you do not provide an display name. email_address in varchar2 default null. status in varchar2 default ’ACTIVE’. This is referred to as an ad hoc role. territory in varchar2 default null. role_name An internal name for the role. the system generates an internal name for you where the name contains a prefix of ’~WF_ADHOC–’ followed by a sequence number. notification_preference in varchar2 default ’MAILHTML’. role_description in varchar2 default null. This procedure checks that the display name provided does not already exist in WF_ROLES and returns an error if the display name already exists. Description Arguments (input) Creates a role at runtime by creating a value in the WF_LOCAL_ROLES table. the procedure resolves this to the language setting of your current session. This procedure checks that the name provided does not already exist in WF_ROLES and returns an error if the name already exists. The value of the database NLS_LANGUAGE initialization parameter that specifies the default language–dependent behavior of the user’s notification session. role_display_name in out varchar2. the system generates one for you where the display name contains a prefix of ’~WF_ADHOC–’ followed by a sequence number. If null. If you do not provide an internal name.

If null. EXTLEAVE. and TMPLEAVE. INACTIVE. Indicate how this role receives notifications: ’MAILTEXT’. The possible statuses are ACTIVE. ’MAILATTH’. A optional electronic mail address for this role or a mail distribution list defined by your electronic mail system. The date at which the role is no longer valid in the directory service. role_description notification_ preference An optional description for the role. the procedure sets the notification preference to ’MAILHTML’.territory–dependant date and numeric formatting used in the user’s notification session. ’MAILHTML’. If null. the procedure resolves this to the territory setting of your current session. using commas or spaces to delimit the list. role_users email_address fax status expiration_date See Also Setting Up an Oracle Workflow Directory Service: page 2 – 21 Oracle Workflow APIs 8 – 137 . An optional Fax number for the role. the procedure sets the status to ’ACTIVE’. ’QUERY’ or ’SUMMARY’. Indicate the names of the users that belong to this role. the procedure defaults the expiration date to sysdate. If null. If null. The availability of the role to participate in a workflow process.

role_name role_users The internal name of the ad hoc role. List of users delimited by spaces or commas.AddUsersToAdHocRole Syntax procedure AddUsersToAdHocRole (role_name in varchar2. Description Arguments (input) Adds users to a existing ad hoc role. role_users in varchar2). but they must already be defined in the Oracle Workflow directory service. 8 – 138 Oracle Workflow Guide . Users can be ad hoc users or users defined in an application.

.SetAdHocUserExpiration Syntax procedure SetAdHocUserExpiration (user_name in varchar2. expiration_date in date default sysdate). Description Updates the expiration date for an ad hoc user.

you must maintain your users only through OID. user_name expiration_date The internal name of the ad hoc user. Oracle Workflow APIs 8 – 139 . You must not use the SetAdHocUserExpiration( ) API to update user information in the WF_LOCAL_USERS table. If null. the procedure defaults the expiration date to sysdate. Arguments (input) Attention: If you implement Oracle Internet Directory integration. New expiration date. because you risk discrepancies in your user information and unpredictable results if you use any tool other than OID to maintain users after integrating with OID.

New expiration date. Description Arguments (input) Updates the expiration date for an ad hoc role. 8 – 140 Oracle Workflow Guide . expiration_date in date default sysdate). If null.SetAdHocRoleExpiration Syntax procedure SetAdHocRoleExpiration (role_name in varchar2. the procedure defaults the expiration date to sysdate. role_name expiration_date The internal name of the ad hoc role.

notification_preference in varchar2 default null. . display_name in varchar2 default null. email_address in varchar2 default null.SetAdHocUserAttr Syntax procedure SetAdHocUserAttr (user_name in varchar2. territory in varchar2 default null. language in varchar2 default null. fax in varchar2 default null). Description Updates the attributes for an ad hoc user.

If null. If null. ’MAILHTML’. If null. ’QUERY’ or ’SUMMARY’. A new display name for the ad hoc user. because you risk discrepancies in your user information and unpredictable results if you use any tool other than OID to maintain users after integrating with OID. you must maintain your users only through OID. user_name display_name notification_ preference The internal name of the ad hoc user to update. You must not use the SetAdHocUserAttr( ) API to update user information in the WF_LOCAL_USERS table. the notification preference is not updated. If null. If null. A new fax number for the ad hoc user. the electronic mail address is not updated. the fax number is not updated. ’MAILATTH’. Arguments (input) Attention: If you implement Oracle Internet Directory integration. If null. A new valid electronic mail address for the ad hoc user. A new value of the database NLS_LANGUAGE initialization parameter for the ad hoc user. language territory email_address fax Oracle Workflow APIs 8 – 141 . the language setting is not updated. the territory setting is not updated. the display name is not updated. A new value of the database NLS_TERRITORY initialization parameter for the ad hoc user. A new notification preference of ’MAILTEXT’.

If null.SetAdHocRoleAttr Syntax procedure SetAdHocRoleAttr (role_name in varchar2. If null. the notification preference is not updated. A new fax number for the ad hoc role. notification_preference in varchar2 default null. fax in varchar2 default null). A new notification preference of ’MAILTEXT’. A new value of the database NLS_LANGUAGE initialization parameter for the ad hoc role. role_name display_name notification_ preference language The internal name of the ad hoc role to update. Description Arguments (input) Updates the attributes for an ad hoc role. A new value of the database NLS_TERRITORY initialization parameter for the ad hoc role. If null. ’MAILHTML’. email_address in varchar2 default null. If null. territory email_address fax 8 – 142 Oracle Workflow Guide . the fax number is not updated. the territory setting is not updated. A new display name for the ad hoc role. display_name in varchar2 default null. If null. the electronic mail address is not updated. A new valid electronic mail address for the ad hoc role. the display name is not updated. the language setting is not updated. ’QUERY’ or ’SUMMARY’. territory in varchar2 default null. If null. language in varchar2 default null.

Description Arguments (input) Removes users from an existing ad hoc role. all users are removed from the role. role_users in varchar2 default null). role_name role_users The internal name of the ad hoc role. List of users to remove from the ad hoc role. Oracle Workflow APIs 8 – 143 . The users are delimited by commas or spaces.RemoveUsersFromAdHocRole Syntax procedure RemoveUsersFromAdHocRole (role_name in varchar2. If null.

Workflow LDAP APIs Call the following APIs to synchronize local user information in your Workflow directory service with the users in an LDAP directory such as Oracle Internet Directory (OID). These APIs are defined in a PL/SQL package called WF_LDAP. • Synch_changes: page 8 – 145 • Synch_all: page 8 – 146 • Schedule_changes: page 8 – 147 See Also Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30 8 – 144 Oracle Workflow Guide .

change event to alert interested parties. if there are any changes.public. If the function completes successfully. modification.Synch_changes Syntax function synch_changes return boolean. One event is raised for each changed user.user. otherwise.apps. it returns TRUE. Synch_changes( ) stores the user attribute information in an attribute cache and raises the oracle. if it encounters an exception. and deletion.wf. The function connects to the LDAP directory specified in the Global Workflow Preferences. See Also Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30 Setting Global User Preferences: page 2 – 14 User Entry Has Changed Event: page 14 – 15 Oracle Workflow APIs 8 – 145 . it returns FALSE. Description Determines whether there have been any user changes to an LDAP directory since the last synchronization by querying the LDAP change log records. including creation.

Run Synch_all( ) to begin your Workflow directory service synchronization with Oracle Internet Directory if you implement OID integration. The function connects to the LDAP directory specified in the Global Workflow Preferences. Subsequently. if it encounters an exception. One event is raised for each user. it returns FALSE.Synch_all Syntax function synch_all return boolean. and raises the oracle. stores the user attribute information in an attribute cache. otherwise. Description Retrieves all users from an LDAP directory. or as required for recovery or cleanup. If the function completes successfully.apps. See Also Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30 Setting Global User Preferences: page 2 – 14 User Entry Has Changed Event: page 14 – 15 Synch_changes: page 8 – 145 Schedule_changes: page 8 – 147 8 – 146 Oracle Workflow Guide . you can use Synch_changes( ) or Schedule_changes( ) to retrieve only changed user information. it returns TRUE.wf.change event to alert interested parties.user. Because Synch_all( ) retrieves information for all users stored in the LDAP directory. you should use this function only once during setup.public.

The default value is zero. The number of minutes in the interval to specify how often you want to run the Synch_changes( ) API. Schedule_changes( ) submits a database job using the DBMS_JOB utility to run Synch_changes( ). Run Schedule_changes( ) to maintain your Workflow directory service synchronization with Oracle Internet Directory if you implement OID integration. The default interval is ten minutes. l_hour in pls_integer default 0.Schedule_changes Syntax procedure schedule_changes (l_day in pls_integer default 0. Arguments (input) l_day The number of days in the interval to specify how often you want to run the Synch_changes( ) API. l_hour l_minute See Also Synch_changes: page 8 – 145 Synchronizing Workflow Directory Services with Oracle Internet Directory: page 2 – 30 Oracle Workflow APIs 8 – 147 . The default value is zero. The number of hours in the interval to specify how often you want to run the Synch_changes( ) API. The default value is ten. l_minute in pls_integer default 10). Description Runs the Synch_changes( ) API repeatedly at the specified time interval to check for user changes in an LDAP directory and alert interested parties of any changes.

Valid preference names are: LANGUAGE TERRITORY MAILTYPE DMHOME DATEFORMAT p_preference_ name 8 – 148 Oracle Workflow Guide . The API is defined in the PL/SQL package called WF_PREF. get_pref Syntax function get_pref (p_user_name in varchar2.Workflow Preferences API Call the following API to retrieve user preference information. To retrieve the value for a global preference. p_preference_name in varchar2) return varchar2. The name of the user preference whose value you wish to retrieve. Description Arguments (input) Retrieves the value of the specified preference for the specified user. specify the user as –WF_DEFAULT–. p_user_name The internal name of the user.

• GetAccessKey: page 8 – 150 • GetDiagramURL: page 8 – 151 • GetEnvelopeURL: page 8 – 153 • GetAdvancedEnvelopeURL: page 8 – 155 .Workflow Monitor APIs Call the following APIs to retrieve an access key or to generate a complete URL to access the various pages of the Workflow Monitor. All Workflow Monitor APIs are defined in the PL/SQL package called WF_MONITOR.

Oracle Workflow APIs 8 – 149 . The functionality of the previous GetURL API correlates directly with the new GetDiagramURL. but moving forward. you should only use the two new APIs where appropriate. Attention: The GetURL API from earlier versions of Oracle Workflow is replaced by the GetEnvelopeURL and GetDiagramURL APIs. The current version of Oracle Workflow still recognizes the GetURL API. API.

A value of YES or NO. x_item_key varchar2. Arguments (input) x_item_type x_item_key A valid item type.GetAccessKey Syntax function GetAccessKey (x_item_type varchar2. NO retrieves the access key password that runs the monitor in ’USER’ mode. Each process instance has separate access keys for running the Workflow Monitor in ’ADMIN’ mode or ’USER’ mode. x_admin_mode 8 – 150 Oracle Workflow Guide . YES directs the function to retrieve the access key password that runs the monitor in ’ADMIN’ mode. A string generated from the application object’s primary key. Description Retrieves the access key password that controls access to the Workflow Monitor. x_admin_mode varchar2) return varchar2. The string uniquely identifies the item within an item type. The item type and key together identify the process to report on.

Description Can be called by an application to return a URL that allows access to the Workflow Monitor with an attached access key password. the monitor runs in ’USER’ mode. x_item_type in varchar2. the monitor runs in ’ADMIN’ mode and if NO. The base web agent string should be stored in the WF_RESOURCES table. x_item_key in varchar2. Arguments (input) x_agent The base web agent string defined for Oracle Workflow or Oracle Self–Service Web Applications in your Web server. The URL displays the diagram for a specific instance of a workflow process in the Workflow Monitor operating in either ’ADMIN’ or ’USER’ mode. The URL returned by the function WF_MONITOR.GetDiagramURL Syntax function GetDiagramURL (x_agent in varchar2. If <YES or NO> is YES.com:portID>/<PLSQL_agent_path> Oracle Workflow APIs 8 – 151 . and looks something like: http://<server. wf_monitor. See: Setting Global User Preferences: page 2 – 14. The wf_monitor.html represents the name of the PL/SQL package procedure that generates the Workflow Monitor diagram of the process instance. <item_type> and <item_key> represent the internal name of the item type and the item key that uniquely identify an instance of a process. <access_key> represents the access key password that determines whether the monitor is run in ’ADMIN’ or ’USER’ mode.html procedure requires four arguments.GetDiagramURL( ) looks as follows: <webagent>/wf_monitor. x_admin_mode in varchar2 default ’NO’) return varchar2.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.

’10022’. A string generated from the application object’s primary key. ’WFDEMO’. ’NO’). 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. The item type and key together identify the process to report on.Translate(’WF_WEB_AGENT’). NO retrieves the access key password that runs the monitor in ’USER’ mode. A value of YES or NO.When calling this function.GetDiagramURL (WF_CORE. See Also TRANSLATE: page 8 – 110 8 – 152 Oracle Workflow Guide . x_admin_mode Example Following is an example of how you can call the GetDiagramUrl. your application must first retrieve the web agent string from the WF_RESOURCES token WF_WEB_AGENT by calling WF_CORE. in ’USER’ mode: URL := WF_MONITOR.TRANSLATE( ). The string uniquely identifies the item within an item type. YES directs the function to retrieve the access key password that runs the monitor in ’ADMIN’ mode. x_item_type x_item_key A valid item type. See: Setting Global User Preferences: page 2 – 14.

See: Setting Global User Preferences: page 2 – 14. x_item_type in varchar2.com:portID>/<PLSQL_agent_path> When calling this function.GetEnvelopeURL Syntax function GetEnvelopeURL (x_agent in varchar2. The URL displays the Notifications List for a specific instance of a workflow process in the Workflow Monitor. and looks something like: http://<server. The URL returned by the function WF_MONITOR. Description Can be called by an application to return a URL that allows access to the Workflow Monitor Notifications List with an attached access key password. Arguments (input) x_agent The base web agent string defined for Oracle Workflow or Oracle Self–Service Web Applications in your Web server. x_item_key in varchar2. The base web agent string should be stored in the WF_RESOURCES table.GetEnvelopeURL( ) looks as follows: <webagent>/wf_monitor. your application must first retrieve the web agent string from the WF_RESOURCES token WF_WEB_AGENT by calling WF_CORE. See: Setting Global User Preferences: page 2 – 14. x_item_type A valid item type. Oracle Workflow APIs 8 – 153 . x_admin_mode in varchar2 default ’NO’) return varchar2. wf_monitor.envelope represents the name of the PL/SQL package procedure that generates the Workflow Monitor Notifications List for the process instance.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.TRANSLATE( ).

A value of YES or NO. The item type and key together identify the process to report on.x_item_key A string generated from the application object’s primary key. 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. x_admin_mode See Also TRANSLATE: page 8 – 110 8 – 154 Oracle Workflow Guide . The string uniquely identifies the item within an item type.

envelope represents the name of the PL/SQL package procedure that generates the Workflow Monitor Notifications List for the process instance. The URL displays the Activities List for a specific instance of a workflow process in the Workflow Monitor. See: Setting Global User Preferences: page 2 – 14.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.com:portID>/<PLSQL_agent_path> When calling this function.GetAdvancedEnvelopeURL( ) looks as follows if the x_options argument is null: Example <webagent>/wf_monitor. The base web agent string should be stored in the WF_RESOURCES table. Description Can be called by an application to return a URL that displays the Workflow Monitor Activities List with an attached access key password. wf_monitor. Arguments (input) x_agent The base web agent string defined for Oracle Workflow or Oracle Self–Service Web Applications in your Web server. x_admin_mode in varchar2 default ’NO’. The Activities List allows you to apply advanced filtering options in displaying the list of activities for a process instance.GetAdvancedEnvelopeURL Syntax function GetAdvancedEnvelopeURL (x_agent in varchar2. The URL returned by the function WF_MONITOR. x_item_type in varchar2. x_options in varchar2 default null) return varchar2. x_item_key in varchar2. your application must first retrieve the web agent string from the WF_RESOURCES token WF_WEB_AGENT by Oracle Workflow APIs 8 – 155 . and looks something like: http://<server.

The string uniquely identifies the item within an item type. If you leave this argument null. YES directs the function to retrieve the access key password that runs the monitor in ’ADMIN’ mode. x_admin_mode x_options See Also TRANSLATE: page 8 – 110 8 – 156 Oracle Workflow Guide . Specify ’All’ if you wish to return a URL that displays the Activities List with all filtering options checked.TRANSLATE( ). NO retrieves the access key password that runs the monitor in ’USER’ mode. The default is null. See: Setting Global User Preferences: page 2 – 14.calling WF_CORE. is returned. The item type and key together identify the process to report on. A string generated from the application object’s primary key. x_item_type x_item_key A valid item type. then a URL that displays the Activities List with no filtering options checked. A value of YES or NO. This allows you to append any specific options if you wish.

Use this view to create custom queries and reports on the status of a particular item or process. If you are using the version of Oracle Workflow embedded in Oracle Applications.Oracle Workflow Views Public views are available for accessing workflow data. The column descriptions of the view are as follows: Name Null? ––––––––––––––––––––––––––––––– –––––––– ROW_ID SOURCE ITEM_TYPE ITEM_TYPE_DISPLAY_NAME ITEM_TYPE_DESCRIPTION ITEM_KEY USER_KEY ITEM_BEGIN_DATE ITEM_END_DATE ACTIVITY_ID ACTIVITY_LABEL ACTIVITY_NAME ACTIVITY_DISPLAY_NAME ACTIVITY_DESCRIPTION ACTIVITY_TYPE_CODE ACTIVITY_TYPE_DISPLAY_NAME Type –––– ROWID CHAR(1) VARCHAR2(8) VARCHAR2(80) VARCHAR2(240) VARCHAR2(240) VARCHAR2(240) DATE DATE NUMBER VARCHAR2(30) VARCHAR2(30) VARCHAR2(80) VARCHAR2(240) VARCHAR2(8) VARCHAR2(80) Oracle Workflow APIs 8 – 157 . • WF_ITEM_ACTIVITY_STATUSES_V: page 8 – 157 • WF_NOTIFICATION_ATTR_RESP_V: page 8 – 159 • WF_RUNNABLE_PROCESSES_V: page 8 – 160 • WF_ITEMS_V: page 8 – 161 Note: These database views are public. WF_ITEM_ACTIVITY_STATUSES_V This view contains denormalized information about a workflow process and its activities’ statuses. This description does not mean that any privileges for these views have been granted to PUBLIC. these view are installed in the same account as the Oracle Workflow server. meaning they are available for you to use for your custom data requirements. If you are using the standalone version of Oracle Workflow. these views are installed in the APPS account.

EXECUTION_TIME ACTIVITY_BEGIN_DATE ACTIVITY_END_DATE ACTIVITY_STATUS_CODE ACTIVITY_STATUS_DISPLAY_NAME ACTIVITY_RESULT_CODE ACTIVITY_RESULT_DISPLAY_NAME ASSIGNED_USER ASSIGNED_USER_DISPLAY_NAME NOTIFICATION_ID OUTBOUND_QUEUE_ID ERROR_NAME ERROR_MESSAGE ERROR_STACK NUMBER DATE DATE VARCHAR2(8) VARCHAR2(80) VARCHAR2(30) VARCHAR2(4000) VARCHAR2(30) VARCHAR2(4000) NUMBER RAW(16) VARCHAR2(30) VARCHAR2(2000) VARCHAR2(4000) 8 – 158 Oracle Workflow Guide .

WF_NOTIFICATION_ATTR_RESP_V This view contains information about the Respond message attributes for a notification group. See: Voting Activity: page 4 – 61. use this view to create the function that tallies the responses from the users in the notification group. If you plan to create a custom ”voting” activity. The column descriptions of the view are as follows: Name ––––––––––––––––––––––––––––––– GROUP_ID RECIPIENT_ROLE RECIPIENT_ROLE_DISPLAY_NAME ATTRIBUTE_NAME ATTRIBUTE_DISPLAY_NAME ATTRIBUTE_VALUE ATTRIBUTE_DISPLAY_VALUE MESSAGE_TYPE MESSAGE_NAME Null? –––––––– NOT NULL NOT NULL NOT NULL NOT NULL Type –––– NUMBER VARCHAR2(30) VARCHAR2(4000) VARCHAR2(30) VARCHAR2(80) VARCHAR2(2000) VARCHAR2(4000) VARCHAR2(8) VARCHAR2(30) NOT NULL NOT NULL Oracle Workflow APIs 8 – 159 .

WF_RUNNABLE_PROCESSES_V This view contains a list of all runnable workflow processes in the ACTIVITIES table. The column descriptions of the view are as follows: Name ––––––––––––––––––––––––––––––– ITEM_TYPE PROCESS_NAME DISPLAY_NAME Null? –––––––– NOT NULL NOT NULL NOT NULL Type –––– VARCHAR2(8) VARCHAR2(30) VARCHAR2(80) 8 – 160 Oracle Workflow Guide .

WF_ITEMS_V This view is a select only version of the WF_ITEMS table. The column descriptions of the view are as follows: Name ––––––––––––––––––––––––––––––– ITEM_TYPE ITEM_KEY USER_KEY ROOT_ACTIVITY ROOT_ACTIVITY_VERSION OWNER_ROLE PARENT_ITEM_TYPE PARENT_ITEM_KEY PARENT_CONTEXT BEGIN_DATE END_DATE Type –––– VARCHAR2(8) VARCHAR2(240) VARCHAR2(240) NOT NULL VARCHAR2(30) NOT NULL NUMBER VARCHAR2(30) VARCHAR2(8) VARCHAR2(240) VARCHAR2(2000) NOT NULL DATE DATE Null? –––––––– NOT NULL NOT NULL Oracle Workflow APIs 8 – 161 .

The outbound and inbound queues facilitate the integration of external activities into your workflow processes. Note: An event in this context is different from the business events associated with the Business Event System. . and a message in this context is different from the messages associated with notification activities. In Oracle Workflow. an ’outbound’ and an ’inbound’ queue are established. Similarly an agent may enqueue some message to the inbound queue for the Workflow Engine to consume and process. A package of data on the queue is referred to as an event or a message. You must execute these queue APIs from the same Oracle Workflow account since the APIs are account dependent. These agents may be any application that is external to the database.Workflow Queue APIs Oracle Workflow queue APIs can be called by an application program or a workflow function in the runtime phase to handle workflow Advanced Queues processing. Events are enqueued in the outbound queue for agents to consume and process. Note: Background engines use a separate ’deferred’ queue. All Oracle Workflow queue APIs are defined in a PL/SQL package called WF_QUEUE.

Refer to the Oracle Application Developer’s Guide – Advanced Queuing for more information on Advanced Queues. we assume that you have prior knowledge of Oracle Advanced Queuing concepts and terminology. Attention: In using these APIs. Note: In a future release. this workflow Advanced Queues processing will be implemented within the Business Event System using a specialized queue handler to handle dequeue and enqueue operations. Queue APIs • EnqueueInbound: page 8 – 165 • DequeueOutbound: page 8 – 167 • DequeueEventDetail: page 8 – 170 • PurgeEvent: page 8 – 172 • PurgeItemtype: page 8 – 173 • ProcessInboundQueue: page 8 – 174 • GetMessageHandle: page 8 – 175 • DequeueException: page 8 – 176 8 – 162 Oracle Workflow Guide .

The internal stack is purely a storage area and you must eventually write each message that you create on the stack to the inbound queue.EnqueueInbound( ). The name of the function to execute. FUNCTION_NAME VARCHAR2(200) Table 8 – 5 (Page 1 of 2) Oracle Workflow APIs 8 – 163 . The item key of the event. The function activity instance ID. Attribute Name Datatype Description ITEMTYPE ITEMKEY ACTID VARCHAR2(8) VARCHAR2(240) NUMBER The item type of the event. you should periodically write to the inbound queue to prevent the stack from growing too large. Note: For efficient performance.• Deferred_queue: page 8 – 177 • Inbound_queue: page 8 – 178 • Outbound_queue: page 8 – 179 Developer APIs for the Inbound Queue The following APIs are for developers who wish to write to the inbound queue by creating messages in the internal stack rather than using WF_QUEUE. The payload contains all the information that is required about the event. The following table lists the attributes of system.wf_payload_t to define the payload for any given message.wf_payload_t. • ClearMsgStack: page 8 – 180 • CreateMsg: page 8 – 181 • WriteMsg: page 8 – 182 • SetMsgAttr: page 8 – 183 • SetMsgResult: page 8 – 184 Payload Structure Oracle Workflow queues use the datatype system.

In the outbound scenario. RESULT VARCHAR2(30) Table 8 – 5 (Page 2 of 2) See Also Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 Advanced Queuing: Oracle Application Developer’s Guide – Advanced Queuing 8 – 164 Oracle Workflow Guide .Attribute Name Datatype Description PARAM_LIST VARCHAR2(4000) A list of ”value_name=value” pairs. the pairs are passed as item attributes and item attribute values. An optional activity completion result. Possible values are determined by the function activity’s Result Type or can be an engine standard result. the pairs are passed as all the attributes and attribute values of the function (activity attributes). In the inbound scenario.

The result value is only effective for successful completion. The item key of the event. actid in number. itemkey in varchar2. Oracle Workflow marks the external function activity as complete with an ERROR status. If a specified value name does not exist as an item attribute. error_stack in varchar2 default null). attrlist in varchar2 default null.EnqueueInbound Syntax procedure EnqueueInbound (itemtype in varchar2. Each pair must be delimited by the caret character (^). ”ATTR1=A^ATTR2=B^ATTR3=C”. A longlist of ”value name=value” pairs that you want to pass back as item attributes and item attribute values. Description Enqueues the result from an outbound event onto the inbound queue. overriding the result value. Oracle Workflow launches that error process. The string uniquely identifies the item within an item type. An item key is a string generated from the application object’s primary key. The function activity instance ID that this event is associated with. Additionally. An optional activity completion result. The item type and key together identify the process instance. If you specify an external program error in the error_stack parameter. 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. result in varchar2 default null. actid result attrlist Oracle Workflow APIs 8 – 165 . as in the example. correlation in varchar2 default null. Arguments (input) itemtype itemkey The item type of the event. if a corresponding error process is defined in the item type. Possible values are determined by the function activity’s Result Type. however.

You can specify any text value up to a maximum length of 200 characters. error_stack 8 – 166 Oracle Workflow Guide . Specify an optional external program error that will be placed on Oracle Workflow’s internal error stack. Oracle Advanced Queues allow you to search a queue for messages based on a specific correlation value. of type varchar2. correlation Specify an optional correlation identifier for the message to be enqueued.Oracle Workflow creates the item attribute for you. If null. the Workflow Engine creates a correlation identifier based on the Workflow schema name and the item type.

Description Dequeues a message from the outbound queue for some agent to consume.DequeueOutbound Syntax procedure DequeueOutbound (dequeuemode in number. navigation in number default 1. . itemtype in varchar2 default null. timeout out boolean). payload out system. correlation in varchar2 default null. message_handle in out raw.wf_payload_t.

A mode of DBMS_AQ. to indicate the position of the message that will be retrieved. to represent the locking behavior of the dequeue. 2 and 3 respectively.LOCKED means to read and obtain a write lock on the message. A mode of DBMS_AQ.REMOVE.REMOVE means read the message and delete it.NEXT_MESSAGE. A value of DBMS_AQ. the procedure dequeues the same message again. Arguments (input) Attention: If you call this procedure within a loop. corresponding to the numbers 1. The first message is inherently the beginning of the queue. A mode of DBMS_AQ.LOCKED.FIRST_MESSAGE retrieves the first message that is available and matches the correlation criteria. otherwise.BROWSE means to read the message from the queue without acquiring a lock on the message. dequeuemode A value of DBMS_AQ. A value of DBMS_AQ. where the lock lasts for the duration of the transaction.BROWSE. you must remember to set the returned message handle to null. This may not be the behavior you want and may cause an infinite loop.FIRST_MESSAGE or DBMS_AQ. DBMS_AQ. or DBMS_AQ. corresponding to the number 1 or 2 respectively.NEXT_MESSAGE retrieves the next message that is available and matches the navigation Oracle Workflow APIs 8 – 167 . Specify DBMS_AQ.

correlation Specify an optional correlation identifier for the message to be dequeued. The item type of the event. The default is 1.correlation criteria. ’%’. You can use the Like comparison operator. to specify the identifier string. the Workflow Engine creates a correlation identifier based on the Workflow schema name and the item type. If null. the correlation identifier is ignored. Specify an optional message handle ID for the specific event to be dequeued. Oracle Advanced Queues allow you to search a queue for messages based on a specific correlation value. itemtype message_handle . and lets you read through the queue. If you specify a message handle ID.

–– always start with the first message then progress to next if i = 1 then navigation_mode := dbms_aq. end if. Following is an example of code that loops through the outbound queue and displays the output. number. varchar2(30). number. i:=0. 8 – 168 Oracle Workflow Guide . boolean. else navigation_mode := dbms_aq.FIRST_MESSAGE.wf_payload_t. Example Attention: The timeout output returns TRUE when there is nothing further to read in the queue. LOOP i:=i+1. begin queuename:=wf_queue.OUTBOUNDQUEUE. raw(16).NEXT_MESSAGE. declare event i msg_id queuename navigation_mode end_of_queue system.

DequeueOutbound( dequeuemode payload navigation message_handle timeout if end_of_queue then exit. Leave it null so ––as to loop through all messages in queue msg_id :=null. Oracle Workflow APIs 8 – 169 .itemkey ||’ ’||event. END LOOP.–– not interested in specific msg_id. event.actid||’ ’ ||event. wf_queue. end if. navigation_mode. end_of_queue). msg_id.put_line(’Msg ’||to_char(i)||’ = ’|| event.BROWSE. / => => => => => dbms_aq.itemtype||’:’||event. end.param_list). –– print the correlation itemtype:itemKey dbms_output.

navigation in number default 1. actid out number. message_handle in out raw. Description Dequeue from the outbound queue. param_list out varchar2. itemkey out varchar2. . actid. function_name out varchar2. it outputs itemkey. the full event details for a given message. correlation in varchar2 default null. This API is similar to DequeueOutbound except it does not reference the payload type. Instead.DequeueEventDetail Syntax procedure DequeueEventDetail (dequeuemode in number. function_name. which are part of the payload. and param_list. itemtype in out varchar2. timeout out boolean).

REMOVE means read the message and update or delete it.LOCKED means to read and obtain a write lock on the message. or DBMS_AQ. where the lock lasts for the duration of the transaction. A mode of DBMS_AQ.LOCKED.FIRSTMESSAGE or DBMS_AQ. dequeuemode A value of DBMS_AQ. you must remember to set the returned message handle to null. 2 and 3 respectively. This may not be the behavior you want and may cause an infinite loop. A value of DBMS_AQ. to indicate the position of the message that will be retrieved.BROWSE means to read the message from the queue without acquiring a lock on the message. DBMS_AQ.BROWSE. corresponding to the numbers 1. to represent the locking behavior of the dequeue. otherwise. A mode of DBMS_AQ.FIRSTMESSAGE retrieves the first message that is available and matches the navigation 8 – 170 Oracle Workflow Guide . corresponding to the number 1 or 2 respectively.NEXTMESSAGE.REMOVE. the procedure dequeues the same message again. Arguments (input) Attention: If you call this procedure within a loop. A mode of DBMS_AQ. Specify DBMS_AQ.

the Workflow Engine creates a correlation identifier based on the Workflow schema name and the item type. A value of DBMS_AQ. If null. acctname itemtype message_handle . If acctname is null.NEXTMESSAGE retrieves the next message that is available and matches the correlation criteria.correlation criteria. ’%’. You can use the Like comparison operator. the correlation identifier is ignored. it defaults to the pseudocolumn USER. to specify the identifier string. The Oracle Workflow database account name. correlation Specify an optional correlation identifier for the message to be dequeued. The default is 1. Oracle Advanced Queues allow you to search a queue for messages based on a specific correlation value. Specify an optional item type for the message to dequeue if you are not specifying a correlation. If you specify a message handle ID. Specify an optional message handle ID for the specific event to be dequeued. It also resets the position to the beginning of the queue.

Oracle Workflow APIs 8 – 171 . Attention: The timeout output returns TRUE when there is nothing further to read in the queue.

PurgeEvent Syntax procedure PurgeEvent (queuename in varchar2. message_handle in raw). queuename message_handle The name of the queue from which to purge the event. Description Arguments (input) Removes an event from a specified queue without further processing. The message handle ID for the specific event to purge. 8 – 172 Oracle Workflow Guide .

Oracle Advanced Queues allow you to search a queue for messages based on a specific correlation value.PurgeItemType Syntax procedure PurgeItemType (queuename in varchar2. to specify the identifier string. An optional item type of the events to purge. queuename itemtype correlation The name of the queue from which to purge the events. ’%’. You can use the Like comparison operator. itemtype in varchar2 default null. the Workflow Engine creates a correlation identifier based on the Workflow schema name and the item type. Oracle Workflow APIs 8 – 173 . Specify an optional correlation identifier for the message to be purged. Description Arguments (input) Removes all events belonging to a specific item type from a specified queue without further processing. If null. correlation in varchar2 default null).

the Workflow Engine creates a correlation identifier based on the Workflow schema name and the item type. See: EnqueueInbound: page 8 – 165.ProcessInboundQueue Syntax procedure ProcessInboundQueue (itemtype in varchar2 default null. If correlation is null. correlation in varchar2 default null). 8 – 174 Oracle Workflow Guide . enter a correlation identifier. If you wish to process only messages with a specific correlation. Description Reads every message off the inbound queue and records each message as a completed event. Arguments (input) itemtype correlation An optional item type of the events to process. 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.

actid correlation Oracle Workflow APIs 8 – 175 . actid in number. itemtype in varchar2. correlation in varchar2 default null) return raw. The string uniquely identifies the item within an item type. An item key is a string generated from the application object’s primary key. the Workflow Engine creates a correlation identifier based on the Workflow schema name and the item type. The item type of the message. The item type and key together identify the process instance. queuename itemtype itemkey The name of the queue from which to retrieve the message handle. itemkey in varchar2. Description Arguments (input) Returns a message handle ID for a specified message. Specify an optional correlation identifier for the message.GetMessageHandle Syntax function GetMessageHandle (queuename in varchar2. If the correlation is null. The item key of the message. The function activity instance ID that this message is associated with.

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 Default Event Error Process: page 6 – 34 8 – 176 Oracle Workflow Guide .’ When the messages are dequeued from WF_ERROR.DequeueException Syntax procedure DequeueException (queuename in varchar2). 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.

DeferredQueue Syntax Description function DeferredQueue Returns the name of the queue and schema used by the background engine for deferred processing. Oracle Workflow APIs 8 – 177 .

8 – 178 Oracle Workflow Guide .InboundQueue Syntax Description function InboundQueue Returns the name of the inbound queue and schema. The inbound queue contains messages for the Workflow Engine to consume.

OutboundQueue Syntax Description function OutboundQueue Returns the name of the outbound queue and schema. Oracle Workflow APIs 8 – 179 . The outbound queue contains messages for external agents to consume.

See: Developer APIs for the Inbound Queue: page 8 – 163.ClearMsgStack Syntax Description procedure ClearMsgStack. Clears the internal stack. 8 – 180 Oracle Workflow Guide .

itemkey in varchar2. See: Developer APIs for the Inbound Queue: page 8 – 163. actid in number). itemtype itemkey The item type of the message. Description Arguments (input) Creates a new message in the internal stack if it doesn’t already exist. An item key is a string generated from the application object’s primary key. The item type and key together identify the process instance. The string uniquely identifies the item within an item type. actid Oracle Workflow APIs 8 – 181 .CreateMsg Syntax procedure CreateMsg (itemtype in varchar2. The function activity instance ID that this message is associated with. The item key of the message.

itemkey in varchar2. itemtype itemkey The item type of the message. See: Developer APIs for the Inbound Queue: page 8 – 163. Description Arguments (input) Writes a message from the internal stack to the inbound queue. The string uniquely identifies the item within an item type. The function activity instance ID that this message is associated with.WriteMsg Syntax procedure WriteMsg (itemtype in varchar2. actid in number). actid 8 – 182 Oracle Workflow Guide . An item key is a string generated from the application object’s primary key. The item key of the message. The item type and key together identify the process.

attrValue in varchar2). itemkey in varchar2. An item key is a string generated from the application object’s primary key. attrName in varchar2. The string uniquely identifies the item within an item type. actid attrName attrValue Oracle Workflow APIs 8 – 183 . The item key of the message. The internal name of the item attribute you wish to append to the message.SetMsgAttr Syntax procedure SetMsgAttr (itemtype in varchar2. The item type and key together identify the process instance. Description Arguments (input) Appends an item attribute to the message in the internal stack. See: Developer APIs for the Inbound Queue: page 8 – 163. The value of the item attribute you wish to append. itemtype itemkey The item type of the message. The function activity instance ID that this message is associated with. actid in number.

The function activity instance ID that this message is associated with. actid in number. An item key is a string generated from the application object’s primary key. The item key of the message. Possible values are determined by the activity’s Result Type.SetMsgResult Syntax procedure SetMsgResult (itemtype in varchar2. The completion result for the message. itemtype itemkey The item type of the message. result in varchar2). itemkey in varchar2. The item type and key together identify the process instance. Description Arguments (input) Sets a result to the message written in the internal stack. The string uniquely identifies the item within an item type. See: Developer APIs for the Inbound Queue: page 8 – 163. actid result 8 – 184 Oracle Workflow Guide .

Document Management APIs .

The document management APIs are defined in a PL/SQL package called FND_DOCUMENT_MANAGEMENT: • get_launch_document_url: page 8 – 186 • get_launch_attach_url: page 8 – 187 • get_open_dm_display_window: page 8 – 188 • get_open_dm_attach_window: page 8 – 189 • set_document_id_html: page 8 – 190 See Also Standard API for PL/SQL Procedures Called by Function Activities: page 7 – 3 Oracle Workflow APIs 8 – 185 . as well as across multiple instances of DM systems from different vendors within the same network. The following document management APIs can be called by user interface (UI) agents to return URLs or javascript functions that enable integrated access to supported document management systems. Attention: Document management functionality is reserved for future use. All supported document management (DM) systems accommodate a URL interface to access documents. This description of Oracle Workflow document management APIs is provided for reference only. The document management APIs allow you to access documents across multiple instances of the same DM system.

document_identifier in varchar2. The lower frame displays the specified document. whereas False tells the procedure to return only the URL. Arguments (input) username document_ identifier The username of the person accessing the document management system.get_launch_document_url Syntax procedure get_launch_document_url (username in varchar2. display_icon 8 – 186 Oracle Workflow Guide . The upper frame contains a customizable company logo and a toolbar of Oracle Workflow–integrated document management functions. You can retrieve the document identifier using the GetItemAttrDocument API. True tells the procedure to return the URL with the paper clip attachment icon and translated prompt name. True or False. The document identifier for the document you wish to display. This argument provides you the flexibility needed when you call this procedure from a form– or HTML–based UI agent. The document identifier should be stored as a value in an item attribute of type document. The screen is a frame set of two frames. Description Returns an anchor URL that launches a new browser window containing the DM integration screen that displays the specified document. display_icon in Boolean. See: GetItemAttrDocument: page 8 – 59 and SetItemAttrDocument: page 8 – 51. launch_document_url out varchar2).

The URL you would like to invoke after the user selects a document to attach. whereas False tells the procedure to return only the URL. Description Returns an anchor URL that launches a new browser window containing a DM integration screen that allows you to attach a document. Arguments (input) username callback_ function The username of the person accessing the document management system. callback_function in varchar2. True tells the procedure to return the URL with the paper clip attachment icon and translated prompt name. This argument provides you the flexibility needed when you call this procedure from a form– or HTML–based UI agent.get_launch_attach_url Syntax procedure get_launch_attach_url (username in varchar2. True or False. launch_attach_url out varchar2). The screen is a frame set of two frames. display_icon in Boolean. display_icon Oracle Workflow APIs 8 – 187 . The upper frame contains a customizable company logo and a toolbar of Oracle Workflow–integrated document management functions. This callback function should be the callback_url syntax that is returned from the set_document_id_html API. The lower frame displays the search screen of the default document management system.

get_open_dm_display_window Syntax Description procedure get_open_dm_display_window Returns a javascript function that displays an attached document from the current UI. 8 – 188 Oracle Workflow Guide . Each DM function also gives the current DM integration screen a name so that the Document Transport Window can call back to the javascript function in the current window. The javascript function is used by all the document management functions that the user can perform on an attached document.

The javascript function is used by all the document management functions that the user can perform to attach a document.get_open_dm_attach_window Syntax Description procedure get_open_dm_attach_window Returns a javascript function to open a Document Transport Window when a user tries to attach a document in the current UI. Each DM function also gives the current DM integration screen a name so that the Document Transport Window can call back to the javascript function in the current window. Oracle Workflow APIs 8 – 189 .

The name of the HTML field in the current UI that you would like to write the resulting document identifier to. <version> is the version of the document. form_name in varchar2. <documentid> is the document ID of the document. Description Returns a callback URL that gets executed when a user selects a document from the DM system. Arguments (input) frame_name form_name document_id_ field_name The name of the HTML frame that you wish to interact with in the current UI. 8 – 190 Oracle Workflow Guide . The name of the HTML form that you wish to interact with in the current UI. 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 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. the latest version is assumed. If a version is not specified. as assigned by the document management system where the document resides. The destination field is the field from which the user launches the DM integration screen to attach a document.set_document_id_html Syntax procedure set_document_id_html (frame_name in varchar2. Pass the returned callback URL as an argument to the get_launch_attach_url API. callback_url out varchar2). document_id_field_name in varchar2 document_name_field_name in varchar2. The resulting document identifier is determined by the document the user selects from the document management Search function.

Oracle Workflow APIs 8 – 191 .document_name_ The name of the HTML field in the current UI that field_name you would like to write the resulting document name to.

E–mail notifications can contain HTML content or include other documents as optional attachments. The messages may have optional attributes that can specify additional resources and request responses. • Look up the message attributes for the message. which the Send( ) or SendGroup( ) 8 – 192 Oracle Workflow Guide .Overview of the Oracle Workflow Notification System Oracle Workflow communicates with users by sending notifications. You define the notification activity and the notification message that the notification activity sends in the Workflow Builder. The Workflow Engine moves through the workflow process. If the procedure cannot find an item type attribute. • Identify the notification preference for of the performer role. Notifications contain messages that may request users to take some type of action and/or provide users with information. Once it encounters a notification activity. Sending Notification Messages The Send( ) or SendGroup( ) API are called by the Workflow Engine when it encounters a notification activity. if available. it uses the default value of the message attribute. A user can also receive notifications in their e–mail applications. there may be a number of runtime named values called item type attributes from which the message attributes draw their values. – If a message attribute is of source SEND. The Notification System delivers the messages and processes the incoming responses. In addition. The Subject and Body of the message may include message attributes of source SEND. These APIs do the following: • Check that the performer role of the notification activity is valid. the Send() or SendGroup( ) API retrieves its value from the item type attribute that the message attribute references. the engine makes a call to the Notification System Send( ) or SendGroup( ) API to send the notification. evaluating each activity in turn. Notification Model A notification activity in a workflow process consists of a design–time message and a list of message attributes. Users can query their notifications online using the Notifications web page in an HTML browser.

API token replaces with each attribute’s current value when creating the notification. are simply querying the Workflow Notification tables from this interface. See: Forwarding a Notification: page 8 – 194. MAILHTML. • Update the notification activity’s status to ’NOTIFIED’ if a response is required or to ’COMPLETE’ if no response is required. the notification is flagged with the corresponding value in the Notification table. See: Special Handling of Voting Activities: page 8 – 195 If the performer role of a notification has a notification preference of MAILTEXT. regardless of their notifications preferences. the Send( ) or SendGroup() API checks to see if it has a default value assigned to it. • Transfer ownership of the notification to another role. Oracle Workflow APIs 8 – 193 . – If a message includes a message attribute of source RESPOND. See: Processing a Notification Response: page 8 – 194. The procedure then uses these RESPOND attributes to create the default response section of the notification. where there are no RESPOND message attributes associated with it. the status is updated to ’WAITING’ instead of ’NOTIFIED’. See: Implementing the Notification Mailer: page 2 – 48. Users who view their notifications from the Notifications Web page. See: Transferring a Notification: page 8 – 195. which polls the Notification table for these flags. • Forward the notification to another role. the notification activity gets marked as complete as soon as the Notification System delivers the message. Note: In the case of a voting activity. The Notification Mailer. • ’Construct’ the notification content by inserting relevant information into the Workflow Notification tables. Note: If a notification activity sends a message that is for the performer’s information only (FYI). MAILATTH or SUMMARY. A notification recipient can perform one of four actions with the notification: • Respond to the notification or close the notification if it does not require a response. then generates an e–mail version of that notification and sends it to the performer.

CompleteActivity( ) to inform the engine that the notification activity is complete so it can transition to the next qualified activity. the Notifications web page or Notification Mailer assigns the response values to the notification response attributes and calls the notification Respond( ) API. The Forward( ) API validates the role. Forwarding a Notification If a recipient forwards a notification to another role. Processing a Notification Response After a recipient responds.• Ignore the notification and let it time out. See: Post–notification Functions: page 8 – 13. Note: The Notification System is not able to track notifications that are forwarded via e–mail. If it doesn’t. 8 – 194 Oracle Workflow Guide . Finally. the post–notification function may return an error and prevent the Forward operation from proceeding. the response is aborted. The post–notification function may interpret the response and perform tightly–coupled post–response processing. The Respond( ) API first calls a notification callback function to execute the notification activity’s post–notification function (if it has one) in RESPOND mode. See: Processing a Timed Out Notification: page 8 – 195. It records only the eventual responder’s e–mail address and any Respond message attributes values included in the response. 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. See: Post–notification Functions: page 8 – 13. the Notifications web page calls the Notification System’s Forward( ) API. If the post–notification function raises an exception. If no exception is raised. that response value is also set as the result of the notification activity. As an example. If the notification message prompts for a response that is specified in the Result tab of the message’s property page. Respond( ) marks the notification as closed and then calls the notification callback function again in SET mode to update the corresponding item attributes with the RESPOND notification attributes values. Respond( ) calls WF_ENGINE. then calls a notification callback function to execute the notification activity’s post–notification function (if it has one) in FORWARD mode.

Note that a transfer is also recorded in the comments of the notification. and the current date and time exceeds that time out value. Background engines set up to handle timed out activities periodically check for activities that have time out values specified. Note: Recipients who view notifications from an e–mail application cannot transfer notifications. so that an individual copy of the notification message is sent to each member of the Performer role. the Notification web page calls the Notification System’s Transfer( ) API. the post–notification function may return an error and prevent the Transfer operation from proceeding. If it doesn’t. Special Handling of Voting Activities A voting activity by definition is a notification activity that: • Has its roles expanded. the post–notification function may verify whether the role that the notification is being transferred to has appropriate authority. If an activity does have a time out value. The Transfer( ) API validates the role. See: Post–notification Functions: page 8 – 13. To transfer a notification. passing along any appended comments. the recipient must use the Notifications web page. Processing a Timed Out Notification Timed out notification or subprocess activities are initially detected by the background engine. Note: Forward( ) does not update the owner or original recipient of the notification. Oracle Workflow APIs 8 – 195 .Forward( ) then forwards the notification to the new role. the background engine marks that activity’s status as ’TIMEOUT’ and calls the Workflow Engine. The Workflow Engine then resumes by trying to execute the activity to which the <Timeout> transition points. As an example. then calls a notification callback function to execute the notification activity’s post–notification function (if it has one) in TRANSFER mode. along with any appended comments. Transferring a Notification If a recipient transfers the ownership of a notification to another role. Transfer( ) then assigns ownership of the notification to the new role.

Once the Notification System sends the notification for a voting activity. respectively. FORWARD. When the Notification System completes execution of the post–notification function in RESPOND mode. respectively. that requires recipients to respond from a list of values. respectively. or TRANSFER mode. the Workflow Engine then runs the post–notification function again in RUN mode. They can also transfer the notification if they use the Notifications web page. When the Notification System finishes executing the post–notification function in FORWARD or TRANSFER mode. • Has a post–notification function associated with it that contains logic in the RUN mode to process the polled responses from the Performer members to generate a single response that the Workflow Engine interprets as the result of the notification activity. The voting activity’s status is updated to ’WAITING’ as soon as some responses are received.• Has a message with a specified Result. It calls the function in RUN mode after all responses are received to execute the vote tallying logic. The logic for TIMEOUT mode in a voting activity’s post–notification function should identify how to tally the votes received up until the timeout. but not enough responses are received to satisfy the voting criteria. The individual role members that each receive a copy of the notification message can then respond or forward the notification if they use either of the two notification interfaces to view the notification. See: Voting Activity: page 4 – 61. the Workflow Engine runs the post–notification function in CANCEL or TIMEOUT mode. Each API in turn calls the notification callback function to execute the post–notification function in RESPOND. The notification user interface calls the appropriate Respond(). Also if the voting activity is reset to be reexecuted as part of a loop. or Transfer() API depending on the action that the performer takes. it marks the voting activity’s status as ’NOTIFIED’. 8 – 196 Oracle Workflow Guide . Forward(). it carries out the Forward or Transfer operation. or if it times out.

as Java methods. See: Oracle Workflow Java Interface: page 8 – 5. Many of these Notification APIs also have corresponding Java methods that you can call from any Java program to integrate with Oracle Workflow. . or both. The following list indicates whether the Notification APIs are available as PL/SQL functions/procedures. The APIs are stored in the PL.Notification APIs The following APIs can be called by a notification agent to manage notifications for a notification activity./SQL package called WF_NOTIFICATION.

Attention: Java is case–sensitive and all Java method names begin with a lower case letter to follow Java naming conventions. • Send: page 8 – 199—PL/SQL and Java • SendGroup: page 8 – 203—PL/SQL • Forward: page 8 – 205—PL/SQL and Java • Transfer: page 8 – 207—PL/SQL and Java • Cancel: page 8 – 209—PL/SQL and Java • CancelGroup: page 8 – 210—PL/SQL • Respond: page 8 – 211—PL/SQL and Java • Responder: page 8 – 212—PL/SQL and Java • VoteCount: page 8 – 213—PL/SQL and Java • OpenNotificationsExist: page 8 – 214—PL/SQL and Java • Close: page 8 – 215—PL/SQL and Java • AddAttr: page 8 – 216—PL/SQL and Java • SetAttribute: page 8 – 217—PL/SQL and Java • GetAttrInfo: page 8 – 219—PL/SQL and Java • GetInfo: page 8 – 220—PL/SQL and Java • GetText: page 8 – 221—PL/SQL • GetShortText: page 8 – 222—PL/SQL • GetAttribute: page 8 – 223—PL/SQL and Java • GetAttrDoc: page 8 – 225—PL/SQL and Java • GetSubject: page 8 – 226—PL/SQL and Java • GetBody: page 8 – 227—PL/SQL and Java Oracle Workflow APIs 8 – 197 .

• GetShortBody: page 8 – 228—PL/SQL • TestContext: page 8 – 229—PL/SQL • AccessCheck: page 8 – 230—PL/SQL and Java • WorkCount: page 8 – 231—PL/SQL and Java • getNotifications: page 8 – 232—Java • getNotificationAttributes: page 8 – 233—Java • WriteToClob: page 8 – 234—PL/SQL 8 – 198 Oracle Workflow Guide .

If you are using your own custom notification system that does not call the Workflow Engine. String callback. callback in varchar2 default null. A callback function can also be used when a notification is responded to.Send PL/SQL Syntax function SEND (role in varchar2. Oracle Workflow APIs 8 – 199 . msg_type in varchar2. send_comment in varchar2 default null priority in number default null) return number. returning a notification ID if successful. due_date in date default null. Note: If you are using the Oracle Workflow Notification System and its e–mail–based or web–based notification client. String context. BigDecimal priority) Description This function sends the specified message to a role. The notification ID must be used in all future references to the notification. If your message has message attributes.CB callback function. Java Syntax public static BigDecimal send (WFContext wCtx. String dueDate. string sendComment. String role. String messageName. 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. String messagType. then you must define your own callback function following a standard format and specify its name for the callback argument. context in varchar2 default null. msg_name in varchar2. the Send procedure implicitly calls the WF_ENGINE. See: Custom Callback Function: page 8 – 200.

role msg_type or messagType msg_name or messageName due_date or dueDate callback context send_comment or A comment presented with the message. text_value in out varchar2. Required for the Java method only. The date that a response is required. date_value in out date). If #PRIORITY does not exist or if the value is null. This optional due date is only for the recipient’s information. The role name assigned as the performer of the notification activity. You may provide your own custom callback function.Arguments (input) wCtx Workflow context information. See: Oracle Workflow Context: page 8 – 6. attr_type in varchar2. Context information passed to the callback function. The callback function name used for communication of SEND and RESPOND source message attributes. as derived from the #PRIORITY notification activity attribute. attr_name in varchar2. The item type associated with the message. sendComment priority The priority of the message. it has no effect on processing. 8 – 200 Oracle Workflow Guide . context in varchar2. but it must have the following specifications: procedure <name in callback argument> (command in varchar2. the Workflow Engine uses the default priority of the message. number_value in out number. The message internal name. Custom Callback Function A default callback function can be called at various points by the actions of the WF_NOTIFICATION APIs.

The context passed to SEND( ) or SendGroup( ). once for each RESPOND attribute. number_value. numval. Value of a date attribute if command is SET or value of a date attribute returned if command GET. SET to set the value of an attribute. That is. context. ’BUGNO’. COMPLETE. FORWARD to execute the post–notification function in FORWARD mode. textval. context attr_name attr_type text_value number_value date_value Note: The arguments text_value. Example 1 For each SEND attribute. use only one of these arguments depending on the value of the attr_type argument. Value of a text attribute if command is SET or value of text attribute returned if command is GET. TRANSFER to execute the post–notification function in TRANSFER mode. call: your_callback(’GET’. TESTCTX to test the current context by calling the item type’s Selector/Callback function. the callback is called again. COMPLETE to indicate that the response is complete. and date_value are mutually exclusive. Value of a number attribute if command is SET or value of a number attribute returned if command is GET. An attribute name to set/get if command is GET or SET.Arguments (input) command Specify GET. the system calls the specified callback function once for each SEND attribute (to get the attribute value). ’NUMBER’. TESTCTX. dateval) Example 2 When the user responds to the notification. SET. TRANSFER. The format is <itemtype>:<itemkey>:<activityid>. ERROR to set the associated notification activity to a status of ’ERROR’. Oracle Workflow APIs 8 – 201 . ERROR. An attribute type if command is SET or GET. Use GET to get the value of an attribute. or RESPOND as the action requested. and RESPOND to execute the post–notification function in RESPOND mode. FORWARD. When a notification is sent.

numval. ’STATUS’. ’COMPLETE’. ’TEXT’. dateval). context. attrname. context. textval. dateval). numval. 8 – 202 Oracle Workflow Guide .your_callback(’SET’. your_callback(’COMPLETE’. attrtype. Example 3 Then finally the Notification System calls the ’COMPLETE’ command to indicate the response is complete.

Generally. msg_type in varchar2.SendGroup PL/SQL Syntax function SendGroup (role in varchar2. The item type associated with the message. msg_name in varchar2. callback in varchar2 default null. Note: If you are using the Oracle Workflow Notification System and its e–mail–based or web–based notification client. The message internal name. send_comment in varchar2 default null priority in number default null) return number. the Send procedure implicitly calls the WF_ENGINE. Arguments (input) role msg_type msg_name The role name assigned as the performer of the notification activity. 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. The notification group ID identifies that group of users and the notification they each received. then the Send( ) function is called instead. 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. A callback function can also be used when a notification is responded to. See: Custom Callback Function: page 8 – 200.CB callback function. then you must define your own callback function following a standard format and specify its name for the callback argument. If Expanded Roles is not checked. context in varchar2 default null. if successful. this function is called only if a notification activity has ’Expanded Roles’ checked in its properties page. If your message has message attributes. See: Voting Activity: page 4 – 61. due_date in date default null. If you are using your own custom notification system. Oracle Workflow APIs 8 – 203 .

A comment presented with the message. The priority of the message. as derived from the #PRIORITY notification activity attribute. Context information passed to the callback function. callback context send_comment priority 8 – 204 Oracle Workflow Guide .due_date The date that a response is required. This optional due date is only for the recipient’s information. it has no effect on processing. If #PRIORITY does not exist or if the value is null. the Workflow Engine uses the default priority of the message. The callback function name used for communication of SEND source message attributes.

The example code is from the WFTest. System. new_role in varchar2. Note that when you forward a notification. count = WFNotificationAPI.Forward PL/SQL Syntax procedure FORWARD (nid in number. Required for the Java method only.out. // forward to MBEECH System. Arguments (input) wCtx Workflow context information. BigDecimal nid. A comment can be supplied to explain why the forward is taking place. Also implicitly calls the Callback function specified in the Send or SendGroup function with FORWARD mode.workCount(ctx.println(”There are ” + count + ” open notification(s) for” + ” MBEECH”). System. The notification id. Java Syntax public static boolean forward (WFContext wCtx.println(”Delegate nid ” + myNid + Oracle Workflow APIs 8 – 205 .java program.out. String newRole String comment) Description This procedure delegates a notification to a new role to perform work. See: Oracle Workflow Context: page 8 – 6. The Delegate feature in the Notification System calls this procedure. or comment Example The following code excerpt shows an example of how to call forward() in a Java program. The role name of the person the note is reassigned to. forward_comment in varchar2 default null). nid new_role or newRole forward_comment An optional forwarding comment. even though the original role recipient still maintains ownership of the notification activity.println(”Delegate Test”).out. Existing notification attributes (including due date) are not refreshed or otherwise changed. the forward is recorded in the USER_COMMENT field of the notification. ”MBEECH”).

forward(ctx. Please handle. 8 – 206 Oracle Workflow Guide .workCount(ctx.out. myNid.”). count = WFNotificationAPI.”). ”MBEECH”).” from BLEWIS to MBEECH”). WFNotificationAPI. ”MBEECH”. ”Matt. System.println(”There are ” + count + ” open notification(s) for” + ” MBEECH after Delegate.

String newRole String comment) Description This procedure forwards a notification to a new role and transfers ownership of the notification to the new role. BigDecimal nid. Java Syntax public static boolean transfer (WFContext wCtx. Note that when you transfer a notification. the transfer is recorded in the USER_COMMENT field of the notification. new_role in varchar2. . It also implicitly calls the Callback function specified in the Send or SendGroup function with TRANSFER mode.Transfer PL/SQL Syntax procedure TRANSFER (nid in number. A comment can be supplied to explain why the forward is taking place. The Transfer feature in the Notification System calls this procedure. forward_comment in varchar2 default null).

The role name of the person the note is transferred to. or comment Example The following code excerpt shows an example of how to call transfer() in a Java program. System. The example code is from the WFTest. Workflow context information. nid new_role or newRole forward_comment An optional comment to append to notification.out.println(”Transfer Test”). Arguments (input) wCtx Attention: Existing notification attributes (including due date) are not refreshed or otherwise changed except for ORIGINAL_RECIPIENT. Required for the Java method only.java program. See: Oracle Workflow Context: page 8 – 6. which identifies the owner of the notification.println(”Transfer nid ” + myNid + ” from BLEWIS to MBEECH”).out. The notification id. // transfer to MBEECH System. Oracle Workflow APIs 8 – 207 .

You own it now. ”MBEECH”). System. count = WFNotificationAPI. 8 – 208 Oracle Workflow Guide .WFNotificationAPI.”). ”MBEECH”. myNid.workCount(ctx.println(”There are ” + count + ” open notification(s) for” + p” MBEECH after Transfer. ”Matt.”).out.transfer(ctx.

a ’Canceled’ e–mail is sent to the original recipient as a warning that the notification is no longer valid. Required for the Java method only. The notification id. BigDecimal nid. If the notification was delivered via e–mail and expects a response. Java Syntax public static boolean cancel (WFContext wCtx. String comment) Description This procedure may be invoked by the sender or administrator to cancel a notification. The notification status is then changed to ’CANCELED’ but the row is not removed from the WF_NOTIFICATIONS table until a purge operation is performed. cancel_comment in varchar2 default null). nid cancel_comment or comment Oracle Workflow APIs 8 – 209 . See: Oracle Workflow Context: page 8 – 6. Arguments (input) wCtx Workflow context information. An optional comment on the cancellation.Cancel PL/SQL Syntax procedure CANCEL (nid in number.

then the Cancel( ) function is called instead. Generally.CancelGroup PL/SQL Syntax procedure CancelGroup (gid in number. Arguments (input) gid cancel_comment The notification group id. 8 – 210 Oracle Workflow Guide . The notification status is then changed to ’CANCELED’ but the rows are not removed from the WF_NOTIFICATIONS table until a purge operation is performed. cancel_comment in varchar2 default null). The notifications are identified by the notification group ID (gid). An optional comment on the cancellation. See: Voting Activity: page 4 – 61. Description This procedure may be invoked by the sender or administrator to cancel the individual copies of a specific notification sent to all users in a notification group. this function is called only if a notification activity has ’Expanded Roles’ checked in its properties page. If the notification was delivered via e–mail and expects a response. a ’Canceled’ e–mail is sent to the original recipient as a warning that the notification is no longer valid. If Expanded Roles is not checked.

respond_comment in varchar2 default null. This procedure also accepts the name of the individual who actually responded to the notification. Required for the Java method only. The value stored in this column depends on how the user responds to the notification. nid comment responder Oracle Workflow APIs 8 – 211 . The notification id An optional comment on the response The user who responded to the notification. The information is stored in the RESPONDER column of the WF_NOTIFICATIONS table.Respond PL/SQL Syntax procedure RESPOND (nid in number. The procedure marks the notification as ’CLOSED’ and communicates RESPOND attributes back to the database via the callback function (if supplied). Java Syntax public static boolean respond (WFContext wCtx. The following table shows the value that is stored for each response mechanism. String responder) Description This procedure may be invoked by the notification agent (Notification Web page or e–mail agent) when the performer completes the response to the notification. This may be useful to know especially if the notification is assigned to a multi–user role. String comment. BigDecimal nid. responder in varchar2 default null). Response Mechanism Value Stored Web E–mail Table 8 – 6 (Page 1 of 1) Web login username E–mail username as displayed in the mail response Arguments (input) wCtx Workflow context information. See: Oracle Workflow Context: page 8 – 6.

If the Notification was closed using the e–mail interface then the value returned will be an e–mail address. Java Syntax public static String responder (WFContext wCtx. Arguments (input) wCtx Workflow context information. See: Respond: page 8 – 211. See: Oracle Workflow Context: page 8 – 6. If the notification was closed using the Web Notification interface the value returned will be a valid role defined in the view WF_ROLES.Responder PL/SQL Syntax function RESPONDER (nid in number) returns varchar2. The notification id nid 8 – 212 Oracle Workflow Guide . Required for the Java method only. BigDecimal nid) Description This function returns the responder of a closed notification.

ResultCount out number. Arguments (input) wCtx Workflow context information. ResultCode in varchar2. String resultCode) Description Counts the number of responses for a specified result code. The notification group id. PercentOfVotes out number). PercentOfTotalPop out number. See: Oracle Workflow Context: page 8 – 6. Result code to be tallied. BigDecimal gid. Use this procedure only if you are writing your own custom Voting activity. gid ResultCode Oracle Workflow APIs 8 – 213 . See: Voting Activity: page 4 – 61. Java Syntax public static WFTwoDDataSource voteCount (WFContext wCtx. Required for the Java method only.VoteCount PL/SQL Syntax procedure VoteCount (gid in number.

See: Oracle Workflow Context: page 8 – 6. Required for the Java method only. Use this procedure only if you are writing your own custom Voting activity. See: Voting Activity: page 4 – 61. Java Syntax public static boolean openNotificationsExist (WFContext wCtx. Arguments (input) wCtx Workflow context information. otherwise it returns ’FALSE’. gid 8 – 214 Oracle Workflow Guide .OpenNotificationsExist PL/SQL Syntax function OpenNotificationsExist (gid in number) return boolean. The notification group id. BigDecimal gid) Description This function returns ’TRUE’ if any notification associated with the specified notification group ID is ’OPEN’.

BigDecimal nid.Close PL/SQL Syntax procedure Close (nid in number. See: Oracle Workflow Context: page 8 – 6. responder in varchar2 default null). The user or role who responded to the notification. Required for the Java method only. wCtx Workflow context information. The notification id. nid responder Oracle Workflow APIs 8 – 215 . Java Syntax public static boolean close (WFContext wCtx. String responder) Description Arguments (input) This procedure Closes a notification.

AddAttr PL/SQL Syntax procedure AddAttr (nid in number. Required for the Java method only. myNid. The attribute name. Arguments (input) wCtx Workflow context information.addAttr(ctx. if (WFNotificationAPI. The example code is from the WFTest. Java Syntax public static boolean addAttr (WFContext wCtx. as it is completely unvalidated by Oracle Workflow.”). BigDecimal nid. See: Oracle Workflow Context: page 8 – 6. myAttr) == false) { System. } 8 – 216 Oracle Workflow Guide . The notification id. String aName) Description Adds a new runtime notification attribute.println(”Add attribute ” + myAttr + ” failed.java program. aname in varchar2).out. The attribute value. nid aname avalue Example The following code excerpt shows an example of how to call addAttr() in a Java program. You should perform validation and insure consistency in the use of the attribute.

BigDecimal nid.SetAttribute PL/SQL Syntax procedure SetAttrText (nid in number. avalue in number). Java Syntax public static boolean setAttrText (WFContext wCtx. String aName. The performer (responder) may set the value of RESPOND attributes. aname in varchar2. BigDecimal aValue) public static boolean setAttrDate WFContext wCtx. avalue in date). The notification agent (sender) may set the value of SEND attributes. String aName. avalue in varchar2). String aName. Oracle Workflow APIs 8 – 217 . procedure SetAttrNumber (nid in number. String aValue) public static boolean setAttrNumber (WFContext wCtx. procedure SetAttrDate (nid in number. BigDecimal nid. BigDecimal nid. String aValue) Description Used at both send and respond time to set the value of notification attributes. aname in varchar2. aname in varchar2.

The attribute value. myAttr.out. The example code is from the WFTest. nid aname avalue Example The following code excerpt shows an example of how to call a setAttribute method in a Java program. } 8 – 218 Oracle Workflow Guide . Required for the Java method only. value) == false) { System.setAttrDate(ctx. if (WFNotificationAPI. The notification id.”).java program.Arguments (input) wCtx Workflow context information. See: Oracle Workflow Context: page 8 – 6. The attribute name.println(”set attribute ” + myAttr + ” to ” + value + ” failed. myNid.

java program. format out varchar2). subtype out varchar2. BigDecimal nid. Arguments (input) wCtx Workflow context information. atype out varchar2. The notification id. Oracle Workflow APIs 8 – 219 . subtype. The subtype is always SEND or RESPOND to indicate the attribute’s source.0). such as its type. if any is specified. The attribute name. String aName) Description Returns information about a notification attribute. nid aname Example The following code excerpt shows an example of how to call getAttrInfo() in a Java program. See: Oracle Workflow Context: page 8 – 6.GetAttrInfo PL/SQL Syntax procedure GetAttrInfo (nid in number. // the first element is the attribute type myAttrType = (String) dataSource. myAttr).getAttrInfo(ctx. aname in varchar2. and format. dataSource = WFNotificationAPI.getData(0. The example code is from the WFTest. Java Syntax public static WFTwoDataSource getAttrInfo (WFContext wCtx. dataSource). displayDataSource(ctx. myNid. Required for the Java method only.

Arguments (input) wCtx Workflow context information.out. The notification id. See: Oracle Workflow Context: page 8 – 6. myNid).println(”Notification Info for nid ” + myNid). nid Example The following code excerpt shows an example of how to call getInfo() in a Java program. dataSource = WFNotificationAPI. status out varchar2). the name of the message.getInfo(ctx. Java Syntax public static WFTwoDDataSource getInfo (WFContext wCtx. Required for the Java method only. displayDataSource(ctx. the due date and the status for the specified notification. the notification priority. 8 – 220 Oracle Workflow Guide . The example code is from the WFTest.GetInfo PL/SQL Syntax procedure GetInfo (nid in number. dataSource). // Notification Info System. due_date out date. BigDecimal nid) Description Returns the role that the notification is sent to. the item type of the message. message_name out varchar2. message_type out varchar2.java program. role out varchar2. priority out number.

which returns text/html • wf_notification. Arguments (input) some_text nid disptype Text to be substituted.doc_attach.doc_text. The display type of the message body that you are token substituting the text into. Oracle Workflow APIs 8 – 221 .GetText PL/SQL Syntax function GetText (some_text in varchar2. If an error is detected. Description Substitutes tokens in an arbitrary text string using token values from a particular notification.doc_html. this function returns some_text unsubstituted rather than raise exceptions. disptype in varchar2 default ’’) return varchar2. which returns null The default is null. Notification ID of notification to use for token values. Valid display types are: • wf_notification. For views and forms. This function may return up to 32K characters. use GetShortText( ) which truncates values at 1950 characters. nid in number. which returns text/plain • wf_notification. You cannot use this function in a view definition or in an Oracle Forms Developer form.

8 – 222 Oracle Workflow Guide . Arguments (input) some_text nid Text to be substituted. this function returns some_text unsubstituted rather than raise exceptions. where the field size is limited to 1950 characters. This function is meant for use in view definitions and Oracle Forms Developer forms. This function may return up to 1950 characters. nid in number) return varchar2. If an error is detected.GetShortText PL/SQL Syntax function GetShortText (some_text in varchar2. Notification ID of notification to use for token values. Use GetText( ) in other situations where you need to retrieve up to 32K characters. Description Substitutes tokens in an arbitrary text string using token values from a particular notification.

aname in varchar2) return date. function GetAttrDate (nid in number. String aName) public static String getAttrDate WFContext wCtx. Java Syntax public static String getAttrText (WFContext wCtx. BigDecimal nid. function GetAttrNumber (nid in number. See: Oracle Workflow Context: page 8 – 6. aname in varchar2) return number. aname in varchar2) return varchar2. String aName) Description Arguments (input) Returns the value of the specified message attribute. wCtx Workflow context information. nid aname Oracle Workflow APIs 8 – 223 . The message attribute name. The notification id. Required for the Java method only. BigDecimal nid. BigDecimal nid.GetAttribute PL/SQL Syntax function GetAttrText (nid in number. String aName) public static BigDecimal getAttrNumber (WFContext wCtx.

java program.getAttrDoc(ctx. myNid.getAttrNumber(ctx.Example The following code excerpt shows an example of how to call the getAttribute methods in a Java program. myAttr). } else if (myAttrType == ”NUMBER”) { value = (WFNotificationAPI. myAttr. if (myAttrType == ”DATE”) { value = WFNotificationAPI. myAttr).out. myAttr)). System. } else value = WFNotificationAPI.getAttrText(ctx.getAttrDate(ctx. myNid. } else if (myAttrType == ”DOCUMENT”) { value = WFNotificationAPI.toString() + ” = ’” + value + ”’”). The example code is from the WFTest.toString().println(myAttr. myNid. // we get the value according to the type. 8 – 224 Oracle Workflow Guide . null). myNid.

the document key string instead of the actual document. use GetAttrText( ). as requested. Java Syntax public static String getAttrDoc (WFContext wCtx.doc_text. See: Oracle Workflow Context: page 8 – 6. BigDecimal nid. The message attribute name. Valid display types are: • wf_notification.doc_html. which returns text/plain • wf_notification. that is. String aName. String dispType) Description Returns the displayed value of a Document–type attribute. which returns null nid aname disptype Oracle Workflow APIs 8 – 225 . aname in varchar2. Required for the Java method only. disptype in varchar2) return varchar2. Arguments (input) wCtx Workflow context information. The notification id. which returns text/html • wf_notification. The display type of the document you wish to return.GetAttrDoc PL/SQL Syntax function GetAttrDoc (nid in number.doc_attach. If you wish to retrieve the actual attribute value. The referenced document appears in either plain text or HTML format.

Arguments (input) wCtx Workflow context information. nid 8 – 226 Oracle Workflow Guide . Any message attribute in the subject is token substituted with the value of the corresponding message attribute. Required for the Java method only.GetSubject PL/SQL Syntax function GetSubject (nid in number) return varchar2 Java Syntax public static String getSubject (WFContext wCtx. See: Oracle Workflow Context: page 8 – 6. The notification id. BigDecimal nid) Description Returns the subject line for the notification message.

The display type of the message body you wish to fetch. Any message attribute in the body is token substituted with the value of the corresponding notification attribute. it should be wordwrapped as appropriate for the output device. which returns null The default is null. Required for the Java method only. depending on the message body type specified. See: Oracle Workflow Context: page 8 – 6.doc_text. Body text may contain tabs (which indicate indentation) and newlines (which indicate paragraph termination). Valid display types are: • wf_notification. Java Syntax public static String getBody (WFContext wCtx. disptype in varchar2 default ’’) return varchar2. nid disptype Oracle Workflow APIs 8 – 227 .doc_attach. You cannot use this function in a view definition or in an Oracle Applications form. This function may return up to 32K characters. The notification id. which returns text/html • wf_notification. For views and forms. Arguments (input) wCtx Workflow context information. BigDecimal nid. String dispType) Description Returns the HTML or plain text message body for the notification.doc_html. which returns text/plain • wf_notification. use GetShortBody( ) which truncates values at 1950 characters. Note that the returned plain text message body is not formatted.GetBody PL/SQL Syntax function GetBody (nid in number.

Use GetBody( ) in other situations where you need to retrieve up to 32K characters. where the field size is limited to 1950 characters. Note: This function is intended for displaying messages in forms or views only. it should be wordwrapped as appropriate for the output device. Body text may contain tabs (which indicate indentation) and newlines (which indicate paragraph termination). Any message attribute in the body is token substituted with the value of the corresponding notification attribute. rather than raise exceptions. this function returns the body unsubstituted or null if all else fails. Arguments (input) nid The notification id. Note that the returned plain text message body is not formatted. 8 – 228 Oracle Workflow Guide . Description Returns the message body for the notification.GetShortBody PL/SQL Syntax function GetShortBody (nid in number) return varchar2. If an error is detected. This function is meant for use in view definitions and Oracle Forms Developer forms. This function may return up to 1950 characters.

or if no Selector/Callback function is implemented. This function returns TRUE if the context check is OK. Description Tests if the current context is correct by calling the Item Type Selector/Callback function. Arguments (input) nid The notification id.TestContext PL/SQL Syntax function TestContext (nid in number) return boolean. Oracle Workflow APIs 8 – 229 . It returns FALSE if the context check fails.

String accessString) Description Returns a username if the notification access string is valid and the notification is open. 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. access_str or accessString 8 – 230 Oracle Workflow Guide . Java Syntax public static String accessCheck (WFContext wCtx. The access string. See: Oracle Workflow Context: page 8 – 6. otherwise it returns null. in the format: nid/nkey where nid is the notification ID and nkey is the notification key. Arguments (input) wCtx Workflow context information. Required for the Java method only.AccessCheck PL/SQL Syntax function AccessCheck (access_str in varchar2) return varchar2.

See: Oracle Workflow Context: page 8 – 6. The internal name of a role. String userName) Description Arguments (input) Returns the number of open notifications assigned to a role. username Oracle Workflow APIs 8 – 231 . Java Syntax public static BigDecimal workCount (WFContext wCtx. wCtx Workflow context information. Required for the Java method only.WorkCount PL/SQL Syntax function WorkCount (username in varchar2) return number.

The internal name of the item type. itemType itemKey 8 – 232 Oracle Workflow Guide . The item type and key together identify the process instance. A string derived from the application object’s primary key. The string uniquely identifies the item within the item type. See: Oracle Workflow Context: page 8 – 6. wCtx Workflow context information. Required for the Java method only. String itemType. String itemKey) Description Arguments (input) Returns a list of notifications for the specified item type and item key.getNotifications Java Syntax public static WFTwoDDataSource getNotifications (WFContext wCtx.

Oracle Workflow APIs 8 – 233 .out.getNotificationAttributes Java Syntax public static WFTwoDDataSource getNotificationAttributes (WFContext wCtx. // List available Notification Attributes System. nid Example The following code excerpt shows an example of how to call getNotificationAttributes() in a Java program.java program. See: Oracle Workflow Context: page 8 – 6. wCtx Workflow context information.getNotificationAttributes(ctx. The notification ID. dataSource). displayDataSource(ctx.println(”List of Attributes for id ” + myNid ”:”). dataSource = WFNotificationAPI. Required for the Java method only. myNid). BigDecimal nid) Description Arguments (input) Returns a list of notification attributes and their corresponding values for the specified notification ID. The example code is from the WFTest.

Description Appends a character string to the end of a character large object (CLOB). Arguments (input) clob_loc msg_string The CLOB to which the string should be added. A string of character data. You can use this procedure to help build the CLOB for a PL/SQL CLOB document attribute for a notification.WriteToClob PL/SQL Syntax procedure WriteToClob (clob_loc in out clob. See Also To Define a Document Attribute: page 4 – 14 ”PL/SQL CLOB” Documents: page 7 – 19 8 – 234 Oracle Workflow Guide . msg_string in varchar2).

You define events. Subscriptions can include the following types of processing: • Executing custom code on the event information • Sending event information to a workflow process • Sending event information to named communication points called agents on the local system or external systems The event information communicated by the Business Event System is called an event message. and subscriptions in the Event Manager. You can also define event activities in the Workflow Builder to include business events in your workflow processes. When a significant business event occurs in an internet or intranet application on a system.Overview of the Oracle Workflow Business Event System The Oracle Workflow Business Event System leverages the Oracle Advanced Queuing infrastructure to communicate business events between systems. See Also Managing Business Events: page 13 – 2 Event Activities: page 4 – 54 Oracle Workflow APIs 8 – 235 . it triggers event subscriptions that specify the processing to execute for that event. agents. The event message includes header properties to identify the event as well as event data describing what occurred. systems.

See Also User–Defined Datatypes. which is located in the Oracle Workflow sql subdirectory for the standalone version of Oracle Workflow. or in the sql subdirectory under $FND_TOP for the version of Oracle Workflow embedded in Oracle Applications. Oracle Concepts 8 – 236 Oracle Workflow Guide .Business Event System Datatypes Oracle Workflow uses a number of abstract datatypes (ADTs) to model the structure and behavior of Business Event System data. These datatypes include the following: • Agent structure: WF_AGENT_T • Parameter structure: WF_PARAMETER_T • Parameter list structure: WF_PARAMETER_LIST_T • Event message structure: WF_EVENT_T The Business Event System datatypes are created by a script called wftypes.sql.

• getName • getSystem • setName • setSystem getName PL/SQL Syntax MEMBER FUNCTION getName return varchar2 Description Returns the value of the NAME attribute in a WF_AGENT_T object. which you can use to retrieve and set the values of its attributes. The following table lists the attributes of the WF_AGENT_T datatype. Attribute Name Datatype Description NAME SYSTEM VARCHAR2(30) VARCHAR2(30) The name of the agent. Oracle Workflow APIs 8 – 237 . The system where the agent is located. Table 8 – 7 (Page 1 of 1) The WF_AGENT_T object type also includes the following methods. getSystem PL/SQL Syntax MEMBER FUNCTION getSystem return varchar2 Description Returns the value of the SYSTEM attribute in a WF_AGENT_T object.Agent Structure Oracle Workflow uses the object type WF_AGENT_T to store information about an agent in a form that can be referenced by an event message.

setSystem PL/SQL Syntax MEMBER PROCEDURE setSystem (pSystem in varchar2) Description Arguments (input) Sets the value of the SYSTEM attribute in a WF_AGENT_T object. pSystem The value for the SYSTEM attribute.setName PL/SQL Syntax MEMBER PROCEDURE setName (pName in varchar2) Description Arguments (input) Sets the value of the NAME attribute in a WF_AGENT_T object. See Also Agents: page 13 – 22 8 – 238 Oracle Workflow Guide . pName The value for the NAME attribute.

Table 8 – 8 (Page 1 of 1) The WF_PARAMETER_T object type also includes the following methods. getValue PL/SQL Syntax MEMBER FUNCTION getValue return varchar2 Oracle Workflow APIs 8 – 239 . The parameter value.Parameter Structure Oracle Workflow uses the object type WF_PARAMETER_T to store a parameter name and value pair in a form that can be included in an event message parameter list. WF_PARAMETER_T allows custom values to be added to the WF_EVENT_T event message object. The following table lists the attributes of the WF_PARAMETER_T datatype. which you can use to retrieve and set the values of its attributes. • getName • getValue • setName • setValue getName PL/SQL Syntax MEMBER FUNCTION getName return varchar2 Description Returns the value of the NAME attribute in a WF_PARAMETER_T object. Attribute Name Datatype Description NAME VALUE VARCHAR2(30) VARCHAR2(2000) The parameter name.

Description Returns the value of the VALUE attribute in a WF_PARAMETER_T object. pValue The value for the VALUE attribute. 8 – 240 Oracle Workflow Guide . setName PL/SQL Syntax MEMBER PROCEDURE setName (pName in varchar2) Description Arguments (input) Sets the value of the NAME attribute in a WF_PARAMETER_T object. pName The value for the NAME attribute. setValue PL/SQL Syntax MEMBER PROCEDURE setValue (pValue in varchar2) Description Arguments (input) Sets the value of the VALUE attribute in a WF_PARAMETER_T object.

Parameter List Structure Oracle Workflow uses the named varying array (varray) WF_PARAMETER_LIST_T to store a list of parameters in a form that can be included in an event message. The WF_PARAMETER_LIST_T datatype can include up to 100 parameter name and value pairs. A description of this datatype is as follows: WF_PARAMETER_LIST_T • Maximum size: 100 • Element datatype: WF_PARAMETER_T Oracle Workflow APIs 8 – 241 . WF_PARAMETER_LIST_T allows custom values to be added to the WF_EVENT_T event message object.

WF_EVENT_T defines the event message structure that the Business Event System and the Workflow Engine use to represent a business event. and subscription processing does not begin until the specified date. If the send date is set to a future date when an event is sent to an agent. 1 represents a high priority. all use WF_EVENT_T as their payload type. but does not become available for the consumer to dequeue until the specified date. The send date can be set to the system date to indicate that the message is immediately available for dequeuing. The following table lists the attributes of the WF_EVENT_T datatype. called WF_IN. The standard queues that Oracle Workflow provides for the Business Event System. including any existing queues you already have defined on your system. If you want to use queues with an alternate payload type. Attribute Name Datatype Description PRIORITY NUMBER The priority with which the message recipient should dequeue the message. the Business Event System and the Workflow Engine can only communicate events in this format. you must create a queue handler to translate between the standard Workflow WF_EVENT_T structure and your custom payload type. The date and time when the message is available for dequeuing. WF_OUT. WF_DEFERRED. See: Setting Up Queues: page 2 – 97 and Standard APIs for a Queue Handler: page 7 – 23. or to a future date to indicate future availability. and WF_ERROR. If the send date is set to a future date when an event is raised. This datatype contains all the header properties of an event message as well as the event data payload. and 99 represents a low priority. the event message is propagated to that agent’s queue. 50 represents a normal priority. A smaller number indicates a higher priority. Internally. SEND_DATE DATE 8 – 242 Oracle Workflow Guide . in a serialized form that is suitable for transmission outside the system. For example. the event message is placed on the WF_DEFERRED queue.Event Message Structure Oracle Workflow uses the object type WF_EVENT_T to store event messages.

this is the subscription that was being executed when the error was encountered. The agent from which the event is sent. • Initialize: page 8 – 245 • getPriority: page 8 – 245 • getSendDate: page 8 – 245 Oracle Workflow APIs 8 – 243 . The error stack provides context information to help you locate the source of an error. The string that uniquely identifies the instance of the event. then that value is used as the item key if the event is sent to a workflow process. A set of additional details describing what occurred in the event. If a value is set for the correlation ID.Attribute Name Datatype Description RECEIVE_DATE CORRELATION_ID DATE VARCHAR2(240) The date and time when the message is dequeued by an agent listener. The agent to which the event should be sent (the message recipient). For locally raised events. This attribute is initially blank but can be set by a function. An error stack of arguments that the Event Manager generates if an error occurs while processing this event. A correlation identifier that associates this message with other messages. The internal name of the event. which you can use to retrieve and set the values of its attributes. An error message that the Event Manager generates if an error occurs while processing this event. this attribute is initially null. A list of additional parameter name and value pairs. The event data can be structured as an XML document. If an error occurs while processing this event. PARAMETER_LIST EVENT_NAME EVENT_KEY EVENT_DATA WF_PARAMETER_ LIST_T VARCHAR2(240) VARCHAR2(240) CLOB FROM_AGENT WF_AGENT_T TO_AGENT ERROR_ SUBSCRIPTION WF_AGENT_T RAW(16) ERROR_MESSAGE VARCHAR2(4000) ERROR_STACK VARCHAR2(4000) Table 8 – 9 (Page 2 of 2) The WF_EVENT_T object type also includes the following methods.

and setEventData methods. setEventKey. EVENT_KEY. or 8 – 244 Oracle Workflow Guide . and EVENT_DATA attributes individually using the setEventName.• getReceiveDate: page 8 – 246 • getCorrelationID: page 8 – 246 • getParameterList: page 8 – 246 • getEventName: page 8 – 246 • getEventKey: page 8 – 247 • getEventData: page 8 – 247 • getFromAgent: page 8 – 247 • getToAgent: page 8 – 247 • getErrorSubscription: page 8 – 247 • getErrorMessage: page 8 – 248 • getErrorStack: page 8 – 248 • setPriority: page 8 – 248 • setSendDate: page 8 – 248 • setReceiveDate: page 8 – 249 • setCorrelationID: page 8 – 249 • setParameterList: page 8 – 249 • setEventName: page 8 – 250 • setEventKey: page 8 – 250 • setEventData: page 8 – 250 • setFromAgent: page 8 – 251 • setToAgent: page 8 – 251 • setErrorSubscription: page 8 – 251 • setErrorMessage: page 8 – 251 • setErrorStack: page 8 – 252 • Content: page 8 – 252 • Address: page 8 – 253 • AddParameterToList: page 8 – 253 • GetValueForParameter: page 8 – 253 Note: You can set the values of the EVENT_NAME.

See: Address: page 8 – 253. Initialize PL/SQL Syntax STATIC PROCEDURE initialize (new_wf_event_t in out wf_event_t) Description Initializes a new WF_EVENT_T object by setting the PRIORITY attribute to 0. setPriority. . and SEND__DATE attributes individually using the setFromAgent. you can set the values of the FROM_AGENT. initializing the EVENT_DATA attribute to EMPTY using the Empty_CLOB() function. and setting all other attributes to NULL. or you can use the Address method to set all four address attributes at once.you can use the Content method to set all three event content attributes at once. TO_AGENT. Similarly. PRIORITY. setToAgent. and setSendDate methods. See: Content: page 8 – 252.

getPriority PL/SQL Syntax MEMBER FUNCTION getPriority return number Description Returns the value of the PRIORITY attribute in a WF_EVENT_T object. new_wf_event_t The WF_EVENT_T object to initialize. getSendDate PL/SQL Syntax MEMBER FUNCTION getSendDate return date Oracle Workflow APIs 8 – 245 . Arguments (input) Attention: You must call the Initialize method before you can perform any further manipulation on a new WF_EVENT_T object.

getParameterList PL/SQL Syntax MEMBER FUNCTION getParameterList return wf_parameter_list_t Description Returns the value of the PARAMETER_LIST attribute in a WF_EVENT_T object. getCorrelationID PL/SQL Syntax MEMBER FUNCTION getCorrelationID return varchar2 Description Returns the value of the CORRELATION_ID attribute in a WF_EVENT_T object.Description Returns the value of the SEND_DATE attribute in a WF_EVENT_T object. 8 – 246 Oracle Workflow Guide . getEventName PL/SQL Syntax MEMBER FUNCTION getEventName return varchar2 Description Returns the value of the EVENT_NAME attribute in a WF_EVENT_T object. getReceiveDate PL/SQL Syntax MEMBER FUNCTION getReceiveDate return date Description Returns the value of the RECEIVE_DATE attribute in a WF_EVENT_T object.

getEventKey PL/SQL Syntax MEMBER FUNCTION getEventKey return varchar2 Description Returns the value of the EVENT_KEY attribute in a WF_EVENT_T object. getFromAgent PL/SQL Syntax MEMBER FUNCTION getFromAgent return wf_agent_t Description Returns the value of the FROM_AGENT attribute in a WF_EVENT_T object. getToAgent PL/SQL Syntax MEMBER FUNCTION getToAgent return wf_agent_t Description Returns the value of the TO_AGENT attribute in a WF_EVENT_T object. getErrorSubscription PL/SQL Syntax MEMBER FUNCTION getErrorSubscription Oracle Workflow APIs 8 – 247 . getEventData PL/SQL Syntax MEMBER FUNCTION getEventData return clob Description Returns the value of the EVENT_DATA attribute in a WF_EVENT_T object.

setSendDate PL/SQL Syntax MEMBER PROCEDURE setSendDate 8 – 248 Oracle Workflow Guide .return raw Description Returns the value of the ERROR_SUBSCRIPTION attribute in a WF_EVENT_T object. setPriority PL/SQL Syntax MEMBER PROCEDURE setPriority (pPriority in number) Description Arguments (input) Sets the value of the PRIORITY attribute in a WF_EVENT_T object. pPriority The value for the PRIORITY attribute. getErrorStack PL/SQL Syntax MEMBER FUNCTION getErrorStack return varchar2 Description Returns the value of the ERROR_STACK attribute in a WF_EVENT_T object. getErrorMessage PL/SQL Syntax MEMBER FUNCTION getErrorMessage return varchar2 Description Returns the value of the ERROR_MESSAGE attribute in a WF_EVENT_T object.

pCorrelationID The value for the CORRELATION_ID attribute. pReceiveDate The value for the RECEIVE_DATE attribute. pSendDate The value for the SEND_DATE attribute.(pSendDate in date default sysdate) Description Arguments (input) Sets the value of the SEND_DATE attribute in a WF_EVENT_T object. setParameterList PL/SQL Syntax MEMBER PROCEDURE setParameterList (pParameterList in wf_parameter_list_t) Description Sets the value of the PARAMETER_LIST attribute in a WF_EVENT_T object. Oracle Workflow APIs 8 – 249 . setReceiveDate PL/SQL Syntax MEMBER PROCEDURE setReceiveDate (pReceiveDate in date default sysdate) Description Arguments (input) Sets the value of the RECEIVE_DATE attribute in a WF_EVENT_T object. setCorrelationID PL/SQL Syntax MEMBER PROCEDURE setCorrelationID (pCorrelationID in varchar2) Description Arguments (input) Sets the value of the CORRELATION_ID attribute in a WF_EVENT_T object.

8 – 250 Oracle Workflow Guide . pEventName The value for the EVENT_NAME attribute. pEventKey The value for the EVENT_KEY attribute. setEventKey PL/SQL Syntax MEMBER PROCEDURE setEventKey (pEventKey in varchar2) Description Arguments (input) Sets the value of the EVENT_KEY attribute in a WF_EVENT_T object.Arguments (input) pParameterList The value for the PARAMETER_LIST attribute. setEventData PL/SQL Syntax MEMBER PROCEDURE setEventData (pEventData in clob) Description Arguments (input) Sets the value of the EVENT_DATA attribute in a WF_EVENT_T object. pEventData The value for the EVENT_DATA attribute. setEventName PL/SQL Syntax MEMBER PROCEDURE setEventName (pEventName in varchar2) Description Arguments (input) Sets the value of the EVENT_NAME attribute in a WF_EVENT_T object.

setToAgent PL/SQL Syntax MEMBER PROCEDURE setToAgent (pToAgent in wf_agent_t) Description Arguments (input) Sets the value of the TO_AGENT attribute in a WF_EVENT_T object. pErrorSubscrip– tion The value for the ERROR_SUBSCRIPTION attribute.setFromAgent PL/SQL Syntax MEMBER PROCEDURE setFromAgent (pFromAgent in wf_agent_t) Description Arguments (input) Sets the value of the FROM_AGENT attribute in a WF_EVENT_T object. pFromAgent The value for the FROM_AGENT attribute. setErrorSubscription PL/SQL Syntax MEMBER PROCEDURE setErrorSubscription (pErrorSubscription in raw) Description Arguments (input) Sets the value of the ERROR_SUBSCRIPTION attribute in a WF_EVENT_T object. setErrorMessage PL/SQL Syntax MEMBER PROCEDURE setErrorMessage Oracle Workflow APIs 8 – 251 . pToAgent The value for the TO_AGENT attribute.

EVENT_KEY. 8 – 252 Oracle Workflow Guide . pName pKey pData The value for the EVENT_NAME attribute. pData in clob) Description Arguments (input) Sets the values of all the event content attributes in a WF_EVENT_T object. Content PL/SQL Syntax MEMBER PROCEDURE Content (pName in varchar2.(pErrorMessage in varchar2) Description Arguments (input) Sets the value of the ERROR_MESSAGE attribute in a WF_EVENT_T object. pErrorMessage The value for the ERROR_MESSAGE attribute. pErrorStack The value for the ERROR_STACK attribute. The value for the EVENT_KEY attribute. including EVENT_NAME. pKey in varchar2. and EVENT_DATA. setErrorStack PL/SQL Syntax MEMBER PROCEDURE setErrorStack (pErrorStack in varchar2) Description Arguments (input) Sets the value of the ERROR_STACK attribute in a WF_EVENT_T object. The value for the EVENT_DATA attribute.

and SEND_DATE. The parameter value. The value for the TO_AGENT attribute. The value for the SEND_DATE attribute. pPriority in number. 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. then the previous value of that parameter is overwritten with the specified value. GetValueForParameter PL/SQL Syntax MEMBER FUNCTION GetValueForParameter Oracle Workflow APIs 8 – 253 . AddParameterToList PL/SQL Syntax MEMBER PROCEDURE AddParameterToList (pName in varchar2. PRIORITY. TO_AGENT. Arguments (input) pName pValue The parameter name. pSendDate in date) Description Arguments (input) Sets the values of the all address attributes in a WF_EVENT_T object. pOutAgent pToAgent pPriority pSendDate The value for the FROM_AGENT attribute. pToAgent in wf_agent_t. The value for the PRIORITY attribute. including FROM_AGENT.Address PL/SQL Syntax MEMBER PROCEDURE Address (pOutAgent in wf_agent_t. If a parameter with the specified name already exists in the parameter list.

This method begins at the end of the parameter list and searches backwards through the list. then the GetValueForParameter method returns NULL.(pName in varchar2) return varchar2 Description Returns the value of the specified parameter from the list stored in the PARAMETER_LIST attribute of a WF_EVENT_T object. Arguments (input) pName The parameter name. If no parameter with the specified name is found in the parameter list. 8 – 254 Oracle Workflow Guide .

Example for Using Abstract Datatypes The following example shows some ways to use abstract datatype methods in a SQL script. including: • Initializing a new event message structure with the Initialize method .

Oracle Workflow APIs 8 – 255 . l_fromsystem varchar2(30) := ’&fromsystem’. l_msg varchar2(200) := ’&message’.initialize before you can manipulate a new wf_event_t object. l_eventkey varchar2(100) := ’&eventkey’. which enqueues an event message on a queue using an override agent. Attention: You must call the Initialize method before you can perform any further manipulation on a new WF_EVENT_T object. l_overrideagent_t wf_agent_t. l_fromagent_t wf_agent_t. begin /*You must call wf_event_t.sql. l_toagent_t wf_agent_t. l_eventname varchar2(100) := ’&eventname’. l_fromagent varchar2(30) := ’&fromagent’. l_clob clob. declare l_overrideagent varchar2(30) := ’&overrideagent’. See: Wfevtenq. l_event_t wf_event_t. l_tosystem varchar2(30) := ’&tosystem’. • 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. l_toagent varchar2(30) := ’&toagent’.sql: page 16 – 10.initialize(l_event_t).*/ wf_event_t. l_overridesystem varchar2(30) := ’&overridesystem’.

length(l_msg). DBMS_LOB.l_overrideagent_t := wf_agent_t(l_overrideagent. l_overridesystem). dbms_lob. end if. 8 – 256 Oracle Workflow Guide .enqueue(l_event_t. null). l_toagent_t := wf_agent_t(l_toagent. l_event_t. l_fromsystem). l_fromagent_t := wf_agent_t(l_fromagent.Content(l_eventname. else dbms_lob. 1. l_eventkey. FALSE.createtemporary(l_clob. l_eventkey. 50. l_event_t. l_clob). l_msg). wf_event. l_tosystem).CALL). if l_msg is null then l_event_t. l_toagent_t. l_overrideagent_t).write(l_clob. sysdate).Address(l_fromagent_t.Content(l_eventname. end.

Among other attributes. which contains the message payload in CLOB format.SEND_DATE WF_EVENT_T. OMBAQ_PROPERTY. The following table shows how the attributes of the WF_EVENT_T message structure are mapped to the attributes within the OMBAQ_TEXT_MSG structure. and another attribute called HEADER.PRIORITY WF_EVENT_T.str_value [name = EVENTKEY] Table 8 – 10 (Page 1 of 2) Oracle Workflow APIs 8 – 257 .str_value [name = CORRELATIONID] ombaq_properties(9).str_value [name = SENDDATE] ombaq_properties(7).CORRELATION_ID WF_EVENT_T.str_value [name = PRIORITY] ombaq_properties(6). OMB queues require messages to be stored in a structure defined by a Java Message Service abstract datatype called OMBAQ_TEXT_MSG.Mapping Between WF_EVENT_T and OMBAQ_TEXT_MSG If you use Oracle8i.str_value [name = RECEIVEDATE] ombaq_properties(8). and the datatype of its elements is a fourth ADT. a named varying array called OMBAQ_PROPERTIES. See: Setting Up the WF_EVENT_OMB_QH Queue Handler: page 2 – 100 and Agents: page 13 – 22.RECEIVE_DATE WF_EVENT_T. whose datatype is another ADT called OMBAQ_HEADER. the OMBAQ_TEXT_MSG datatype contains an attribute called TEXT_LOB. Oracle Workflow provides a queue handler called WF_EVENT_OMB_QH which you can use to translate between the standard Workflow WF_EVENT_T message structure and the OMBAQ_TEXT_MSG structure. The maximum size of OMBAQ_PROPERTIES is 1000. you can optionally implement Oracle Message Broker (OMB) to propagate event messages between systems.EVENT_NAME WF_EVENT_T.str_value [name = EVENTNAME] ombaq_properties(10).EVENT_KEY ombaq_properties(5). whose datatype is a third ADT. WF_EVENT_T OMBAQ_TEXT_MSG WF_EVENT_T. OMBAQ_HEADER in turn contains an attribute called PROPERTIES.

PARAMETER_LIST .str_value [name = ERRORMESSAGE2] ombaq_properties(14).TO_AGENT.str_value [name = <first_parameter_name>] . ombaq_properties(115). TOAGENTSYSTEM.WF_EVENT_T OMBAQ_TEXT_MSG WF_EVENT_T. ERRORMESSAGE2.. ERRORSTACK1.str_value [name = ERRORSUBSCRIPTION] ombaq_properties(12). FROMAGENTSYSTEM. The reserved words are: PRIORITY.NAME WF_EVENT_T.FROM_AGENT.SYSTEM WF_EVENT_T. WF_EVENT_T.TO_AGENT.str_value [name = FROMAGENTNAME] ombaq_properties(2).NAME WF_EVENT_T.str_value [name = TOAGENTNAME] ombaq_properties(4).str_value [name = ERRORMESSAGE1] ombaq_properties(13). TOAGENTNAME..EVENT_DATA WF_EVENT_T. ERRORSUBSCRIPTION. except the reserved words that are used for the other event properties.str_value [name = TOAGENTSYSTEM] ombaq_properties(11).ERROR_SUBSCRIPTION WF_EVENT_T..ERROR_STACK WF_EVENT_T. EVENTKEY.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. ERRORMESSAGE1. ERRORSTACK2 8 – 258 Oracle Workflow Guide . RECEIVEDATE.SYSTEM WF_EVENT_T.ERROR_STACK WF_EVENT_T. EVENTNAME. FROMAGENTNAME.str_value [name = FROMAGENTSYSTEM] ombaq_properties(3).PARAMETER_LIST text_lob (CLOB) ombaq_properties(1).. CORRELATIONID.str_value [name = ERRORSTACK1] ombaq_properties(15).ERROR_MESSAGE WF_EVENT_T.str_value [name = ERRORSTACK2] ombaq_properties(16).ERROR_MESSAGE WF_EVENT_T. SENDDATE.FROM_AGENT.

Note: Oracle Message Broker and the OMBAQ_TEXT_MSG datatype are no longer used in Oracle9i. Oracle Message Broker Administration Guide Oracle Workflow APIs 8 – 259 . in place of Oracle Message Broker. you can use the Messaging Gateway and Internet access features of Oracle Advanced Queuing to propagate event messages. In Oracle9i. See Also Oracle AQ Driver ADTs.

• SetErrorInfo: page 8 – 273 • SetDispatchMode: page 8 – 274 • AddParameterToList: page 8 – 275 • AddParameterToListPos: page 8 – 276 • GetValueForParameter: page 8 – 277 • GetValueForParameterPos: page 8 – 278 8 – 260 Oracle Workflow Guide . These APIs are defined in a PL/SQL package called WF_EVENT. See: Workflow Agent Listener: page 8 – 272.Event APIs The Event APIs can be called by an application program or a workflow process in the runtime phase to communicate with the Business Event System and manage events. • Raise: page 8 – 261 • Send: page 8 – 265 • NewAgent: page 8 – 267 • Test: page 8 – 268 • Enqueue: page 8 – 269 • Listen: page 8 – 270 Note: If you are using the version of Oracle Workflow embedded in Oracle Applications. you can also use the ”Workflow Agent Listener” concurrent program to listen for inbound event messages.

or the Event Manager can obtain the event data itself by calling the Generate function for the event.Raise PL/SQL Syntax procedure Raise (p_event_name in varchar2. you can improve performance by allowing the Event Manager to run the Generate function and generate the event data only when subscriptions exist that require that data. p_parameters in wf_parameter_list_t default NULL. p_send_date in date default NULL). Raise() creates a WF_EVENT_T structure for this event instance and sets the specified event name. Raise() sets the send date to the current system date. after first checking whether the event data is required by a subscription. the Event Manager begins subscription processing for the event. In this case. When the send date arrives. rather than always generating the event data from your application at runtime. the Event Manager places the event message on the standard WF_DEFERRED queue. If no active subscriptions exist for the event that was raised Oracle Workflow APIs 8 – 261 . If the event data is not already available in your application. the event retains its original Local source type when it is dequeued from the WF_DEFERRED queue. p_event_data in clob default NULL. The Event Manager searches for and executes any active subscriptions by the local system to that event with a source type of Local. the event message becomes available for dequeuing and will be dequeued the next time an agent listener runs on the WF_DEFERRED queue. Description Raises a local event to the Event Manager. where it remains in a WAIT state until the send date. If the send date is null. When an event is raised and is not deferred. event data. event key. The event data can be passed to the Event Manager within the call to the Raise() API. You can defer an event by setting the send date to a date later than the system date. The send date can optionally be set to indicate when the event should become available for subscription processing. and send date into the structure. or when an event that was deferred is dequeued from the WF_DEFERRED queue. and also any active subscriptions by the local system to the Any event with a source type of Local. Note: If an event is deferred when it is raised. parameter list. p_event_key in varchar2. See: Events: page 13 – 4 and Standard API for an Event Data Generate Function: page 7 – 21.

then Oracle Workflow executes any active subscriptions by the local system to the Unexpected event with a source type of Local. Note: Any exceptions raised during Raise() processing are not trapped. Note: The Event Manager does not raise an error if the event is not defined. Oracle Workflow creates a default set of event data using the event name and event key. 8 – 262 Oracle Workflow Guide . 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. with the same results as if the validation logic were coded inline. See: Events: page 13 – 4 and Standard API for an Event Data Generate Function: page 7 – 21. This behavior enables you to use subscriptions and their rule functions to perform validation. The event key uniquely identifies a specific instance of the event. An optional set of information about the event that describes what occurred. but instead are exposed to the code that called the Raise() procedure. Arguments (input) p_event_name p_event_key The internal name of the event. If the event data is required but is not already provided. An optional list of additional parameter name and value pairs. the Event Manager calls the Generate function for the event to produce the event data. The Event Manager checks each subscription before executing it to determine whether the subscription requires the event data. p_event_data p_parameters p_send_date Example declare l_xmldocument varchar2(32000). The Event Manager checks each subscription before executing it to determine whether the subscription requires the event data. A string generated when the event occurs within a program or application.(apart from subscriptions to the Any event). If the event data is required but no Generate function is defined for the event. An optional date to indicate when the event should become available for subscription processing.

dbms_lob. else we can just rely on the Event Generate ** Function callback code. p_event_data => l_eventdata.raise( p_event_name => ’<EVENT_NAME>’. p_event_key => <EVENT_KEY>. l_message varchar2(10). p_parameters => l_parameter_list).test(’<EVENT_NAME>’).createtemporary(l_eventdata.CALL). */ l_message := wf_event. p_event_key => ’<EVENT_KEY>’. begin /* ** If the complete event data is easily available. FALSE. elsif l_message = ’KEY’ then –– Raise the Event wf_event. Then Raise the Event with the ** required parameters.write(l_eventdata. and we have the message now. else –– Raise the Event without the message wf_event. p_event_key => ’<EVENT_KEY>’. l_parameter_list wf_parameter_list_t. ** set it. p_parameters => l_parameter_list).raise( p_event_name => ’<EVENT_NAME>’. /* ** If we do require a message. end if. l_xmldocument). Oracle Workflow APIs 8 – 263 . we can ** optionally test if any subscriptions to this event ** require it (rule data = Message). */ if l_message = ’MESSAGE’ then if l_xmldocument is not null then dbms_lob. length(l_xmldocument). p_parameters => l_parameter_list). –– Raise the Event with the message wf_event. 1 .l_eventdata clob.raise( p_event_name => <EVENT_NAME>. DBMS_LOB.

/* ** Up to your own custom code to handle any major exceptions */ exception when others then null.end if. end. See Also Any Event: page 14 – 10 Unexpected Event: page 14 – 12 8 – 264 Oracle Workflow Guide . /* ** Up to your own custom code to commit the transaction */ commit.

Oracle Application Developer’s Guide – Advanced Queuing. • You can omit the To Agent if the From Agent uses a multi–consumer queue with a subscriber list.Send PL/SQL Syntax procedure Send (p_event in out wf_event_t). the event message is placed on the From Agent’s queue without a specified recipient. Description Sends an event message from one agent to another. For a single–consumer queue. 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. If the event message contains a From Agent but no specified To Agent. The send date within the event message indicates when the message should become available for the consumer to dequeue. (The standard Workflow queue handlers work only with multi–consumer queues. the Send() procedure resets the value to the current system date. the queue’s subscriber list determines which consumers can dequeue the message. If no subscriber list is defined for that queue. Oracle Application Developer’s Guide – Advanced Queuing. or whichever type of propagation is implemented for the agents’ protocol. see: Subscription and Recipient Lists. For more information. see: Time Specification: Delay. no specified consumer is required. If the event message contains a To Agent but no specified From Agent. If the send date is a future date. If the send date is blank. 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.) In this case. meaning the message is immediately available for dequeuing as soon as it is propagated. the event message is placed on the WF_ERROR queue for error handling. the message is sent from the default outbound agent that matches the queue type of the 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. If the event message contains both a From Agent and a To Agent. however. • 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. Oracle Workflow APIs 8 – 265 .

Arguments (input) p_event The event message. including any properties set by the procedure. you should set the send date during subscription processing before Send() is called. Send() returns the final event message that was sent.Note: If you want to use the send date to determine when a message becomes available for dequeuing on the To Agent. 8 – 266 Oracle Workflow Guide .

See: Agent Structure: page 8 – 237. Arguments (input) p_agent_guid The globally unique identifier of the agent. Description Creates a WF_AGENT_T structure for the specified agent and sets the agent’s system and name into the structure. Oracle Workflow APIs 8 – 267 .NewAgent PL/SQL Syntax function NewAgent (p_agent_guid in raw) return wf_agent_t.

or referencing an enabled event group that contains the event. but all such subscriptions require only the event key. or the event does not exist. • KEY—At least one enabled local subscription references the event.Test PL/SQL Syntax function Test (p_event_name in varchar2) return varchar2. • MESSAGE—At least one enabled local subscription on the event requires the complete event data. using the following result codes: • NONE—No enabled local subscriptions reference the event. Test() returns the most costly data requirement among these subscriptions. Description Tests whether the specified event is enabled and whether there are any enabled subscriptions by the local system referencing the event. Arguments (input) p_event_name The internal name of the event. 8 – 268 Oracle Workflow Guide .

Enqueue PL/SQL Syntax procedure Enqueue (p_event in wf_event_t. The message recipient is set to the To Agent specified in the event message. You can optionally specify an override agent where you want to enqueue the event message. The outbound agent on whose queue the event message should be enqueued. Otherwise. Arguments (input) p_event p_out_agent_ override The event message. p_out_agent_override in wf_agent_t default null). the event message is enqueued on the From Agent specified within the message. Oracle Workflow APIs 8 – 269 . Description Enqueues an event message onto a queue associated with an outbound agent. Enqueue() uses the queue handler for the outbound agent to place the message on the queue.

Note: If you are using the standalone version of Oracle Workflow available with Oracle9i Release 2. See Also Workflow Agent Listener Concurrent Program: page 8 – 272 Any Event: page 14 – 10 Unexpected Event: page 14 – 12 8 – 270 Oracle Workflow Guide . Description Monitors an agent for inbound event messages and dequeues messages using the agent’s queue handler. The Listen procedure exits after all event messages on the agent’s queue have been dequeued.Listen PL/SQL Syntax procedure Listen (p_agent_name in varchar2). and also any active subscriptions by the local system to the Any event with a source type of External. you can use the standalone Oracle Workflow Manager component available through Oracle Enterprise Manager to submit and manage Workflow agent listener database jobs. See: Scheduling Listeners for Local Inbound Agents: page 13 – 56. 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. the Event Manager searches for and executes any active subscriptions by the local system to that event with a source type of External. then Oracle Workflow executes any active subscriptions by the local system to the Unexpected event with a source type of External. Custom queue handlers can also set the RECEIVE_DATE value if this functionality is included in the Dequeue API. Note: You can use the Check Setup web page to schedule Listen procedures for all active inbound and error queues. If no active subscriptions exist for the event that was received (apart from subscriptions to the Any event). please refer to the Oracle Workflow Manager online help. For more information. Arguments (input) p_agent_name The name of the inbound agent. When an event is dequeued.

Wfagtlst.sql: page 16 – 6 Standard APIs for a Queue Handler: page 7 – 23 Oracle Workflow APIs 8 – 271 .

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. The executable name for this concurrent program is ”Workflow Agent Listener” and its short name is FNDWFLST. See: Overview of Concurrent Programs and Requests. In the Parameters window. When you finish modifying the print and run options to define the schedule for this request.Workflow Agent Listener Concurrent Program If you are using the version of Oracle Workflow embedded in Oracle Applications. enter the name of the agent that you want to monitor for inbound event messages. Oracle Applications User’s Guide. you can use Oracle Workflow Manager to submit and manage the Workflow Agent Listener concurrent program. See Also Listen: page 8 – 270 8 – 272 Oracle Workflow Guide . 3. please refer to the Oracle Applications Manager online help. you can submit the Listen procedure as a concurrent program to listen for inbound event messages. choose Submit to submit the request. Choose OK to close the Parameters window. Navigate to the Submit Requests form in Oracle Applications to submit the Workflow Agent Listener concurrent program. 4. Submit the Workflow Agent Listener concurrent program as a request. " To Listen for Inbound Event Messages 1. Use the Submit Requests form in Oracle Applications to submit the Workflow Agent Listener. 2. For more information. Note: If you are using the version of Oracle Workflow embedded in Oracle Applications and you have implemented Oracle Applications Manager. See: Submitting a Request. 5. Oracle Applications System Administrator’s Guide.

p_type in varchar2). either ’ERROR’ or ’WARNING’. The error type. The error message and error stack are set into the corresponding attributes of the event message. Description Retrieves error information from the error stack and sets it into the event message. The error name and error type are added to the PARAMETER_LIST attribute of the event message. Oracle Workflow APIs 8 – 273 . Arguments (input) p_event p_type The event message.SetErrorInfo PL/SQL Syntax procedure SetErrorInfo (p_event in out wf_event_t.

In this mode. Note: This method of deferring subscription processing is not recommended and should only be used in exceptional circumstances. To retain the flexibility to modify subscription processing without intrusion into the application. See Also Deferred Subscription Processing: page 13 – 41 Raise: page 8 – 261 8 – 274 Oracle Workflow Guide . You can call SetDispatchMode() with the mode ’SYNC’ to set the dispatch mode back to normal synchronous subscription processing. The subscriptions are not executed until the agent listener runs to dequeue the event from the WF_DEFERRED queue. the phase number for each subscription determines whether the subscription is executed immediately or deferred. In this case. the Event Manager places the event on the WF_DEFERRED queue before executing any subscriptions for that event. Call SetDispatchMode() with the mode ’ASYNC’ just before calling Raise() to defer all subscription processing forever for the event that you will raise. Description Sets the dispatch mode of the Event Manager to either deferred or synchronous subscription processing. or ’SYNC’ for synchronous subscription processing. since it requires hard–coding the deferral in your application.SetDispatchMode PL/SQL Syntax procedure SetDispatchMode (p_mode in varchar2). Arguments (input) p_mode The dispatch mode: either ’ASYNC’ for deferred (asynchronous) subscription processing. you can simply mark some or all of the individual subscriptions for deferral using the subscription phase numbers.

p_value in varchar2. The parameter list. If the varray is null.AddParameterToList PL/SQL Syntax procedure AddParameterToList (p_name in varchar2. Description Adds the specified parameter name and value pair to the end of the specified parameter list varray. Arguments (input) p_name p_value p_parameterlist The parameter name. p_parameterlist in out wf_parameter_list_t). Oracle Workflow APIs 8 – 275 . The parameter value. AddParameterToList() initializes it with the new parameter.

The procedure also returns the index for the position at which the parameter is stored within the varray. Description Adds the specified parameter name and value pair to the end of the specified parameter list varray. p_position out integer. If the varray is null. 8 – 276 Oracle Workflow Guide . p_parameterlist in out wf_parameter_list_t). The parameter value. AddParameterToListPos() initializes it with the new parameter. Arguments (input) p_name p_value p_parameterlist The parameter name.AddParameterToListPos PL/SQL Syntax procedure AddParameterToListPos (p_name in varchar2. p_value in varchar2. The parameter list.

GetValueForParameter PL/SQL Syntax function GetValueForParameter (p_name in varchar2. p_parameterlist in wf_parameter_list_t) return varchar2. Arguments (input) p_name p_parameterlist The parameter name. Oracle Workflow APIs 8 – 277 . GetValueForParameter() begins at the end of the parameter list and searches backwards through the list. Description Retrieves the value of the specified parameter from the specified parameter list varray. The parameter list.

The parameter list. Description Arguments (input) Retrieves the value of the parameter stored at the specified position in the specified parameter list varray. p_parameterlist in wf_parameter_list_t) return varchar2. 8 – 278 Oracle Workflow Guide .GetValueForParameterPos PL/SQL Syntax function GetValueForParameterPos (p_position in integer. p_position p_parameterlist The index representing the position of the parameter within the parameter list.

Event Subscription Rule Function APIs The event subscription rule function APIs provide standard rule functions that you can assign to event subscriptions. The Error_Rule function performs the same processing as the Default_Rule function. Error. if specified in the subscription definition Oracle Workflow also provides some other standard rule functions that you can use. The default rule function includes the following actions: • Sending the event message to a workflow process. The Workflow_Protocol and Error_Rule functions are used in predefined Oracle Workflow event subscriptions. A rule function specifies the processing that Oracle Workflow performs when the subscription’s triggering event occurs. Warning. Oracle Workflow provides a standard Default_Rule function to perform basic subscription processing. The SetParametersIntoParameterList function adds the subscription parameters to the parameter list within the event message. • Default_Rule: page 8 – 281 • Log: page 8 – 283 • Error: page 8 – 284 • Warning: page 8 – 285 • Success: page 8 – 286 • Workflow_Protocol: page 8 – 287 • Error_Rule: page 8 – 288 • SetParametersIntoParameterList: page 8 – 289 See Also Event Subscriptions: page 13 – 34 Oracle Workflow APIs 8 – 279 . The Workflow_Protocol function passes the event message to a workflow process to be sent to an agent. These rule function APIs are defined in a PL/SQL package called WF_RULE. This function is executed by default if no other rule function is specified for the subscription. and Success functions can be used for testing and debugging your application. The Log. if specified in the subscription definition • Sending the event message to an agent. but also raises an exception.

Standard API for an Event Subscription Rule Function: page 7 – 25 8 – 280 Oracle Workflow Guide .

Define a subscription to the relevant event with your custom rule function and a phase of 10. The default processing includes: • Sending the event message to a workflow process. Default_Rule() generates a new correlation ID to use as the item key for the process in order to ensure that the item key is unique. and then define another subscription with a higher phase number that uses the default rule function to send the event. When the event is passed to the second subscription. 3. the modified event message will be sent to the workflow or agent you specified. Description Performs default subscription processing when no rule function is specified for an event subscription. You can also call Default_Rule() to add the default send processing within a custom rule function. Raise the event to trigger the subscriptions. and specify the workflow or agent to which you want to send the event. For example. The subscription with the lower phase number will be executed first and will run your custom rule function on the event message. p_event in out wf_event_t) return varchar2.Default_Rule and a phase of 20. If you want to run a custom rule function on the event message before it is sent. if specified in the subscription definition If either of these operations raises an exception. and returns the status code ERROR. if specified in the subscription definition • Sending the event message to an agent. stores the error information in the event message. Define another subscription to the event with the rule function WF_EVENT. Oracle Workflow does not automatically send the event message to the workflow and agent Oracle Workflow APIs 8 – 281 . If you enter a rule function other than Default_Rule() for a subscription. Default_Rule() traps the exception.Default_Rule PL/SQL Syntax function Default_Rule (p_subscription_guid in raw. you can define one subscription with a low phase number that uses the custom rule function. follow these steps: 1. Default_Rule() returns the status code SUCCESS. Note: If the event message is being sent to the Default Event Error workflow process. 2. Otherwise.

rather than creating complex specialized rule functions that cannot be reused. you must explicitly include the send processing in your custom rule function. 8 – 282 Oracle Workflow Guide . Instead. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. which you can optionally accomplish by calling Default_Rule().specified in the subscription. if you want to send the message from the same subscription. See: Standard API for an Event Subscription Rule Function: page 7 – 25. Note: You may find it advantageous to define multiple subscriptions to an event with simple rule functions that you can reuse. The event message.

Log PL/SQL Syntax function Log (p_subscription_guid in raw. you can use Log() to show the event message both before and after your custom rule function is run.Raise. Next. Description Logs the contents of the specified event message using DBMS_OUTPUT. The event message. Execute the following command: set serveroutput on size 100000 Then raise the event using WF_EVENT. Oracle Workflow APIs 8 – 283 .Log. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. • Define the second subscription with a phase of 20 and your custom rule function. you should see the contents of the event message both before and after your custom rule function is run. p_event in out wf_event_t) return varchar2. Define three subscriptions to the relevant event as follows: • Define the first subscription with a phase of 10 and the rule function WF_RULE. For example.put_line and returns the status code SUCCESS. if you want to test a custom rule function that modifies the event message. As the Event Manager executes your subscriptions to the event in phase order. • Define the third subscription with a phase of 30 and the rule function WF_RULE.Log. Note: You should not assign Log() as the rule function for any enabled subscriptions in a production instance of Oracle Workflow. connect to SQL*Plus. Use this function to output the contents of an event message to a SQL*Plus session for testing and debugging purposes. This function should be used for debugging only.

you must enter a text string representing the internal name of an error message in the Parameters field for the subscription. The text string you enter in the Parameters field must be a valid name of an Oracle Workflow error message.” which is the display name of the WFSQL_ARGS error message. p_event in out wf_event_t) return varchar2. 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. See: setErrorMessage: page 8 – 251. Note: Error() does not raise any exception to the calling application when it completes normally. For example. Because Error() returns the status code ERROR.Error and enter WFSQL_ARGS in the Parameters field. The event message. define a subscription to the relevant event with the rule function WF_RULE. Error() will set that error message into the event message using setErrorMessage().Error PL/SQL Syntax function Error (p_subscription_guid in raw. When the subscription is executed. When the listener runs on the WF_ERROR queue. Additionally. Then raise the event to trigger the subscription. Description Returns the status code ERROR. 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. an error notification will be sent to the system administrator with the message ”Invalid value(s) passed for arguments. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. the Event Manager places the event message on the WF_ERROR queue and subscription processing for the event is halted. when you assign this function as the rule function for a subscription. 8 – 284 Oracle Workflow Guide .

The text string you enter in the Parameters field must be a valid name of an Oracle Workflow error message. When the listener runs on the WF_ERROR queue. but subscription processing for the event still continues.Warning PL/SQL Syntax function Warning (p_subscription_guid in raw. p_event in out wf_event_t) return varchar2. See: setErrorMessage: page 8 – 251. 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. the Event Manager places the event message on the WF_ERROR queue. when you assign this function as the rule function for a subscription.Warning and enter WFSQL_ARGS in the Parameters field. The event message. Additionally. define a subscription to the relevant event with the rule function WF_RULE. Then raise the event to trigger the subscription. When the subscription is executed. For example. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. a warning notification will be sent to the system administrator with the message ”Invalid value(s) passed for arguments. Warning() will set that error message into the event message using setErrorMessage(). Description Returns the status code WARNING.” 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. you must enter a text string representing the internal name of an error message in the Parameters field for the subscription. Because Warning() returns the status code WARNING. Oracle Workflow APIs 8 – 285 . 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 Success for testing and debugging purposes while developing code for use with the Business Event System. When the subscription is executed. you can modify one of the subscriptions by replacing its rule function with WF_RULE. For example. if you are trying to debug multiple subscriptions to the same event. 8 – 286 Oracle Workflow Guide . leaving all other details for the subscription intact. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. This function removes the event message from the queue but executes no other code except returning the SUCCESS status code to the calling subscription.Success PL/SQL Syntax function Success (p_subscription_guid in raw. it will return SUCCESS but not perform any other subscription processing. Success() is analogous to the WF_STANDARD. p_event in out wf_event_t) return varchar2. This method can help you isolate a problem subscription.Noop procedure used in the standard Noop activity.Success. The event message. Description Returns the status code SUCCESS.

Workflow_Protocol PL/SQL Syntax function Workflow_Protocol (p_subscription_guid in raw. Otherwise. If the workflow process raises an exception. Otherwise. Workflow_Protocol() is used as the rule function in several predefined subscriptions to Workflow Send Protocol and Event System Demonstration events. Workflow_Protocol() returns the status code SUCCESS. If the subscription also specifies an outbound agent. Description Sends the event message to the workflow process specified in the subscription. where you can model the processing that you want to send the event message on to the specified agent. which will in turn send the event message to the inbound agent specified in the subscription. If the subscription parameters include the parameter name and value pair ACKREQ=Y. Oracle Workflow APIs 8 – 287 . a default outbound agent will be selected. then the workflow process waits to receive an acknowledgement after sending the event message. The event message. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. Workflow_Protocol() stores the error information in the event message and returns the status code ERROR. Note: Workflow_Protocol() does not itself send the event message to the inbound agent. the workflow process places the event message on that agent’s queue for propagation to the inbound agent. See: Workflow Send Protocol: page 14 – 17 and Event System Demonstration: page 15 – 63. p_event in out wf_event_t) return varchar2. This function only sends the event message to the workflow process.

including: • Sending the event message to a workflow process. p_event in out wf_event_t) return varchar2. if specified in the subscription definition However. Otherwise. The event message.Error as the rule function for your error subscription and specify the workflow item type and process that you want the subscription to launch. Error_Rule() returns the status code SUCCESS. The predefined subscriptions specify that the event should be sent to the Default Event Error process in the System: Error item type. Error_Rule() reraises the exception so that the event is not placed back onto the WF_ERROR queue. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. See Also Unexpected Event: page 14 – 12 Any Event: page 14 – 10 8 – 288 Oracle Workflow Guide . if either of these operations encounters an exception. Description Performs the same subscription processing as Default_Rule().Error_Rule PL/SQL Syntax function Error_Rule (p_subscription_guid in raw. You can also use this rule function with your own error subscriptions. if specified in the subscription definition • Sending the event message to an agent. Error_Rule() is used as the rule function for the predefined subscriptions to the Unexpected event and to the Any event with the Error source type. Enter WF_RULE.

except for any parameter named ITEMKEY or CORRELATION_ID. The event message. If these operations raise an exception. p_event in out wf_event_t) return varchar2. Otherwise. the function sets the CORRELATION_ID attribute of the event message to the parameter value. Description Sets the parameter name and value pairs from the subscription parameters into the PARAMETER_LIST attribute of the event message.SetParametersIntoParameterList PL/SQL Syntax function SetParametersIntoParameterList (p_subscription_guid in raw. SetParametersIntoParameterList() stores the error information in the event message and returns the status code ERROR. Then subsequent subscriptions with higher phase numbers can access those parameters within the event message. to add predefined parameters from the subscription into the event message. For a parameter with one of these names. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. SetParametersIntoParameterList() returns the status code SUCCESS. See Also Event Message Structure: page 8 – 242 Oracle Workflow APIs 8 – 289 . You can use SetParametersIntoParameterList() as the rule function for a subscription with a lower phase number.

These APIs are defined in a PL/SQL package called WF_EVENT_FUNCTIONS_PKG.Event Function APIs The Event Function APIs provide utility functions that can be called by an application program. • Parameters: page 8 – 291 • SubscriptionParameters: page 8 – 293 • AddCorrelation: page 8 – 294 • Generate: page 8 – 296 • Receive: page 8 – 298 8 – 290 Oracle Workflow Guide . or a workflow process in the runtime phase to communicate with the Business Event System and manage events. the Event Manager.

parameters(’1111/2222’.2. The following table describes the T_PARAMETERS datatype: Datatype Name Element Datatype Definition T_PARAMETERS Table 8 – 11 (Page 1 of 1) VARCHAR2(240) Parameters() is a generic utility that you can call in Generate functions when the event key is a concatenation of values separated by a known character.’/’). Oracle Workflow APIs 8 – 291 .put_line(’Value 2:’||l_parameters(2)). p_numvalues in number. The separator used to delimit the parameters in the string. Use this function to separate the event key into its component values. which is defined in the WF_EVENT_FUNCTIONS_PKG package. Arguments (input) p_string p_numvalues p_separator Example A text string containing concatenated parameters.Parameters PL/SQL Syntax function Parameters (p_string in varchar2.put_line(’Value 1:’||l_parameters(1)). l_parameters := wf_event_functions_pkg. Description Parses a string of text that contains the specified number of parameters delimited by the specified separator. p_separator in varchar2) return t_parameters. set serveroutput on declare l_parameters wf_event_functions_pkg.2).t_parameters(1.t_parameters. Parameters() returns the parsed parameters in a varray using the T_PARAMETERS composite datatype. dbms_output. dbms_output. The number of parameters contained in the string. begin –– Initialize the datatype l_parameters := wf_event_functions_pkg.

/ 8 – 292 Oracle Workflow Guide .end.

The name of the parameter whose value should be returned. –– –– This is where we will do some logic to determine –– if there is a parameter –– l_function := wf_event_functions_pkg. Arguments (input) p_string p_key Example A text string containing the parameters defined for an event subscription. and then code different behavior for the rule function based on that value. Description Returns the value for the specified parameter from a text string containing the parameters defined for an event subscription. which adds a correlation ID to an event message during subscription processing. . In the following example.SubscriptionParameters (l_parameters... . SubscriptionParameters() is used to assign the value of the ITEMKEY subscription parameter to the l_function program variable.. See: AddCorrelation: page 8 – 294.’ITEMKEY’). The example code is from the AddCorrelation function. 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> SubscriptionParameters() searches the text string for the specified parameter name and returns the value assigned to that name. you can call this function in a subscription rule function to retrieve the value of a subscription parameter. For instance. p_key in varchar2) return varchar2. Oracle Workflow APIs 8 – 293 .SubscriptionParameters PL/SQL Syntax function SubscriptionParameters (p_string in varchar2..

p_event in out wf_event_t) return varchar2.function_name> AddCorrelation() uses SubscriptionParameters() to search for and retrieve the value of the ITEMKEY parameter. the function returns the status code ERROR. Otherwise. follow these steps: 1.AddCorrelation and a phase of 10. the Workflow Engine uses that correlation ID as the item key to identify the process instance. AddCorrelation() searches the subscription parameters for a parameter named ITEMKEY that specifies a custom function to generate a correlation ID for the event message.AddCorrelation PL/SQL Syntax function AddCorrelation (p_subscription_guid in raw. then AddCorrelation() runs that function and sets the correlation ID to the value returned by the function. 2. If AddCorrelation() encounters an exception. AddCorrelation() sets the correlation ID to the system date. See: SubscriptionParameters: page 8 – 293. Otherwise. replacing <package_name.function_name> in the Parameters field for the subscription. AddCorrelation() is defined according the standard API for an event subscription rule function. If the event message is then sent to a workflow process. AddCorrelation() returns the status code SUCCESS. For example. If a custom correlation ID function is specified with the ITEMKEY parameter. Define another subscription to the event with a phase of 20. You can use AddCorrelation() as the rule function for a subscription with a low phase number to add a correlation ID to an event. Description Adds a correlation ID to an event message during subscription processing. Enter the parameter name and value pair ITEMKEY=<package_name.function_name> with the package and function that will generate the correlation ID. or both. Define a subscription to the relevant event with the rule function WF_EVENT_FUNCTIONS_PKG. 8 – 294 Oracle Workflow Guide . and then use a subscription with a higher phase number to perform any further processing. and specify the processing you want to perform by entering a custom rule function or a workflow item type and process. The function must be specified in the Parameters field for the subscription in the following format: ITEMKEY=<package_name.

See: Standard API for an Event Subscription Rule Function: page 7 – 25. The subscription with the lower phase number will be executed first and will add a correlation ID to the event message. Note: You may find it advantageous to define multiple subscriptions to an event with simple rule functions that you can reuse. You can also call AddCorrelation() within a custom rule function to add a correlation ID during your custom processing.3. The event message. that correlation ID will be used as the item key. When the event is passed to the second subscription. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. Raise the event to trigger the subscriptions. Oracle Workflow APIs 8 – 295 . rather than creating complex specialized rule functions that cannot be reused.

group.event.create • oracle.delete • oracle. system.wf.event.event.sync For the event.event. WF_EVENT_FUNCTIONS_PKG. 8 – 296 Oracle Workflow Guide .apps.create • oracle.all.wf.wf.wf.wf.wf.wf.apps.event.event.wf.create • oracle.wf.delete • oracle.create • oracle.apps. For the Synchronize Event Systems event.apps.event.agent.update • oracle.apps.apps.apps.subscription.update • oracle.update • oracle.agent. event group.event.event.apps.wf.apps.event.event.system. and subscription definition events.group.delete • oracle.subscription. p_event_key in varchar2) return clob.wf.event.apps.delete • oracle.wf.event.apps. agent.system.update • oracle.apps. and subscription definitions from the Event Manager on the local system. event group. agent.apps.event.apps.wf.Generate PL/SQL Syntax function Generate (p_event_name in varchar2.system.apps. This event data contains Business Event System object definitions which can be used to replicate the objects from one system to another.create • oracle.wf.Generate() produces an XML document containing all the event.wf.wf.event.event.update • oracle.subscription.event.event.group.Generate() calls the Generate APIs associated with the corresponding tables to produce the event data XML document. The Seed event group includes the following events: • oracle.event.delete • oracle.apps.agent. WF_EVENT_FUNCTIONS_PKG. Description Generates the event data for events in the Seed event group. system.

Arguments (input) p_event_name p_event_key The internal name of the event.Generate: page 8 – 303 WF_EVENT_GROUPS_PKG.Generate: page 8 – 306 WF_SYSTEMS_PKG. A string generated when the event occurs within a program or application. The event key uniquely identifies a specific instance of the event.Generate: page 8 – 315 Predefined Workflow Events: page 14 – 2 Oracle Workflow APIs 8 – 297 .Generate: page 8 – 309 WF_AGENTS_PKG.Generate: page 8 – 312 WF_EVENT_SUBSCRIPTIONS_PKG. See Also WF_EVENTS_PKG.

wf.update • oracle.group.event.update • oracle.delete • oracle.create • oracle.wf.subscription.agent.event.group.update • oracle.create • oracle.wf.delete • oracle.wf.event.event.wf.delete • oracle.wf.apps.wf.apps.wf. The Seed event group includes the following events: • oracle. Description Receives Business Event System object definitions during subscription processing and loads the definitions into the appropriate Business Event System tables.event.apps.apps.agent.apps.apps.wf.event.subscription.event.event.event.event.sync 8 – 298 Oracle Workflow Guide .all.event.apps.subscription.delete • oracle.update • oracle.event.event.wf.Receive PL/SQL Syntax function Receive (p_subscription_guid in raw.event.event.wf.apps.apps.wf.event.event.apps.delete • oracle.apps.apps.wf.create • oracle. WF_EVENT_FUNCTIONS_PKG.event. p_event in out wf_event_t) return varchar2. Oracle Workflow uses WF_EVENT_FUNCTIONS_PKG.group.event.wf.apps. and one that is triggered when any of the events in the Seed event group is received from an external source.Receive() is defined according the the standard API for an event subscription rule function.system.apps.Receive() as the rule function for two predefined subscriptions. This function completes the replication of the objects from one system to another. one that is triggered when the System Signup event is raised locally.system.apps.create • oracle.wf.system.wf.apps.agent.update • oracle.create • oracle.

Receive() calls the Receive APIs associated with the corresponding tables to parse the XML document and load the definition into the table.Receive: page 8 – 313 WF_EVENT_SUBSCRIPTIONS_PKG. system. See Also WF_EVENTS_PKG.Receive: page 8 – 316 Predefined Workflow Events: page 14 – 2 Oracle Workflow APIs 8 – 299 . WF_EVENT_FUNCTIONS_PKG.Receive: page 8 – 304 WF_EVENT_GROUPS_PKG. Arguments (input) p_subscription_ guid p_event The globally unique identifier of the subscription. Note: For the event. and subscription definition events.Receive: page 8 – 310 WF_AGENTS_PKG. The event message.Receive() parses the event data XML document from the event message that was received and then loads the Business Event System object definitions into the appropriate tables.Receive: page 8 – 307 WF_SYSTEMS_PKG. event group.WF_EVENT_FUNCTIONS_PKG. agent.

Document Type Definitions The document type definitions (DTDs) for the Workflow table XML messages are defined under the master tag WF_TABLE_DATA.Generate: page 8 – 306 – WF_EVENT_GROUPS_PKG. Oracle Workflow uses these APIs during the automated replication of Business Event System data.Generate: page 8 – 312 – WF_AGENTS_PKG.Generate: page 8 – 315 – WF_EVENT_SUBSCRIPTIONS_PKG.Receive: page 8 – 304 • WF_EVENT_GROUPS_PKG – WF_EVENT_GROUPS_PKG. while the Receive APIs are called by WF_EVENT_FUNCTIONS_PKG. each of which corresponds to a Business Event System table.Generate: page 8 – 309 – WF_SYSTEMS_PKG.Generate(). The Generate APIs are called by WF_EVENT_FUNCTIONS_PKG.Receive: page 8 – 310 • WF_AGENTS_PKG – WF_AGENTS_PKG. The corresponding Receive API parses the XML message and loads the row into the appropriate table. Oracle Workflow provides both a Generate function and a Receive function for each table.Business Event System Replication APIs You can call the following APIs to replicate Business Event System data across your systems. each DTD has a tag identifying the Workflow 8 – 300 Oracle Workflow Guide . The replication APIs are stored in the following PL/SQL packages.Receive: page 8 – 307 • WF_SYSTEMS_PKG – WF_SYSTEMS_PKG. Beneath the master tag. • WF_EVENTS_PKG – WF_EVENTS_PKG.Receive().Generate: page 8 – 303 – WF_EVENTS_PKG.Receive: page 8 – 316 Each Generate API produces an XML message containing the complete information from the appropriate table for the specified Business Event System object definition. See: Generate: page 8 – 296 and Receive: page 8 – 298.Receive: page 8 – 313 • WF_EVENT_SUBSCRIPTIONS_PKG – WF_EVENT_SUBSCRIPTIONS_PKG.

and beneath that. The following example shows how the DTDs are structured: <WF_TABLE_DATA> <WF_TABLE_NAME> <VERSION></VERSION> <COL1></COL1> <COL2></COL2> </WF_TABLE_NAME> </WF_TABLE_DATA> <– masterTagName <– m_table_name <– m_package_version The Business Event System replication APIs use the following DTDs: • WF_EVENTS DTD: page 8 – 302 • WF_EVENT_GROUPS DTD: page 8 – 305 • WF_SYSTEMS DTD: page 8 – 308 • WF_AGENTS DTD: page 8 – 311 • WF_EVENT_SUBSCRIPTIONS DTD: page 8 – 314 Oracle Workflow APIs 8 – 301 .table name to which it applies. a version tag as well as tags for each column in the table.

<WF_TABLE_DATA> <WF_EVENTS> <VERSION></VERSION> <GUID></GUID> <NAME></NAME> <STATUS></STATUS> <GENERATE_FUNCTION></GENERATE_FUNCTION> <OWNER_NAME></OWNER_NAME> <OWNER_TAG></OWNER_TAG> <DISPLAY_NAME></DISPLAY_NAME> <DESCRIPTION></DESCRIPTION> </WF_EVENTS> </WF_TABLE_DATA> 8 – 302 Oracle Workflow Guide .WF_EVENTS Document Type Definition The following document type definition (DTD) describes the required structure for an XML message that contains the complete information for an event definition in the WF_EVENTS table.

WF_EVENTS_PKG. Oracle Workflow APIs 8 – 303 .Generate PL/SQL Syntax function Generate (x_guid in raw) return varchar2. x_guid The globally unique identifier of the event. Description Arguments (input) Generates an XML message containing the complete information from the WF_EVENTS table for the specified event definition.

WF_EVENTS_PKG. 8 – 304 Oracle Workflow Guide . x_message An XML message containing the complete information for an event definition.Receive PL/SQL Syntax procedure Receive (x_message in varchar2). Description Arguments (input) Receives an XML message containing the complete information for an event definition and loads the information into the WF_EVENTS table.

Note: Event group header information is defined in the WF_EVENTS table. Only the event group member definitions are stored in the WF_EVENT_GROUPS table. similarly to an individual event.WF_EVENT_GROUPS Document Type Definition The following document type definition (DTD) describes the required structure for an XML message that contains the complete information for an event group member definition in the WF_EVENT_GROUPS table. <WF_TABLE_DATA> <WF_EVENT_GROUPS> <VERSION></VERSION> <GROUP_GUID></GROUP_GUID> <MEMBER_GUID></MEMBER_GUID> </WF_EVENT_GROUPS> </WF_TABLE_DATA> Oracle Workflow APIs 8 – 305 .

Generate PL/SQL Syntax function Generate (x_group_guid in raw.WF_EVENT_GROUPS_PKG. Description Generates an XML message containing the complete information from the WF_EVENT_GROUPS table for the specified event group member definition. x_member_guid in raw) return varchar2. The globally unique identifier of the individual member event. 8 – 306 Oracle Workflow Guide . Arguments (input) x_group_guid x_member_guid The globally unique identifier of the event group.

Receive PL/SQL Syntax procedure Receive (x_message in varchar2).WF_EVENT_GROUPS_PKG. Description Receives an XML message containing the complete information for an event group member definition and loads the information into the WF_EVENT_GROUPS table. Oracle Workflow APIs 8 – 307 . Arguments (input) x_message An XML message containing the complete information for an event group member definition.

<WF_TABLE_DATA> <WF_SYSTEMS> <VERSION></VERSION> <GUID></GUID> <NAME></NAME> <MASTER_GUID></MASTER_GUID> <DISPLAY_NAME></DISPLAY_NAME> <DESCRIPTION></DESCRIPTION> </WF_SYSTEMS> </WF_TABLE_DATA> 8 – 308 Oracle Workflow Guide .WF_SYSTEMS Document Type Definition The following document type definition (DTD) describes the required structure for an XML message that contains the complete information for a system definition in the WF_SYSTEMS table.

WF_SYSTEMS_PKG. Description Arguments (input) Generates an XML message containing the complete information from the WF_SYSTEMS table for the specified system definition. x_guid The globally unique identifier of the system. Oracle Workflow APIs 8 – 309 .Generate PL/SQL Syntax function Generate (x_guid in raw) return varchar2.

Receive PL/SQL Syntax procedure Receive (x_message in varchar2). Arguments (input) x_message An XML message containing the complete information for a system definition. 8 – 310 Oracle Workflow Guide .WF_SYSTEMS_PKG. Description Receives an XML message containing the complete information for a system definition and loads the information into the WF_SYSTEMS table.

WF_AGENTS Document Type Definition The following document type definition (DTD) describes the required structure for an XML message that contains the complete information for an agent definition in the WF_AGENTS table. <WF_TABLE_DATA> <WF_AGENTS> <VERSION></VERSION> <GUID></GUID> <NAME></NAME> <SYSTEM_GUID></SYSTEM_GUID> <PROTOCOL></PROTOCOL> <ADDRESS></ADDRESS> <QUEUE_HANDLER></QUEUE_HANDLER> <QUEUE_NAME></QUEUE_NAME> <DIRECTION></DIRECTION> <STATUS></STATUS> <DISPLAY_NAME></DISPLAY_NAME> <DESCRIPTION></DESCRIPTION> </WF_AGENTS> </WF_TABLE_DATA> Oracle Workflow APIs 8 – 311 .

WF_AGENTS_PKG. Description Arguments (input) Generates an XML message containing the complete information from the WF_AGENTS table for the specified agent definition. x_guid The globally unique identifier of the agent.Generate PL/SQL Syntax function Generate (x_guid in raw) return varchar2. 8 – 312 Oracle Workflow Guide .

Oracle Workflow APIs 8 – 313 . x_message An XML message containing the complete information for an agent definition. Description Arguments (input) Receives an XML message containing the complete information for an agent definition and loads the information into the WF_AGENTS table.WF_AGENTS_PKG.Receive PL/SQL Syntax procedure Receive (x_message in varchar2).

<WF_TABLE_DATA> <WF_EVENT_SUBSCRIPTIONS> <VERSION></VERSION> <GUID></GUID> <SYSTEM_GUID></SYSTEM_GUID> <SOURCE_TYPE></SOURCE_TYPE> <SOURCE_AGENT_GUID></SOURCE_AGENT_GUID> <EVENT_FILTER_GUID></EVENT_FILTER_GUID> <PHASE></PHASE> <STATUS></STATUS> <RULE_DATA></RULE_DATA> <OUT_AGENT_GUID></OUT_AGENT_GUID> <TO_AGENT_GUID></TO_AGENT_GUID> <PRIORITY></PRIORITY> <RULE_FUNCTION></RULE_FUNCTION> <WF_PROCESS_NAME></WF_PROCESS_NAME> <PARAMETERS></PARAMETERS> <OWNER_NAME></OWNER_NAME> <DESCRIPTION></DESCRIPTION> </WF_EVENT_SUBSCRIPTIONS> </WF_TABLE_DATA> 8 – 314 Oracle Workflow Guide .WF_EVENT_SUBSCRIPTIONS Document Type Definition The following document type definition (DTD) describes the required structure for an XML message that contains the complete information for an event subscription definition in the WF_EVENT_SUBSCRIPTIONS table.

Generate PL/SQL Syntax function Generate (x_guid in raw) return varchar2.WF_EVENT_SUBSCRIPTIONS_PKG. Oracle Workflow APIs 8 – 315 . Description Generates an XML message containing the complete information from the WF_EVENT_SUBSCRIPTIONS table for the specified event subscription definition. Arguments (input) x_guid The globally unique identifier of the event subscription.

Description Receives an XML message containing the complete information for an event subscription definition and loads the information into the WF_EVENT_SUBSCRIPTIONS table. 8 – 316 Oracle Workflow Guide .WF_EVENT_SUBSCRIPTIONS_PKG. Arguments (input) x_message An XML message containing the complete information for an event subscription definition.Receive PL/SQL Syntax procedure Receive (x_message in varchar2).

13–37 Activities. 4–62 in a loop.Index Symbols &#NID. 8–230 ACCOUNT parameter. 4–59 error process. 15–81 in the Buyer: Send PO to Supplier process. 4–47 effective date. 5–4 notification. 13–80 in the Notify Approver subprocess. 13–82 in the Master Ping process. 4–44 icons. 4–12. 4–58. 4–48. 4–25 for an error process. 4–48. 5–7. 4–49. 4–15. 4–42. 15–88 in the Workflow Event Protocol process. 2–102 default. 15–97 in the Supplier: Top Level Order process. 15–78 in the Buyer: Top Level PO process. 8–9 result type. 4–17 Access property page. 4–59 process. 4–60 cost. 4–58 A AbortProcess( ). 14–21 joining branches. 2–85. 4–54. 4–18 AccessCheck( ). 15–21 in the Requisition process. 4–52. 8–36 Access Level. 6–26 function. 6–22 copy. 4–45 External Java functions. 4–42 accessing from different data stores. 15–84 in the Buyer: Receive Supplier Invoicing process. 15–95 in the Supplier: Get Order Details process. 4–50. 4–46 processing cost. 2–86 Index – 1 . 4–60 in the Buyer: Advanced Shipment Notice process. 4–17 Access protection See also Access level. for subscriptions. 4–42. 15–101 in the Supplier: Stock Check process. 15–92 in the Supplier: Send Supplier Invoice process. 6–2 Concurrent Manager. 4–54. 4–32 #FROM_ROLE attribute. 4–47 create. 4–42. 15–15 in the Supplier: Advanced Shipment Notice process. 7–5. 4–57 deferred. 15–99 in the Supplier: Credit Check process. 4–59 event. 4–43 optional details. 2–105 Access level indicator. 7–14 Actions. 4–52. 4–25 #HIDE_REASSIGN attribute. 3–10. 15–86 in the Buyer: Receive Supplier PO Acknowledgement process. Protection level preserving customizations. 15–75 in the Detail Ping process. 4–42. 14–8 ACTID. 2–59 Acknowledge Ping event. 4–13.

15–101 in the Supplier: Stock Check process. 15–78 in the Buyer: Top Level PO process. 8–118 Administrator privileges. 8–121 AddAttr( ). 5–2 APIs. 15–15 in the Supplier: Advanced Shipment Notice process. 15–97 in the Supplier: Top Level Order process. 4–10. 8–14. 8–46 addItemAttrNumber( ). 5–24 APIs. 14–5 Agent Updated event. 4–14. 8–43 AddItemAttrTextArray( ). 8–237 Agent Created event. 13–22 defining. 15–86 in the Buyer: Receive Supplier PO Acknowledgement process. 8–253 AddUsersToAdHocRole( ). 5–10 version number. 4–11. 13–24 scheduling listeners. 8–162 Advanced Queuing. 15–99 in the Supplier: Credit Check process. 8–275 AddParameterToListPos( ). 4–41 Attribute types attribute. 8–43 addItemAttrDate( ). 13–22 finding. 8–3 AQ message payload. 6–14 AssignActivity( ). 13–23 queue handlers. 2–16 Advanced Queues integration. 8–43 AddItemAttrNumberArray( ). 15–95 in the Supplier: Get Order Details process. 14–4 Agents. 14–21 Ad hoc users and roles. 4–11 date. 4–36 Index – 2 Oracle Workflow Guide . 13–33 Agents web page. 8–74 Asynchronous processes.Standard. 13–80 in the Notify Approver subprocess. 13–2 Agent. 4–42 timing out. 15–21 in the Requisition process. 13–32 pinging. 13–33 ALLOW_FORWARDED_RESPONSE parameter. 13–29. 5–2 Assign activity. 2–61 And activity. 15–92 in the Supplier: Send Supplier Invoice process. 4–35 document. 15–81 in the Buyer: Send PO to Supplier process. 8–276 Address. 6–2 statuses. 6–2 Any event. 13–77 protocol. 8–216 AddCorrelation( ). 8–138 AdHocDirectory( ). 4–60 Activities( ). C – 2 Attribute. 8–46 addItemAttrText( ). 8–163 Arrows. datatype. 8–253 AddParameterToList( ). 8–3 System: Error. 13–25 queues. 15–84 in the Buyer: Receive Supplier Invoicing process. 13–29 deleting. 15–88 in the Workflow Event Protocol process. 13–33 direction. 14–10 Any transitions. 13–61 updating. 4–42. 8–43 AddItemAttrDateArray( ). 5–12 Activity nodes in the Buyer: Advanced Shipment Notice process. 14–4 Agent Deleted event. 8–46 AddParameterToList. 13–82 in the Master Ping process. 13–56 scheduling propagations. token substitution. 8–294 AddItemAttr( ). 15–75 in the Detail Ping process. 8–114 Activity attributes See also Function activity attributes setting values for.

4–11. 8–17 Buyer Workbench. scripts. summary. 8–210 Check Setup web page. 13–58. 15–80 Buyer: Send PO to Supplier process. 13–53 managing business events. 4–35 Attribute–type attributes. 16–16 CLEAR( ). 15–106 B2B Invoice event. summary. 16–17 background engines. 10–25 Business events. summary. 4–10. 8–300 Index – 3 . 8–215 Compare Date activity. 2–43 scripts. 4–35 AUTOCLOSE_FYI parameter. 4–12. 8–67 Block activity. 8–69 CompleteActivityInternalName( ). 13–77 predefined events. 13–2 overview. 6–3 Compare Number activity. 4–36 text. 13–53. 8–235 Ping/Acknowledge example. 15–85 Buyer: Receive Supplier PO Acknowledgement process. 2–61 Automatic Notification Handler. 6–3 compareTo( ). 4–10. 13–62 Checking activity versions. 15–78 Buyer: Top Level PO process. 6–22 Concurrent Manager Functions item type. 2–45 Background( ). 4–36 lookup. 6–3 Compare Text activity. 8–102 ClearMsgStack( ). 8–41 BeginActivity( ). 8–180 Close( ). 6–22 Concurrent program FNDWFLST. 14–2 setting up. 8–100 Comparison activities. 4–10. 13–4 in Workflow processes. 6–5 Business Event System. 15–105 B2B Purchase Order event. 8–72 Concurrent Manager activities. 4–35 URL. 16–7 directory service data model. 8–209 CancelGroup( ). 16–13 workflow data model. 10–25 Automatic replication. 16–7 Background Engines about. 15–107 B2B Purchase Order Acknowledgement event. summary. 6–16 Compare Execution Time activity. 16–6 starting. 15–102 Background engine. of Event Manager objects. 4–16 type. 1–3 checking setup. 4–10. summary.event. 4–4 Attributes copy. 4–10. 4–35 number. 6–3 Compare Event Property activity. 16–4 B B2B Advanced Shipment Notice event. 4–11. 4–3. 4–5 Cancel( ). 15–83 Buyer: Receive Supplier Invoicing process. 10–25 Automatic routing. 2–96 Business Event System Replication APIs. 4–35 role. 4–13. 4–36 form. 7–15 for item types. 16–10 foreign/primary key references. 4–10. web page. 15–73 C Callback functions. 6–3 CompleteActivity( ). 2–44 submitting. 7–13 command. 15–67 Buyer: Advanced Shipment Notice process. 13–71 Automatic responses.

16–10 integrating with local workflow users. 4–47 performance. 8–119 Workflow Agent Listener. in web pages. 7–24 DequeueEventDetail( ). 2–27 integrating with Oracle HR. 4–50. 2–27. C – 7 DeferredQueue function. queue handler. 16–15 item type attributes. 16–14 data for an item type. 4–37 CONTEXT( ). 8–105 CONNECT parameter. 8–38 CreateMsg( ). 8–237 WF_EVENT_T. 2–60 Directory repository. 4–63 D Data types. 2–96 DEBUG parameter. 5–26 Directory services. 4–3 DBA Studio. 6–6 Deferred activities. 8–236 WF_AGENT_T. 2–96 Datatypes example. 16–14 runtime data for an item type. 8–108 Continue Flow activity. C – 9 workflow status information. wf_payload_t. 4–58. 6–34 Default transitions. 6–34 Default_Rule( ). 2–30. 8–181 CreateProcess( ). 2–84 Customization Level. 8–144 Index – 4 Oracle Workflow Guide . WFAttribute class. 3–4 view from Builder. 6–28 Default Event Error Process. 15–7 Dequeue. 8–239 Date–type attributes. C – 7 Deferred processing for event subscriptions. 2–109 Workflow Resource Generator. 8–167 Detail Notification web page. 6–12 Coordinating master/detail activities. 2–58 Constants. 5–2 DEFAULT_ERROR. 6–28 DEFAULT_EVENT_ERROR. 4–53. directory service. 8–252 Content–attached checkbox. 8–9. 8–242 WF_PARAMETER_LIST_T. 4–20. 13–81 Detail process. 8–136 CreateAdHocUser( ). 8–21 Custom logos. 4–47 CreateAdHocRole( ). 16–15 Demonstration. 2–43. 2–45 Workflow Definitions Loader. 8–170 DequeueException( ). 15–47 summary. 8–134 CreateForkProcess( ). 4–11. 2–56 Purge Obsolete Workflow Runtime Data. 2–27 synchronization. 8–176 DequeueOutbound( ). 4–8. 10–3 DIRECT_RESPONSE parameter. 6–11 Cost threshold. 2–43. 2–105 for activities. 13–41 for workflow processes. 4–56. summary.FNDWFPR. 13–55 creating. 10–19 Detail Ping process. 2–21 checking the data model. 6–12 Detail Survey process activities. 8–163 Database links checking. 8–241 WF_PARAMETER_T. 8–90 Content. 4–32. 16–5 Concurrent programs Notification Mailer. 8–255 for the Business Event System. 16–15. 2–62 Default Error Process. 2–28 integrating with native Oracle users. 8–281 Defer Thread activity. 8–177 Delete all workflow data. 2–48. 8–272 Workflow Background Process. 15–46 Diagram arrows. 5–2 Direct Response e–mail. 2–21 Directory Service in Navigator tree.

5–10 E E–mail notifications. 15–49 activities. 16–13 Event activities. 15–50 Document Type Definitions Business Event System. 2–63 Dispatch mode. 8–242 enqueuing. 8–121 DISCARD parameter. 13–3 Event messages datatype. 4–37 Document Review process. 3–14. 7–25 Event Subscriptions web page. 3–16 Effective dates. 2–4 example direct response instructions. 2–48 and HTML attachments. 8–305 WF_EVENT_SUBSCRIPTIONS. A – 3 Effective date. 4–6 Dynamic priority. 7–17 Document Management. queue handler. 14–3 Event Function APIs. 10–7 modifying mail templates. 13–52 Event System Demonstration data model. 6–8 Engine thresholds. 8–311 WF_EVENT_GROUPS. 6–26 Error( ). 7–21. 4–45 create. 6–26 Error Check process. 14–3 Event Group Deleted event. 13–43 Document integration. 8–165 Environment variables WF_ACCESS_LEVEL. 4–56 Event activity details. 8–302 WF_SYSTEMS. 4–54 Workflow Engine. 8–288 Errored activities. retrying. 13–44 for process activities. 4–3. 15–52 summary. 10–3 with HTML attachments. 13–8 Event Manager. 8–314 WF_EVENTS. 8–50 Event Deleted event. 10–2 Edit menu. 8–10 Error process. 14–2 Event data. 15–56 Error handling for event subscriptions. 3–16. 8–185 Document management integration. 15–54 activities. 4–6 Document message attributes. 13–36 Event data URL. 2–42 Error activities. 7–23 Enqueue( ). item type. 8–284 Error_Rule( ). 8–290 Event Group Creation event. 8–308 Document–type attributes. 5–12 Event APIs. 3–7 END activities. 2–47 Enqueue. 5–12 Event Rule APIs. 2–102. 2–106 WF_RESOURCES. 4–59. 8–269 EnqueueInbound( ). 1–5. 2–69 requirements. 13–5. 8–11 Effectivity. 5–4 End Activity. 15–64 Index – 5 . 16–10 Event nodes. 2–4 summaries. 5–11 Dynamic timeouts. 14–3 Event Group Updated event. 4–11. 8–17 Event activity attributes. 4–3. 13–4 defining. 15–57 summary. 8–279 Event subscriptions. 15–49 Document Management APIs. 8–77 for workflow processes. 14–3 Event groups. 13–34 rule functions. 2–48. 4–3 Documents. 10–24 templates for. 4–36.Directory Services APIs. 4–59. 8–260 Event Created event. dates of. 8–300 WF_AGENTS. attached vs embedded.

16–5 Fonts modifying. 8–312 WF_EVENT_FUNCTIONS_PKG. 14–2 Event( ). 16–4 FNDWFPR. 8–150 F FAILCOMMAND parameter. 13–5 deleting. 8–315 WF_EVENTS_PKG. 8–89 External document integration. 13–5 Generate( ) WF_AGENTS_PKG. 8–14. 4–6 External Java function activities. 8–148 GetAccessKey( ). 15–64 Event System Local Queues web page. 4–50 standard Java API. 8–187 get_launch_document_url( ). 8–188.initiating. 5–21 Forced synchronous processes. 10–15 Find System web page. 15–66 Event System Demonstration process. 6–15 Get Monitor URL activity. 4–4 Events. 15–69 Example function activity Select Approver. 8–306 WF_EVENT_SUBSCRIPTIONS_PKG. web page. 15–63 Requisition. 4–53 Functions. 13–65 sending to agents. 15–29 Example process Event System Demonstration. 8–303 WF_SYSTEMS_PKG. 7–8 standard PL/SQL API. 13–41 G Generate function. 13–8. 15–66 overview. 8–309 Get Event Property activity. 2–62 File menu. URL attributes. 15–63 setting up. 7–5. 2–59 FROM_ROLE attribute. 13–14 predefined. 8–296 WF_EVENT_GROUPS_PKG. 15–5 Execute Concurrent Program activity. 3–10 See also PL/SQL procedures Future–dated events. A – 2 Find Agent web page. 2–86. 13–15. 5–21 setting. 13–32 Find Event web page. 8–189 get_pref( ). 11–8 Index – 6 Oracle Workflow Guide . 13–14. installing. 8–103 get_launch_attach_url( ). 7–3 Function activity attributes. 13–45 Events: Buyer Workbench. 8–272 concurrent program. 13–15 Events web page. 4–37 FROM parameter. 13–50 Find Notifications web page. 13–15 finding. 13–4 defining. 15–67 Events: Track Order. 4–8. 13–4. 8–5. 6–22 execute( ). 13–19 FND_FNDWFIAS. 8–186 get_open_dm_select_window( ). 8–75 Event–type attributes. 13–73 Event Updated event. 4–44 create. 13–5. 7–6 Function activities. 13–39 sending to workflow processes. 10–14 FNDWFLST. 8–13 Forward( ). 8–205 Frame target. 15–26 Verify Authority. 8–194. 8–82 FND_FNDWFNOT. 13–38 updating. 8–119 concurrent program. 6–14 GET_ERROR( ). 4–3 FORWARD mode. 4–25 FUNCMODE. web page. 14–2 raising. C – 2 Form–type attributes.

8–66 GetActivityAttrDate( ). 8–87 GetItemAttrClob( ). 8–126 GetRoleName( ). 8–247 getEventKey. 8–246 getPriority. 8–57 GetItemAttrDocument( ). 4–2 H HandleError( ). 8–227 getCorrelationID. 8–246 GetRoleDisplayName( ). 8–97 getFromAgent. 8–248 getErrorSubscription. 8–175 getName WF_AGENT_T. 8–248 getErrorStack. 3–4 HIDE_REASSIGN attribute. 8–62 GetItemAttrNumber( ). 9–2 HTML_MAIL_TEMPLATE parameter. 8–277 GetValueForParameterPos( ). 8–77 Hardware requirements. 8–95 GetValueForParameter. 8–56 GetItemUserKey( ). 8–223 GetAttrDoc( ). 8–245 GetShortBody( ). 8–223 GetBody( ). 2–65 Index – 7 . 8–237 WF_PARAMETER_T.getActivityAttr( ). 8–222 GetSubject( ). 8–131 GetRoleInfo( ). 8–61 GetItemAttrInfo( ). 8–278 getValueType( ). 8–123 getSendDate. 8–237 GetText( ). 8–151 GetEnvelopeURL( ). 8–130 GetRoleUsers( ). 8–64 GetActivityAttrInfo( ). 8–220 getItemAttr( ). 8–98 Global Preferences. 8–96 GetUserName( ). 8–253 GetValueForParameter( ). 8–246 GetDiagramURL( ). 8–225 GetAttrInfo( ). 8–24 GetMessageHandle( ). 8–94 getNotificationAttributes( ). 8–219 GetAttrNumber( ). 8–81 getReceiveDate. 8–57 getItemAttributes( ). 2–2 Help menu. 8–247 getEventName. 8–124 getValue WF_PARAMETER_T. 8–125 GetRoleInfo2( ). 8–233 getNotifications( ). 8–221 getToAgent. 8–153 getErrorMessage. web page. 8–64 GetActivityLabel( ). 8–246 getFormat( ). 8–228 GetShortText( ). 8–223 GetAttrText( ). 8–239 WFAttribute. 8–247 getType( ). 8–57 getItemTypes( ). 8–226 getSystem. 8–64 GetActivityAttrEvent( ). 8–129 GetUserRoles( ). A – 6 Hidden item types. 8–63 GetActivityAttrNumber( ). 8–232 getParameterList. 8–85 GetActivityAttrClob( ). 8–247 GetInfo( ). 4–25 Home page. 8–64 GetActivityAttrText( ). 2–14 Global variables. 8–239 WFAttribute. 8–247 getEventData. 8–57 GetItemAttrText( ). 8–60 GetItemAttrDate( ). 8–155 GetAttrDate( ). 8–25 GetAdvancedEnvelopeURL( ). 8–245 getProcessStatus( ). 8–59 GetItemAttrEvent( ).

for function activities. 15–66 Internal names updating activity. 2–30 LDAP APIs. 13–22 Listen( ). 2–62 Index – 8 Oracle Workflow Guide . 16–7 updating item attributes. 8–84 Loader program. C – 3 Requisition. 7–4. 15–36. in a web interface. 2–5 JavaScript. 7–14 J Java API. 4–5 Concurrent Manager Functions. 4–2. 3–9. 2–4 Joining activities. C – 8 Requisition. 4–15 creation. 7–4. 13–54 Initialize. 3–13 loadItemAttributes( ). 4–52. 13–17 LOG parameter. 4–54. 16–8 updating lookup codes. 8–80 ITEMTYPE. 8–127 Item attributes. support in a Web browser. 6–26 System: Mailer. 4–5. 4–8. 13–78 Workflow Send Protocol. 4–7 Event System Demonstration. 7–8 Java APIs. See Workflow Definitions Loader Loading item types. 10–24. 3–12 selector functions. 4–2 callback function. 16–11 Java interface. 2–34. 15–8. 16–9 updating messages. 6–9 loadActivityAttributes( ). 8–144 List of values. 14–18 Item types. 4–49. 8–245 Initiating a workflow process. 7–14 Items( ). 7–13 copy. 16–9 IsPerformer( ). 3–13 persistence type.HTMLAGENT parameter. 4–4. 8–178 Init. 13–58 updating. 16–6 scheduling. 2–86 starting. 2–85 viewing. 4–58 IDLE parameter. 16–9 updating message attributes. 4–6 Item type attributes. 11–2 Java Runtime Environment. 2–86 stopping. external document integration. 16–8 updating item types. 2–62 I Icons. 2–95. 14–18 ITEMKEY. 13–56 running. 13–61 Load balancing. 6–22 context reset. 15–71 loading. 2–61 InboundQueue function. 13–61 for inbound agents. 8–83 Local system.ora parameters. 5–4 L Launch Process activity. 7–13 Standard. 15–71 performance. 8–5 Java Function Activity Agent. 8–30 LDAP. 8–5 Java monitor tool. 3–12. 15–12 Workflow Send Protocol. 6–2 System: Error. 15–12 saving. 2–69 Workflow Agent Ping/Acknowledge. 8–270 Listeners deleting. 8–13 Event System Demonstration. 6–6 LaunchProcess( ). 8–113 ItemStatus( ). 16–8 updating lookup types. 8–12 arrays. 16–7 updating activity attributes.

13–72 Master/Detail coordination activities. 4–3 Loop Counter activity. 5–3 Loops. 2–69 Messages. 5–11 NODE parameter. 2–82 formatted table. summary. 4–48 Index – 9 . 2–49 Mod_osso. WF_NOTIFICATION(). 3–9 body. 4–30. 4–34. 2–82 for Workflow URL Attachment message. finding objects in. 4–25 #HIDE_REASSIGN. 4–23 MIME support. 6–12 Master/copy systems. 2–38 Node activities. 2–75 for Workflow Summary Mail message. 13–79 Master process. 15–32 Messages window. 4–24. 4–22 Lookup types. A – 2 Message attributes. 6–7 Loop Reset. 4–35. 16–12 N Naming conventions. 3–9. 11–2 workitems. 6–7 Notification. PL/SQL stored procedures. 2–77 for Workflow Open Mail (Direct) message. A – 7 Navigator tree. 4–24. 4–19 copy. 16–5. 4–43 coupling with custom functions. copy. 4–25 for Workflow Cancelled Mail message. 16–12 Notification access keys. C – 5 Respond. 5–11 subject. 4–26 performance. 4–22 creation. 2–32 Lookup codes. 15–15 Navigator Toolbar. 4–35 Message function. 5–6 start and end. for e–mail notifications. 4–41 creation. 8–283 Login Server. 2–70 for Workflow Open Mail for Outlook Express message. 2–32 Monitoring Workflow Monitor. 8–13 create. 2–65 NLS support in a web session. 4–25. 8–10 M MAPI–compliant mail application. 4–49. 4–26 Message propagation. Oracle Workflow Builder. 2–81 for Workflow Invalid Mail message. setting up. 4–24. 15–31 viewing. 4–39 Send. 6–11 notes on usage. 2–78 for Workflow Closed Mail message. 3–6 NewAgent( ). 4–29 overriding default priority. dynamic priority. 4–33. 15–31 copy. 2–77 for Workflow Warning Mail message. 4–23. 1–5 Multi–consumer queues. 13–53 Message templates. 2–79 for Workflow Open FYI Mail message. 7–6. 13–40 Multilingual support. 4–31. 15–32 #FROM_ROLE. 2–59 Nodes adding to a process. 4–35 source. 10–3 Notification activities. 4–60. 4–20 Lookup–type attributes. 5–8 NOOP activity. 6–13 Menus. 2–39 in Oracle Workflow Builder. 8–267 NLS codeset. 2–39 in e–mail notifications. 2–55 Master Ping Process. 2–73 for Workflow Open Mail (Templated) message. status.Log( ).

10–22 Notifications. 2–69 Notification Web page. 4–13.Notify Requisition Approval Required. 15–31 Notify Approver subprocess. 10–22 reassign via e–mail. 10–2 forwarding. example notification activities. 13–2 Oracle Applications Manager. 2–6 Oracle Workflow Builder. 2–49 required folders. 2–57 starting for UNIX Sendmail. 10–2 Notification preference. 4–3 O OMBAQ_TEXT_MSG. 10–2 dependence on directory services. 15–31 Notification APIs. 9–8 Notification preferences. See Worklist web page Notifications( ). 10–12 responding with Notification Web page. 10–22 setting the From Role. 4–25 timed out. 8–11 OpenNotificationsExist( ). 10–13 Notifications Worklist. 2–32 Index – 10 Oracle Workflow Guide . 2–48. 3–2 requirements. 2–67 shutdown. 4–15. 4–26 Notification ID token. 2–32 identifying the Workflow web agent. 4–32 Notification IDs. 6–9 Notify Approver. via e–mail. 10–9 identifying the responder. 2–17 Workflow server requirements. 8–195 transferring. 2–2 save modes. 3–17 Oracle Workflow home page. 8–211 load balancing. 2–56 starting for MAPI–compliant applications. 10–2 via Notification Web page. 15–31 Number–type attributes. 4–25 HTML–formatted e–mail. 3–15. 2–55 Notification method. 8–214 Or activity. 2–48 starting. 15–19 Notify Requisition Approval Required. 1–5 reassigning notifications. 10–5 plain text e–mail with attachments. 8–115 Notify activity. 2–49 Notification summaries. 10–24 Notification System. 10–6 plain text e–mail using templated response. for e–mail notifications. 2–100 Oracle Net Services. 2–30 Oracle Message Broker. 2–63 response processing. 2–2 Oracle Workflow. 1–5 Oracle Workflow views. 1–3 Loader functionality. 2–96 Oracle HTTP Server. 4–49. 8–195 via e–mail. Workflow server requirements. 2–20. 2–67 script to restart. 8–257 On Revisit. 8–192. 8–197 Notification functions. 8–157 Oracle9i Application Server. summary. 8–13 Notification history. 2–58 MIME support. 6–2 Oracle Advanced Queues integration. 2–49 notification preference. 2–48 configuration file. 3–15 overview. 1–5 Oracle DBA Studio. 4–12. 2–4 Oracle Internet Directory. implementation issues. 8–162 Oracle Advanced Queuing. 4–17 starting from command line. 8–194 hiding the Reassign button. 10–3 Notification Mailer about. 2–48. 2–4 Oracle9iAS Single Sign–On. 10–11 reassign in Notification Web page. 6–9 plain text e–mail using direct response. 9–2 Oracle Workflow Manager. 8–192 Notification templates.

C – 8 Phase numbers. 5–20 creation. 7–23 for a selector or callback function. 15–38 Product Survey process. 4–18 Process activities. 8–239 Parameter list. 8–77 Process window. C – 7 item attributes. 13–65 for outbound agents. document. 4–43. 15–36 installing. 8–291 Partitioning Workflow tables. 3–12 loops. 7–21 for an Event Subscription Rule Function. 13–77 PL/SQL. 8–13 Predefined events. C – 5 synchronous and asynchronous workflows. modifying. 7–25 for function activities. item type. 15–36 Product Survey item type. 15–35 Propagation. 7–13 for an Event Data Generate Function. C – 8 subprocesses. 5–20 starting. 13–62 updating. C – 8 runtime data. 14–2 Preferred notification method. 16–5 Index – 11 . 8–179 P Parameter. 4–57 Process definition. 5–21 ProcessInboundQueue( ). C – 8 Payload. 13–23 Purge outbound notification message queue. 16–12 Protection level locking. C – 5 partitioning Workflow tables. C – 3 message attributes. 14–8 Pinging agents. 7–17 for a Queue Handler. 13–36. 15–54 Persistence. A – 8 Processes activity transitions. 5–2. 3–11 Process diagram adding nodes. 5–2 Process Window Toolbar. 10–2 Preserving customizations. 16–12 performance. 8–10 overview. C – 8 purging. datatype. 8–163 Performance concepts. 8–174 Product Survey. 5–19 printing. for an activity. 7–19 PL/SQL documents. 7–17 PL/SQL APIs for a ’PL/SQL CLOB’ document. 7–17. 4–6 PL/SQL stored procedures creating. 13–53 Propagations deleting. 7–17 for a ’PL/SQL’ document. for Advanced Queues messages. web page.OutboundQueue function. datatype. 5–6 drawing. 4–46 create. 8–241 Parameters( ). 13–61 scheduling. 5–2 editing. 2–63 Process rollback. 15–34 initiating. 7–6. 3–10. 13–42 Ping Agent event. 2–12. 15–15 scripts. 2–103 reset. C – 2 deferred activities. 15–15 naming conventions. C–2 Periodic Alert. See Access protection Protocols. 4–4. 3–7 editing. 5–4 verify. 1–4 document. 13–65 Protection level. 7–3 PL/SQL CLOB. 5–2 copying to clipboard. 15–15 Post–notification functions. setting up. 5–6 PROCESS parameter.

10–9 plain text e–mail using direct response. 8–316 WF_EVENTS_PKG. 10–11 via Notification Web page. 8–261 Raising events. 10–6 plain text e–mail using templated response. 8–194 RESULT. 15–13 Reset process. 7–5. 4–58 for voting activities. See Rollback RESET_FAILED parameter. 8–298 WF_EVENT_GROUPS_PKG. 8–34 Retry Error. 2–62 Requirements. for event messages. 4–4 Roles. Business Event System. 8–270 Receive( ) WF_AGENTS_PKG. 7–23. 8–313 WF_EVENT_FUNCTIONS_PKG. 8–119 PurgeEvent( ). 15–6 summary. 2–70. 2–100 Queue tables. 10–13 Respond( ). 5–24 view from Builder. 10–22 Receive date. 13–56 reviewing. 8–300 REPLYTO parameter. 2–65 RESET_NLS parameter. 13–4. 8–212 Response methods. 2–60 Response processing. 8–211 Responder( ). 13–24 checking. 5–25 tab page. 4–62 ResumeProcess( ).Workflow Purge APIs. 5–24 ad hoc. 4–48. web page. templated. 10–12 Reassign web page. 13–65 Reassign notifications hiding the Reassign button. 5–26 Rollback. 13–25 WF_EVENT_OMB_QH. 15–6 Requisition Demonstration. processing. 13–66 RAISE( ). 5–24 loading into the Workflow Builder. 7–15 Result type for activities. 2–72. 8–194. 8–111 Purge Obsolete Workflow Runtime Data concurrent program. 2–97 Queues assigned to agents. 8–143 Replication APIs. 6–32 RETRY_ONLY. by Notification Mailer. automatic. 4–25 in Notification Web page. 8–172 PurgeItemType( ). 8–13 Respond to notification HTML–formatted e–mail. hardware and software. 5–26 Role Resolution activity. 8–173 Q Queue handlers. 8–304 WF_SYSTEMS_PKG. 8–105 Raise( ). 8–211 Responder. 15–26 initiating. 10–25 Index – 12 Oracle Workflow Guide . data model. 15–8 Requisition process. direct vs. 2–16 property page. 2–67 Responses. 8–77 Routing. 2–2 Requisition. 10–22 via e–mail. 2–75. 8–307 WF_EVENT_SUBSCRIPTIONS_PKG. of process. 15–8 installing. 2–65 Respond attributes. 8–310 RemoveUsersFromAdHocRole. 6–32 Role administrator. 15–5 example function activities. 13–72 setting up. 2–97 R Raise Event web page. 4–52. 2–79 RESPOND mode. 10–5 plain text e–mail with attachments. 6–9 Role–type attributes.

6–2 Standard APIs for ”PL/SQL CLOB” documents. 8–51 SetItemAttrEvent( ). 8–26 SetItemParent API. 8–249 setSendDate. 8–248 setReceiveDate. 4–5. 10–31 updating. 8–23 SetMsgAttr( ). 13–40 Software requirements. 8–199. 2–66 SendGroup( ). 8–249 SetParametersIntoParameterList( ). 10–27 listing. 8–48 SetItemAttrNumber( ). 8–252 setErrorSubscription. 8–142 SetAdHocRoleExpiration( ). 8–251 setValue. 7–17 for a Queue Handler. 8–48 SetItemAttrTextArray( ). 8–53 setItemAttrValue( ). 8–53 SetItemAttrText( ). 8–265 SEND_ACCESS_KEY parameter. 8–265 Send( ). 8–250 setFromAgent. 8–240 Shortcuts. 8–88 SetItemOwner( ). 8–217 setCorrelationID. 2–62 Single sign–on. 8–248 setSystem. 8–4 Schedule_changes( ). 8–141 SetAdHocUserExpiration( ). 7–8. 10–26 overriding. 8–217 SetAttrNumber( ). 8–238 setToAgent. 7–23 Index – 13 . 6–15 set_document_id_html( ). 2–30. 8–251 setEventData. 8–203 Set Event Property activity. 8–147 Seed event group. 10–32 Rule functions. 7–17. 8–132 SetAttrDate( ). 10–32 for a role. 8–251 setErrorStack.Routing rules deleting. 15–26 Selector functions. 8–192. 8–274 SetErrorInfo( ). 7–13 Send date. 8–238 WF_PARAMETER_T. 13–37 Runtime data. 6–12 SetItemParent( ). 8–139 SetAdHocUserStatus( ). 8–48 SetItemAttrDateArray( ). 8–249 SetDispatchMode( ). 8–192. 14–6 Select Approver function activity. 8–140 SetAdHocRoleStatus( ). 8–79 SetItemUserKey( ). 15–2 Savepoints. 8–250 setEventName. 8–273 setErrorMessage. 8–289 setPriority. 8–240 setParameterList. 8–133 SetAdHocUserAttr( ). 8–183 SetMsgResult( ). 8–184 setName WF_AGENT_T. 5–22 Shutdown files. 2–62 SHUTDOWN parameter. C – 8 S Sample workflow processes. 8–251 SetItemAttrDate( ). 7–25 for event subscriptions. 2–32 Single–consumer queues. 7–19 for ”PL/SQL” documents. 8–250 setEventKey. 7–3. 2–2 Source types. 13–35 Standard activities. 8–48 SetItemAttrNumberArray( ). 8–53 SetItemAttrDocument( ). 8–217 SetAttrText( ). for event messages. 8–190 SetAdHocRoleAttr( ).

14–4 System identifier. 8–268 Index – 14 Oracle Workflow Guide . 14–5 SubscriptionParameters( ). 5–10 Subscription Created event. 13–34 deferring. 8–28 Status report developer. 13–69 synchronizing. 15–87 Survey–Master/Detail process activities. summary. 14–5 Synchronous processes.for an Event Data Generate Function. 15–94 Supplier: Get Order Details process. summary. 13–21 finding. 14–5 Subscription Deleted event. 13–68 System integration. with Oracle Internet Directory. 13–17 master/copy. for sample Requisition process. 13–52 Success( ). 14–4 System Deleted event. 15–91 Supplier: Send Supplier Invoice process. 13–45 deleting. 6–26 Standard item type. 8–32 Synch_all( ). 2–59 Supplier: Advanced Shipment Notice process. 13–41 defining. 13–50 predefined. 8–146 Synch_changes( ). 15–41 Survey–Single process. 6–26 System: Mailer item type. 14–4 System: Error item type. summary. 14–5 Subscription Updated event. summary. 13–17 defining. 14–9 System Signup web page. 12–2 Test( ). 2–30. 8–286 SUMMARYONLY parameter. 2–63 TAGFILE parameter. 8–145 Synchronization. C – 5 timing out. 15–23 StartProcess( ). 15–100 Supplier: Stock Check process. 13–72 signing up. 13–68 System Identifier web page. 13–69 System Updated event. 15–98 Supplier: Credit Check process. 13–18. 2–63 TCP/IP drivers. 15–96 Supplier: Top Level Order process. 8–293 Subscriptions. 2–43 Submit Concurrent Program activity. 16–16 end user. 13–21 Systems web page. 15–44 summary. summary. 8–14. 16–16 Stuck processes. 13–67. 15–39 SuspendProcess( ). summary. 2–2 Templated Response e–mail. 8–40 StartProcess function. 10–3 Test harness. 13–19 local. 7–25 for function activities. 8–144 Synchronize Event Systems event. 15–42 Survey–Single Process. 14–2 updating. 7–8 for selector/callback functions. 5–4 Start activity. 13–21 T Tag files. 2–34. 7–21 for an Event Subscription Rule Function. 2–69 Systems. 7–13 Standard error process. 13–70 updating. 6–8 StartForkProcess( ). 13–2 System Signup event. activities. 6–2 START activities. summary. 13–18 deleting. C – 2 System Created event. 6–23 Subprocesses performance. 7–3. 13–52 finding.

8–12 URL attributes. 8–13 Transfer( ). 2–38 for Find Notifications web page. 4–3 Timed out processes. Oracle Workflow. 5–10 dynamic. 10–13 web browser. 4–41 of document–type message attributes. attached vs embedded. 5–2. 5–3 Timeouts. 8–195 U Unexpected event. 10–13 User Defined Alert Action process activities.TEST_ADDRESS parameter. 14–12 UNIX Sendmail. 16–16 of Oracle Workflow. 9–2 for Product Survey web page. 10–2 Notification Web page. 8–229 Text–type attributes. 15–36 for Requisition Demonstration web page. 8–117 TRANSFER mode. 10–27 Index – 15 . 8–110 Translation. 5–24 V Vacation forwarding. 8–207 Transitions. 15–29 Version. web page. 8–157 Vote Yes/No activity. 11–7 for Worklist web page. C – 7 Timeout transitions. 2–63 Upgrading workflow definitions. 15–67. 15–61 summary. 2–55 UNPROCESS parameter. 11–8 for Notifications Routing Rules web page. 8–116 TotalPERM( ). 8–195. 2–19. for the Business Event System. 8–11. 10–12 Views. 10–26 for Oracle Workflow home page. 15–60 User Entry Has Changed event. 9–8 language and territory. for activities. 4–14 TOKEN( ). 2–9 Version compatibility. Oracle Workflow Builder. 5–10 Token substitution attributes. A – 7 toString( ). A – 4 View notifications e–mail summary. ad hoc. 4–60 Versioning. 3–7 View menu. 2–9 Version number. 6–10 VoteCount( ). 15–10 for the Workflow Monitor. 10–13 for Find Processes web page. 2–20. 2–43. 9–6 User preferences. 9–7 notification preference. 9–8 User–defined datatypes. 4–37 URL–type attributes. 4–3 URLs for event data. 8–236 UserActive( ). 5–2 Any. 5–2 creating. 8–93 Verify Authority function activity. 14–15 User Preferences. 10–25 value( ). 2–20. 2–62 TestContext( ). 10–24 electronic mail. 8–99 Total( ). 5–2 TRANSLATE( ). 8–50 for Event System Demonstration web pages. 8–128 Users. 5–2 editing. 5–18 Timeout. 2–14 document management home. frame target. 5–18 Default. 4–37 URL message attributes. 8–213 Voting activities processing. 15–69 for Find Notifications Routing Rules web page. 8–104 Toolbars.

8–298 WF_EVENT_GROUPS Document Type Definition. view. 8–242 mapping attributes to OMBAQ_TEXT_MSG. 2–106 WF_AGENT_T. 13–25 WF_ERROR queue. 13–25 WF_EVENT_FUNCTIONS_PKG. 13–25 WF_IN queue. 2–42 WF_ROLES.Receive. 2–22 Wfagtlst. 13–25 WF_OUT queue. 2–4 WF_ACCESS_LEVEL. 8–257 WF_EVENTS Document Type Definition.Receive. 8–303 WF_EVENTS_PKG. 15–29 WF_RESOURCES.sql. 8–157 WF_ITEMS_V. 8–309 WF_SYSTEMS_PKG. 8–310 WF_USER_ROLES. 2–97 WF_ENGINE. 8–316 WF_EVENT_T.Receive( ).Receive.Generate. 15–18.StartProcess. 16–6 WFAttribute class.sql. 6–12 Warning( ). 2–25 WF_USERS. 16–8 Wfchitt.sql. 2–44 WF_ERROR agent.Generate. 8–237 WF_AGENTS Document Type Definition. 8–313 WF_DEFERRED agent. 4–62 Voting activity. 16–6 Wfbkgchk. 8–163 WF_PURGE.VerifyAuthority.sql. 8–239 wf_payload_t. 2–97 WF_ERROR_QH. 13–25 attribute mapping. 8–296 WF_EVENT_FUNCTIONS_PKG. 4–26 WF_NOTIFICATION_ATTR_RESP_V.Generate( ). 2–97 WF_PARAMETER_LIST_T. 2–100 WF_EVENT_QH. 16–7 Wfchact.Receive. view. 8–305 WF_EVENT_GROUPS_PKG. 13–25 WF_DEFERRED queue. 8–302 WF_EVENTS_PKG. 8–257 setting up.SelectApprover. view. for Oracle Workflow.sql. 16–7 Wfchita. 8–92 Wfbkg. 8–160 WF_SYSTEMS Document Type Definition. 15–26 WF_REQDEMO. 8–111 WF_REQDEMO. 8–241 WF_PARAMETER_T. 2–38 WF_LOCAL_* tables. 13–25 WF_EVENT_SUBSCRIPTIONS Document Type Definition. 4–61 W Wait activity. 8–90 WFAttribute( ). 8–308 WF_SYSTEMS_PKG. 6–4 Wait for Concurrent Program activity. 9–2 Web notifications.sql. 8–311 WF_AGENTS_PKG.result type. 16–8 Index – 16 Oracle Workflow Guide . 2–17 Web home page.BACKROUND. 8–312 WF_AGENTS_PKG. 8–304 WF_IN agent.Generate. 8–315 WF_EVENT_SUBSCRIPTIONS_PKG. 8–307 WF_EVENT_OMB_QH.Generate. 8–161 WF_LANGUAGES view.Generate. 16–7 Wfchacta.sql. 15–8 WF_REQDEMO.Receive. 8–306 WF_EVENT_GROUPS_PKG. 2–24 WF_RUNNABLE_PROCESSES_V. 6–24 Wait for Flow activity. requirements. 8–314 WF_EVENT_SUBSCRIPTIONS_PKG. 8–285 Web agent. environment variable. 2–97 WF_ITEM_ACTIVITY_STATUSES_V. 2–21 WF_NOTIFICATION() message function. 8–159 WF_OUT agent. 2–102.

16–15.sql.sql. 16–4 Workflow Agent Listener concurrent program.sql.bat. 2–28 wfdirhrv.sql. 16–14 Wfrmitms. C – 9 Wfrun.sql. 2–99 Wfevtenq. 16–16 Wfstdchk. 16–17 wfxload. 16–16 Wfverchk. 2–78 Workflow Closed Mail message template.SQL. 8–121 Workflow Engine. 2–12 Wfver. 8–121 error processing.sql.sql.bat. 8–231 Workflow administrator. 2–87 Wfjvstop. 16–15 Wfrmitt. 16–13 wfresgen. 1–4. 2–12 Wfupartb. 3–12 testing. 8–19 looping. 16–11 WFLOAD.sql. 8–101. 1–3 calling after activity completion. 16–10 wfdircsv.sql. 8–272 Workflow Agent Ping/Acknowledge.sql. 16–5 WFNLENA. 8–10 Java APIs. 16–12 Wfqclean.sql.csh. 8–82 wfjvlsnr. 16–17 Wfverupd. 2–114.sql. 15–2 Workflow Designer. 16–12 WFNLADD. 2–99 wfevqued. 2–87 wfjvlsnr. 8–8 calling for activity initiation. displaying. 8–236 Wfupart.sql. 2–107.cfg.sql.sql.pls. 2–117 Windows menu. 13–78 item type attributes. 8–11 core APIs. 13–78 Workflow Builder menus.sql. 16–9 Wfchmsg.sql.sql.pls. 1–4 source control.sql. See Oracle Workflow Builder Workflow diagrams. 2–108 wfmail. 2–100 Wfquhndos. 8–3 CANCEL mode. 16–12 Wfntfsh.sql. 4–47 deferred activities. 16–8 Wfchlut. 2–107 Workflow Definitions Loader. 16–13 Wfrmall. 16–12 Wfprot.sql. 2–27 wfdirouv. 2–117 wfxload. 8–10 Index – 17 . 8–9 directory services. A – 2 Workflow Cancelled Mail message template. 2–109 Workflow Demonstrations home page.sql.sql. 8–5. 16–16 Wfstatus. 16–15 Wfrmtype. 2–100 Wfrefchk. 2–108 concurrent program.sql.sql. 2–114.sql. 15–3 Workflow Directory Service APIs.sql. 8–111 cost threshold. 16–14 Wfrmita.sql. 16–10 WFFunctionAPI class.sql. 16–9 Wfchmsga. 8–101 Workflow definitions loading. 16–15 WFRUND. 2–58 Wfmqupd. A – 6 WorkCount( ). 2–16 Workflow Agent Listener. 2–27 wfevquec. 12–2 transferring.sql.sql.sql.sql. 16–16 Wftypes. 16–9 Wfdirchk. 2–81 Workflow Core APIs. 13–77 item type. 8–105 Wfretry.Wfchluc. 2–109 wfload. 15–8 Wfstat.sql. 16–13 Wfquhndob.sql.

16–15 monitoring. 8–105 concurrent program. 8–19 RUN mode. See Notification APIs Workflow Open Mail (Direct) message template. 14–17 Workflow Send Protocol Acknowledgement event. 2–82 Workflow web pages. 10–17 WriteMsg( ). requirements. 2–21 Workflow Views. 2–74 Workflow Open Mail message template. 8–106 Workflow roles. 6–18 XML Transform activity. modifying template. 8–162 Workflow queues. 8–182 WriteToClob( ). 11–2 Administration buttons. 14–20 Workflow Invalid Mail message template. 2–79 Workflow LDAP APIs. 8–9 Workflow Engine APIs. 2–84 Workflow Monitor APIs. 8–148 Workflow processes creating and starting. 2–84 Workflow XML Loader. 2–82 Workflow URL Attachment message template. summary. 14–24 Workflow Server. 2–47. 6–19 XML Compare Tag Value activities. 8–111 Workflow Queue APIs. 8–157 Workflow Warning Mail message template. 2–3 Workflow Summary Mail message template. 2–69 Workflow Open Mail for Outlook Express message template. 2–21 Workflow Send Protocol item type. 11–2 samples. 14–26 Workflow Send Protocol event. See Items Worklist web page. 8–144 Workflow Monitor. 2–77 Workflow users. 16–13 Workflow Resource Generator. 8–287 Workitems. 6–19 XML Compare Tag Value (Number) activity. 6–19 XML Get Tag Value activity. 11–6 Detail Tab window. 14–18 sample workflow process. 8–3 Workflow Event Protocol process. 11–3 setup. 2–34. 8–79 PL/SQL APIs. cleaning. 2–76 Workflow Preferences API. 2–71 Workflow Open Mail (Templated) message template. 8–234 X XML Compare Tag Value (Date) activity. 8–149 Workflow Notification APIs. 11–4 Process Diagram window.master/detail processes. 15–2 Workflow Purge APIs. 8–11 threshold cost. 6–19 XML Compare Tag Value (Text) activity. 6–20 Index – 18 Oracle Workflow Guide . 11–3 Process title. 2–112 Workflow_Protocol( ).

please give your name. and page number below: Please send your comments to: Oracle Applications Documentation Manager Oracle Corporation 500 Oracle Parkway Redwood Shores. • Did you find any errors? • Is the information clearly presented? • Do you need more information? If so.6. and telephone number below: Thank you for helping us improve our documentation. 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.Reader’s Comment Form Oracle Workflow Guide Volume 1. CA 94065 USA Phone: (650) 506–7000 Fax: (650) 506–7200 If you would like a reply. address.2 A95276–03 Oracle Corporation welcomes your comments and suggestions on the quality and usefulness of this publication. please indicate the topic. chapter. Your input is an important part of the information we use for revision. . Release 2.

.

2 VOLUME 2 March 2002 .Oracler Workflow Guide RELEASE 2.6.

medical. and SQL*Plus are trademarks or registered trademarks of Oracle Corporation. duplication and disclosure of the Programs including documentation.227–19. Susan Stratton The Programs (which include both the software and documentation) contain proprietary information of Oracle Corporation.Oracle Workflow Guide Volume 2. Reverse engineering. Oracle Store. It shall be licensee’s responsibility to take all appropriate fail–safe. the following notice is applicable: RESTRICTED RIGHTS NOTICE Programs delivered subject to the DOD FAR Supplement are ”commercial computer software” and use. disassembly or decompilation of the Programs. The information contained in this document is subject to change without notice. Programs delivered subject to the Federal Acquisition Regulations are ”restricted computer software” and use. JInitiator. 2002 Oracle Corporation. Other names may be trademarks of their respective owners. 500 Oracle Parkway. Oracle is a registered trademark. Oracle Corporation does not warrant that this document is error–free. Clara Jaeckel Major Contributors: George Buzsaki. for any purpose. Steve Mayze. redundancy and other measures to ensure the safe use of such applications if the Programs are used for such purposes. Otherwise. CA 94065. A95265–03 . and Oracle disclaims liability for any damages caused by such use of the Programs. please use the set part number. Copyright E 1996. Oracle8i. without the express written permission of Oracle Corporation. they are provided under a license agreement containing restrictions on use and disclosure and are also protected by copyright. Release 2. Oracle8. Mark Craig. George Kellner. shall be subject to the licensing restrictions set forth in the applicable Oracle license agreement. mass transit. back up.2 The part number for this volume is A95277–03 . If the Programs are delivered to the US Government or anyone licensing or using the Programs on behalf of the US Government. . Robin Seiden. patent and other intellectual and industrial property laws. PL/SQL. duplication and disclosure of the Programs shall be subject to the restrictions in FAR 52. Except as may be expressly permitted in your license agreement for these Programs. Commercial Computer Software – Restricted Rights (June. and Express. no part of these Programs may be reproduced or transmitted in any form or by any means. If you find any problems in the documentation. Redwood City. Kenneth Ma. OracleMetaLink.6. Oracle Corporation. aviation. 1987). except to the extent required to obtain interoperability with other independently created software or as specified by law. is prohibited. or other inherently dangerous applications. All rights reserved. Kevin Hudson. Primary Authors: Siu Chang. John Cordes. Sheryl Sheh. Jin Liu. Oracle9i. Oracle Press. David Lam. please report them to us in writing. The Programs are not intended for use in any nuclear. Tim Roveda. electronic or mechanical. To reorder this book.

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Oracle . . . Related User’s Guides . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Major Features and Definitions . . . . . . . . . . . . . . . . . Installation and System Administration . . . . . . . . . . . . . . . . . . . . . . . i Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Do Not Use Database Tools to Modify Oracle Applications Data . . . . . . . . . . . . . . . . . . Your Feedback . . . . . . . . . . . . . . User Guides Related to This Product . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Workflow Processes . . . . . . . . . . . . . . . . . . . . . . . . . . . Documentation Accessibility . . . . . . . . . 1–1 1–2 1–3 1–6 Contents iii . . . . . . . . . . . . . . . . Introduction to Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Online Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How To Use This Guide . . . . . . . . . . . . . Audience for This Guide . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Training and Support . . . . . . . . . . . . Other Information Sources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xix xx xx xxi xxii xxii xxiii xxiii xxiv xxv xxvi xxviii xxix xxix xxx Chapter 1 Overview of Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Guides Related to All Products . . Other Implementation Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Contents VOLUME 1Volume 1 . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . Setting Up a Default Access Level . . . . . . . . . . . . . . . . . . 4–1 4–2 4–2 4 – 17 4 – 19 4 – 23 4 – 42 4 – 61 4 – 68 4 – 69 4 – 70 iv Oracle Workflow Guide . . . . . . . . Voting Activity . . . . . Oracle Workflow Hardware and Software Requirements . . . . . . . Deleting Objects in Oracle Workflow Builder . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using Oracle Workflow Builder with Different Server Versions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of Setting Up . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Navigator Tree Structure . . . . . Item Types . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Opening and Saving Item Types . . . . . . . . Identifying the Version of Your Oracle Workflow Server . . . . . . . . Messages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Optional Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Using the Workflow Definitions Loader . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Viewing the Navigator Tree . . . . . . . . . . . . . . . Item Type Definition Web Page . . . . . . . . . . . . . . Lookup Types . . . . . . . . . . . . . . . . . . Using the Workflow XML Loader . . . . . . Creating Process Definitions in Oracle Workflow Builder . . . . . . . . . . . . . Setup Steps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Modifying Objects in Oracle Workflow Builder . . . . . . . . . . . . . . . . Workflow Objects That Support Versioning . . . . Overview of Required Setup Steps for the Version of Oracle Workflow Embedded in Oracle Applications . . . . . . 3–1 3–2 3–3 3–4 3–7 3 – 12 3 – 18 3 – 21 3 – 24 Chapter 4 Defining Workflow Process Components . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Activities . . . . . . . Overview of Oracle Workflow Access Protection . . . . . . . . .Chapter 2 Setting Up Oracle Workflow . 2–1 2–2 2–6 2–6 2–7 2–7 2–8 2–9 2 – 10 2 – 11 2 – 12 2 – 101 2 – 105 2 – 107 2 – 112 Chapter 3 Defining a Workflow Process . . . . Quick Start Wizard Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Allowing Access to an Object . . . . . . Other Workflow Features . . Workflow Process Components . . . . . . . . . . . . . . . . . Setup Checklist . Overview of Oracle Workflow Builder . . . . . . . . . . . . . . . . . Setup Flowchart . . . . . . . . . . Overview of Required Setup Steps for the Standalone Version of Oracle Workflow . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . Compare Event Property Activity . . . . . . . . . . . . . . . End Activity . Start Activity . . . . . . . . Concurrent Manager Standard Activities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .