[JBoss JIRA] Resolved: (JBPM-2135) Next TaskInstance is not created
by Alejandro Guizar (JIRA)
[ https://issues.jboss.org/browse/JBPM-2135?page=com.atlassian.jira.plugin.... ]
Alejandro Guizar resolved JBPM-2135.
------------------------------------
Assignee: Alejandro Guizar
Resolution: Incomplete Description
Using a transaction manager does not mean you do not have to close the JbpmContext. In particular the configuration in your other issue does not even have isCurrentSessionEnabled, so the Hibernate session isn't even attached to your JTA transaction. Please read my comment in JBPM-2128 regarding incomplete descriptions.
> Next TaskInstance is not created
> --------------------------------
>
> Key: JBPM-2135
> URL: https://issues.jboss.org/browse/JBPM-2135
> Project: jBPM
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Runtime Engine
> Affects Versions: jBPM 3.3.0 GA
> Environment: jBOSS 4.2.2, ORACLE 10, JBoss jBPM3 - Core 3.3.0.GA, Struts 2, EJB3
> Reporter: Jasphior S
> Assignee: Alejandro Guizar
> Priority: Critical
> Labels: TaskInstance, creation, ignored
>
> I have a process definition with linear task nodes of about 11 each containing a single task, to finish the task & start the next task(if the flow is not @ the end), as described in the jBPM docs, I usually get the taskinstance by the id and invoke end() to finish that task & the next task's instance gets auto created... however, at times the next task is not created for unknown reasons(no exception thrown!), even when the taskinstance over which the end() is invoked is tagged by jBPM as ended...
> This happens unpredictably!!!
> The only work around i have as of now is to explicitly make the so pitifully ended task open by setting the taskinstance's end_ value to null and again call the end()...
> As of now this is how I'm finding whether the next task is successfully created or not...
> taskInstance.end();
> getJbpmContext().save(taskInstance);
> flushJbpmSession();
> boolean next = true;
> if(taskInstance.getProcessInstance().getEnd() == null) {
> Collection<TaskInstance> list = (Collection<TaskInstance>)taskInstance.getTaskMgmtInstance().getTaskInstances();
> for(TaskInstance instance : list) {
> if(instance.isOpen() && (instance.getCreate().equals(taskInstance.getEnd()) ||
> instance.getCreate().after(taskInstance.getEnd()))){
> next = false;
> break;
> }
> }
> } else {
> next = false;
> }
> if(next) {
> throw new RuntimeException("Task Creation has been skipped! -"+ taskInstance.getId());
> }
> ------------------
> As I'm using the transaction manager, I'm not explicitly closing the jbpmcontext... is the problem due to this?
> also please refer the below link for config info and the other issue...
> https://jira.jboss.org/jira/browse/JBPM-2128
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira