Examples of BpmnModel


Examples of de.caterdev.modelling.process.bpmn.BPMNModel

        d = new Activity("D");
        ab = new DirectedAssociation(a, b);
        bc = new DirectedAssociation(b, c);
        cd = new DirectedAssociation(c, d);
       
        model = new BPMNModel();
        model.add(a, b, c, d);
        model.add(ab, bc, cd);
        graph = GraphModel.convert(model);
    }
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

    if( process == null || process.getProcessDefinitionId() ==null ){
      this.saveErrorMessage("参数错误!");
      return INPUT;
    }
   
    BpmnModel bpmnModel = workflowManager.getBpmnModel(
        process.getProcessDefinitionId() );
    if( bpmnModel == null ){
      this.saveErrorMessage("流程定义ID["+
          process.getProcessDefinitionId()+"]对应BpmnModel数据不存在!");
      return INPUT;
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

    if( procIntance == null ){
      this.saveErrorMessage("流程实例["+process.getProcessInstanceId()+"]不存在!");
      return INPUT;
    }
   
    BpmnModel bpmnModel = workflowManager.getBpmnModel( procIntance.getProcessDefinitionId() );
    if( bpmnModel == null ){
      this.saveErrorMessage("流程定义ID["+
          process.getProcessDefinitionId()+"]对应BpmnModel数据不存在!");
      return INPUT;
    }
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

        } else if (bpmConfBase.getProcessDefinitionId() == null) {
            bpmConfBase.setProcessDefinitionId(processDefinitionId);
            bpmConfBaseManager.save(bpmConfBase);
        }

        BpmnModel bpmnModel = new GetBpmnModelCmd(processDefinitionId)
                .execute(commandContext);
        Graph graph = new FindGraphCmd(processDefinitionId)
                .execute(commandContext);
        this.processGlobal(bpmnModel, 1, bpmConfBase);
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

            return inputStream;
        }

        GetBpmnModelCmd getBpmnModelCmd = new GetBpmnModelCmd(
                processDefinitionId);
        BpmnModel bpmnModel = getBpmnModelCmd.execute(commandContext);
        ProcessEngineConfiguration processEngineConfiguration = Context
                .getProcessEngineConfiguration();
        InputStream is = new DefaultProcessDiagramGenerator().generateDiagram(
                bpmnModel, "png",
                processEngineConfiguration.getActivityFontName(),
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

                .findHistoricProcessInstance(processInstanceId);
        String processDefinitionId = historicProcessInstance
                .getProcessDefinitionId();
        GetBpmnModelCmd getBpmnModelCmd = new GetBpmnModelCmd(
                processDefinitionId);
        BpmnModel bpmnModel = getBpmnModelCmd.execute(Context
                .getCommandContext());
        Point point = getMinXAndMinY(bpmnModel);
        this.minX = point.x;
        this.minY = point.y;
        this.minX = (this.minX <= 5) ? 5 : this.minX;
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

    public void drawSequenceFlow(BufferedImage image,
            String processDefinitionId, String sequenceFlowId) {
        GetBpmnModelCmd getBpmnModelCmd = new GetBpmnModelCmd(
                processDefinitionId);
        BpmnModel bpmnModel = getBpmnModelCmd.execute(Context
                .getCommandContext());

        Graphics2D graphics = image.createGraphics();
        graphics.setPaint(HISTORY_COLOR);
        graphics.setStroke(new BasicStroke(2f));

        try {
            List<GraphicInfo> graphicInfoList = bpmnModel
                    .getFlowLocationGraphicInfo(sequenceFlowId);

            int[] xPoints = new int[graphicInfoList.size()];
            int[] yPoints = new int[graphicInfoList.size()];
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

        JsonNode modelNode = (JsonNode) new ObjectMapper()
                .readTree(repositoryService.getModelEditorSource(modelData
                        .getId()));
        byte[] bpmnBytes = null;

        BpmnModel model = new BpmnJsonConverter().convertToBpmnModel(modelNode);
        bpmnBytes = new BpmnXMLConverter().convertToXML(model);

        String processName = modelData.getName() + ".bpmn20.xml";
        Deployment deployment = repositoryService.createDeployment()
                .name(modelData.getName())
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

          DownloadStream ds = null;
          try {
           
            BpmnJsonConverter jsonConverter = new BpmnJsonConverter();
            JsonNode editorNode = new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelData.getId()));
            BpmnModel bpmnModel = jsonConverter.convertToBpmnModel(editorNode);
            BpmnXMLConverter xmlConverter = new BpmnXMLConverter();
            byte[] bpmnBytes = xmlConverter.convertToXML(bpmnModel);
           
            ByteArrayInputStream in = new ByteArrayInputStream(bpmnBytes);
            String filename = bpmnModel.getMainProcess().getId() + ".bpmn20.xml";
            ds = new DownloadStream(in, "application/xml", filename);
            // Need a file download POPUP
            ds.setParameter("Content-Disposition", "attachment; filename=" + filename);
          } catch(Exception e) {
            LOGGER.log(Level.SEVERE, "failed to export model to BPMN XML", e);
View Full Code Here

Examples of org.activiti.bpmn.model.BpmnModel

  }
 
  protected void deployModel() {
    try {
      ObjectNode modelNode = (ObjectNode) new ObjectMapper().readTree(repositoryService.getModelEditorSource(modelData.getId()));
      BpmnModel model = new BpmnJsonConverter().convertToBpmnModel(modelNode);
      byte[] bpmnBytes = new BpmnXMLConverter().convertToXML(model);
     
      Deployment deployment = repositoryService.createDeployment().name(modelData.getName())
          .addString(modelData.getName() + ".bpmn20.xml", new String(bpmnBytes)).deploy();
     
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.