End process with error using REST API

1
0
-1

Hi every body,

I am currently facing a problem with attached document in the workflow.

The attached document is analyzed with the antivirus and there is a chance that the document will be put in quarantine and I cannot modify the workflow to integrate this case.

Knowing that, my approach consist to create a script to verify if my document is on the quarantine folder or not, in this case I will end my workflow with error or exception.

Can I interrupt my workflow using the REST API? if yes, how can I do so?

Regards

1 answer

1
0
-1
This one is the BEST answer!

Hello,

You can interrupt a process by a REST API: the Message REST API.

1/ in the process, add an Event Sub Process (this is a PLUS in the palet) . In this event Sub-process, add a "catch message event". Base the correlation key on the caseID for example. The event subprocess will end the process (just add after a terminate event)

2/ in your form, send a MESSAGE by the rest API. In the message, for the correlation key, give the current case id

Then be prepared, because if the users click on the "submit button", he will have an error: the case is ended, the task does not exist anymore.

PS: my advice is that you follow training in Bonita to handle this situation.

Comments

Submitted by anass.fergoug on Fri, 08/21/2020 - 09:18

Thank you for your help, I will try to put it in place.

I will follow your advice thumbs_up.png

Notifications