AnsweredAssumed Answered

How can i set user id when the process is been deleted

Question asked by rafaelduqueestrada on Nov 30, 2015
Latest reply on Dec 8, 2015 by jbarrez
Hi,
i didn't find any example on how can i set a user id when i call deleteProcessInstance method.

I will try to use this code:


        try {
            identityService.setAuthenticatedUserId(idUser);
            runtimeService.deleteProcessInstance(processInstance.getProcessInstanceId(), deleteReason);
        } finally {
            identityService.setAuthenticatedUserId(null);
        }


This code works fine when the process is been started.

Is this approach is a good approach?

What happend on activiti tables when i called setAuthenticatedUserId before deleteProcessInstance? (on IDENTITYLINK tables will exist some information like starter and participant?)

Outcomes