[JBoss JIRA] Created: (JBPM-1164) Null Pointer Exception is thrown when subprocess is leave event is fired.
by Gurpreet Sahota (JIRA)
Null Pointer Exception is thrown when subprocess is leave event is fired.
-------------------------------------------------------------------------
Key: JBPM-1164
URL: http://jira.jboss.com/jira/browse/JBPM-1164
Project: JBoss jBPM
Issue Type: Bug
Affects Versions: jBPM jPDL 3.2.2
Environment: Windows XP Pro, Sun JDK 1.5.0_13
Reporter: Gurpreet Sahota
Assigned To: Tom Baeyens
I have a process flow where process (A) calls a process state that in turn calls subprocess (B). When Subprocess "end" state is signalled then I receive a Null Pointer Exception.
Following is stack trace
java.lang.NullPointerException
at org.jbpm.graph.node.ProcessState.leave(ProcessState.java:204)
at org.jbpm.graph.exe.Token.signal(Token.java:195)
at org.jbpm.graph.exe.Token.signal(Token.java:140)
When debugging, it turns out that "leave" method in ProcessState tries to retrieve subProcessInstance from execution context. This is set to null causing exception. If executionContext.getToken() is used to retrieve the subProcessInstance, then it is not null.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2622) fix java static factory method use case
by Tom Baeyens (JIRA)
fix java static factory method use case
----------------------------------------
Key: JBPM-2622
URL: https://jira.jboss.org/jira/browse/JBPM-2622
Project: jBPM
Issue Type: Task
Security Level: Public (Everyone can see)
Reporter: Tom Baeyens
Assignee: Tom Baeyens
Fix For: jBPM 4.3
this doesn't work as expected.
<process name="OrderWithRules">
<start>
<transition to="isImportant">
<java var="amount" class="java.lang.Integer" method="parseInt">
<arg><object expr="#{amount}" /></arg>
</java>
</transition>
</start>
cause is to be found somewhere in JavaBinding, i think
if (XmlUtil.attribute(element, "method", true, parse, null)!=null) {
UserCodeReference invocationReference = parser.parseUserCodeReference(element, parse);
javaActivity.setInvocationReference(invocationReference);
ObjectDescriptor objectDescriptor = (ObjectDescriptor) invocationReference.getDescriptor();
javaActivity.setArgDescriptors(objectDescriptor.getArgDescriptors());
objectDescriptor.setArgDescriptors(null);
javaActivity.setMethodName(objectDescriptor.getMethodName());
objectDescriptor.setMethodName(null);
}
by setting the methodName to null in the object descriptor (objectDescriptor.setMethodName(null)), the object descriptor will not see it as a static factory method, but instead will look for the constructor of the class.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2682) Add problem specific exception sub-classes
by Peter Horvath (JIRA)
Add problem specific exception sub-classes
------------------------------------------
Key: JBPM-2682
URL: https://jira.jboss.org/jira/browse/JBPM-2682
Project: jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.x
Reporter: Peter Horvath
Currently error conditions are signaled using a single exception type, JbpmException.
Using problem specific exception subclasses would make it possible for the client code to deal with different error conditions differently .
Example - current GetOutcomes command implementation:
package org.jbpm.pvm.internal.cmd;
...
public class GetOutcomes implements Command<Set<String>> {
...
public Set<String> execute(Environment environment) {
DbSession dbSession = environment.get(DbSession.class);
TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
if (task==null) {
throw new JbpmException("task "+taskId+" doesn't exist");
}
...
Introducing problem specific exception subclasses would allow client code to handle errors much better; for example if a custom TaskDoesNotExistException (public class TaskDoesNotExistException extends JbpmException) was thrown in GetOutcomes.execute when a task is not found, then the caller code would be able to distinguish this problem from say a transient database connectivity problem. It could display a user friendly error message rather than showing a generic error message etc:
public Set<String> execute(Environment environment) {
DbSession dbSession = environment.get(DbSession.class);
TaskImpl task = dbSession.get(TaskImpl.class, Long.parseLong(taskId));
if (task==null) {
throw new TaskDoesNotExistException("task "+taskId+" doesn't exist");
}
The same approach for process instances, executions, variables, etc. could be used to allow building robust client code.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2625) Add count() to Queries to support pagination
by Peter Horvath (JIRA)
Add count() to Queries to support pagination
--------------------------------------------
Key: JBPM-2625
URL: https://jira.jboss.org/jira/browse/JBPM-2625
Project: jBPM
Issue Type: Feature Request
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.x
Reporter: Peter Horvath
Queries provide a powerful interface to access JBPM tasks, jobs, deployments, etc;
currently the only way you can get the number of results that match a filter is to load the whole list, and determine its size by calling .size() method - this is extremely inefficient and can even cause OutOfMemoryError (e.g. a HistoryActivityInstanceQuery could return tens of thousands elements)
count() could be used with page(int firstResult, int maxResults) method to create a paginated result list where you can display the number of pages
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2636) NPE in Configuration.getProcessEngine() when using jbpm.jbossremote.cfg.xml
by Mark Roy (JIRA)
NPE in Configuration.getProcessEngine() when using jbpm.jbossremote.cfg.xml
---------------------------------------------------------------------------
Key: JBPM-2636
URL: https://jira.jboss.org/jira/browse/JBPM-2636
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.2
Environment: Windows XP, JDK 6, JBoss, Oracle 10g
Reporter: Mark Roy
In jBPM 4.1, using the following jbpm.cfg.xml in my simple test app worked:
Code:
<jbpm-configuration>
<import resource="jbpm.jbossremote.cfg.xml" />
</jbpm-configuration>
Since upgrading to 4.2, however, I now get a NPE:
Code:
java.lang.NullPointerException
at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.checkDb(ProcessEngineImpl.java:177)
at org.jbpm.pvm.internal.cfg.ProcessEngineImpl.buildProcessEngine(ProcessEngineImpl.java:170)
at org.jbpm.api.Configuration.getProcessEngine(Configuration.java:161)
at org.jbpm.test.JbpmTestCase.initialize(JbpmTestCase.java:81)
at org.jbpm.test.JbpmTestCase.setUp(JbpmTestCase.java:76)
at com.mydomain..ReviewProcess.setUp(ReviewProcess.java:24)
at junit.framework.TestCase.runBare(TestCase.java:132)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:13
0)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
I traced this to the fact the userCommandService is assigned null from the following:
Code:
userCommandService = (CommandService) processEngineWireContext.get(CommandService.NAME_TX_REQUIR
ED_COMMAND_SERVICE);
This problem can be easily reproduced using the examples included in the distribution.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 5 months
[JBoss JIRA] Created: (JBPM-2648) Candidate-Groups
by Sebastian Castellanos (JIRA)
Candidate-Groups
-----------------
Key: JBPM-2648
URL: https://jira.jboss.org/jira/browse/JBPM-2648
Project: jBPM
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 4.2
Reporter: Sebastian Castellanos
Hi,
I have a problem when seeking tasks using candidate-groups.
I created tarea1 which has associated candidate-groups "Group1, Group2, Group3.
Then I have a user "sebastian" which is a member of Group 1, Group 2 and Group 3.
The problem is that when I run taskService().findGroupTasks("sebastian");
I returned a list of 3 tasks equal, Tarea1, Tarea1, Tarea1. When it should be listed just once the task (Tarea1).
I'm not sure if it's a conceptual issue or a bug in the API.
I would be grateful for your help.
P/d: I'm not using swimlane because I had problems with respect to the Fork / Join.
Greetings. Sebastian
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
14 years, 6 months