[jBPM] - Weird problem with new JBPM 5.2 release
by Marco Piraccini
Marco Piraccini [http://community.jboss.org/people/mpiraccini] created the discussion
"Weird problem with new JBPM 5.2 release"
To view the discussion, visit: http://community.jboss.org/message/641348#641348
--------------------------------------------------------------
Hi,
I have a very strange issue with the new JBPM 5.2 (with JPA persistence activated). In processes that end in the same call used to start the process (for instance a process with only script task). In these case, indeed, I have this NPE:
java.lang.NullPointerException
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcessInstance(ProcessRuntimeImpl.java:172)
at org.jbpm.process.instance.ProcessRuntimeImpl.startProcess(ProcessRuntimeImpl.java:138)
at org.drools.common.AbstractWorkingMemory.startProcess(AbstractWorkingMemory.java:1079)
at org.drools.impl.StatefulKnowledgeSessionImpl.startProcess(StatefulKnowledgeSessionImpl.java:306)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:119)
at org.drools.command.runtime.process.StartProcessCommand.execute(StartProcessCommand.java:38)
at org.drools.command.impl.DefaultCommandService.execute(DefaultCommandService.java:36)
at org.drools.persistence.SingleSessionCommandService.execute(SingleSessionCommandService.java:345)
at org.drools.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:223)
Debugging the JBPM code, it seems that in org.jbpm.process.instance.ProcessRuntimeImpl, when the process is started (and -subsequentially- ended), the Session reference goes to null (and then the NPE is thrown).
The very same process definitions work well with JBPM 5.1
It's a regression?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641348#641348]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 6 months
[jBPM] - Problem of getting WorkflowProcessInstance in Guvnor
by Yu Chai
Yu Chai [http://community.jboss.org/people/cross.cy] created the discussion
"Problem of getting WorkflowProcessInstance in Guvnor"
To view the discussion, visit: http://community.jboss.org/message/641400#641400
--------------------------------------------------------------
Hi,
I have a question about getting the current WorkflowProcessInstance in Guvnor business rule editor.
In my test workflow, I have a script node before a rule task node, doing
"kcontext.getKnowledgeRuntime().*insert*(kcontext.getProcessInstance())" to insert the current process instance into working memory. In the rule task node, I'm trying to refer to a business rule defined using Guvnor. To use WorkflowProcessInstance in "When", I manually imported org.drools.runtime.process.WorkflowProcessInstance into the package. However, when i tried to call setVariable() method on the process instance, it always threw out null pointer exception at runtime. It looks like the business rule didn't pick up the WorkflowProcessInstance inserted by the previous script task. The source of the business rule is like:
rule "Rejected App"
ruleflow-group "rejection"
when
......
processInstance: WorkflowProcessInstance()
then
processInstance.setVariable("delay", 2);
retract(processInstance);
end
I ended up using Eclipse to write a drl rule and uploaded to Guvnor to build the package, and it worked. My rule is like:
rule "Rejected App"
ruleflow-group "rejection"
when
......
processInstance: WorkflowProcessInstance()
then
((WorkflowProcessInstance)kcontext.getKnowledgeRuntime().getProcessInstance(processInstance.getId())).setVariable("delay", 2);
retract(processInstance);
end
Any suggestion on how to pick up the right WorkflowProcessInstance using Guvnor Bunisess rule editor? I'm using jBPM5.1 and Guvnor 5.2.Final. Thanks!
Best regards
Yu
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641400#641400]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 6 months
[Snowdrop] - equiv of tomcat /shared/ location for jboss
by darren hartford
darren hartford [http://community.jboss.org/people/dhartford] created the discussion
"equiv of tomcat /shared/ location for jboss"
To view the discussion, visit: http://community.jboss.org/message/641383#641383
--------------------------------------------------------------
hey all,
I ask a long time ago on the jboss as forum (or maybe stackoverflow, I don't recall now) about if you had a spring-based application such as alfresco (and many others, not just alfresco) where:
1) the application usually has a .war binary deploy.
2) the configs are usually located in a tomcat_home/shared/ location (usually under /shared/classes/myconfig.properties for example).
This allowed the application .war binary to be updated/replaced regularly without loosing your current configurations stored in the /shared/ location.
However, I never found out how to deploy these kinds of applications to jboss with the same level of agility - binary war's get updated regularly, while configs are still elsewhere in the equivalent of tomcat_home/shared/. This would avoid the need of requiring exploded war deployments that would require re-applying of configs after .war updates.
Could someone enlighten me please :-)
-D
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641383#641383]
Start a new discussion in Snowdrop at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 6 months