Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-5188

[GSS] [6.4.z] Process model SVG is not updated in Windows environments

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Out of Date
    • Affects Version/s: 6.4.9
    • Fix Version/s: None
    • Component/s: Business Central
    • Labels:
    • Environment:
      • BPM Suite on Tomcat (possibly in EAP or other containers as well)
      • Windows
    • Steps to Reproduce:
      Hide
      • Install BPM Suite 6.4.9 on Tomcat on Windows;
      • Set storesvgonsave to true;
      • Start the server, create a business process;
      • Open the business process, modify it, save it;
      • Notice the exception in logs;
      • If you deploy the project will see that it will always use the first version of the process SVG;
      Show
      Install BPM Suite 6.4.9 on Tomcat on Windows; Set storesvgonsave to true; Start the server, create a business process; Open the business process, modify it, save it; Notice the exception in logs; If you deploy the project will see that it will always use the first version of the process SVG;
    • Workaround:
      Workaround Exists
    • Workaround Description:
      • Navigate in the project editor and delete the process definition manually, then open the process editor to make it generate a new image;

      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

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  tsurdilovic Tihomir Surdilovic
                  Reporter:
                  williamAntonio William Siqueira
                  Tester:
                  Jan Hrcek
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: