Complete participant step through code | Community
Skip to main content
DIPEN_SEN_
Level 3
Jun 27, 2019 12:20 PM UTC
Solved

Complete participant step through code

Hi,

I am trying to complete participant step through code from a scheduler. So I am getting service resource resolver with full read/write permission on repository. Then I am adapting to WorkflowSession. I am able to retrieve every data I need but at last step when I am trying to do workflowSession.complete(workitem, route) then I am getting exception that 'service-user' is unable to load '/var/waorkflow/instance .... ' .

Is there anything need to be configured to get this done?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
DIPEN_SEN_
DIPEN_SEN_Accepted solution
Level 3
Jun 28, 2019 9:36 AM UTC

I have found the issue. Service user need to be added as workflow super user even though it had full read/write access to repository.

6 replies

antoniom5495929
Level 7
Jun 28, 2019 9:41 AM UTC

So, permission issue

Translate
DIPEN_SEN_
DIPEN_SEN_AuthorAccepted solution
Level 3
Jun 28, 2019 9:36 AM UTC

I have found the issue. Service user need to be added as workflow super user even though it had full read/write access to repository.

Translate
antoniom5495929
Level 7
Jun 28, 2019 8:40 AM UTC

Hi,

can you share the full stacktrace?

Thanks,

Antonio

Translate
DIPEN_SEN_
Level 3
Jun 28, 2019 5:50 AM UTC

One more important point is I am getting exception only when calling workflowsession.getroutes(workitem, true). Otherwise I am able to load workitem and access all its values.

This worlflowsession is resourceResoover.adaptTo(WorkflowSession.class)

Please let me know if I am doing anything wrong

Translate
DIPEN_SEN_
Level 3
Jun 28, 2019 5:31 AM UTC

I have checked the permission. It has full read, modify, create, delete, read ACL, write ACL, Replicate permission to complete repository.

Still its not able to read.

Using AEM 6.4

Translate
antoniom5495929
Level 7
Jun 27, 2019 12:37 PM UTC

Hi,

the exception that you are facing seems to be related to permission.

Have you checked if your service user has read and modify permission under /var/workflow path?

By the way, why do you need to make this execution? Probably, if you need to make some stuff automatically, you can create a copy of this workflow by removing the participant step.

Let us know.

Thanks,

Antonio

Translate