Skip to main content

My client has asked me for some assitance with this one workflow that they are trying to use for literally everything.


It is called - 'Generic Workflow', a user will go to the form, fill it out, and select the approvers that are needed for the workfow (could be anywhere from 1 to N users and/or groups).  One thing to note is the order of the approvers that are selected on the form (it's a repeating table) is the order that this workflow needs to send activities to.


So on the workflow itself there is 1 activity with 1 InfoPath Client Event.  They were thinking they could use Destination Rules/Sets to handle assigning the work for the 1 to N approvers selected on the form.  The requirements are if one of the approvers is an AD Group, then only 1 approval from the members in that group are required for it to move on to the next approver (or step if there are no more approvers listed).  Also the workflow still has to go the other approvers listed on the form as well (in a sequential fashion as well).


Is that the best way to handle this?  I don't see how they are going to be able to use one activity with one client event to do this, but maybe someone else in the community has done something similiar?


Thanks!

Hi there. I would do this as follows:



  1. Create a process level data field called DestinationRule, and in the client event you assign the destination rule to this data field.
  2. When the form is submitted, the first activity iterates through the list of approvers int he InfoPath XML, gets the first one and copies the value to DestinationRule. 
  3. The workflow gets to the client event and the task is assigned to whoever is in DestinationRule (this could be a person or a group).
  4. Once they complete the event the workflow moves to a code activity which pulls out the next approver from the list. if there is an approver, it copies the approver's name into DestinationRule and loops back to the client activity. If there isn't an approver, it moves on to the next activity.

Make sense? I may have misunderstood the question :)


I  also think that creating a Datafield for Destination rules is a good solution. You can compute the dynamic destination rules  result , pass it in the datafield when the activity start.


I've also the same case but for me if the order of approver is the same, a parallel actitivy takes place. For that  I used the same activity and choose the parameter 'one per destination'. Everything goes well til a user is choosen as an approver as itself and as a member for a group. In this scenario, I want that the user validate twice: first as itself, and second as a itself but belonging to the choosen group.


I've compute dynamically the destination rules by adding the users 2 times in the K2.Destinations objet. But the result is that the user can only see one worklistitem on his task instead of two ( general case is N ).


Any ideas for configuring that ?


thanks in advance.


Haja


 


 


Reply