Uploaded image for project: 'Kogito'
  1. Kogito
  2. KOGITO-6346

Setting up MongoDB/PostgreSQL persistence for Serverless workflow errors for generating proto

    XMLWordPrintable

Details

    Description

      I am deploying my SWOrchestration Microservice as Knative/ScaleToZero and it includes a Async Call, which it has to wait for before the Orchestration is considered complete.

      While waiting for this Async call, the SWOrch is scaled to Zero. For it to re-scale to 1 and resume the workflow instance upon reciept of the Async Call, I need to setup Data Persistence to store and retrieve the Workflow Process Instance ID.

      I have modified the Callback Example in my fork and branch so that the Async Call can be returned/triggered by Me manually. This works as desired.

      Next: I am trying to add in Data Persistence via Mongo DB but am failing to make it work. I have so far:

      • Added the Pom Dependency
      • Added in the Application Properties to my MongoDB Server

      Running 

      mvn clean compile quarkus:dev

      I hit the error:

       

      2021-11-30 14:06:37,364 ERROR [io.qua.dep.dev.IsolatedDevModeMain] (main) Failed to start quarkus: java.lang.RuntimeException: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
              [error]: Build step org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor#postGenerationProcessing threw an exception: java.lang.RuntimeException: Error while generating proto for model class null null
              at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.generate(AbstractProtoGenerator.java:143)
              at org.kie.kogito.codegen.process.persistence.proto.AbstractProtoGenerator.protoOfDataClasses(AbstractProtoGenerator.java:52)
              at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.generateProtoMarshaller(PersistenceGenerator.java:278)
              at org.kie.kogito.codegen.process.persistence.PersistenceGenerator.internalGenerate(PersistenceGenerator.java:179)
              at org.kie.kogito.codegen.core.AbstractGenerator.generate(AbstractGenerator.java:69)
              at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.getGeneratedPersistenceFiles(ProcessesAssetsProcessor.java:235)
              at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.generatePersistenceInfo(ProcessesAssetsProcessor.java:198)
              at org.kie.kogito.quarkus.processes.deployment.ProcessesAssetsProcessor.postGenerationProcessing(ProcessesAssetsProcessor.java:165)
      ...
       
      

       

      Which suggests that the Required proto is failed to being generated, meaning that the MongoDB is not storing my Process Instance.

       

      Attachments

        Issue Links

          Activity

            People

              rhn-support-egonzale Enrique Gonzalez Martinez
              prattyush.mangal@ibm.com Prattyush Mangal
              Votes:
              1 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: