Workflows in AEM
Definition : a workflow is a sequence of steps or tasks that
automate and streamline content-centric processes. Workflows in AEM are used to
define and manage the lifecycle of content, such as content creation, review,
approval, publishing, and archival. Workflows provide a structured and
automated approach to content processing, ensuring consistent and efficient
execution of business processes.
Workflows can access assets (e.g. images, videos,
documents), content pages, services, and resources in the AEM JCR repository.
This makes workflows a perfect choice to perform complex tasks which involve
interaction between different users and resources. AEM has a very strong
framework to build and extend these workflows. This allows developers to
quickly develop workflows specific to project requirements.
To access workflow console, click on Tools and then click on
Workflow, as shown in below picture.
Within the Workflow console, there are several tabs:
- Models
- Lists the workflow models currently available. Here you can
create, edit or delete workflow models.
- Instances
- Shows you details of workflow instances which are currently
active. These instances are also version dependent.
- Archive
- Enables you to access details of workflow instances which have
terminated, for whatever reason.
- Launcher
- Allows you to define a workflow to be launched if a specific
node has been updated.
- Failures
- Enables you to monitor and manage failed worklow instances.
What is a Workflow Model?
- A
workflow model is a skeleton or a blueprint of the workflow consisting of
sequential steps.
- Process
steps are defined either by a Java class or an ECMAScript.
- For
the Java class processes, the fully qualified class name is provided.
- For
the ECMAScript processes, the path to the script is provided.
- Every
model has a start and end step.
- To
initiate a workflow from the model, we need to select a payload which
could be an asset or page which gets passed to each step as a string that
is either a JCR path or a JCR identifier (UUID).
- Individual
process steps that do act on the payload will usually expect a payload of
a certain type, or act differently depending on the payload type.
What is a Workflow Process/Step?
A workflow step component defines the appearance and
behavior of the step when creating workflow models:
1.
The category and step name in the workflow
sidekick
2.
The appearance of the step in the workflow
models
3.
The edit dialog for configuring component
properties
4.
The service or script that is executed at
runtime
As with all components, workflow step components inherit
from the component that is specified for the sling:resourceSuperTypeproperty.
The following diagram shows the hierarchy of cq:componentnodes that form the
basis of all workflow step components. The diagram also includes the Process
Step, Participant Step, and Dynamic Participant Step components, as these are
the most common (and basic) starting points for developing custom step
components.
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.
- PROCESS STEP - It executes an ECMA script or calls an OSGi service to perform automatic processing.
Process
The process implementation to execute. Use the drop-down menu to select the ECMA script or OSGi service that are available
Handler Advance
Select this option to automatically advance the workflow to the next step after execution. If no selected, the implementation script must handle workflow advancement.
Arguments
Arguments to be passed to the process. - PARTICIPANT
STEP - It 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.
User/group
A drop down selection box will allow you to navigate and select a user or
group.
Email
You can notify participant(s) by sending them an email when the workflow
reaches the step.
If set to On, an email will be sent to the user defined by the property User/Group
or to each member of the group if a group is defined.
- CONTAINER
STEP - A container step starts another workflow model that
executes as a child workflow.
Sub Workflow
Select the workflow to start. more
- OR
SPLIT - It creates a split in the workflow, whereby only one
branch is active. This allows you to introduce conditional processing
paths into our workflow. more
- AND
SPLIT - An AND Split creates a split in the workflow; both
branches will be active. This component enables you to introduce multiple
processing paths into the workflow. For example you can allow certain
review steps to occur in parallel, saving time. more
- GOTO
STEP - The Goto step specifies the next step in the workflow
model to execute, depending on the result of an ECMA script. more
No comments:
Post a Comment