Workflow MetaDataMap issue
This question was posted today at 5:18 am EST -- however - it appears to be gone. We have re-entered as it AEM ENG has an answer that will benefit the AEM community:
Hi!
I've a workflow with (basically) two steps. The first step puts the userId in the workflow MetaDataMap. The second step, retrieves the userId from workflow MetaDataMap:
• Step 1:
workflowData.getMetaDataMap().put("initiator", workItem.getWorkflow().getInitiator()); //getInitiator() returns String
• Step 2:
String initiator = (String) workItem.getWorkflowData().getMetaDataMap().get("initiator");
When the workflow initiator is 'Administrator', I've no problems (initiator is populated with "admin"). This works fine!
But when the workflow initiator is another user, I get this error message:
...
Caused by: java.lang.ClassCastException: org.apache.jackrabbit.spi.commons.value.QValueValue cannot be cast to java.lang.String
...
Any advice? Thanks in advance!