Skip to main content


Showing posts from September, 2019

Workflows in AEM 03 - Dynamic Participant Step

A participant is a step which enables a user to assign ownership of a task to another user. The workflow will only go further if that user manually acknowledges the step. A simple use case of this workflow is a review step, i.e. if you have made some changes in an AEM page and then you want someone to review it then you can add it to the participant step and that user will get a notification in his/her inbox. Obviously, the reviewer should have access to the page in question. Dynamic Participant Step is similar to the Participant Step with the exception that the user is selected at run time. There might be a use case where you want an item to be assigned to a user who has the lowest number of items to review. The business logic of a Dynamic Participant Step can be written in a class that implements the  Participant Chooser interface. Following is a code example that selects the participant from either "admin" or a user from the "administrators" group based

Workflows in AEM 02 - Process Step

Hi everyone, it's been a long time since I wrote the first part of this blog. In the previous part, we discussed the fundamentals of workflows, their types and applications. Today, we are going to discuss the most widely used Workflow step - the process step. This is generally used when we want our application to execute a certain logic. It executes an ECMA script or an OSGi service to perform automatic processing. A process can be implemented using the following steps - Create an OSGi service implementing the interface com.adobe.granite.workflow.exec.WorkflowProcess . Set the property process.label . This is the String value by which our workflow needs to be listed. Implement the execute(WorkItem, WorkflowSession, MetaDataMap) method with the implementation code. The execute() method has three parameters - WorkItem - It is the unit that is passed through a Workflow instance of a WorkflowModel. It contains the WorkflowData. The instances act on and a reference t

Workflows in AEM 01 - Introduction

Introduction A workflow is a way to automate AEM activities by executing some steps in a specific order to achieve the desired results. Each step performs an individual activity such as publishing a page, creating a version of the page, sending an email message etc. For example, the most common activity in AEM is publishing the page from the author instance to the publish instance. But sometimes we want the approval of the changes by some reviewers before publishing. This can be easily achieved by implementing workflows in AEM. There are many workflows provided out of the box in AEM. Apart from those, if we want, we can also define our custom workflows for our specific activities. Workflow console The workflow console is the centralized location for workflow management in AEM. There are five tabs in this console - Models: Lists the workflow models that are currently available. We can also create, edit and delete a new workflow here. Instances: This tab shows the deta