cancel
Showing results for 
Search instead for 
Did you mean: 

Change workflow Owner

dranakan
Champ on-the-rise
Champ on-the-rise
Hello,

I want to change the owner of some workflows which is started by a webscript. I don't want that the user can delete the workflow.

I have tried this in the webscipt :

workflow.parameters["cm:owner"] = people.getPerson("superUser");
workflow.parameters["initiator"]= people.getPerson("superUser");
And this in the workflow :

<startEvent id="start" name="Start" activiti:formKey="sgfwf:submitStartFinance1a" activiti:initiator="superUser"><
But the user (who begin the workflow) can delete the workflow… How can I change the owner of the workflow ?

Thank you.

Alfresco 4.0d, Activiti
2 REPLIES 2

afaust
Legendary Innovator
Legendary Innovator
Hello,

as far as I know, the initiator is set as a process level variable and can't be reset via start event configuration or a web script. What I'd use in this situation is a process execution listener (implemented in Java) that deletes the process level variable (or reassigns to a "harmless" account). But bear in mind that the worklow will then no longer be found via the "Workflows I've started" page, as this relies on the initiator as a filter criteria. Also, you then no longer have any technical data telling you which user actually started the workflow (wether or not he/she should remain the owner) if you need to investigate it…

Regards
Axel

dranakan
Champ on-the-rise
Champ on-the-rise
Thank you AFaust