[JBoss jBPM] - JBPM Variables
by AmiraTalbi
Hi;
I have a big problem that don't let me continue testing my process.
My pb seams to be simple, but .... I have found no solution
So... in few words; I have a method executed concurrently by two or more threads. This method set a processInstance variable; and this variable is recuperated by a second thread to be updated. The var is java List that I recuperate to add a new element.
The pb is, when the second process gets the var setted by the first one, the variable is always null....
So I added a logger to inspect the var just after setting it, and it is always null. But the process is using it internally and it works with no problems :(
List<PtlReportedInfo> confirmedMsgs= (List<PtlReportedInfo> ) jbpmManager.getVariable(bpmId, PtlProcessVariables.CONFIRMATION_MSGS);
|
| log.log(Level.INFO, "________________confirmedMsgs_________________"+ confirmedMsgs);
|
|
| List<PtlReportedInfo> initialVar= confirmedMsgs;
|
| if(confirmedMsgs==null){
| confirmedMsgs=new ArrayList<PtlReportedInfo>();
| }
|
| confirmedMsgs.add(ptlInfo);
| jbpmManager.setProcessVariable(bpmId, PtlProcessVariables.CONFIRMED_MSG,
| confirmedMsgs);
|
| log.log(Level.INFO, "--"+ jbpmManager.getVariable(bpmId, PtlProcessVariables.CONFIRMATION_MSGS));
I need an urgent help please :(
I have no more ideas
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4178056#4178056
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4178056
17 years, 6 months
[JBoss jBPM] - deadlock cycle
by ppc
I'm running jbpm 3.1.4 on jboss 4.2.0.GA the persistence is provided by Derby, a Deadlock arise when I configure more than one MDB to process the messages,
the deadlock is on this code findTaskInstancesByProcessInstance
| @Stateless
| public class ProcessManagerSession .....{
| ...
|
| public Collection<TaskInstance> getActiveTasksByProcessInstance2(Long processId) {
|
|
| List<TaskInstance> taskList = null;
|
| JbpmContext jbpmContext = JbpmConfiguration.getInstance().createJbpmContext();
| try {
| ProcessInstance processInstance = jbpmContext.getProcessInstance(processId);
| taskList = jbpmContext.getTaskMgmtSession().findTaskInstancesByProcessInstance(processInstance);
|
| } catch (Exception e) {
| logger.error(e);
| throw new ProcessException("Could not get active tasks ");
| } finally {
| jbpmContext.close();
| }
|
| ...
| ...
|
Can somebody could give me some pointer to solve this issue ?
anonymous wrote :
| 07:39:51,003 ERROR (WorkManager(2)-18:) [JDBCExceptionReporter] A lock could not be obtained due to a deadlock, cycle of locks and waiters is:
| Lock : ROW, JBPM_TASKINSTANCE, (20,6)
| Waiting XID : {3770, S} , SA, select taskinstan0_.ID_ as ID1_180_, taskinstan0_.NAME_ as NAME3_180_, taskinstan0_.DESCRIPTION_ as DESCRIPT4_180_, taskinstan0_.ACTORID_ as ACTORID5_180_, taskinstan0_.CREATE_ as CREATE6_180_, taskinstan0_.START_ as START7_180_, taskinstan0_.END_ as END8_180_, taskinstan0_.DUEDATE_ as DUEDATE9_180_, taskinstan0_.PRIORITY_ as PRIORITY10_180_, taskinstan0_.ISCANCELLED_ as ISCANCE11_180_, taskinstan0_.ISSUSPENDED_ as ISSUSPE12_180_, taskinstan0_.ISOPEN_ as ISOPEN13_180_, taskinstan0_.ISSIGNALLING_ as ISSIGNA14_180_, taskinstan0_.ISBLOCKING_ as ISBLOCKING15_180_, taskinstan0_.TASK_ as TASK16_180_, taskinstan0_.TOKEN_ as TOKEN17_180_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN18_180_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM19_180_ from JBPM_TASKINSTANCE taskinstan0_, JBPM_TOKEN token1_ where taskinstan0_.TOKEN_=token1_.ID_ and token1_.PROCESSINSTANCE_=? and taskinstan0_.ISSUSPENDED_<>1 and taskinstan0_.ISOPEN_=1
| Granted XID : {3769, X}
| Lock : ROW, JBPM_TASKINSTANCE, (21,6)
| Waiting XID : {3769, S} , SA, select taskinstan0_.ID_ as ID1_180_, taskinstan0_.NAME_ as NAME3_180_, taskinstan0_.DESCRIPTION_ as DESCRIPT4_180_, taskinstan0_.ACTORID_ as ACTORID5_180_, taskinstan0_.CREATE_ as CREATE6_180_, taskinstan0_.START_ as START7_180_, taskinstan0_.END_ as END8_180_, taskinstan0_.DUEDATE_ as DUEDATE9_180_, taskinstan0_.PRIORITY_ as PRIORITY10_180_, taskinstan0_.ISCANCELLED_ as ISCANCE11_180_, taskinstan0_.ISSUSPENDED_ as ISSUSPE12_180_, taskinstan0_.ISOPEN_ as ISOPEN13_180_, taskinstan0_.ISSIGNALLING_ as ISSIGNA14_180_, taskinstan0_.ISBLOCKING_ as ISBLOCKING15_180_, taskinstan0_.TASK_ as TASK16_180_, taskinstan0_.TOKEN_ as TOKEN17_180_, taskinstan0_.SWIMLANINSTANCE_ as SWIMLAN18_180_, taskinstan0_.TASKMGMTINSTANCE_ as TASKMGM19_180_ from JBPM_TASKINSTANCE taskinstan0_, JBPM_TOKEN token1_ where taskinstan0_.TOKEN_=token1_.ID_ and token1_.PROCESSINSTANCE_=? and taskinstan0_.ISSUSPENDED_<>1 and taskinstan0_.ISOPEN_=1
| Granted XID : {3770, X}
| . The selected victim is XID : 3770.
| 07:39:51,005 ERROR (WorkManager(2)-18:) [TaskMgmtSession] org.hibernate.exception.LockAcquisitionException: could not execute query
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4177859#4177859
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4177859
17 years, 6 months