如何在我的ejb中登录camunda用户信息?

时间:2016-03-30 12:14:13

标签: java-ee glassfish camunda

我正在使用Camunda Glassfish Distribution(JAVA EE)的Camunda BPM进行过程自动化。 我想在我的ejb中获取当前登录的用户信息。

我尝试按照以下代码获取它:

    @Inject
    IdentityService identityService;

    public void persist(DelegateExecution delegateExecution) {

        LOGGER.log(Level.INFO, "User Id: " +     identityService.getCurrentAuthentication().getUserId());
        .
        .
        .
        .
        .
        .
        .
        .
        .
    }

我得到一个空指针异常。有没有其他方法可以获得用户ID或当前身份验证?

0 个答案:

没有答案