cancel
Showing results for 
Search instead for 
Did you mean: 

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

rafaelduqueestr
Champ in-the-making
Champ in-the-making
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?)
2 REPLIES 2

rafaelduqueestr
Champ in-the-making
Champ in-the-making
"is being deleted"

jbarrez
Star Contributor
Star Contributor
No, the deleteProcessInstance information doesn't do anything with the current authenticated user. I agree it would be nice to store in the history tables though.