Workflows enable you to automate Experience Manager activities. Workflows consist of a series of steps that are executed in a specific order. Each step performs a distinct activity such as activating a page or sending an email message. Workflows can interact with assets in the repository, user accounts, and Experience Manager services. Therefore, workflows can coordinate complicated activities that involve any aspect of Experience Manager
Many useful workflow models are provided with Experience Manager. In addition, any number of custom workflow models, tailored to the specific needs of your project, can be defined using the Workflow console.
Read moreNote: For more on Workflow watch this video
Workflows enable you to automate Experience Manager activities. Workflows consist of a series of steps that are executed in a specific order. Each step performs a distinct activity such as activating a page or sending an email message. Workflows can interact with assets in the repository, user accounts, and Experience Manager services. Therefore, workflows can coordinate complicated activities that involve any aspect of Experience Manager
The Workflow console is the centralized location for workflow management in AEM. It can be accessed via the Workflows link on the AEM Welcome page (Classic UI), and the Tools section of the touch-optimized UI.
To define a process step as an OSGI service component.
The Dynamic Participant Step component is similar to Participant Step except the participant is selected automatically at run time.
To define a dynamic participate step as an OSGI service component.
Workflow models consist of a series of steps of various types which can be extended with scripts to provide the functionality and control you require.
AEM has some inbuilt workflow. Example
If you want the feature to propagate metadata changes to select renditions of the asset, add the name of the renditions to the XMP Writeback Process workflow step of DAM Metadata WriteBack workflow. By default, this step is configured with the original rendition. more
Other than this AEM has inbuilt workflow - Download Asset, Dam parse word document, etc
PARTICIPANT STEP - A participant step enables you to assign ownership for a particular action. The workflow will only proceed when the user has manually acknowledged the step. This is used when you want someone to take an action on the workflow; for example, a review step. more
DIALOG PARTICIPANT STEP - Use a Dialog Participant Step to collect information from the user who is assigned the work item. This step is useful for collecting small amounts of data that is used later in the workflow. Upon completing the step, the Complete Work Item dialog contains the fields that you define in your dialog. The data that is collected in the fields is stored in nodes of the workflow payload. Subsequent workflow steps can then read the value from the repository. more
We have two built-in workflow groups.
workflow-users - A user participating in a workflow must be member of group workflow-users. This gives him or her full access to: /etc/workflow/instances so that he or she can update the workflow instance.
Procedure to trigger a workflow programmatically.
We can pass values between two workflow steps in workitem
Here is the full code of First workflow step
Here is the full code of Second workflow step
The com.day.cq.workflow.exec.WorkflowProcess interface
We need to override only execute method. It returns void
The com.day.cq.workflow.exec.ParticipantStepChooser interface
We need to override only getParticipant method. It returns String.
In the content page within the workflow step.
The content that the workflow user enters will be stored as part of the page.