public void copyAnnotationsForDraftWorkflow(String parentWorkflowName) throws Exception { final String originalPropKey = WorkflowDesignerConstants.ANNOTATION_PREFIX.concat(parentWorkflowName); final String originalJson = workflowDesignerPropertySet.getProperty(originalPropKey); if (StringUtils.isNotBlank(originalJson)) { String propKey = WorkflowDesignerConstants.ANNOTATION_DRAFT_PREFIX.concat(parentWorkflowName); workflowDesignerPropertySet.setProperty(propKey, originalJson); } }
public void copyActiveAnnotations(String originalWorkflowName, String newWorkflowName) throws Exception { final String originalPropKey = WorkflowDesignerConstants.ANNOTATION_PREFIX.concat(originalWorkflowName); final String originalJson = workflowDesignerPropertySet.getProperty(originalPropKey); if (StringUtils.isNotBlank(originalJson)) { String propKey = WorkflowDesignerConstants.ANNOTATION_PREFIX.concat(newWorkflowName); workflowDesignerPropertySet.setProperty(propKey, originalJson); } }
private List<WorkflowAnnotation> loadAnnotations(String propKey) throws IOException { List<WorkflowAnnotation> annotations = new ArrayList<WorkflowAnnotation>(); final String json = workflowDesignerPropertySet.getProperty(propKey); if (!StringUtils.isBlank(json)) { final JSONAnnotationSerializer deserializer = new JSONAnnotationSerializer(); annotations = deserializer.deserialize(json); } return annotations; }