I am new to the world of BPMN and Flowable. I am working in an application where we want to initiate a workflow of document approval from our application and execute the approval process in Flowable. Our document approval process follows a maker-checker kind of workflow. Here is what I want to accomplish:
Whenever a document is uploaded to our application, I want to make a REST API call to Flowable with a payload which contains some details about the document to initiate the approval workflow. The BPMN process should use the data sent in the API payload while executing the workflow.
I need help to understand how do I start / initiate a BPMN process in Flowable from an external application by calling a REST API with some payload.
On this I have another followup query. As I am reading more on this, I found in the document that using Event Registry I can receive events from any source including HTTP. While in the modeller i can see JMS, Kafka and RabbitMQ, I don’t see the HTTP as an option. Is it a limitation of the open source version or am I missing something. Can you please help? Any link to an example of using HTTP as event registry will be greatly useful. Thanks in advance!
Could you elaborate a bit more on your use case?
When you talk about HTTP. Does a ‘plain’ REST call not suffice?
For that the event registry is not needed. You can initiate or resume a process instance using the REST API.
My use case is to initiate an approval workflow in Flowable via a REST call from an external (the parent) application. Based on some sequence flows and rules (DMN), the workflow in Flowable should select the approver(s) [Human Task]. The approval could be sequential in a finite number of steps (L1, L2 …) or could be parallel. When the approval goes to the approver, say an approve / reject button is shown in the external application. The approver approves in the external application via the press of the button and then the call should come back to Flowable. Then Flowable token moves to a service task, does some processing and finally make a call back to the external (parent) application. The workflow ends.
I am currently stuck on how can I show the approve / reject button in the external application when the task is waiting at the human approval. I don’t intend to give direct access of my Flowable instance to the users, else the task could have been completed by the human inside Flowable itself.
As I can envision, there is a good amount of back & forth interaction between Flowable and the external application which I want to do via HTTP (REST calls)
I was trying to understand what could be the difference between a plain REST call with some payload vs sending an event via the event registry with HTTP. I could not find much details about the HTTP based event registry in the documentation, so kinda confused.
The HTTP way of triggering an event is more of a backup-solution. Typically the event will come through a channel, which a Flowable concept that encapsulates a message queue such as ActiveMQ, Kafka, etc.
Typically this is done through tasks forms, and buttons are called ‘outcomes’. If you use the example UI application, that should become quickly clear when using the forms. In a world with REST communication, the side where the task is shown would then need to render the task form and send the payload of the form back to the Flowable REST API.