Wondering how to persist workflow data from one step to another.
From my understanding we use the following code to save the workflow data for the second step:
public void execute(WorkItem item, WorkflowSession session, MetaDataMap args) throws WorkflowException {
MetaDataMap wfd = item.getWorkflow().getMetaDataMap();
wfd.put("mykey", "My Step Value");
Set<String> keyset = wfd.keySet();
Iterator<String> i = keyset.iterator();
while (i.hasNext()){
Object key = i.next();
log.info("The workflow medata includes key {} and value {}",key.toString(),wfd.get(key).toString());
}
}
How do you retreive the data from the second custom step?
Thanks,
Ram
Solved! Go to Solution.
Views
Replies
Total Likes
The MetaDataMap object contains all of the workitem data. The key/value pair is one item of data. So, you would add each data item that you are handling to the object.
Perhaps you could describe in more detail what it is you are implementing and we could help you more directly?
scott
Views
Replies
Total Likes
Take a look at this AEM topic:
http://docs.adobe.com/docs/en/cq/current/workflows/wf-ref.html
Views
Replies
Total Likes
Sorry, took a look at that AEM topic and it didn't have anything on pass workflow data between custom processes.
Views
Replies
Total Likes
Hi,
I think this topic is specific to your goal: http://docs.adobe.com/docs/en/aem/6-0/develop/extending/workflows/wf-extending.html#Persisting%20Dat...
scott
Views
Replies
Total Likes
Sorry can't seem to wrap my head around this.
The following line of code:
wfd.put(
"mykey"
,
"My Step Value"
);
What exactly is "my step value"? Workflow Item/Data?
If someone can show me an example that would be greatly appreciated.
Thanks
Views
Replies
Total Likes
The MetaDataMap object contains all of the workitem data. The key/value pair is one item of data. So, you would add each data item that you are handling to the object.
Perhaps you could describe in more detail what it is you are implementing and we could help you more directly?
scott
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies