January 2, 2021
Estimated Post Reading Time ~

The Power of Transient Workflow in AEM

When a workflow executes in Adobe Experience Manager (AEM), it stores workflow runtime information in the JCR repository under the instance node. This feature is useful when auditing is required on each step of the workflow status. The downside of this feature is the growth of the repository size, as a large repository can eventually inhibit performance and cause disk space loss issues.

AEM provides out-of-the-box (OOTB) Adobe Granite Workflow Purge to clear nodes under the instance node. This workflow purge activity needs to be scheduled on periodic basis. The workflow purge schedule task runs takes quite a long time, which leads to timeout where not all archived workflow is purged.

Here’s where transient workflow comes into play. What exactly does Transient Workflow work? It doesn’t save any of the runtime information relating to the workflow (whereas the payload related information and processing logic that creates assets are persisted to JCR).

So what is the benefit of this transient workflow? We do not need to worry about repository growth, as it contributes to a lower number of TarMK files and faster offline compaction. Transient workflows do not create child nodes under an instance node. When Adobe Granite Workflow Purge scheduled task runs, it has fewer archived workflows to purge, so it won’t timeout.

Here’s a simple demonstration of the transient workflow feature within Adobe Digital Asset Management (DAM) Update Asset Workflow.

Before making DAM Update Asset Workflow transient:



Upload a PDF asset to the DAM folder. After completion of the workflow, inspect the workflow console archive tab – you will see the workflow instance. Open the history of the completed workflow instance to see all persisted workflow steps.



Now verify the same CRXDE. Under /etc/workflow/instance you will see the instance.



Next, make the same DAM Update Asset Workflow a transient workflow, and then look at the results:



Now upload a PDF asset to the DAM folder. After completion of the workflow, inspect the workflow console archive tab. You will not see the instance of the workflow because the transient workflow won’t be saved under the /etc/workflow/instances node.



Note: There are use cases that require one workflow to be non-transient and other workflow to be transient. You can implement not only the OOTB workflow as transient, you can make your custom workflow be the transient workflow as well.


By aem4beginner

No comments:

Post a Comment

If you have any doubts or questions, please let us know.