Hide Forgot
Description of problem: jBPM Console cannot access processes from user defined packages Version-Release number of selected component (if applicable): dev 6 jbpm console How reproducible: Very Steps to Reproduce: 1.Create a new package in Guvnor (jboss-brms) 2.Create a simple process in Web designer 3.Build the package 4. Login to jBPM Console 5. Select Processes -> Process Overview Actual results: Nothing shows up. Exception in the console: 12:34:31,532 ERROR [SingleSessionCommandService] Could not commit session java.lang.RuntimeException: Could not find session data for id 1 at org.drools.persistence.SingleSessionCommandService.initKsession(SingleSessionCommandService.java:221) at org.drools.persistence.SingleSessionCommandService.<init>(SingleSessionCommandService.java:191) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.buildCommandService(KnowledgeStoreServiceImpl.java:101) at org.drools.persistence.jpa.KnowledgeStoreServiceImpl.loadStatefulKnowledgeSession(KnowledgeStoreServiceImpl.java:84) at org.drools.persistence.jpa.JPAKnowledgeService.loadStatefulKnowledgeSession(JPAKnowledgeService.java:131) at org.jbpm.integration.console.CommandDelegate.newStatefulKnowledgeSession(CommandDelegate.java:164) at org.jbpm.integration.console.CommandDelegate.getSession(CommandDelegate.java:252) at org.jbpm.integration.console.CommandDelegate.<init>(CommandDelegate.java:92) at org.jbpm.integration.console.ProcessManagement.<init>(ProcessManagement.java:35) at org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:22) at org.jbpm.integration.console.ManagementFactory.createProcessManagement(ManagementFactory.java:19) at org.jboss.bpm.console.server.ProcessMgmtFacade.getProcessManagement(ProcessMgmtFacade.java:86) at org.jbos Expected results: See process listed in Processes view Additional info: Tried to modify ChangeSet.xml and jbpm.console.properties in gwt-console-server with no impact.
We worked this out with Jeff's sample repository. Jeff, can this be closed? Thanks.
Yes, this can be closed. However as discussed it appears that the jBPM Console will not list processes if any package has any process with any type of error in it, even errors that pass validation in Web Designer and allow the package to compile.
I would not close this. The way the jBPM Console currently works is problematic. As soon as you add a new process and build the package, no processes show up in the jBPM Console. There is no error message to determine the cause. This is too brittle. A problem with one process definition should not cause the rest of them to not show up. I assume this is caused by creating one knowledge base with all the packages in it. A better design might be to compile each package into a separate knowledge base.
(In reply to comment #3) > This is too brittle. A problem with one process definition should not cause the > rest of them to not show up. I assume this is caused by creating one knowledge > base with all the packages in it. A better design might be to compile each > package into a separate knowledge base. Couldn't reproduce. I prepared 3 packages. One of them contained a corrupted process and cannot be built. Processes from the other two packages showed up in the console. Any changes made to the processes in the healthy packages were reflected, new processes were added to the process overview, too. When I fixed the bad process, it showed up as well. I think this can be closed. All packages are monitored if guvnor.packages property is empty. If it is non-empty, only those packages that are listed in the property are monitored.
One more thing: the exception in bug description is not related. It is always logged when first accessing the console, see bug 783413.
The problem with your testing is that you said you had a corrupted process and that the package could not be built. Only the latest package is returned to the jBPM Console, so of course this would not cause an issue. The problem I described is when the package can be built, but the problem with the process causes the knowledge base to not be built. The problems could be quite subtle. The jBPM Console attempts to build a knowledgeBase from all packages that are returned. If any has an error no processes are displayed. Yes I agree the exception is not related. This problem occurs silently, there is no exception message saying which package was the culprit, you just have to guess.
I understand now. I tried to reproduce again, with no success again :) The reason is that I cannot save a process that has validation errors. I don't know if this feature was added after reporting this issue, but it definitely seems to solve it (by prevention). The other possibility is that I just failed to produce the right error. Can you help me, Jeff? Or, a repository with reproducing process would be nice. I am working with ER2.
The only validation error that doesn't prevent saving the process asset is a missing task form for a human task, however a package containing this type of error doesn't prevent processes from showing up in the jbpm-console.
I forgot about one important thing: I wasn't using the designer included in ER2, but a little more recent Tiho's build (see bug 772654). I switched back to ER1 and I could save process with validation errors but the package wouldn't build... will retest in ER3.
Here is a repository that is currently not showing any processes in the jBPM Console (not sure why at this point).
Created attachment 557973 [details] repository
Created attachment 558002 [details] console-processes
Jeff, I am unable to reproduce the issue. After building the three packages in Guvnor I am able to see all the processes in the console (see the created attachment console-processes).
Well I archived the defaultPackage, and I was able to see the processes from the other two packages.
I could reproduce with attachment 557973 [details]. I started with clean BRMS installation. I imported the repository and ran 'Rebuild all package binaries'. When I went to the Process Overview, no processes showed up at all.
Jiri, I am unable to reproduce this issue with your provided attachment. Can you please make sure that your model jars are in the right place on the classpath?
Update status to ON_QA. Please verify them against ER6.
With the provided repo export, I was able to VERIFY this as fixed. All packages can be built. Processes show up. That though is only true if you have the model jar on classpath. I honestly don't know why this is required when we have a perfectly good repository that already contains various binaries and assets... I'm sure I'm just missing something obvious. I wouldn't know not having that is a problem if I did not read it here, because server logs say NPE, can't load from Guvnor when it is more like can't load from classpath. ERROR [StatefulKnowledgeSessionUtil] Could not load processes from Guvnor: null java.lang.NullPointerException at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:148) ... I'll have a new report for you on that, once/if I find out if this is normal or just happens with this one repo. Further more, I went through the processes and found that process ConditionalStartProcess fails designer's validation with message "Catch Event has no conditionexpression." shown next to the start event (Start Conditional Event). ConditionalStartProcess might have been the original culprit. Archiving it, rebuilding the package, refreshing the process overview, then restoring it again and rebuilding package again and refreshing resulted in this nice stack trace (though the process showed up after some more refreshing): ERROR [SingleSessionCommandService] Could not commit session Exception executing consequence for rule "RuleFlow-Start-com.sample.bpmm2.conditionalstartprocess" in defaultPackage: java.lang.IllegalArgumentException: Unknown process ID: com.sample.bpmm2.conditionalstartprocess at org.drools.runtime.rule.impl.DefaultConsequenceExceptionHandler.handleException(DefaultConsequenceExceptionHandler.java:39) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1195) at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1126) at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1343) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:709) at org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:673) at org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:228) at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:106) at org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:32) at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36) at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:350) at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(CommandBasedStatefulKnowledgeSession.java:245) at org.jbpm.integration.console.StatefulKnowledgeSessionUtil$2.activationCreated(StatefulKnowledgeSessionUtil.java:345) at org.drools.event.AgendaEventSupport.fireActivationCreated(AgendaEventSupport.java:41) at org.drools.common.DefaultAgenda.createActivation(DefaultAgenda.java:587) at org.drools.reteoo.RuleTerminalNode.assertLeftTuple(RuleTerminalNode.java:192) at org.drools.reteoo.LeftInputAdapterNode$RightTupleSinkAdapter.assertObject(LeftInputAdapterNode.java:280) at org.drools.reteoo.ObjectTypeNode.updateSink(ObjectTypeNode.java:307) at org.drools.reteoo.LeftInputAdapterNode.updateSink(LeftInputAdapterNode.java:186) at org.drools.reteoo.RuleTerminalNode.attach(RuleTerminalNode.java:305) at org.drools.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:163) at org.drools.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:119) at org.drools.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110) at org.drools.reteoo.ReteooRuleBase.addRule(ReteooRuleBase.java:444) at org.drools.common.AbstractRuleBase.addRule(AbstractRuleBase.java:837) at org.drools.common.AbstractRuleBase.addPackages(AbstractRuleBase.java:567) at org.drools.reteoo.ReteooRuleBase.addPackages(ReteooRuleBase.java:466) at org.drools.impl.KnowledgeBaseImpl.addKnowledgePackages(KnowledgeBaseImpl.java:150) at org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:1039) at org.drools.agent.impl.KnowledgeAgentImpl.incrementalBuildResources(KnowledgeAgentImpl.java:956) at org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:673) at org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:202) at org.drools.agent.impl.KnowledgeAgentImpl$ChangeSetNotificationDetector.run(KnowledgeAgentImpl.java:1224) at java.lang.Thread.run(Thread.java:679) Caused by: java.lang.IllegalArgumentException: Unknown process ID: com.sample.bpmm2.conditionalstartprocess at org.jbpm.process.instance.ProcessRuntimeImpl.createProcessInstance(ProcessRuntimeImpl.java:152) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:135) at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:130) at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1077) at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:313) at defaultPackage.Rule_RuleFlow_Start_com_sample_bpmm2_conditionalstartprocess.defaultConsequence(Rule_RuleFlow_Start_com_sample_bpmm2_conditionalstartprocess.java:7) at defaultPackage.Rule_RuleFlow_Start_com_sample_bpmm2_conditionalstartprocessDefaultConsequenceInvoker.evaluate(Unknown Source) at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:1185) ... 32 more As it seems to not be a problem really, I say VERIFIED.