Hellow!

I have 2 processes that both call a service action, both service actions return a error. One of the processes then has a status error and one has the status active without error. With the one with the status error it's nice because it can be triggerd manualy trough service center, the other one not. What am I doing wrong that one process is active but not going to status error?

Hi Freek,

What do you mean by the Service Actions "returning an error"? Just an error code, or producing an Exception? Are the BPT processes equal in their handling of Exceptions?

So I have a BPT that calls a service action, in that service action a error is returned. The BPT stays active but does not show the button to retry in service center. I have seen other cases where a error occurs in a BPT process and a button in service center is available to retry the BPT proces manually. When will this button be visible?

Hi Freek,

I explicitly asked what you mean by "returning an error", and all you did is write again that it is "returning an error". Please look at my post above, and answer the question, thanks :).

Woops sorry Kilian then I did not understood your question correctly, so I'm just doing a raise expection: Abort Activity Change Exception.

Ah, ok, thanks, so you raise an exception. In that case I would assume a button is present. I'll ask around if I can find an expert on this :).

freek wrote:

Woops sorry Kilian then I did not understood your question correctly, so I'm just doing a raise expection: Abort Activity Change Exception.

 Hi Freek,

Can you create a small example that replicates this behaviour and attache it here?

Cheers

 

Hi Freek,

How is the service action being called? Via an Automatic Activity, I presume?

If so, an exception in an Automatic Activity should retry forever - no need for a retry button on Service Center.

As a side note, I'm not 100% sure an Abort Activity Change Exception is detected as such across a service action call. It should have the same retry behaviour, but if it ends up being detected as a "normal" exception, you will likely see an error in the error log.


Miguel

I will attached some screenshots:

I have a BPM process like this:

The execute activity starts the finance branch.

In the FinanceSync a call to a service action is done like:

In that service action a validation is being done and when not valid a error is triggered:


The error is being logged in service center and the BPM process is stopped.

Only instead of showing the BPM process as a error it just stays active:


In other cases a error will make the status of the process active with errors but in this case it doesn't.

Solution

Hi Freek,

I've tried to replicate this behavior (like I asked you to do) and the observed:

  • When you use the Abort Activity, you are preventing the activity from closing.
    • this is the expected behavior
    • this is consistent with the documentation
    • this does not change the status of the process instance to "Active with Errors"

However, if you trigger a user exception this means the activity actually produced an exception and you get the behavior you described.

With Abort Exception:


With User Exception:


The BBB Activity:


So I suspect that sometimes you get the Abort Activity but others the exception is actually coming from your service call (maybe a time out?), check your logs.

It is very hard to help you if you do not create a sample piece of code that illustrates what you described. In fact by doing so you will most likely find the issue. 

But at this point we can only be guessing.

Let us know the end result.

Cheers

Solution

Hi Rui!

Thanks for taking the time to replicate the behavior!

I think your completely right with your observation.

When I call a rest service and a error is returned for example 404 the process will be active with errors.

When I do a manual error trigger of the type abort activity the process stays active.

So in this case it would be a good thing to replace all my manual error triggers by user exceptions so the system will handle them correctly.


Awesome!