Process instance *****[*******] is disconnected

630 views
Skip to first unread message

Neeraj Pandey

unread,
Jul 22, 2016, 4:32:41 AM7/22/16
to jBPM Usage
Hi All,

I have a workflow created which has a script task in it.
I am triggering a perl script from script task and reading the output of it. Perl script takes aroung 3-4 minutes to get completed.
Upon running this workflow sometimes I get following error:

Process instance 251061[OP_POC.PLP_Daily_Check] is disconnected.
WARN  [org.drools.persistence.TransactionSynchronizationRegistryHelper] (default task-12) Unable to put resource app-updateable-resource value [] due to No transaction is running
2016-07-21 17:02:43,914 WARN  [org.drools.persistence.SingleSessionCommandService] (default task-12) Could not commit session: java.lang.RuntimeException: Process instance 251061[OP_POC.PLP_Daily_Check] is disconnected.
  at org.jbpm.process.instance.impl.ProcessInstanceImpl.getProcess(ProcessInstanceImpl.java:100) [jbpm-flow-6.2.0.Final.jar:6.2.0.Final]
  at org.jbpm.process.instance.impl.ProcessInstanceImpl.getContextInstance(ProcessInstanceImpl.java:171) [jbpm-flow-6.2.0.Final.jar:6.2.0.Final]
  at org.jbpm.workflow.instance.WorkflowRuntimeException.initialize(WorkflowRuntimeException.java:56) [jbpm-flow-6.2.0.Final.jar:6.2.0.Final]

2016-07-21 17:02:44,241 WARN  [com.arjuna.ats.arjuna] (default task-12) ARJUNA012077: Abort called on already aborted atomic action 0:ffff0a0e227b:-15c7e80a:57873c42:198aed

2016-07-21 17:02:44,247 WARN  [org.kie.remote.services.cdi.ProcessRequestBean] (default task-12) Unable to execute StartProcessCommand/0: org.kie.remote.services.rest.exception.KieRemoteRestOperationException: Process instance 251061[OP_POC.PLP_Daily_Check] is disconnected.
  at org.kie.remote.services.rest.exception.KieRemoteRestOperationException.internalServerError(KieRemoteRestOperationException.java:132) [kie-remote-services-6.2.0.Final.jar:6.2.0.Final]

Caused by: java.lang.RuntimeException: Process instance 251061[OP_POC.PLP_Daily_Check] is disconnected

and along with that, I am making a rest call to get process instances and this instance is not listed in the output.

Please help me on this.

Thnaks
Neeraj

Maciej Swiderski

unread,
Jul 22, 2016, 5:25:26 AM7/22/16
to Neeraj Pandey, jBPM Usage
this means your transction times out while the script is executing. In general it’s bad practice to use script task to invoke operations, especially long running ones. Intead you should either use cusotm work items and even better (for your case)to use async commands fired by jbpm executor so that is not done as part of process instance transaction but in background and notifies process instance once is completed.

Maciej
--
You received this message because you are subscribed to the Google Groups "jBPM Usage" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+...@googlegroups.com.
To post to this group, send email to jbpm-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jbpm-usage/ba099685-386b-4185-a15b-e294416b8089%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Neeraj Pandey

unread,
Jul 22, 2016, 7:59:39 AM7/22/16
to jBPM Usage, gpk.pand...@gmail.com
Hi Maciej,

Thanks for the response.
I have couple of things to ask now. As I am yet to get a good command on async tasks, I am going to approach one of the followings:

1. increase the transaction timeout value.
         
         how to do it?

2.Create a custom work item.
             
        In this case what happens if custom work item exceeds the transaction time out?
   

Thanks

Maciej Swiderski

unread,
Jul 22, 2016, 8:02:32 AM7/22/16
to Neeraj Pandey, jBPM Usage
On 22.07.2016, at 13:59, Neeraj Pandey <gpk.pand...@gmail.com> wrote:

Hi Maciej,

Thanks for the response.
I have couple of things to ask now. As I am yet to get a good command on async tasks, I am going to approach one of the followings:

1. increase the transaction timeout value.
         
         how to do it?
this depends on the application server you use, so look into its documentation


2.Create a custom work item.
             
        In this case what happens if custom work item exceeds the transaction time out?
as long as it does it synchronously it will suffer from the same issue

Maciej

Neeraj Pandey

unread,
Jul 22, 2016, 8:09:30 AM7/22/16
to jBPM Usage, gpk.pand...@gmail.com
Maciej,

Thanks for the info.

Will give a try to async task.

Thanks

Anand Parthiban

unread,
Sep 30, 2016, 2:57:22 AM9/30/16
to jBPM Usage, gpk.pand...@gmail.com
Maciej,

How do we make the async commands fired by us return the output to process instance. any specific example you can share it with us ?

Any link to look for as we are new to Async Process in JBPM.

Maciej Swiderski

unread,
Sep 30, 2016, 3:01:49 AM9/30/16
to Anand Parthiban, jBPM Usage, Neeraj Pandey
check this project https://github.com/guvnorngtestuser1/jbpm-console-ng-playground-kjar/tree/master/async-examples/src/main/resources that has check weather.bpmn2 process that uses async command to collect weather forecast from external web service.

Maciej

To unsubscribe from this group and stop receiving emails from it, send an email to jbpm-usage+unsubscribe@googlegroups.com.

To post to this group, send email to jbpm-...@googlegroups.com.

Anand Parthiban

unread,
Sep 30, 2016, 3:03:24 AM9/30/16
to jBPM Usage, h3llo...@gmail.com, gpk.pand...@gmail.com
Thanks Maciej for your Quick Reply.

Will Surely look into it.
Message has been deleted

Maciej Swiderski

unread,
Jul 18, 2018, 8:15:46 PM7/18/18
to N Parmar, jBPM Usage
first of all, I would really recommend to upgrade as you’re running on very old version of jBPM. 

Then, the usual cause of this is that you use ksession with singleton strategy and external transaction management like UserTransaction etc. And obviously there might have been a bug which is most likely already solved in later version.

Maciej

On 19 Jul 2018, at 00:49, N Parmar <nishan...@gmail.com> wrote:

We are facing this issue and very frequent in production. Once this disconnect issues appears we need to restart the runtime environment (server restart).
We couldnt figure out the actual root cause though.

We are JBPM 6.1.0.Final

Is it JBPM shares same transaction resources in case of multiple threads performing different operations?

We have multi tenant platform and multiple application perform concurrent operations. We see lots of transaction errors and then this ghost error start appearing
  • class: ProcessInstanceImpl
  • method: getProcess()

    public Process getProcess(){
       if(this.process == null){
         if(processXml == null){
           if(kruntime == null){
              throw new RuntimeException("Process instance " + id + "[" + processId + "] is disconnected. "));
          }else{
             other code ...........
          }
        }
      }
    }
@Maciej Swiderski - Please help on this. It became our nightmare.

N Parmar

unread,
Jul 19, 2018, 2:13:08 PM7/19/18
to jBPM Usage
Thanks a lot!

We are planning to
 - upgrade
- per process strategy

Regards,
Nishant
Reply all
Reply to author
Forward
0 new messages