title: How to get logged in camunda user information in my ejb?
body: <p>I am working with Camunda BPM in Camunda Glassfish Distribution (JAVA EE) for process automation.
  I want to get currently logged in user information in my ejb.</p>
  
  <p>I tried to get it as per the following code:</p>
  
  <pre><code>    @Inject
      IdentityService identityService;
  
      public void persist(DelegateExecution delegateExecution) {
  
          LOGGER.log(Level.INFO, "User Id: " +     identityService.getCurrentAuthentication().getUserId());
          .
          .
          .
          .
          .
          .
          .
          .
          .
      }
  </code></pre>
  
  <p>and I get a null pointer exception. Is there any other way to get the user Id or current authentication?</p>