Expand my Community achievements bar.

Get topics payload in postprocessing workflow during incremental publishing

Avatar

Level 3

While doing incremental site publishing, a user can select topics which needs to be updated incrementally during AEM Site Generation. 

I have a custom post processing workflow which gets triggered once the execution of aem sites completes.

In the custom workflow I need the list of topics which user selected during incremental site generation. Currently I don't see that getting passed to the metadata of the post processing workflow.

Is there any way I can retrieve that topics information programmatically in post processing workflow.

@DivrajSingh 

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

5 Replies

Avatar

Employee

@ravir73578276 : I assume you are aware of the post generation workflow (check this documentationwith which you can access the metadata of the publishing job in the java process you implement.

Within the java process you also get the handle to the workflow metadata node (check details in Installation & Configuration Guide), and with that you can then access the metadata property "payloadJson" (see [1]) which has the list of topics which were selected while publishing (using re-generate option). 

NOTE: payloadJson is only available when you use the partial(re-generate) publishing .

 

I hope this answers your query.

 

[1]: "payloadJson" metadata of workflow contains the list of topics publishing when using re-generate option

DivrajSingh_0-1701320520148.png

 

Avatar

Level 3

Hy @DivrajSingh  ,

Thanks for the valuable inputs, but this payloadJson is available on the metadata property of publishDitamapWorkflow instance. In my custom post processing workflow I don't see this payloadJson coming. From my custom post processing workflow how can I identify the publishDitamap Workflow Instance ?

Avatar

Employee

@ravir73578276 : in the post generation workflow I assume you are accessing the workflowData object of workItem available in post generation workflow. Please refer this post where an example code snippet is share for accessing workflowData object properties.

If above does not solve it, you may have to share your code snippet for clarity on why "payloadJson" is not accessible in your custom code.

Avatar

Administrator

@ravir73578276 Did you find the suggestions from users helpful? Please let us know if more information is required. Otherwise, please mark the answer as correct for posterity. If you have found out solution yourself, please share it with the community.



Kautuk Sahni