AEMaaCS - http request to publisher from author - workflows | Community
Skip to main content
Level 9
June 18, 2024
Solved

AEMaaCS - http request to publisher from author - workflows

  • June 18, 2024
  • 3 replies
  • 1313 views

Hi,

There’s a workflow that executes on author but page is on publisher and the workflow hand off occurs via AEM forms from publisher to author for some PUT requests with error handling.

 

With an error at any step of the workflow on author , how do I send the notification to publisher from author, to display to the user ? 


want to ensure I cautiously pass data between instances I believe sling event can help but not sure I should over engineer it 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by rk_pandian

Hi @nitrohazedev,

 

My thoughts on this one: Workflows may not be the correct option when dealing with user submit actions and showing them appropriate error messages based on the REST flow, because for some reason if the workflow gets queued, then showing real time responses to the user might be delayed. Since you said you cannot invoke servlets via JS, have you thought of using custom submit action for the form? From what I see, it is possible to write a custom action with a JSP file by which you can call your servlet and handle the error as well.

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/forms/customize-aem-forms/custom-submit-action-form#workflow-for-a-submit-action

 

Let me know if this helps!

 

Thanks!

3 replies

EstebanBustamante
Community Advisor and Adobe Champion
Community Advisor and Adobe Champion
June 18, 2024

Hi, 

I think it is important to clarify that the type of "users" you deal with in the Author instance are "Content authors," and the type of "users" you deal with in a Publisher instance are "final users" or users who utilize your application (website). In most cases, these roles won't necessarily overlap, and you probably wouldn't want to notify a final user about something stuck in an authoring process.

However, to answer your question, the way you could communicate this is via content updates on the publish instance. You can then listen for the type of content being added/removed on the publish instance and act accordingly.

Please check these threads: https://cqdump.joerghoh.de/2022/02/03/the-deprecation-of-sling-resource-events/ 

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/resourcechangelistener-for-page-moves-will-the-listener-receive/m-p/545225 

 

Hope this helps

Esteban Bustamante
Level 9
June 18, 2024

Hi @estebanbustamante  , long story short .. I am trying to get about an issue with forms submitting to multiple end points and more. Workflows is an option 

 

end users submit form on pub - workflow on author gets invoked and end point requests are made and data is updated.  At this point there could have been failures that I would handle as part of workflows but wondering if we could display the success or error  it to end user on publisher

unfortunately JS cannot be used to invoke FDM ATM.

i am not a fan of sending it over from author to pub since I am dealing with workflows but trying to hear everyone’s thoughts here 

Level 9
June 18, 2024

@estebanbustamante  Other than replicate , are there other stable and less invasive approaches perhaps OOTB or other means to send this over to display to the user without persist or other means (minus replication) ? 

rk_pandian
rk_pandianAccepted solution
Level 4
June 20, 2024

Hi @nitrohazedev,

 

My thoughts on this one: Workflows may not be the correct option when dealing with user submit actions and showing them appropriate error messages based on the REST flow, because for some reason if the workflow gets queued, then showing real time responses to the user might be delayed. Since you said you cannot invoke servlets via JS, have you thought of using custom submit action for the form? From what I see, it is possible to write a custom action with a JSP file by which you can call your servlet and handle the error as well.

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/forms/customize-aem-forms/custom-submit-action-form#workflow-for-a-submit-action

 

Let me know if this helps!

 

Thanks!

kautuk_sahni
Community Manager
Community Manager
June 25, 2024

@nitrohazedev Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!  

Kautuk Sahni