1 Reply Latest reply: Oct 18, 2012 8:57 AM by Daniel Atwood RSS

    Human Tasks : How to get the task initiator details

    kiransaravi
      Hi

      I'm doing a simple Human task service, where an employee raises an expense report.
      In the Human task, in the participant assignment, I want to assign the participant(manager in this case) dynamically

      something like
      getManager(*getInitiatorForThisTask()*)

      I could see getManager(username) funciton in the Identity Service Functions, but how to i get the username of the initiator of this task. Since that is the parameter to be passed in getManager(username) function.

      Regards
      RaviKiran.
        • 1. Re: Human Tasks : How to get the task initiator details
          Daniel Atwood
          Look at your list of elements in your output data mapping coming out of and going into every interactive activity. Expand the predefined variables. The "Creator" element is the one you want.

          The issue you will have is if the work item instance is not created using an Initiator Interactive activity. This is the only way that this gets set automatically. In this case you'd need to set this predefined variable to a valid user's id before using it in your human task's getManager() method call.

          You'll see "creator" in your list of variables for the human task. Your syntax would be:
          ids:getManager(/task:task/task:creator)
          Dan