Skip to content

Posts tagged ‘CQ’

23
Jun

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 »

11
Jun

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 »

22
Jul

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 »

18
Apr

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.

15
Apr

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
INDEX=1
FILES=$TARGET_DIR/$PACKAGE_NAME-*.zip
for f in $FILES
do
    echo File Name: $f
    FILE=$f
    NTEMP=`echo ${FILE##*-}|cut -d . -f1`
    echo NTEMP: $NTEMP
    if [ "$NTEMP" -gt "$INDEX" ];
    then
         INDEX=$NTEMP
    fi
done;

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 »

30
Mar

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 »

17
Mar

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 »

16
Mar

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

10
Mar

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 »

9
Mar

CQ Workflow Tutorial: Basic Project Setup

As already mentioned in the previous article developing CQ Workflows is not easy due to many parts that need to play together and because most of the action is happening behind the scene. Therefore it will be time-consuming and frustrating from time to time. There are a few things that I learned over the past year and a half that will make your life easier. One of the most important tips to consider is to clamped down on the number of moving parts and to be able to review and undo changes if necessary. That is why I have all code and configuration related to a CQ Workflow inside a VCS tool and use Maven to install the Workflows in CQ.

Attention: Even though I use a VCS tool and Maven to manage a Workflow the actual Workflow Model is edited inside CQ Workflow Model Editor. I tried to edit workflows within a Code Editor (IntelliJ IDEA) but beside simple changes in text properties I failed to make it work. The Workflow Model Editor will not bring up the Model if there is a slight inconsistency and so you might loose your work.

Creating a Workflow Models

As said above you cannot edit Workflow Models by hand. This means you need to open the Workflow Model inside the Workflow Editor by double-clicking on the Workflow Model and then change the Model in its Editor. Now this is a problem if you have the Workflow in VCS because when you would reinstall the Workflow Model you would loose your changes. This is my process on how to edit Workflows inside CQ and still keep the golden copy in a VCS:

  1. Create a Workflow inside the Workflow Editor by clicking on the New button. Give it a Title (displayed name). Here we use Basic Workflow

CQ Workflow Tutorial Basic Create Workflow

Read more »