public void persistWorkflow(Workflow workflow) throws WorkflowException {
  try {
    Map<String,Workflow.Step> stepMap=workflow.getStepMap();
    Map<String,StepStatus> stepStatusMap=workflow.getStepStatusMap();
    workflow.setStepMap(null);
    workflow.setStepStatusMap(null);
    String path=getZKWorkflowPath(workflow);
    _dataManager.putData(path,workflow);
    workflow.setStepMap(stepMap);
    workflow.setStepStatusMap(stepStatusMap);
  }
 catch (  Exception ex) {
    throw new WorkflowException("Cannot persist workflow data in ZK",ex);
  }
}

public void persistWorkflow ( Workflow workflow ) throws WorkflowException { try { Map < String , Workflow . Step > stepMap = workflow . getStepMap ( ) ; Map < String , StepStatus > stepStatusMap = workflow . getStepStatusMap ( ) ; workflow . setStepMap ( null ) ; workflow . setStepStatusMap ( null ) ; String path = getZKWorkflowPath ( workflow ) ; _dataManager . putData ( path , workflow ) ; workflow . setStepMap ( stepMap ) ; workflow . setStepStatusMap ( stepStatusMap ) ; } catch ( Exception ex ) { throw new WorkflowException ( "Cannot persist workflow data in ZK" , ex ) ; } }
persits the workflow to zookeeper .
