Custom Workflow to publish Content Fragments | Community
Skip to main content
New Member
September 2, 2025
Question

Custom Workflow to publish Content Fragments

  • September 2, 2025
  • 4 replies
  • 795 views

Hello,

We're on a AEMaaCS and have a requirement to create a custom workflow to publish Content Fragments with below use cases.

 

1.When an author makes a change, they can send the fragment for Review and Activate to a reviewer

Then approver reviews the content and accepts to activate - this then publishes the fragment

 

2.When an author wants to deactivate a fragments 

Then approver receives the content and de activation request and accepts to deactivate - this then unpublishes and deactivates the fragment

 

3.When an author makes a change, they can send the fragment for Review and Activate for a specific time

Then approver reviews the content and accepts to activate at the requested time - this then publishes the fragment at the specific time

 

4.When an author wants to deactivate a fragment at a specific time

Then approver receives the content and de activation request and accepts to deactivate - this then unpublishes and deactivates the fragment at the requested time

 

I have created a custom workflow, but I don't see an option to initiate a workflow from Content Fragment Editor. Has anyone experience this in AEMaaCS? Can we create custom workflow for content fragment in AEMaaCS?


Thankyou.

4 replies

giuseppebaglio
Level 10
September 5, 2025

hi @radhaga2

You can launch workflows for XF, but be careful to select the XF itself rather than the folder that contains it. As shown in my screenshot, I have the option to launch a workflow specifically for an XF with the Create button.

 

RadhaGa2Author
New Member
September 9, 2025

Hey @giuseppebaglio ,
Thank you for your response.

My use case is particularly around "Content Fragments" only and not experience fragment. 

Regards,

Radha

HrishikeshKagne
Community Advisor
Community Advisor
September 8, 2025

Hi @radhaga2 ,

You cannot start a workflow directly from the Content Fragment Editor in AEMaaCS.

You can start a workflow for a Content Fragment, but you have to do it from the Assets console → Timeline → Start Workflow.

Your custom workflow can include steps like review, approve, publish, or unpublish.

If you need to schedule publish or unpublish at a specific time, use the built-in Manage Publication feature instead of custom code.

Yes, custom workflows for CFs are possible, but you start them from the Assets Timeline, not from the editor.

Hrishikesh Kagane
RadhaGa2Author
New Member
September 9, 2025

Hi @hrishikeshkagne ,

I found this article to launch custom Workflow from Content Fragment new editor:
Launching Workflows from the AEM Content Fragment Editor with UI Extensibility




kautuk_sahni
Community Manager
Community Manager
September 12, 2025

@radhaga2 Quick follow-up! Were you able to get this issue sorted out? If you did, please consider posting the solution you used so others can learn from it. And if any of the replies above were helpful—whether they fully solved your problem or just pointed you toward the right fix—marking one as accepted helps future community members find solutions more easily. Closing the loop here makes a real difference for everyone.

Kautuk Sahni
Syed_Shaik
Level 3
October 8, 2025

Hi @radhaga2 

Pls post your queries on  Qusn Tab.

===========================================

Option 1: Start Workflows via the Workflow Console

Authors can still:

  1. Go to Tools → Workflow → Instances → Start Workflow

  2. Select your custom workflow model .

  3. Select the Content Fragment path(s) to include in the workflow.

✅ Works perfectly in AEMaaCS.


Option 2: Trigger Workflow via Custom Console Action

You can build a custom UI extension (using the AEM Cloud UI Extension Framework) to add a “Submit for Review” or “Schedule Publish” button to the CF console.

  • This button triggers your custom workflow programmatically via the AEM Workflow API.

  • You can use the AEM as a Cloud Service SPA Editor SDK or AEM UI Extension SDK for this.

✅ This gives you the same behavior as “Start Workflow” from the CF Editor.


Option 3: Handle Scheduled Publish/Unpublish via Workflow Process Step

For scheduled publish/unpublish (your use cases 3 & 4):

  • Inside your workflow, use a Custom Process Step that:

    • Reads the requested datetime from metadata (entered by author).

    • Uses the Replication API or AEM Scheduler Job to activate/deactivate the CF at that specific time.

Example (Java Process Step snippet):

 

 
replication.replicate(session, ReplicationActionType.ACTIVATE, path);
 

For scheduling:

  • Store the datetime as a workflow payload variable.

  • Use a Sling Job or Workflow Timeout step to delay the action until the desired time.


Option 4: Use Launchers (if needed)

If you want workflows to start automatically when CFs are modified (e.g., upon saving):

  • Configure a Workflow Launcher under:

     
    /conf/global/settings/workflow/launcher/config
  • Trigger it for changes under /content/dam/.../contentfragments

Thanks,

Syed Shaik.