AnsweredAssumed Answered

Run Activiti Script As System in Alfresco 5.0

Question asked by tonyrivet on Mar 24, 2015
Latest reply on Mar 26, 2015 by tonyrivet
Hi,

I wanted to run a JS script in an Activiti workflow as the System user.
I did that many times in v4.2, setting "System" in the "runas" field of an AlfrescoScriptTask, but when running this in v5.0 (Enterprise) the following error shows up : "runas user 'System' does not exist".

It seems the way the System user is created in Alfresco 5.0 has changed because I can't find it in the people container anymore. The thing is the ActivitiScriptBase uses the personService to check if the "runas" user exists and looks through the people container to do so.

So here are my two questions :
- is anybody aware of a new way to handle the System user in v5.0 (I didn't find any info to confirm that…) ?
- how can I run a Script in Activiti as the System user now ?

Thanks !

Outcomes