e2ebridge / bpmn

BPMN 2.0 execution engine
467 stars 138 forks source link

closed mongodb connections on first completed process #15

Open wiltshirek opened 9 years ago

wiltshirek commented 9 years ago

db connections are closed when a process is done and has no parent. This holds water when a process was launched via a bpmn 'call activity' which is where the notion of 'parent' exists. AFAIK collaborating processes don't seem to have any parent processes but they do have participants who may, and more often than not, are, still in a 'processing' state. Currently the connection to mongo is terminated when a processes ends if it doesn't have any parents. But since collaborating processes don't necessarily have to have parents the first one to complete will kill the connection to mongo. I may be doing something wrong here so if so please let me know. Otherwise, if this is a legitimate issue I'll fix and do a pull request.
Just let me know, thanks.

cyrilschmitt commented 9 years ago

Hello,

You are right. This could be a good improvement. Feel free to make a pool request if you fix it.

Thanks