In this blog I will explain with Simple example how to use EVENTS in Oracle Workflow and then how to Raise Event in Oracle Application and Receive event in Oracle Workflow.
In my next blog I will explain in details about how to RAISE and RECEIVE events in Oracle Workflow, but here I will limit my self to RAISE event from Oracle Apps and then RECEIVE in Oracle workflow.
Step#1 - Define Event in Oracle Apps.
Navigation > Oracle Admin Workflow > Business Events > Press Button Create Event /Create Group Event.
Note - In this blog I will limit myself to "Create Event" Only and will not discuss "Create Event Group".
- Owner Name/Tag etc for Event
WF_EVENT_T structure stores
- Event Header Properties like Event Name, Event Key , CoRelation ID,, Parameter list etc.
Step 2 - Create the subscription for the Event , an event subscription registration indicating that a particular event is significant to a system.When ever an event is raised , event manager searches and execute amy subscripion assocaited with Event.
Navigate to Subscription tab and Select "Create Substription" and Define
- Source Type
- Event Filter
- Rule Data
- Action Type
- On Error
- If Action Type = "Launch Workflow" then Define Workflow Type
- Workflow Process
Event Filter - Triggering Event
Phase - Order in which subscription to event execute, Phase with value 1 to 99 run synchronously , 100 and above are deferred., The phase number 0 (zero) is reserved for Oracle Workflow seeded subscriptions
Rule Date - Key /Message .
Action type - we have 4 options here , in my Example , I have defined Action Type = "Launch Workflow" as I want to Launch the workflow.
Create your Subscription .Since I have selected Action Type = "Launch Workflow", I need to create workflow with RECEIVE EVENT activity .
Below are Steps to create Workflow with RECEIVE Event activity.
1.Step #1 - Drag the Event Activity on your workflow and Select Event Action = Receive.Since it is a simple test i just added a wait and end activity.
- Event Name
- Event Type
- Event Key
Go to Workflow Adminstator and test the Event , by first query for your Event in Event Tab and then Press the Test Button .
It will trigger the Event
Event In turn trigger all the subscription assocaited with the Event.
In our example , since Action Type for My Subscription is "Launch Workflow", it will trigger my workflow as shown .
you can check the triggering of the workflow , either by query the Workflow @workflow Admin Page > Search in Item_type/item_key
by executing below database queries.
Hope that helps , Leave your comments , as that help me to improve furthers.