2 Replies Latest reply on May 29, 2012 8:06 AM by liviah

    authenticated userId in workitem

    liviah

      Is there a way to find out which user has created a process instance?

      (process is started using REST interface of bpm console)

       

      Regards,

      Liv

        • 1. Re: authenticated userId in workitem
          swiderski.maciej

          Currently there is no out of the box support for this but if your execution is done by the same thread that started the process in console (meaning it did not went into any state node or async processing) you could get if from the thread context as it contains subject:

           

           

          Subject subject = (Subject) PolicyContext.getContext("javax.security.auth.Subject.container");
          

           

          From subject you can then get principals and one of them will be related to user, rest could be some roles/groups that users belongs to, etc.

          NOTE: This is part of JACC so it should be cross container.

           

          HTH

          • 2. Re: authenticated userId in workitem
            liviah

            Hi Maciej,

             

            yes, this helps. many thx!

             

            Regards

            Liv