5 Replies Latest reply on Nov 29, 2011 10:13 AM by michelpohle

    [jbpm5.1] Inconsistencies between Guvnor and jbpm-console

    michelpohle Newbie

      Dear jBPM-Community,

       

      I am rather new with jBPM, but so far could solve all the problems I've come across by analysis and googling. Not so this time. Workflows from Guvnor will just not show up in the jBPM web console (http://localhost:8080/jbpm-console/). Please let me tell you my development environment and approach so I can explain my problem:

       

      • jBPM 5.1 deployed on a JBoss AS 7.0.1 (jbpm-gwt-console-[server].war) together with Guvnor 5.3.0.CR1 (drools-guvnor.war)
      • For designing the processes, I use the Eclipse plugin
      • Then, I upload them to Guvnor by dropping the *.bpmn file into the WebDAV folder
      • refresh Guvnor and build package
      • refresh and check in jBPM web console

       

      This approach worked until yesterday, when a workflow would just not show up in the jBPM console. Things got weird when I minimized the workflow to isolate the problem and, in another step, had to change the process ID in order to avoid conflict. After replacing the old workflow file (the only difference being the changed ID) and rebuilding Drools' defaultPackage, I would have expected to the either the old or the new process. Instead, localhost:8080/gwt-console-server/rs/process/definitions returned this:

       

      {"definitions":[{"id":"com.sample.bpmn.hello","name":"Hello World","version":0,"packageName":"defaultPackage","deploymentId":"N/A","suspended":false},{"id":"com.sample.bpmn.hellox","name":"Hello World","version":0,"packageName":"defaultPackage","deploymentId":"N/A","suspended":false}]}

       

      Both versions of the minimized process would show up in the jBPM console and be executable although only one file corresponding to the workflow was included in the built package.

       

      Both source and documentation of the Drools package contain no helpful information and when I checked the binary with a text editor (before minimizing the workflow), I could make out fragments of my code, indicating that it was included in the package.

       

      One of the last things I changed before these inconsistencies started to occur was change the configuration of the defaultPackage (importing a class and later deleting that import). Assuming that this was the reason for my problems, I've since deleted the h2 database, Drools' repository folder and JBoss' temp files and afterwards re-imported all necessary files into Guvnor, but that seemed not to change anything about my problem.

       

      As reference, here are the original and minimal workflow files and a custom work item definition that is used by the original. I had already successfully executed workflows with that custom work item before the problem occured.

       

       

      Your help would be very much appreciated.

       

      Best regards,

      Michèl Pohle

        • 1. Re: [jbpm5.1] Inconsistencies between Guvnor and jbpm-console
          Tihomir Surdilovic Master

          This is an issue related to https://issues.jboss.org/browse/JBPM-3268 which we are trying to fix in time for jBPM5.2. The problem is actually with the Drools KnowledgeAgent not being able to detect removed processes in a pkg resource. Please watch this Jira to get email notifications on any updates.

           

          Hope this helps.

          1 of 1 people found this helpful
          • 2. Re: [jbpm5.1] Inconsistencies between Guvnor and jbpm-console
            michelpohle Newbie

            Hello Tihomir,

             

            thank you for your quick reply. This does indeed explain why my minimized process will show up twice. However, I am still at a loss why the original workflow (WSCustomWorkItem.bpmn in the original post) does not show up, as this is also the case when I drop into an empty repository. Sorry for not being more clear about this being the main problem.

            • 3. Re: [jbpm5.1] Inconsistencies between Guvnor and jbpm-console
              Tihomir Surdilovic Master

              Sorry if this is a silly question, but do you build your defaultPackage after dropping the process into it via webdav? Does the package build fine? Do you see anything in your server log that could indicate a posssible issue?

              • 4. Re: [jbpm5.1] Inconsistencies between Guvnor and jbpm-console
                michelpohle Newbie

                Yes, I build after every change in the repository. According to Guvnor, the package builds fine. Sometimes there are errors in my processes that prevent the package from building, but so far I could solve them and get the desired "Package built successfully. Last modified on ...". In the server log, the only new line after building the package is this (Bargain and WSCustomWorkItem are the workflows):

                09:31:30,287 INFO  [stdout] (http--127.0.0.1-8080-5) INFO  29-11 09:31:30,279 (LoggingHelper.java:info:49)       Following assets have been included in package build: drools, Bargain, serviceTask, shopclient-1.0.0, webservice, WSCustomWorkItem,

                When I then log into jbpm-console, it additionally logs:

                09:34:51,810 INFO  [stdout] (http--127.0.0.1-8080-1) Loaded user admin: admin manager user
                09:34:51,810 INFO  [stdout] (http--127.0.0.1-8080-1) Loaded user krisv: admin manager user
                09:34:51,810 INFO  [stdout] (http--127.0.0.1-8080-1) Loaded user sales-rep: admin manager user sales
                09:34:51,811 INFO  [stdout] (http--127.0.0.1-8080-1) Loaded user john: admin manager user PM
                09:34:51,811 INFO  [stdout] (http--127.0.0.1-8080-1) Loaded user mary: admin manager user HR
                09:35:03,763 INFO  [stdout] (http--127.0.0.1-8080-7) INFO  29-11 09:35:03,762 (NilAuthenticator.java:authenticate:35)    All users are guests.
                09:35:03,764 INFO  [stdout] (http--127.0.0.1-8080-7) INFO  29-11 09:35:03,763 (RepositoryServlet.java:allowUser:113)     admin authenticated for rest api
                09:35:03,764 INFO  [stdout] (http--127.0.0.1-8080-7) INFO  29-11 09:35:03,764 (PackageDeploymentServlet.java:execute:134)        PackageName: defaultPackage
                09:35:03,765 INFO  [stdout] (http--127.0.0.1-8080-7) INFO  29-11 09:35:03,764 (PackageDeploymentServlet.java:execute:135)        PackageVersion: LATEST
                09:35:03,765 INFO  [stdout] (http--127.0.0.1-8080-7) INFO  29-11 09:35:03,765 (PackageDeploymentServlet.java:execute:136)        PackageIsLatest: true
                09:35:03,765 INFO  [stdout] (http--127.0.0.1-8080-7) INFO  29-11 09:35:03,765 (PackageDeploymentServlet.java:execute:137)        PackageIsSource: false
                09:35:03,843 INFO  [stdout] (http--127.0.0.1-8080-1) jbpm.console.directory property not found
                09:35:05,322 INFO  [stdout] (http--127.0.0.1-8080-1) Loading session data ...
                09:35:05,425 INFO  [stdout] (http--127.0.0.1-8080-1) Error loading session data: java.lang.reflect.InvocationTargetException
                09:35:05,426 INFO  [stdout] (http--127.0.0.1-8080-1) Creating new session data ...
                09:35:05,719 INFO  [stdout] (http--127.0.0.1-8080-1) Successfully loaded default package from Guvnor

                Still, no processes are found by jbpm-console-server, even after redeploying. As a reference, I attached the complete server.log (from startup to opening the jbpm-console).

                • 5. Re: [jbpm5.1] Inconsistencies between Guvnor and jbpm-console
                  michelpohle Newbie

                  Hi,

                   

                  now I managed to see my process again. In short, this is what I found out:

                   

                  • when a process is not visible in the jbpm-console, all the other processes in Guvnor's defaultPackage won't be as well
                  • all my processes that would not show up had loops out of gateway nodes in them. When I removed the gateways, the processes would show up, even if I re-introduced them afterwards
                  • I did not try if  any change of the semantic of the process would produce that result

                   

                  I still have no idea why I can't see them on the first try though, as I completely clean out Guvnor's repository between changes (see below), so the bug you mentioned should not occur.

                   

                  Long story:
                  In order to find out if my problem was linked to the bug you described, I minimized my process again, this time clearing the Guvnor repository after each change (i.e. stopping JBoss, deleting $JBOSS_DEPLOYMENTS/repository and $JBOSS_TEMP/*, restarting JBoss). After the first change (removing all Gateways), I could suddenly see the task and after re-introducing them, the task was still visible (i.e. in its original version). I tried to manipulate the circumstances of uploading and deploying in order to see why the process was visible, but found none of them had any influence.

                   

                  Only when I added another process to the repository (already in the initial build), I would consistently see neither of them both. The only difference in the server logs is that in the unsuccessful case, the last log entries are these...

                   

                  5:18:28,665 INFO  [stdout] (http--127.0.0.1-8080-6) INFO  29-11 15:18:28,665 (LoggingHelper.java:info:49)       Following assets have been included in package build: drools, Bargain, serviceTask, shopclient-1.0.0, webservice, WSCustomWorkItem, 15:18:37,244 INFO  [stdout] (http--127.0.0.1-8080-9) INFO  29-11 15:18:37,243 (NilAuthenticator.java:authenticate:35)    All users are guests.
                  15:18:37,245 INFO  [stdout] (http--127.0.0.1-8080-9) INFO  29-11 15:18:37,245 (RepositoryServlet.java:allowUser:113)     admin authenticated for rest api
                  15:18:37,246 INFO  [stdout] (http--127.0.0.1-8080-9) INFO  29-11 15:18:37,245 (PackageDeploymentServlet.java:execute:134)        PackageName: defaultPackage
                  15:18:37,246 INFO  [stdout] (http--127.0.0.1-8080-9) INFO  29-11 15:18:37,246 (PackageDeploymentServlet.java:execute:135)        PackageVersion: LATEST
                  15:18:37,247 INFO  [stdout] (http--127.0.0.1-8080-9) INFO  29-11 15:18:37,246 (PackageDeploymentServlet.java:execute:136)        PackageIsLatest: true
                  15:18:37,247 INFO  [stdout] (http--127.0.0.1-8080-9) INFO  29-11 15:18:37,247 (PackageDeploymentServlet.java:execute:137)        PackageIsSource: false
                  15:18:37,325 INFO  [stdout] (http--127.0.0.1-8080-6) jbpm.console.directory property not found
                  15:18:38,633 INFO  [stdout] (http--127.0.0.1-8080-6) Loading session data ...
                  15:18:38,705 INFO  [stdout] (http--127.0.0.1-8080-6) Error loading session data: java.lang.reflect.InvocationTargetException
                  15:18:38,705 INFO  [stdout] (http--127.0.0.1-8080-6) Creating new session data ...
                  15:18:39,111 INFO  [stdout] (http--127.0.0.1-8080-6) Successfully loaded default package from Guvnor

                   

                  ... while in the successful case, before "jbpm.console.directory property not found" would be this line...

                   

                  15:13:27,114 INFO  [stdout] (http--127.0.0.1-8080-4) Loading process from Guvnor: ua.telepark.CustomItemWSTest

                   

                  ... and then several lines with exceptions because I didn't upload a diagram.

                   

                  As it turned out, I couldn't see the second process even if there was no other process in the repository. But with another process that already worked before these problems began, I could see both. So I did to my second invisible process what I had done to the first: removing and reintroduce the gateways. The result was the same: the process was now visible as well.