Process Mapping Logo

Process Mapping - Forums

Sharing 19 years of knowledge and experience

 
Metastorm BPM forums
Sign up Latest Topics
 
 
 


Reply
  Author   Comment  
totaldis

New Member
Registered:
Posts: 9
Reply with quote  #1 
Someone please correct or confirm me in regards to the scope of a flag.

If a flag is the initial action that begins a process it can be called from anywhere and anytime because it's scope is global.  

If a flag is attached to a stage and the folder is not currently at this stage the flag cannot be called regardless of the flags "which must raise" property. 

Is there no global scoping of a flag within a workflow where you do not need to be on the stage the flag is attached to? As a work around for this when it was absolutely necessary, I created a common stage and attached it to all stages that the flag can be raised on. Is this the only way?

Perhaps I'm better off explaining the reasoning. 

Business needs the ability to "go back" to certain points in a workflow. They have agreed to go back to the start of any single sub process and continue on from that point to the end. My original intent was to create flags at the beginning of each sub process in our 'Controller' process which basically dictates in what order the sub processes are called. Then creating an admin form and use the raise flag event to call a flag on a certain folder id. The issue is that the eWait table does not seem to maintain flag data once it leaves the stage the flag is attached. This includes drilling down into the sub process of the controller. In other words, if the controller calls [sub1] and that sub process is in stage2 there is nothing in the eWait table matching the flag for sub1.

Controller
{ (start process) -flag-> [sub1] -flag-> [sub2] -flag-> [sub3] -flag-> (archive) }

Sub 
{ (start sub) -> [stage1] -> [stage2] -> [stage3] -> (archive) }

What I've resorted to was making stored procs to move folders around in the eFolder table and eAlert table. This is hacky and I don't like it. 

Let me know if something needs further explanation. Thanks...


0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #2 
if you want it to be global, a common stage applied to all stages and a flag from there is best. If you have sub-processes, you have a problem because you cannot apply the common stage to this stage or any stages in the sub-process. Getting 'out' of a sub-process is only possible by sending the folder to an archive stage. Best to set a variable on doing that, and check the variable in a RV action from the sub-process stage in the containing process. If it is set (ie was chucked out by this flag) then send it to the same place that the flag action in the containing process would.

If you prefer not to set a variable, you can use other techniques such as finding out what action triggered the exit from the sub-process, but most people do not bother (only OCD people like me).

It is possible to return to a stage using the 'move to stage' property of a system stage, but again in the case of sub-processes it gets more complex.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
totaldis

New Member
Registered:
Posts: 9
Reply with quote  #3 

So for the benefit of the forums and much to my chagrin I took the approach of attaching common stages bound to a cancelOrReset flag to all stages in every sub process. An admin form raises a flag to start a process passing in the folder ID of the main process to be cancelled. The flag also has a couple bool (check) params that signify whether the call was made from a reset or cancel admin form. 

The flag that is called in the sub process forwards that folder on to the archive so it bubbles back up to the main calling process. The main process has 3 rendezvous points checking for bools that signify whether the case is cancelled, reset, or should continue. 


I dislike this setup, but don't see any other way. It's functional.

0
Jerome

Avatar / Picture

Guru
Registered:
Posts: 5,507
Reply with quote  #4 
what folders does the flagged action respond to? If it is 'any folder' you are going to have a bad time....

You would need to set it to 'this folder' and set that as the 'raising' folder id.

__________________
Post an example, and we will have a much better idea what the problem is. In about 90% of posts, the problem is one of communication. Examples bridge that gap.
0
Previous Topic | Next Topic
Print
Reply

Quick Navigation:


Create your own forum with Website Toolbox!