microservicessingle-sign-oncamundaorchestrationzeebe

zeebe as microservice orchestrator


i'm wondering about using zeebe as a microservices orchestrator, so i have some questions.. in my case, i want to zeebe as workflow engine (microservices orchestrator) with some other microservices like (paymen, stor..) so about my frontend lets say that i'll use angular, i've noticed that zeebe only provide grpc api, how to use rest to be compatible with angular? what about authentication/authorization? could i use zeebe itself (like camunda) or i should develop a separate microservice for it (or using something like keycloak sso..) and how? thanks all

i've searched for many solutions but everything seems blur for me


Solution

  • You can use client libraries in different languages (including JavaScript) to access the Camunda APIs. Here is a list: https://docs.camunda.io/docs/apis-clients/working-with-apis-clients/

    Using for instance the java client in your backend you can expose a REST service to start your process to your (Angular) front end like:

      @IsAuthenticated
      @PostMapping("/{bpmnProcessId}/start")
      public void startProcessInstance(
          @PathVariable String bpmnProcessId, @RequestBody Map<String, Object> variables) {
    
        LOG.info("Starting process `" + bpmnProcessId + "` with variables: " + variables);
    
        zeebe
            .newCreateInstanceCommand()
            .bpmnProcessId(bpmnProcessId)
            .latestVersion()
            .variables(variables)
            .send();
      }
    

    To work with the task API without graphQL another client library exists. Example: https://github.com/camunda-community-hub/camunda-8-lowcode-ui-template/blob/main/src/main/java/org/example/camunda/process/solution/facade/TaskController.java

    You can find the full example application (uses React, but concepts are same) here: https://github.com/camunda-community-hub/camunda-8-lowcode-ui-template/tree/main/src/main/java/org/example/camunda/process/solution/facade