BpmnError Message

Hi,

I have an inline subprocess where I am using an error end event. In modeller, I can configure the error code, but not an error message. If I throw a BpmnError from script, one of the constructors takes an error code and an error message. Hence in modeller, is it possible to add an error message to an error end event?

The reason I want this is I want to display the error message in a user task form for handling the error.
regards

Rob

@Webcyberrob, Assuming this is the same question I had:

Looks like you have to use 7.6 to access the error message. ?

Hi Stephen,

Thanks for the link - actually I reviwed this thread prior to my post. I believe I am having a different problem.

If I use script, I can create a BpmnError with a code and a message;


throw new BpmnError(“AnErrorCode”, “An Error Message”)

On catching an error, you can now map the code and message to process variables for subsequent use. All good.

My challenge is if I configure an error end event in modeller, whilst I can declare the error code in the properties panel, I cant find a way to declare the message. Hence check out the modeller properties panel on a message end event.

regards
Rob

@Webcyberrob Modeler has likely not been updated.

Nice to know that is now working!!

I assume you have just been modifying the XML directly as a workaround?

Hi Rob,

That is a missing feature in both engine and modeler. A look at ErrorEndEventActivityBehavior proves this since only an error code is propagated. Error message would be the second parameter of the #propagateError invocation. Feel free to open a JIRA ticket.

Cheers,
Thorben

1 Like

Hi!

I’m trying to define some Business Errors for my delegate throwing BpmnError(“myCode”,“myMessage”) in my implemenation…

Is just enought to throw it or define error within bpmn too?

Can you explain me how to use it or post samples please?