How To: Keycloak, Flowable and OpenLDAP

Not so long ago I wrote a series of posts about Flowable:

And recently I wrote about Getting started with Keycloak, Angular, OpenID Connect and Keycloak and Angular, OAuth 2.0 and Keycloak.

In this post, I’ll walk you through the steps I followed to get Keycloak to work with Flowable and OpenLDAP.

5 Likes

@Robinyo: wow, that is an impressive set of posts! Many thanks for writing and sharing these.

awesome work and its very useful for the dev community -thank you very much

I am finding it hard on how to run the same on Google Cloud Platform - Standard Environment would be great, but Flexible environment also works.

Helped me a lot!

Is it possible to query task from multiple ProcessEngines running on different ports in Serendipity ?

@Croburg Yes, it is possible :slight_smile:

Flowable’s REST API supports HTTP Basic Auth. So you would need to configure the REST API default user credentials (e.g., Username: flowable-rest and Password: test) and endpoints for each instance.

proxy.conf.json:

{
  "/engine-rest": {
    "target": "http://localhost:8080",
    "secure": false,
    "logLevel": "debug"
  },
  "/flowable-task-1": {
    "target": "http://localhost:5100",
    "secure": false,
    "logLevel": "debug",
    "headers": {
      "Content-Type": "application/json",
      "Authorization": "Basic Zmxvd2FibGUtcmVzdDp0ZXN0"
    }
  },
  "/flowable-task-2": {
    "target": "http://localhost:5101",
    "secure": false,
    "logLevel": "debug",
    "headers": {
      "Content-Type": "application/json",
      "Authorization": "Basic Zmxvd2FibGUtcmVzdDp0ZXN0"
    }
  },
  "/api": {
    "target": "http://localhost:3001",
    "secure": false,
    "logLevel": "debug"
  }
}

And, update the Task Service to check for tasks (GET runtime/tasks) in each engine instance.

1 Like

@vamsi

Serendipity’s Developer Documentation includes a step by step guide to help you build and run (OpenLDAP, Keycloak, Flowable and) Serendipity.

If you run into any problems you can raise an issue.

@Robinyo

And, update the Task Service to check for tasks (GET runtime/tasks) in each engine instance.

Could you provide me an example…

Thanks for replying.

Since i´m very new to this and don´t have any experiences, i´m struggling to find a solution.
I set the ´processEngineUriPrefix`to "/process-api-0/ ",… and rewrite them to /process-api/. Continung with the approach to make multiple GetRequests with a loop, but can´t find a way to combine and return them properly.

const list = [0, 1];

for (const i in list) {
  const endpoint = `${this.processEngineUriPrefix}` + i + `/runtime/tasks`;

    this.httpClient.get<TaskListModel>(endpoint, this.getHttpOptions(params)).pipe(
    tap(() => {

      this.logger.info('TasksService: getTasks() completed' + i);

    }),
    catchError(error => {

      this.logger.info('TasksService: getTasks() -> catchError()');

      if (error === undefined) {

        error = new Error(HTTP_SERVER_ERROR_CONNECTION_REFUSED);
        throw error;

      } else {

        return this.handleError('Get tasks', []);
        // return throwError(error);
      }

    })
  );

Does anybody have any suggestions?

br marko.

See: https://www.learnrxjs.io/operators/combination/merge.html

1 Like

Ah okay, thank you very much