Kogito Custom Forms Not Loading (Quarkus, Maven, Html Bootstrap4)

86 views Asked by At

Preface: Kie/Kogito docs are really lacking and consistently outdated with no option to contact devs or give feedback.

Following nothing but a 3-year-old livestream from 2021 and 72+ hours scouring the web for the right dependencies, I finally get to a place where my Kogito project has:

  1. a Kogito-Runtime-Tools/DevUI card in the Quarkus DevUI (showing number of process, jobs, tasks, forms)
  2. access to the Kogito-Runtime-Tools/DevUI with the actual process instances populating on run (no tasks populate)
  3. a local download of the form-generation-cli-linux binary that generates .config and .html files of the auto-generated .json form

This week of work to find all those parts take me to [KIELive#48] Custom forms for User Tasks with Kogito and Quarkus @[23:26]. I have html files generated and according to Pere Fernandez, you can edit the HTML and the quarkus-kogito app will recognize to populate forms according to the newly generated forms and not the old ones. Ref: 5.16.3 Runtime Tools Quarkus Extension > Forms Note: the form preview shown in the docs does not actually work.

But whether the form html is updated in DevUI, or in VSCode, or in the original src/main/resource/forms/ and recompiled and rerun. Nothing updates the user tasks to use the html file. The same form from the auto-gen .json with my variable names is populated, instead of the .html bootstrap form with my descriptions of the variables

If anyone has any clue how to fix this, or experience with Quarkus/Maven to fix the build or config file.. please help! I haven't found anywhere to submit questions for Kogito support.

Project pom: https://github.com/kiegroup/kogito-examples/blob/main/kogito-quarkus-examples/process-usertasks-timer-quarkus-with-console/pom.xml

Form generation cli linux tool: https://www.npmjs.com/package/@kie-tools/form-generation-tool?activeTab=versions

2

There are 2 answers

2
Tuan Anh On BEST ANSWER

Unfortunately, as stated here by Pere (the Kogito team member who's in charge of the feature, also the one presented it in the live stream), this feature never materialized and it stays only a preview of the form in dev ui. The form won't be shown in Task Console.

They did say that Task Console will be revisited and the topic would be on the table, but didn't give a specific time plan.

So, at the moment, users are stuck with the auto generated forms, I think. There don't seem to be even a basic drag and drop form builder for Kogito (Like Camunda's or Redhat Automation Manager's) as things stand.

That's why there's no mentioning of this in the official document, though I concur the documentation of Kogito needs some work too.

The main way of reaching the developers is via the mentioned Zulip chat channels.

2
Jozef Marko On

let me jump into this discussion. I recently joined Pere to maintain our form-generation-tool, however Pere is for sure still the most experienced developer in this area. I will notify him about this thread.

We did some fixes and updates to the form-generation-tool to make it available as cli utility. We also have a blog post about it.

However, as there was mentioned, there is ongoing migration of KIE under Apache and the updates are not publicly available yet.

However, let me try to use timer-quarkus-with-console locally.

  1. I generate the forms using form-generation-tool, I have chosen bootstrap form type. It produced hiring.html, hiring_HRInterview.html and hiring_ITInterview.html
  2. Then I add a dependency 1 and build the project as mvn clean install -DskipTests
  3. Then I start the project as mvn clean quarkus:dev
  4. Then I open the url http://localhost:8080/q/dev-v1/ and click Forms in the jBPM Runtime Tools Quarkus Dev UI card
  5. There I see then form and can edit them, see attached screenshot form console

1

    <dependency>
      <groupId>org.jbpm</groupId>
      <artifactId>jbpm-quarkus-devui-deployment</artifactId>
    </dependency>