Skip to content

Posts tagged ‘Adobe’


Adobe AEM (CQ) 5.6.1: Cutting Down on Dispatcher Flush Agents

Having multiple domains / virtual hosts on an Adobe AEM Dispatcher with an AEM Publish instance would require a multitude of Dispatcher Flush agents but you can cut them down to one per Dispatcher / Apache Server. This can be done but there is a pitfall to be handled. Read more »


Adobe AEM 5.6.1: Changes to the Impersonation

In the past few days I had to investigate on how to manage impersonation and it turns out that behind the scenes a lot has changed since 5.5 and I am not 100% sure what and why. Here is a rundown on the changes I experienced and on how to manage the impersonation programmatically using CURL. Read more »


CQ 5.5 and Link Rewriter Failures

In CQ 5.5 one can rewrite links by extending a RequestRewriter interface inside an OSGi service. This way links can be dynamically adjusted to external views or can be adjusted to internal conditions. In my current project we use this extensively and for most parts it works fine. That said for a few pages that did not work at all exposing internal structures to the client. It took me a while to discover the cause but fixing as quite simple. Read more »


CQ Workflow Presentation

On Wednesday, April 17th I gave a Presentation about Workflows to the OC CQ User Group which ran for about 2 hours.

So here are the Slides as PDF file, 16MB. Before you look at them I want to point a few things out:

As a Developer I need to figure out how to make things work and so most of my time is spent on figuring out how to deal with problems, bugs or other shortcomings of a Framework. Therefore problems are more important and I focus on way more that on the things that work without a problem. On the other hand I want to give my audience as much help as I can to deal with problems they might have or they might run into in the future. So don’t take my long list of bugs, traps and pitfalls as an indication that CQ Workflow is too buggy and unreliable.
In addition keep in mind that Workflows has two major parts. The coding which I covered a lot but also the business component which defines what to do in the Workflow, by whom and in what order. Because this is an iterative process it makes developing Workflows more difficult because changes might require a redesign of the Workflow.
All in all CQ Workflows need a strong commitment by the developers as well as by the stakeholders because they will take time to get it right and to make it acceptable for the enduser. That said I think CQ Workflows can do amazing things and be a big time saver (especially in crunch time) if setup right.

Have fun – Andy Schaefer

BTW: The session was tapped and so I think it will be posted on the User Group page soon.


CQ Workflow Tutorial: Export Workflow Models Quickly

Update (5/17/2013):

There is a bug in the script when there are more than 10 files. This part will fix it:

# Do not change any of these
for f in $FILES
    echo File Name: $f
    NTEMP=`echo ${FILE##*-}|cut -d . -f1`
    echo NTEMP: $NTEMP
    if [ "$NTEMP" -gt "$INDEX" ];

So far I did not discuss how to manage the project even though if you look at the final project files I posted at the end of the Post you will see that it contains the Workflow Models as well.
In General I always keep the Workflow Models in my VCS (often my personal GIT as well as the Client’s VCS) just to make sure I have a track record of all the changes and can see how it evolves over time but also to have a way to easily undo a problematic current version. Because Workflow Models can only be edited inside the CQ Workflow Model Editor we need to find a way to export them quickly, easily and fast otherwise we might loose changes. That said I never to export the workflows directly into the VCS but rather export them into a temporary folder and then use a DIFF tool like Delta Walker for the Mac to move them over even if I just copy them without ever merging. Read more »


CQ Workflow Tutorial: Workflow Step Dialogs

Attention: This article is written in Markdown and so I will look different. This is a test and if the deminished look is too bad then I will convert it back to Blogtext.

In the last Article of this Tutorial we were looking into how to create our own Workflow Process but then we used the Process Step inside the Workflow Model to execute it in our Workflow. As the other Workflow Steps inside the Sidekick:

Workflow Model's Sidekick

