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.
You need to specify the next user in a String or with a User object.
What variable are you using to specify the next user object?
It seems that those two classes are unrelated, except for the fact that they both represent users. I think you do need to extract an ID string from the infomodel.User object (the getUserID method) and use it as the input for Assign Task.
I had already implemented your solution as a quick fix. It's pretty unsatisfactory that the DirectoryService returns User and Group objects that are incompatible with 'Assign task', but there appears to be nothing I can do to remedy that, given that the 'correct' types aren't part of the SDK.