Skip to main content

Hi All,


I have 4 destination users ( A , B, C ,D) for one activity. Between the first and the second activity , I have a line rule that looks like this "All Slots Of ([{K2.ActivityInstanceDestination.DataFields("Result}]) = "PASS";


The first activity has a slot for each destination user.


The second activity is a server mail event.


All the users update the DataField "Result" to PASS. Then any one out of them finishes the task. Thus the task is removed from the WorkList of all the 4 users. But the Line Rule fails .


I think this should not happen. If 4 users are updating the value of Result to PASS and any one of them finishes the task, then LineRule should return true and control should transfer to the second activity.


Result is an Activity Level DataField.


Pls guide.


Thanks and Regards.

Yip, this is working exactly as designed.


You have to 'tell' K2 that it must wait for 4 responses and not finish after 1 response, this is done by creating a Succeeding rule on the Activity, thus you will have a Succeeding rule that is "All Slots Of ([{K2.ActivityInstanceDestination.DataFields("Result}]) = "PASS"


 


Hi smiddie,


Many a thanks for replying.


Actually, I was late in replying cause I was trying to clear myself about the concept of slots.


I implemented the Succeeding Rule and it's working great but how do I implement that if 2 users have Updated the Datafield value, then only mail should be sent . What is happening is I have limited the number of slots to 2 out of 4. I have also implemented the Succeeding Rule as U have suggested i.e., At Least 2 Of ( {K2.ActivityInstanceDestination.DataFields("Result}]) = "PASS" . But as soon as any 2 users update the Datafield value to PASS, the activity is completing and the next activity having the Server Event is getting fired.


It means do I need to keep a line rule also to check as to whether 2 users out of 4 have updated the datafield ?


Pls guide.


Thanks and Regards.


 


Specific line rules are often used in Succeedeing Rule scenarios. 


Perhaps you can describe the business requirements you are trying to satisfy?


 


Hi Bob,


Thanks a lot for replying.


The requirement goes something like this :


A task will be assigned to a group having 4 users. If any 2 users update a value , then mail is sent to their Supervisor.


I implemented it like this :


I took a client event in one activity, assigned the Group as the Destination Rule.  The acticvity has a datafield called "RESULT".


I took a Server Mail Event in another activtity.


In the first activity, I implemented the following succeeding rule : 


At Least 2 Of (O{K2.ActivityInstanceDestination.DataFields("Result}]) = "PASS"


Between the 2 activities, I implemented a line rule as :


At Least 2 Of ( {K2.ActivityInstanceDestination.DataFields("Result}]) = "PASS"


It worked but I doubt whether this is the right approach to implement using Rules ?


Pls guide.


Thanks and Regards


Hi All,


I tried the above scenario. It is working. If I want 2 out of 4 users to update the value of Result to PASS for the client event to complete, then I have to use Line Rule along with Succeeding Rule as I have posted above.


Pls guide.


Thanks and Regards


The Succeeding Rule is there to determine whether the ACTIVITY can complete or not i.e. when the SucRule reads - At Least 2 of the fields should be PASS, then yes, the ACTIVITY will be able to complete and the process instance will be able to continue.


The Line Rule is there to give direction to the process instance i.e. which way do we continue from here...


So, in your scenario, your Line Rule can be blank since the Succeeding Rule of the Activity should keep the Activity Active until the condition have been met.


HTH,


Ockert


Hi Ockert,


Thanks for replying.


That was a ripper.


Thanks and Regards


Reply