Skip to main content

In my flow 3 different people have the right to view the to be approved form but it is only necessary for one of them to approve of it in order to go on in the flow. Right now all three need to approve in order to go on. I'm not sure where to go in the code to make a small change in order to say that once one person has approved the whole work list item is completed.


thanks.

Hi mbotella,


Instead of Creating a Slot of Each Destination within the properties of the activity, specifiy that you only want 1 slot created. The other nice thing here is the first one to open and begin working on the item will lock the other two people out.


-mike


This is controlled by the Succeeding Rule defined on the Activity which contains the client event for the approval.


If you need only 1 approval you can basically get rid of the succeeding Rule, i.e. always return true.


 


Is this the place you are talking about? I'm not sure when exactly to return true.


public void Main(ref SourceCode.KO.SucceedingRuleContext K2) {
 K2.SucceedingRule = true;
 if(K2.SucceedingRule == true)
 {
  DeleteTaskItems(K2,true);
  DeleteTempIPFile(K2,true);
 }
 else
 {
  DeleteTaskItems(K2,false);
  DeleteTempIPFile(K2,false);
 }
 CopyActInstDataToProcData(K2);
}


Hi mbotella,


So this is an InfoPath integrated process, right?
Somthing strange is going on here.


This code already sets the rule to true, there is nothing in the code which prevents the activity from finishing as soon as the 1st approval is received.


If the Activity was configured to wait for 3 approvals, the Succeeding rule would look something like this:


public void Main(ref SourceCode.KO.SucceedingRuleContext K2) {
 K2.SucceedingRule = false;
 if ( (Func1(ref K2) == true) )
  K2.SucceedingRule = true;
 else
  K2.SucceedingRule = false;
 if(K2.SucceedingRule == true)
 {
  DeleteTaskItems(K2,true);
  DeleteTempIPFile(K2,true);
 }
 else
 {
  DeleteTaskItems(K2,false);
  DeleteTempIPFile(K2,false);
 }
 CopyActInstDataToProcData(K2);


Have you looked at the Process Overview Report in the workspace, what do you see right after the 1st approver has approved, maybe you can attach a screen shot?


 


 


Reply