Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Differences between traditional packages com.day.cq.workflow and com.adobe.granite.workflow

Tags:

aem

As I understand it, Granite is Adobe's name for the combination of Felix, Sling and CRX as a base platform. I am currently looking into CQ workflows, especially into developing a custom WorkflowProcess. I noticed that among others there are two seemingly equivalent packages, com.adobe.granite.workflow.exec (Package Overview) and com.day.cq.workflow.exec (Package Overview).

I see that deprecated classes (e.g. JavaProcess) have been removed and new ones have been added (e.g. InboxItem) while others seem to have stayed the same (e.g. WorkflowProcess). Whose package's WorkflowProcess interface should my custom WorkflowProcess class implement?

like image 764
Markus Avatar asked Nov 06 '14 22:11

Markus


1 Answers

Adobe Granite Workflow API, introduced in AEM 5.6, is a replacement for the classic Day Communique 5 Workflow API. All new workflows should use the new API, but even in the AEM 6 there are some processes that still relies on the legacy API.

In the recent AEM versions both APIs are supported. For instance, in the Process step dialog, where you can list all WorkflowProcesses, you'll see services implementing both the new and the old version of the interface. Nevertheless, to be sure that your code will be compatible with the future versions of AEM, you should use the new API.

Once you decide to use CQ or Granite API, it's important to stick to your choice, as you can't mix types from the first and the second API in one class and you shouldn't do it in one application.

like image 56
Tomek Rękawek Avatar answered Nov 06 '22 12:11

Tomek Rękawek