AnsweredAssumed Answered

messy code with Chinese

Question asked by xpalive on Sep 10, 2014
Latest reply on Sep 10, 2014 by trademak
I design the diagram is correct but does not have the right result which I get the bmp!  *HELP*


@RequestMapping("/picture")
  public void picture(HttpServletRequest request, HttpServletResponse response)
    throws Exception {
    String procDefId = request.getParameter("procDefId");
    ProcessDefinition procDef = repositoryService
      .createProcessDefinitionQuery().processDefinitionId(procDefId)
      .singleResult();
    String diagramResourceName = procDef.getDiagramResourceName();
    InputStream imageStream = repositoryService.getResourceAsStream(
      procDef.getDeploymentId(), diagramResourceName);
    byte[] data = new byte[imageStream.available()];
    imageStream.read(data);
    imageStream.close();
    response.setContentType("image/png");
    OutputStream stream = response.getOutputStream();
    stream.write(data);
    stream.flush();
    stream.close();
  }

The attachment is my bpmn file!

Attachments

Outcomes