Search 800 + Posts

Feb 18, 2010

Master Details Oracle Workflow

For How to define a Master Detail Workflow please refer to my previous blog om the same.

In this blog I will add some more info about what we need to do or what has required when we define a Master Detail relation-ship  in Workflow.
  1. First thing we need is define Master and Child flow.
  2. Call the wf_engine API to establish relation ship betwen Master and Detail. This we usually do when we call Detail workflow from master.
  3. Define a "CONTINUEFLOW" activity in Master flow and set the 'Waiting Activity' and 'Waiting Flow' attribute.
  4. Similarly define  "WAITFORFLOW" activity in child flow and set the attributes 'Continuation Activity' and 'Continuation Flow'.

Once Matser flow got triggered and now we want to transfer the flow back to Master , we need to define the "CONTINUEFLOW" activity in the Master flow and to Receive the control back in Master we need to define "WAITFORFLOW" in the Master.
Please note that most important point here is how we define the attribute of these two activity.

Let say Process is Call Child flow from Master and once Child flow is complte Transfer control Back to Master.
In such case we need to Define

CONTINUEFLOW activity in Master
WAITFORFLOW  activity in Child
CONTINUEFLOW  activity in Child
WAITFORFFLOW activity in Master.

When we define "CONTINUEFLOW", Waiting Activity attribute means the activity on the destination flow that is waiting for the source flow to call it and attribute Waiting Flow is the destination flow name
On similar note the activityWAITFORFLOW has attributes Continuation Activity which points to the activity on the destination flow that will continute once control transfer and attibute Continuation Flow is the destination flow.
WHY I am expling this again ,Recently I came across couple of flow where consultant has define the master and detail flow , but in Contination Activity attribute he has added a ativity that neither exists in Master nor in Detail.and customer end up with lots of transactions where workflow got stuck.

The whole purpose of this blog is to explain the when-ever we define the Master Detail relation-ship we have to careful while defining thee 2 activities and their attributes

This is my first blog from iPhone

- Posted using BlogPress

No comments:

Post a Comment