1

So, I am creating an application which will be using flowable. We can say that once my application starts, it's gonna start a particular process deployed on flowable, proceed ahead accordingly.

So, in a way there will be lot of talking between flowable and other application, but for now suppose I just want to call flowable applications from POSTMAN (outside FLOWABLE).

I have used 3 modules: flowable-idm, flowable-modeler, flowable-task in my application.

Everything works fine when I am starting my deployed process from UI of flowable task, problems come when I want to start the processInstance using REST endpoint.

In flowable-task application, there is already a REST endpoint to start the process deployed: http://localhost:8080/flowable-task/app/rest/process-instances.

Now, if I call this from Swagger of flowable-task application, it works fine. But it doesn't work when I try to call it from another application or POSTMAN for now (once POSTMAN call works, I can make the same arrangement in code), where I'm doing a basic auth and providing what's required in body.

Also, there is no error or exception displayed on console, I believe that is because of something catching that error or exception and not displaying anything.

However, to overcome the problem of starting process from POSTMAN, I can use REST endpoint http://localhost:9999/flowable-task/process-api/runtime/process-instances, but this is just a workaround, in future if I create new endpoints I would have to figure out a way to call those endpoints.

I saw this post and I guess this guy was also trying to achieve something similar but for flowable-modeler. It's been suggested to make changes in SecurityConfiguration.java of flowable-task-conf module for my case, but I haven't done such changes before so not exactly sure where to start and how to proceed.

So, my question is how to talk to flowable-applications from outside flowable applications.

Edit: Forum post about getting exception when imported flowable-rest module in workspace

Akki
  • 754
  • 7
  • 22
  • Hope you worked on same. Can you please help me to solve my question: https://stackoverflow.com/q/60925265/6097074 – ankit Mar 30 '20 at 06:41

1 Answers1

2

The flowable-task UI Application is an example application that exposes non public REST API for the UI. However, the application also exposes the full REST API of Flowable.

There is also the flowable-rest application that has the Swagger doc and exposes the full REST API without a UI.

You would want to communicate with those REST endpoints.

The endpoints are under the following contexts:

  • process-api for the Process Engine
  • cmmn-api for the CMMN Engine
  • dmn-api for the DMN Engine
  • idm-api for the IDM Engine
  • form-api for the Form Engine
  • content-api for the Content Engine

For your example you would need to use POST to /process-api/runtime/process-instances for Starting a Process Instance

Filip
  • 19,269
  • 7
  • 51
  • 60
  • Yup, that's correct and it's working fine, I was thinking of a way to use "process-api" to call my own custom endpoints, so for that I am importing "flowable-rest" and trying to use the same endpoint "/process-api/runtime/process-instances" but it gives exceptions like missing beans, shared the forum link in above question – Akki Sep 05 '19 at 11:30
  • @Filip Can you please help me to solve my question: https://stackoverflow.com/q/60925265/6097074 – ankit Mar 30 '20 at 06:41