return workflowInstance;
}
public static WorkflowInstance getWorkflowInstanceFromXmlRpc(
Hashtable workflowInstance) {
WorkflowInstance wInst = new WorkflowInstance();
wInst.setCurrentTaskId((String) workflowInstance.get("current_task_id"));
wInst.setStatus((String) workflowInstance.get("status"));
wInst.setId((String) workflowInstance.get("id"));
wInst.setWorkflow(getWorkflowFromXmlRpc((Hashtable) workflowInstance
.get("workflow")));
wInst.setStartDateTimeIsoStr((String) workflowInstance
.get("start_date_time"));
wInst.setEndDateTimeIsoStr((String) workflowInstance.get("end_date_time"));
wInst.setCurrentTaskStartDateTimeIsoStr((String) workflowInstance
.get("current_task_start_date_time"));
wInst.setCurrentTaskEndDateTimeIsoStr((String) workflowInstance
.get("current_task_end_date_time"));
if (workflowInstance.get("sharedContext") != null) {
Metadata met = new Metadata();
met.addMetadata((Hashtable) workflowInstance.get("sharedContext"));
wInst.setSharedContext(met);
} else
wInst.setSharedContext(new Metadata());
if (workflowInstance.get("priority") != null) {
Priority p = Priority.getPriority(Double
.valueOf((String) workflowInstance.get("priority")));
}