it would be nice and cool if we could make our Workflow Process appear as Step inside the Sidekick and with it to have our own dialog where the arguments are nicely presented. Digging around inside the CQ’s /libs folder I eventually found the out-of-the-box Workflow Steps and after some trial-and-error I figured out how to make it work. The only tricky part is to make sure that the absolute link to the process arguments is correct otherwise the arguments will not appear.

Read more »


CQ Workflow Tutorial: Extending CQ Workflows with Workflow Porcess

There are a few useful Workflow Steps available that enables you create nice Workflow Models. That said many features are not provided or are implemented badly. This is a list of features that are missing out of the box:

  • Logging of the Payload, Meta Data etc
  • Replication using a Particular Replication Agent
  • Sending Email Notifications using a Particular Template
  • Conditional Jumps
  • etc

When building a CQ Workflow Models you are adding / configuring Steps which you select on the Sidekick:

Process Step Select Step In Sidekick

Read more »


CQ Workflow Tutorial

Last weekend I started to write down some articles about CQ’s Workflows. Initially I thought this will be composed of a few articles and that’s it. But then I remembered what I learned about Workflows since last year and even today I am still learning how CQ Workflow works and how to tweak them to make them do what I want / need them to do.

As of now I am thinking that I need to move these articles into a series of pages so that it will remain intact and in order of the Tutorial. This way it will be easier for readers to follow.

So what do I plan to add to the tutorial? This is a short list of what I plan to do in the future but I am pretty sure there will be more:

  • Workflow Process and how to add custom functionality
  • Workflow Step Dialogs to make Workflow Processes easier to use
  • Dialog Participant Step Revision 3: how to use the selected data
  • Making Workflows more Transparent with Logging
  • (Conditional) Jumps inside a Workflow
  • Workflow Vows and how to Handle Them
  • Workflow Process / OSGi Service Configuration with Rumodes
  • Where did my Comments Go?

There is way more but I am not sure how many readers will actually use them so we will see.

Cheers – Andy


CQ Workflow Tutorial: Selection Dialog Revision 2

In this article we revisit the previously discussed Dialog Selection problem. In my opinion the Dialog is easier to deal with from a code editor than from within CQ Dialog Editor or CRXDE Light. When I am working on Workflows the only piece I edit in CQ are the Models. Everything else I code by hand based on examples. For that purpose I have the libs folder extracted from the **cq-content-<version>.zip (CQ Package).

Creating a Dialog

Based on the previous project CQ Workflow Tutorial Basic Project Setup we are going to add the Dialog, create a new version of the Selection Data Provider and adjust our Basic Workflow. Finally we are going to install it in CQ.

In case you did not through the previous article or in case it is messed up go back to that article and download the solution.

First we need to decide where to place the dialog component. I am not sure if that is the best place but I always but my dialogs in the /apps/<project>/components/workflow/dialog folder within the View module.

  1. Create this folder in the View module: /src/main/content/jcr_root/apps/cq-workflow-tutorial-basic/components/workflow/dialog.

CQ Workflow Tutorial Basic Dialog Folder Structure

Read more »


CQ5 Workflows: Selection Dialog

Since a few years I am working with Adobe CQ (formerly Day CQ) doing mostly backend software like ETC Mapping, Link Rewriting, Dispatcher Cache handling, OSGi Services and mostly Workflows. About 1 1/2 years ago I did not know how the Workflows worked in CQ and now I am even adding additional functionality like a Dialog and Dynamic Participant Step.

Here I want to talk about how to provide a drop down box selection in a Workflow Dialog Participant Step. In order to make that work we need three parts:

  1. Servlet / JSP that provides an JSon Array with ‘text’ / ‘value’ pair
  2. Dialog Definition that contains the Drop Down Box
  3. Dialog Participant Step using the Dialog Definition

Attention: There is a bug in the display of an embedded Dialog where the labels of the dialog are ignored. This is pretty annoying but the Workflow designer can add a hint into the title to make it clear what the fields are.

This is how the dialog will look like inside the Workflow Inbox:

CQ5 Workflow Dialog Selection Dynamic

Read more »