[jBPM Users] - [jBPM 4.2]
by xalperte
I'm trying to locate a ProcessInstance inside a List container using the "contains" method but the instance is not found.
Looking in the equals method of the ExecutionImpl I saw that the EqualsUtils.equals static method is used for that purpose and it's using the object pointer instead the object hibernate key to compare objects.
I think the implementation of the EqualsUtils.equals method should compare objects using its hibernate key, doesn't it?
Idea:
| ClassMetadata entity1Metadata = sessionFactory.getClassMetadata(entity1.getClass());
| Object entity1Key = entity1Metadata.getIdentifier(entity1, EntityMode.POJO);
|
| ClassMetadata entity2Metadata = sessionFactory.getClassMetadata(entity2.getClass());
| Object entity2Key = entity2Metadata.getIdentifier(entity2, EntityMode.POJO);
|
| return entity1Key.equals(entity2Key)
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266872#4266872
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266872
16 years, 4 months
[jBPM Users] - Incorrect Incoming Transition evaluation on Join Node
by pradeep.gulla
I'm Using JBPM4.1 with SQLServer 2000.
My process xml contains a FORK node for assigning 2 parallel tasks.
I've created on extra Task Node which is not part of Fork but contains outgoing transition to JOIN.
When I'm trying to complete the 2 created tasks, execution is not forwarding.
JOIN node waits for the completion of extra task (which is not created).
Process definition:
| <?xml version="1.0" encoding="UTF-8"?>
| <process name="join_test" version="1" xmlns="http://jbpm.org/4.0/jpdl">
| <start><transition to="Assign Parallel Tasks"/></start>
| <fork name="Assign Parallel Tasks">
| <transition to="Task 1"/><transition to="Task 2"/>
| </fork>
| <task assignee="#{approver1}" name="Task 1">
| <transition to="wait"/>
| </task>
| <task assignee="#{approver2}" name="Task 2">
| <transition g="-104,-54" to="wait"/>
| </task>
| <!-- This won't particpate in workflow but still comes in the list of incoming transitions -->
| <task assignee="#{approver3}" name="Task 3">
| <transition g="-104,-54" to="wait"/>
| </task>
|
| <join name="wait">
| <transition to="Final task"/>
| </join>
| <task assignee="#{approver4}" name="Final task">
| <transition to="Finish"/>
| </task>
| <end name="Finish" state="Completed"/>
| </process>
|
Test case:
| public void testOptionalParallelAssignment() {
| HashMap variables = new HashMap();
| variables.put("approver1", "approver1");
| variables.put("approver2", "approver2");
| variables.put("approver3", "approver3");
| variables.put("approver4", "approver4");
|
| executionService.startProcessInstanceByKey("join_test", variables);
|
| //First Task Approval
| List<Task> taskList = taskService.findPersonalTasks("approver1");
| taskService.completeTask(taskList.get(0).getId());
| //Second Task Approval
| taskList = taskService.findPersonalTasks("approver2");
| taskService.completeTask(taskList.get(0).getId());
| assertTrue("Atleast One Task should be Active", taskService.findPersonalTasks("approver4").size() == 1);
| assertTrue("Final Task should present", taskService.findPersonalTasks("approver4").get(0).getName().equals("Final task"));
| }
|
How to remove this unwanted transition ??
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4266864#4266864
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4266864
16 years, 4 months