[JBoss JIRA] Created: (JBPM-2618) Source level problem running Ant script: /examples/build.xml
by Rafael Liu (JIRA)
Source level problem running Ant script: /examples/build.xml
------------------------------------------------------------
Key: JBPM-2618
URL: https://jira.jboss.org/jira/browse/JBPM-2618
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.0
Environment: Linux
HotSpot 1.6.0_14
Reporter: Rafael Liu
Priority: Minor
Trying to run:
ant demo.setup
Gives a lot of exceptions related to generics:
[javac] assertEquals(new ArrayList<Job>(), new ArrayList<Job>(jobs));
[javac] ^^^
[javac] Syntax error, parameterized types are only available if source level is 1.5
The problem is that the -source option vary from JVM from JVM, so the target examples.jar in /examples/build.xml should define a source attribute in javac:
<javac srcdir="${jbpm.home}/examples/src" source="1.5"
destdir="${jbpm.home}/examples/target/classes"
classpathref="jbpm.libs.incl.dependencies" />
That way we don't get tied to JVM's specifics.
--
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
15 years
[JBoss JIRA] Created: (JBPM-2690) Tasks are completed /released without intervention
by Tim Johnson (JIRA)
Tasks are completed /released without intervention
--------------------------------------------------
Key: JBPM-2690
URL: https://jira.jboss.org/jira/browse/JBPM-2690
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Environment: JBPM 4.3, jdk1.5.0_06
Reporter: Tim Johnson
In the following process - Task A is manually completed in the test, the subsequent decision is fired routing to Task B (request.status == MODIFY). Task B is completed by the process engine before the task is picked up and completed by the assignee. The assignee never receives the task.
PROCESS
<?xml version="1.0" encoding="UTF-8"?>
<process name="test" xmlns="http://jbpm.org/4.0/jpdl">
<swimlane candidate-groups="role-a" name="role a"/>
<start g="103,217,48,48" name="start1">
<transition g="-25,-18" name="start" to="A"/>
</start>
<task g="268,216,92,52" name="A" swimlane="role a">
<transition g="-32,-19" name="to exclusive1" to="exclusive1"/>
</task>
<decision g="446,217,48,48" name="exclusive1">
<transition g="-24,-18" name="to B" to="B">
<condition expr="#{request.status=="MODIFY"}"/>
</transition>
<transition g="-42,-18" name="to end1" to="end1">
<condition expr="#{request.status=="COMPLETE"}"/>
</transition>
</decision>
<task assignee="#{request.submitter}" g="423,78,92,52" name="B">
<transition g="314,103:-25,-18" name="to A" to="A"/>
</task>
<end g="631,219,48,48" name="end1"/>
</process>
REQUEST
package org.jbpm.examples.problem;
import java.io.Serializable;
public class Request implements Serializable {
public String getSubmitter() {
return submitter;
}
public void setSubmitter(String submitter) {
this.submitter = submitter;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
private String submitter;
private String status;
}
TEST
package org.jbpm.examples.problem;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jbpm.api.IdentityService;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
public class ProblemTest extends JbpmTestCase {
String deploymentId;
protected void setUp() throws Exception {
super.setUp();
identityService = processEngine.get(IdentityService.class);
identityService.createUser("johntim", "Tim", "Johnson");
identityService.createUser("davrbob", "Bobby", "Davro");
String roleA = identityService.createGroup("role-a");
identityService.createMembership("davrbob", roleA, "approver");
deploymentId = repositoryService.createDeployment()
.addResourceFromClasspath("org/jbpm/examples/problem/test.jpdl.xml")
.deploy();
}
protected void tearDown() throws Exception {
repositoryService.deleteDeploymentCascade(deploymentId);
super.tearDown();
}
public void testProblem() {
Map<String, Object> variables = new HashMap<String, Object>();
Request req = new Request();
req.setSubmitter("johntim");
req.setStatus("MODIFY");
variables.put("request", req);
ProcessInstance processInstance = executionService.startProcessInstanceByKey("test", variables);
assertTrue(processInstance.isActive("A"));
/* =============================================== */
/* Complete TASK A */
/* =============================================== */
List<Task> taskList = taskService.findGroupTasks("davrbob");
assertEquals("Expected a single task in davrbob's group task list", 1, taskList.size());
Task task = taskList.get(0);
String taskId = task.getId();
taskService.takeTask(taskId, "davrbob");
Request request = (Request)taskService.getVariable(taskId, "request");
// Set the status used in the decision
request.setStatus("MODIFY");
Map vars = new HashMap();
vars.put("request", request);
taskService.setVariables(taskId, vars);
taskService.completeTask(taskId);
assertTrue(processInstance.isActive("B"));
// Doesn't get this far A is active
/* =============================================== */
/* Complete TASK B */
/* =============================================== */
taskList = taskService.findPersonalTasks("johntim");
assertEquals("Expected a single task in johntim's personal task list", 1, taskList.size());
task = taskList.get(0);
taskId = task.getId();
//taskService.setVariables(taskId, vars);
taskService.completeTask(taskId);
assertTrue(processInstance.isActive("A"));
}
}
--
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
15 years
[JBoss JIRA] Created: (JBPM-2628) Calling executionService.startProcessInstanceByKey with a non-existent key throws an unhelful exception
by Robert Moskal (JIRA)
Calling executionService.startProcessInstanceByKey with a non-existent key throws an unhelful exception
-------------------------------------------------------------------------------------------------------
Key: JBPM-2628
URL: https://jira.jboss.org/jira/browse/JBPM-2628
Project: jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: jBPM 4.1
Reporter: Robert Moskal
Priority: Optional
Maybe it's ok, but maybe it should throw something other than java.util.ConcurrentModificationException. The trace follows:
java.util.ConcurrentModificationException
at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793)
at java.util.HashMap$KeyIterator.next(HashMap.java:828)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.validateRepositoryCache(RepositorySessionImpl.java:198)
at org.jbpm.pvm.internal.repository.RepositorySessionImpl.findProcessDefinitionByKey(RepositorySessionImpl.java:153)
at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:58)
at org.jbpm.pvm.internal.cmd.StartProcessInstanceInLatestCmd.execute(StartProcessInstanceInLatestCmd.java:38)
at org.jbpm.pvm.internal.svc.DefaultCommandService.execute(DefaultCommandService.java:42)
at org.jbpm.pvm.internal.spring.CommandTransactionCallback.doInTransaction(CommandTransactionCallback.java:50)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128)
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:77)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:46)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.startProcessInstanceByKey(ExecutionServiceImpl.java:66)
at com.bluesky.skyline.workflow.service.impl.InvestigationServiceImpl.startInvestigation(InvestigationServiceImpl.java:51)
at com.bluesky.skyline.workflow.service.InvestigationServiceTests.testInvestigationFullCycle(InvestigationServiceTests.java:30)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:69)
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.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:79)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)
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)
--
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
15 years