1 Reply Latest reply on Feb 15, 2013 8:59 AM by Steve Bishop

    Is it possible to dynamically assign users to a Userlist?

    Don400 Level 1

      I have a review task that needs to be assign to multiple users.  However, I need the application user to control the assignment list.  The Participants section of the 'Assign Multiple Tasks' service allows the programmer to search the directory or to specify a user list asset or a string or an XPath expression but doesn't give any clue as to what the XPath expression should be.  I would like to specify, for example, a variable of type list, subtype string containing the comonName of the users to be part of the review.  However, when I select 'variable' as the input type, only String variables are presented in the selection box, no list-of-strings and no other objects that might be a list of users such as a com.adobe.livecycle.userlist.impl.Userlist

       

      I have searched the SDK for any API that mimics the user selection interface but found nothing.  The type generated in the Workbench variable type selection tree is User in group UserManagerLookUp but it does not seem to match the structure of the Userlist generated by the 'New User List' wizard.  The former generates XML with a single object with root element com.adobe.idp.dsc.um.lookup.datamodel.User but the latter seems to have type com.adobe.livecycle.userlist.impl.Userlist with two children, a string element named userlistType a complex element principals containing com.adobe.livecycle.userlist.impl.UserlistPrincipal elements.

       

      If I generate an object of type Userlist by searching for the type I get the com.adobe.livecycle.userlist.impl.Userlist type but when I try to acces the fields using XPath there is nothing (there should be a userlistType property in addition to the principals property described above).  Even if it worked properly, it does not appear in the list of variables when 'Variable' is selected as the input in the 'Participants' section (only string variables appear in the list).

       

      Is there a way to dynamically create a user list to be assigned as a participant in 'Assign Multiple Tasks'?  I could create all possible lists but as there are 8 possible selections that would be 255 different lists and I'm not interested in that exercise.  Thanks in advance.

       

      ANSWER:  YES.  Use a process to generate the list as follows:

      1. In the New User List wizard, on the page where it lists the User list population options, select the radio button Use a process to populate the user list.
      2. Select a process or create a new one.  The process output must be a single variable named users of type list and sub-type string.

      That's all there is to it.  The process can have inputs which will be recognized by the 'Assign Multiple Users' wizard so that when you select that userlist as the participants, the wizard will detect that the process has input parameters and you will be prompted to specify the input parameters as an XPath expression or literal.

        • 1. Re: Is it possible to dynamically assign users to a Userlist?
          Steve Bishop Level 2

          I use List of sub type User. The previous user step gets a list of user IDs. I loop through that and and do a Find User to get the User object and put in the List.

           

          Find User input[Login ID], String from form submission:

          /process_data/formData/Formdata/Approvers/Approver[number(/process_data/@counter)]/approve rID

           

          Find User output[user]:

          /process_data/approverList[/process_data/@counter]