1
0
-1

Hi, I got a problem when assigning to the specify groups for Task Assign Repeat items. Based on the description above, it's suggested to use pipe delimited to list of groups. However, it doesn't work for my case (just work on multiple users). Assumed that we have 2 groups called group_a and group_b. Then what we set like follows:

 { "name": "Task Assign User",  "value": "CaseManagerA|CaseManagerB" },

 { "name": "Task Assign Groups",  "value": "group_a|group_b" },

The task is just assigned to the user only, it cannot assign to the groups at the same time. Please clarify how to assign to the multiple groups. Thanks.

    CommentAdd your comment...

    3 answers

    1.  
      1
      0
      -1

      Hi Alex,

      As per the thread in the KB https://support.avoka.com/kb/pages/viewpage.action?pageId=36865406.

      I have confirmed that the User or Groups can be set not both. I have got your support ticket and the Change Request is in our system.

      The following workaround will work, I have tested it manually in the Groovy Console using the Core API for a single submission. I haven't testing this using the Fluent API (TM5.0) +.

      The first Action runs Create Group Repeat Tasks, creates the tasks and assigns them to the groups

      It involves creating a "Assign Repeat User" Job action that runs  after the Job Task Assign Service before the Job Task Wait Service.

      {
        "name""Parallel Bundle",
        "type""",
        "shareFormData"true,
        "actions": [
          {
            "name""Create Group Repeat Tasks",
            "type""Job Task Assign",
            "properties": [
              "name""Task Assign Repeating",  "value""true" },
              "name""Task Assign Repeat Item",  "value""blah ${assignRepeatIndex}" },
              "name""Task Assign Group",  "value""$formDataMap.groupsDelimited" },
              "name""Task Form Code",  "value""group-repeat" },
              "name""Task Message",  "value""Please approve or reject" },
              "name""Task Subject",  "value""${assignRepeatItem} Individual Form" },
              "name""Task Input XML Prefill",  "value""$func.startSubmissionXml()" },
              "name""Task Type",  "value""Review" }
            ]
          },
          {
            "name""Assign Repeat User",
            "type""Job Action"
          },
          {
            "name""Repeat Wait",
            "type""Job Task Wait"
          }
        ],
        "routes": [
          "name""Default",  "nextStep""Bundle Complete" }
        ]
      },


      Here is roughly what the jobAction will do. The code depends upon the version of TM that you are running.

      Get the jobAction.step
      Loop over action in step.jobActions
          if action is of type ="Job Task Assign" && action.submission!=null
              Get the user object using the UserDao
              action.submission.setUser(user)
       
      Commit Changes at the end.


      Cheers

      Larry Bunton

        CommentAdd your comment...
      1.  
        1
        0
        -1

        Hi Alex,

        According to the documentation, your property name should be "Task Assign Group". Also, make sure you have set "Task Assign Repeating" property to "true". 

        { "name": "Task Assign Group",  "value": "group_a|group_b" }

         

         

        1. Alex Lam

          Yes, I have set it to true, and It can work only if I just assign to group list.  However, if I assign to both user and group, the form is just assigned to user only. 

        CommentAdd your comment...
      2.  
        1
        0
        -1

        Larry Bunton, thanks for your reply, would you confirm whether if it cannot be assigned to both users and groups? 

          CommentAdd your comment...