Expand my Community achievements bar.

SSO user activating the page..triggers the workflow with workflow launcher but shows initiator as admin..Any suggestions why it shows initiator as admin?

Avatar

Level 4

Team,

I have a workflow with only one process step, which is processMyCustomStep, mapped to an OSGI service.

I have a sso user belonging to the custom AEM group. He has full access to /etc, /content and /libs. 

I have logged in as SSO user, when activating the page, it kicks off the workflow with the workflow launcher cq:page modified event. But shows the initiator as "admin".

workflow instance history

   
                             
StatusTitleInitiatorStart TimeEnd TimeActionComment
CompletedStartadmin12-06-2016 2:58:2712-06-2016 2:58:27WorkflowCompleted 
CompletedprocessMyCustomStepadmin12-06-2016 2:58:2712-06-2016 2:58:27WorkflowCompleted
 

Couple of questions I have:

1. Not sure what is this Title Start probably workflow launcher starting the workflow, but it shows the initiator as admin.

2. At the same time, my workflow process step also shows the initiator as admin.

3. Due to initiator of workflow as admin, when I logged in as sso user, I am not seeing the instances for this workflow and also in archive for the sso user. Only when logged in as admin, I see the workflow instances and in archive once workflow is completed.

Instead of activating a page and workflow launcher triggering the workflow, I manually started the workflow process by providing the payload of the page and then it shows correctly, the workflow process started with initiator as sso user.

workflow instance history

                             
StatusTitleInitiatorStart TimeEnd TimeActionComment
CompletedStartSSOUser112-06-2016 2:56:2412-06-2016 2:58:27WorkflowCompleted 
CompletedprocessMyCustomStepadmin12-06-2016 2:56:2412-06-2016 2:58:27WorkflowCompleted

 This time since the initiator is SSOUser1, I see the workflow instances populated when logged in as sso user(SSOUser1). I also see the workflow instance in the archive once completed.

Even though I am activating the page with sso user in the first case, not sure why it shows the initiator of the workflow as admin instead of sso user. Any suggestions for the sso user to be able to see the workflow instances after activating the page when logged in as sso user. Its triggering the workflow but with initiator as admin instead of sso user. Any inputs will be highly appreciated.

Thanks.

2 Replies

Avatar

Level 9

Hi,

It seems you custom workflow process has used admin session to complete & execute the process. First thing you should do is check the code.

Regards,

Jitendra

Avatar

Level 4

Jitendra S.Tomar wrote...

Hi,

It seems you custom workflow process has used admin session to complete & execute the process. First thing you should do is check the code.

Regards,

Jitendra

 

Thanks Jithendra for your response. 

Inside our workflow process step, we were using the getAdministrativeResourceResolver to do the replication of related pages.

Now modified using the sling service user mapper to do the replication inside my workflow process for related pages. I have created the system user myprocesswrite and using that user for replication.

But after changing to that system user also, still the initiator is showing as admin.

According to adobe documentation for sling service mapper, user has to be  

  • jcr:primaryType="rep:SystemUser"
  • jcr:uuid="<some value>"
  • rep:principalName="<some value>"
  • rep:authorizableId="<some value>

 

How do others solve this issue? Do the SSO Users extend the system users? How can I see the initiator as SSO user? Do I need to use the workflow session to call the osgi service which replicates the related pages?

 

Please suggest if you have any other pointers.