3 Replies Latest reply on Dec 11, 2009 7:07 AM by CraigLeonard

    DirectoryManager API query (ES2)

    CraigLeonard

      In my workflow I have two User tasks, 'Sanction' and 'Validate', which are performed by members of the 'Risk Assessors' group.  Business logic dictates that the user who performs the 'Sanction' task may NOT perform the 'Validate' task.  My implementation assigns the 'Sanction' task to the 'Risk Assessors' group, captures the TaskResult to identify the individual who performed the task, and then uses a custom component to select an appropriate assignee for the 'Validate' task (i.e. picks a random member of 'Risk Assessors', but not the member who performed 'Sanction').

       

      In the custom component, I use the DirectoryManagerServiceClient class to retrieve the set of individual Group members.  Once I have this, it is a simple task to disregard the 'Sanction' user and pick a random user from the remainder.

       

      My problem occurs when attempting to assign this randomly selected user to the 'Validate' task.  I see the following error in the logs:

       

      2009-12-11 13:59:16,327 ERROR [com.adobe.workflow.AWS] stalling action-instance: 739 with message: Assign using an XPath expression was specified with the following expression: /process_data/assignee, but this expression did not evaluate to a datatype that the user service supports.  Supported types are 'String', 'com.adobe.idp.dsc.um.lookup.datamodel.User', and 'com.adobe.idp.dsc.um.lookup.datamodel.Group'

       

      The user I return from the custom component is of type com.adobe.idp.um.api.infomodel.User - this is the User type exposed by DirectoryManagerServiceClient.  Is there any way for me to map this to an instance of  com.adobe.idp.dsc.um.lookup.datamodel.User?  The class expected by 'Assign Task' isn't present in the ES2 Javadoc.

       

      I imagine that there would be some way for me to extract the user name from my User instance, and pass that to 'Assign Task', but i'm genuinely curious about how this is supposed to work.  I think the poster of this thread http://forums.adobe.com/message/2217711 was driving at the same thing.

       

      -- Craig