Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-7382

Process model SVG is not updated in Windows environments

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • None
    • None
    • Designer
    • None
    • 2018 Week 23-24, 2018 Week 25-26, 2018 Week 27-29

    Description

      When running BPM Suite on Windows and setting storesvgonsave to true the SVG is only generated at first time, when you edit and save the process the SVG will not be updated and the following exception will be printed in the logs:

       org.jbpm.designer.web.server.TransformerServlet.storeInRepository class org.uberfire.java.nio.file.FileAlreadyExistsException myprocess-svg.svg
      org.uberfire.java.nio.file.FileAlreadyExistsException
              at org.jbpm.designer.repository.vfs.VFSRepository.createAsset(VFSRepository.java:409)
              at org.jbpm.designer.repository.vfs.VFSRepository$Proxy$_$$_WeldClientProxy.createAsset(VFSRepository$Proxy$_$$_WeldClientProxy.java)
              at org.jbpm.designer.web.server.TransformerServlet.storeInRepository(TransformerServlet.java:660)
              at org.jbpm.designer.web.server.TransformerServlet.doPost(TransformerServlet.java:281)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)
              at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
              at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:53)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)
      

      When debugging the issue we noticed that it tries to delete a file using a bad slash (slash for Windows systems), see:

      INFO [http-nio-8080-exec-2] org.apache.catalina.core.StandardWrapperValve.invoke DEBUG deleting asset in path: /MyProject/src/main/resources/org/myapp\myprocess-svg.svg

      Notice the last slash is changed. The reason why it happens is because TransformerServlet uses File.separator to merge the path to the SVG, but paths in repository seems to use linux slash. Reference: https://github.com/kiegroup/jbpm-designer/blob/6.5.x/jbpm-designer-backend/src/main/java/org/jbpm/designer/web/server/TransformerServlet.java#L609

      Attachments

        Issue Links

          Activity

            People

              rhn-support-tsurdilo Tihomir Surdilovic (Inactive)
              rhn-support-tsurdilo Tihomir Surdilovic (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: