AnsweredAssumed Answered

Workflow process permissions for Alfresco services

Question asked by nickchase on Jul 10, 2017

Hi all

Am developing a custom workflow which invites new users to a share site and creates a task for the new user where they must check their firstname, secondname, email and provide address details.  I have written a custom task listener which implements the TaskListener interface and is hooked up to run on the 'complete' event.  The task listener is triggered OK and contains code which puts the Activiti form fields into a Map and then attempts to update the users profile.

 

HashMap<QName, Serializable> cm_person_properties = new HashMap<QName, Serializable>();

// code to add specific form properties to properties to cm_person_properties

personService.setPersonProperties(task.getAssignee(), cm_person_properties);

 

When the code executes I get the following exception:

 

AccessDeniedException 06100066 Access Denied.  You do not have the appropriate permissions to perform this operation.

 

The task has just been completed by the person whose information is being updated.  My assumption is that the person service is executing under the Activiti process ID and it doesn't have the permission to update the user.  I am not sure of the best practice here; I could write a custom service and then get the Activiti process to execute that in the task assignees account but I am not sure this is possible.

Some advice would be much appreciated.

 

Thanks

 

Nick

Outcomes