cancel
Showing results for 
Search instead for 
Did you mean: 

Global eventlistener and history api

mpriess
Champ in-the-making
Champ in-the-making
Hi,

I checked the board, the documentation and the engine and I miss the following:

- A global listener/interceptor/bus whatever which can catch events and sending out notifications for each process without modeling. For example to inform the user that an error occure via XMPP or E-Mail or something else.
- Is it possible to get the status of a process with the history api? I like to implement a dashboard which shows running and failed process instances.

Are there plans or ways to implement this features?
10 REPLIES 10

mmaker1234
Champ in-the-making
Champ in-the-making
Hello,

I'm not quite good in the BPM slang - what "process without modeling" means?

From business logic point of view - what do you mean by "an error occure"? Where do you expect this error to occur?
I can share our experience here: Our processes contain calls to our business logic. We expect that our business logic might fail and throw an exception. That is why our process definitions contain activities to
- notify the user
- help (an administrator) to repeat the business logic call (if appropriate)
Additionally, BPMN 2.0 contains so called compensation activities - take a look on them.

Yes, it is possible to reveal the state and the history of a process instance but you have to:
- properly configure the history level;
- design your process definitions to persist their state right before the activities where you expect crashes.

Although my posting does not give concrete answers to your questions, I hope it contains helpful information.

jbarrez
Star Contributor
Star Contributor
I want to add this to the explanation above: it is also possible to use BpmnParseListeners (note: will be changed to BpmnParseHandlers in 5.12) to hook in custom logic to any step in the process. That way you can for example send an event for every sequencefloiw that is taken…

mpriess
Champ in-the-making
Champ in-the-making
My business logik throws maybe an error and an administrator or an user get a notification and should be able to repeat a part of the process.

Hello,
That is why our process definitions contain activities to
- notify the user
- help (an administrator) to repeat the business logic call (if appropriate)

That's the feature what I like to use, but without doing the explicit modeling on each process.

jbarrez
Star Contributor
Star Contributor
Like I said above: that is possible with a custom class that is added to the process using a BpmnParseListener.

mpriess
Champ in-the-making
Champ in-the-making
Ok If I use a BpmnParseListeners. I get a call foreach step that is taken. Is this correct? But how can I detect the state or an error inside the ParseListener and retrigger a part of my process. Could you provide an example?

jbarrez
Star Contributor
Star Contributor
Ok If I use a BpmnParseListeners. I get a call foreach step that is taken.Is this correct?

No, you get the possibility to hook in custom logic during the parsing of the step.

But how can I detect the state or an error inside the ParseListener and retrigger a part of my process. Could you provide an example?

I haven't tried this, but what I would do is wrap the ActivityBehaviour of the service task with a custom ActivityBehaviour that catches any Exception and then send an email or whatever you want to do.

mpriess
Champ in-the-making
Champ in-the-making
Ok thanks. Any idea how I can retrigger or start a part of a process?

jbarrez
Star Contributor
Star Contributor
Hmm that is more tricky. The easiest would be to send an event to some external queue. That queue is processed and it restarts the process based on what was in the event.

mpriess
Champ in-the-making
Champ in-the-making
ok thanks, but how can I adress a special part of the process? This is very important for me, because every task need a lot of time.

For example:
A –> B —> C –> D

C failed because something was wrong in B. Now I like to skip back to B and repeat from B forward.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.