내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

AEM 6.3 Override default request activation worflow

Avatar

이전 커뮤니티 멤버

Hi,

I created a custom workflow for the request activation of a page. It's equals at the default workflow, but before activate the page, I added a custom step.

My question is what's the correct way to call my workflow instead of that default.

The solution I thinked and I'm implementing is to override "/libs/wcm/core/content/sites/publishpagewizard" (that is the button "Publish page" in the sidekick in a page), recreating the wizard under "/apps/wcm/core/content/sites/publishpagewizard" and rebuilding the same xml structure, changing only the following properties on the node "/jcr:content/body/items/form/items/wizard/items/publishstep/items/fixedColumns/items/fixedColumn1/items/references": requestActivationWorkflow and scheduleActivationWorkflow. In this way it seems to work and it calls my workflow. But it's correct? The reason of my doubts is because in this way I'm forced to replicate the entire structure of these wizard (publishpagewizard but consequently also the managepublicationwizard, that is the other way to publish now or later a page through the relative button in sites.html), so if with an instance update or an hotfix the structure has changes, it could create me problems.

The other related question is how to trigger the direct activation? Because I need for that custom step I added in my workflows also in the direct activation, that for default calls the servlet "/bin/replicate.json". Otherwise I could change the replicationUrl (an other property under that wizard node), call a custom servlet that does that custom step and then calls the default servlet.

Thank you in advance, Daniel

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Administrator

This would need a custom implementation. I would look at using workflows as part of this solution.

Write code that iterates through pages using JCR API or QueryBuilder API. Then when you find a page that meets your criteria, invoke a workflow (that activates the page) using an API.

You can invoke workflows programmatically. See: http://scottsdigitalcommunity.blogspot.ca/2013/09/creating-workflows-for-adobe-experience.html

You may need to write a custom workflow step as well to perform time operations (if you want to wait 30 mins for example)\. However, AEM is very flexible in letting you write custom workflow steps. TO learn how to write a custom workflow step that implements,

WorkflowProcess see:

https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

More reference:- http://wemcode.wemblog.com/get_asset_reference_in_page



Kautuk Sahni

원본 게시물의 솔루션 보기

1 답변 개

Avatar

정확한 답변 작성자:
Administrator

This would need a custom implementation. I would look at using workflows as part of this solution.

Write code that iterates through pages using JCR API or QueryBuilder API. Then when you find a page that meets your criteria, invoke a workflow (that activates the page) using an API.

You can invoke workflows programmatically. See: http://scottsdigitalcommunity.blogspot.ca/2013/09/creating-workflows-for-adobe-experience.html

You may need to write a custom workflow step as well to perform time operations (if you want to wait 30 mins for example)\. However, AEM is very flexible in letting you write custom workflow steps. TO learn how to write a custom workflow step that implements,

WorkflowProcess see:

https://helpx.adobe.com/experience-manager/using/creating-custom-aem-workflow-steps.html

More reference:- http://wemcode.wemblog.com/get_asset_reference_in_page



Kautuk Sahni