Expand my Community achievements bar.

SOLVED

Problem on subjecting custom workflow to multiple pages at the same time

Avatar

Level 4

We are using AEM 6.5.10.

We are subjecting a custom workflow to couple of pages parallelly using create -> workflow option available at sites.html. And we are supplying the HTML content via FTP path to another application. The content authored is different on both the pages while we subject the workflow (page1 has Text component & page2 has image component).

After the workflow is complete, when we check the content in the FTP path both the pages are rendering same content (i.e., both the pages in FTP are rendering me the content from Text component only which is wrong).

When we subject the same workflow to a single page, we are able to get the correct content in the FTP path.

The problem primarily occurs while we are subjecting the workflow for multiple pages only.

 

Is it right option to subject same workflow parallelly for multiple pages.

How do I resolve this problem.

Kindly help me out.

 

Thanks in advance !

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

You can run the same workflow model  in parallel on multiple pages, this is not a problem. I would rather think that the problem is somewhere in your code (maybe making implicit assumptions about the payload?)

View solution in original post

4 Replies

Avatar

Employee Advisor

I know I am dealing with totally different workflow model here but just to validate the approach I have executed Request for activation on two pages parallelly and both were published without having any issue.

So, no issue with parallel execution. Tested on AEM 6.5.12.

 

Could you please execute your custom workflow on 3 or 4 pages parallelly and validate whether 2nd, 3rd and 4th pages are rendering similar content as 1st page. If yes, please check your workflow process step whether you are using any list and also check each list item is referring individual payload[page] correctly or not while supplying HTML content.

 

Also I am considering one more point separate threads are supplying HTML content of multiple pages.

Avatar

Correct answer by
Employee Advisor

You can run the same workflow model  in parallel on multiple pages, this is not a problem. I would rather think that the problem is somewhere in your code (maybe making implicit assumptions about the payload?)

Avatar

Level 4

There was an illegalStateException which was coming up while subjecting workflow on couple of pages parallelly. After the removal of resourceresolver.close() the exception was not coming up.

But still the same content problem did exist.

From the error logs, even during the workflow subject of a single page we could see execute method called twice.

  • Whether this could be the issue for same content coming up in multiple pages ?
  • What could be the root cause of the problem ?

Kindly share your thoughts.

Thanks !

Avatar

Employee Advisor

We would like take a look into the workflow model and custom workflow step logic. It will help us to debug the issue.