Monday, January 23, 2012

Building Workflows in Adobe CQ5

While developing websites and web apps is never an easy proposition, some parts of the process are getting easier to develop and fulfill the promise of next generation development platforms that trumpet easier application development. I have always been dubious about those claims and Adobe CQ5 defiantly offers up some challenges to even the most seasoned developers, however, one thing I found really easy was building basic, but highly relevant and useful workflows.
Log into the CQ5 server as a user authorized to create and edit workflows, click on the workflows link in the white box. From the models tab, click on ‘new’ and give your new workflow a name. A new window will pop up with the workflow editor. It looks like this.

The next step is to define a participant step which represents the content editor who is starting the workflow after editing or creating content. This first step is a Workflow Initiator Participant Chooser and looks like this.

These are the properties of the workflow initiator you just created.

Once you have created a workflow initiator you could have the workflow go directly to an approver or you could define a more complex approval process, while keeping it simple to implement. For example, let’s say that your content editor needs to have his or her work approved by their manager, the legal department and the marketing department. All we need to do to facilitate this is drag an ‘And Split’ from the Workflow menu onto the canvas. Double click the And Split and select 3 branches and click OK to accommodate all of our approvers.

Now add the approvers to the 3 new slots on the canvas. Those approvers are represented as ‘Participant Steps’. For each Participant step you will need to define a user or group of users to conduct the action required. Each user or group of users identified for a workflow step will receive an email notice when action is required, if the ‘Notify user by email’ checkbox is selected.

As seen above, I have set a 24 hour timeout and the Send Email as the Timeout Handler. There dozens of other stock handlers as well as having one of your developers script something custom, but that wouldn’t be so easy a manager could do it.

Now that we have added a couple of parallel approvers, who incidentally could also be organized in a sequential structure, but I figured that was obvious and didn’t show off as much of CQ5’s workflow capability. This is what our workflow looks like after adding the approvers.

Some organizations will add another approver at the end of the And Split, but for simplicity sake, let’s start wrapping this thing up. First we will version our content modification and then publish it. CQ5’s workflows come with versioning and publishing steps as built in functionality.

From the ‘WCM Workflow’ menu in Sidekick I added a ‘Create Version’ step and an ‘Activate Page’ step to complete the workflow. Don’t forget to save your work by clicking save in the upper left corner of the workflow editor. Now let’s have a quick look at how to use this workflow and what the notifications look like.
The content editor is done making their changes; they now need to go to the workflow tab Sidekick in which looks like the image below (left) and select a workflow and click the Start Workflow button. For workflow approvers, Sidekick will look like the image below (right) if they are in the workflow tab. The options available are to Complete (approve), Step Back (reject) or delegate the workflow approval to another user.

Workflow approvers get to the page they are trying to review by going to the CQ5 inbox which is accessible from the main page once a user logs in to CQ5. The inbox looks like your standard email inbox. A double click on the row will launch the page to be reviewed.

There it is a workflow you could create in less time than it took me to type this blog post.

As always feel free to contact me if you have any questions.

No comments:

Post a Comment