Examples of addModelEditorSource()


Examples of org.activiti.engine.RepositoryService.addModelEditorSource()

        Model model = repositoryService.getModel(id);
        model.setName(name);
        // model.setMetaInfo(root.toString());
        System.out.println("jsonXml : " + jsonXml);
        repositoryService.saveModel(model);
        repositoryService.addModelEditorSource(model.getId(),
                jsonXml.getBytes("utf-8"));

        Map map = new HashMap();

        return map;
View Full Code Here

Examples of org.activiti.engine.RepositoryService.addModelEditorSource()

   
    try {
      // Write JSON to byte-array and set as editor-source
      ByteArrayOutputStream baos = new ByteArrayOutputStream();
      ExplorerApp.get().getSimpleWorkflowJsonConverter().writeWorkflowDefinition(workflowDefinition, new OutputStreamWriter(baos));
      repositoryService.addModelEditorSource(model.getId(), baos.toByteArray());
     
      // Store process image
      // TODO: we should really allow the service to take an inputstream as input. Now we load it into memory ...
      repositoryService.addModelEditorSourceExtra(model.getId(), IOUtils.toByteArray(
          diagramGenerator.generateDiagram(conversion.getBpmnModel(), "png", processEngineConfiguration.getActivityFontName(),
View Full Code Here

Examples of org.activiti.engine.RepositoryService.addModelEditorSource()

            model.setMetaInfo(metaInfoJson.toString());
            repositoryService.saveModel(model);
           
            BpmnJsonConverter bpmnJsonConverter = new BpmnJsonConverter();
            ObjectNode json = bpmnJsonConverter.convertToJson(conversion.getBpmnModel());
            repositoryService.addModelEditorSource(model.getId(), json.toString().getBytes("utf-8"));
           
            // Show modeler
            showModeler();
           
          } else {
View Full Code Here

Examples of org.activiti.engine.RepositoryService.addModelEditorSource()

      model.setMetaInfo(modelJson.toString());
      model.setName(modelForm.getFirstValue("name"));
     
      repositoryService.saveModel(model);
     
      repositoryService.addModelEditorSource(model.getId(), modelForm.getFirstValue("json_xml").getBytes("utf-8"));
      repositoryService.addModelEditorSourceExtra(model.getId(), modelForm.getFirstValue("svg_xml").getBytes("utf-8"));
     
    } catch(Exception e) {
      LOGGER.log(Level.SEVERE, "Error saving model", e);
      setStatus(Status.SERVER_ERROR_INTERNAL);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.