How to do task assignments based on conditons ?

Lets say i have 2 groups, A & B.

If the initiator of a Process model is from group A, then a form with in Process model should be assigned to group B. Similarly for group B, it should be assigned to group A.

I have tried putting a if condition in the expression rule part of "Assignment Tab" of the particular form in process model.

But the process is getting failed.

Can some one advise what approach to be followed in this case ? I dont want to do any thing with Swim Lane, i need to achieve it through "Assignment Tabs"


Thanks in Advance...

  • It might help to share the error message?
    The following should achieve what you need:
    if(isusermemberofgroup(pp!initiator, cons!GROUP_A), cons!GROUP_B, cons!GROUP_A)
    I would suggest running the expression within a script task set to run as the process designer and store the assignment value into a PV.
  • There are a variety of tricks you can consider.
    To troubleshoot, you can use a group type PV that you set prior to the user input task.
    Just use that as your assignment value once you get it working.

     suggests an approach that should work.  
    It's worth a try.  But again, do it before the user input task and verify the value is setting properly.

    Group membership tests can get expensive, though, and I would caution against designs that leverage them extensively.

    you might also have a use case for a decision object.  The documentation actually uses a group assignment use case as an example for how decision objects work

    Here's a trick you might also like to try.
    Full disclosure, maintaining the following may become tedious if the use case changes and you add many more groups.

    • Add an assignTo parameter PV to the process model that includes the user input task with the assignment.
      • use this variable on the assignment tab
    • Then, Create two very simple parent process models - one for each group.
      • Set the permissions on the action or related action that starts this process such that groups A&B can only see their respective action or relation action (i.e. each group only sees 1 action)
      • In Group A's process add a parameter PV called "assignTo" and default that value to group B
      • In Group B's process add a parameter PV called "assignTo" and default that value to group A
      • Add a sub process task to each of these parent processes, and have them flow into the task assignment process, pass in the assignTo Variable.

    This reduces the amount of expression evaluation that takes place in your process, and identifies "for free" which group started the process.

 Discussion posts and replies are publicly visible