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 void saveAnnotations(String propKey, List<WorkflowAnnotation> annotations) throws Exception { final JSONAnnotationSerializer serializer = new JSONAnnotationSerializer(); final String json = serializer.serialize(annotations); workflowDesignerPropertySet.setProperty(propKey, json); }