We recently upgraded to CQ 5.6, and the data sharing between workflow process is not working properly, it was working fine with 5.4 version. Please check the snippet below
workItem.getWorkflowData().getMetaDataMap().put("test", "data transfer between processes");
doesn't seems to get populated.
Digging deep into it, we found that the implementation has been changed with a wrapper CQWorkflowDataWrapper, which returns newly instantiated map each time
public MetaDataMap getMetaDataMap()
return new CQMetaDataMap(graniteData.getMetaDataMap());
With CQ 5.4, we get the following
String test =workItem.getWorkflowData().getMetaDataMap().get("test");
However, in CQ 5.6, the String test value is null...as the map was not populated.
Is there any other way to pass the desired result(any object) from one process to other process?
I wouldn't say it returns an empty map, since the new map is initialized with the underlying graniteData metadata Map, which make sense, since the workflow module of CQ has been migrated to Granite between 5.5 and 5.6.
But indeed I could reproduce the problem, and you might have run into a product issue. Can I suggest to open a Daycare (CQ Support Portal) ticket about this issue for further investigation from Adobe ? Just put the same description, as this is qualified enough.
Thanks for your reply. We have already opened a ticket with daycare.