Pass WorkFlow data from one custom step to another
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