Populating form fields through variables in Camunda 8.5

Hello,
I am learning Camunda 8 with the video course Camunda 8 - Getting Started with Human Workflow, but on Camunda SaaS 8.5 it appears to work differently as described in the course. The description of the problem follows.
Create a simplistic process, the diagram of which is here:
greetings-01-diagram

The forms embedded to task “Enter Greeting” is as follows:

The form embedded to task “Read Greeting” is as follows:

Deploy the process to the cluster.
Start the process.
Open Tasklist. Form “Enter Greeting” appears.
Assign the task to yourself.
Enter “Hello!” to “Greeting” field and click button “Complete Task”.

Open Operate. Task “Read Greeting” is active now. List of variables contains greeting1=“Hello!”.

Open Tasklist. Task “Read Greeting” appears.
Assign the task to yourself.
Actual result: All fields on the form are empty.

Expected result: Field “Greeting” contains text “Hello!”.
Click checkbox “Greeting Accepted” and click button “Complete Task”.

Open Operate. Process status is “Complete” now.
Actual result: Variables contains greeting1=“”, greetingAccepted1=“true”.

Expected result: Variables contains greeting1=“Hello!”, greetingAccepted1=“true”.

So, the question is — Is it a bug in Camunda 8.5 or should fields in the froms be populatet in another way?

Hi @wissenstein, welcome to the forum! I just did a quick test with my SaaS 8.5 cluster, and it works as expected - the second form shows the greeting entered in the first one. So I don’t think there’s a bug, but there’s definitely something not connected quite right in your forms.

When you added the forms to the user tasks, did you use the linked, embedded, or form key option? (Default should be linked.)

My first guess is that the form is embedded, which means the form definition is part of the BPMN model and not a separately deployed file. If you change the form in Modeler the embedded copy isn’t automatically updated. (This is the advantage to using linked forms.) Perhaps the embedded form has a different form key for the text field in the second form?

1 Like

Hi! Yes, your guess is right, the both forms are embedded.
I’ll try to change to linked forms and see, what happens in this case.

1 Like

@wissenstein - if you want to continue to use embedded forms, you need to add one additional step to your deployment process: update the embedded form on the user task. Linked forms are deployed separately with the process, and the process references them, so they are generally always up to date. There are some limitations with form linking to be aware of as well: Form linking | Camunda 8 Docs

I deployed a version of the process with linked forms. Now greeting1 is kept among the process variables, but the second form still does not show it in the field. :thinking:

@wissenstein - that is strange. Can you attach your BPMN and form files here? You can export them from Modeler (click the vertical “…” from the file list to download), then attach them to the reply. Then we can dig a bit deeper to see what’s happening!

@nathan.loding , ok! Here is the process definition: Greetings.bpmn (3.6 KB),

here are the forms:
Enter Greeting.form (660 Bytes)
Read Greeting.form (901 Bytes)

@wissenstein - without editing those files, I uploaded them to Web Modeler, deployed them to my 8.5 cluster, and it worked!


It’s possible that an older version of the process was run again. One thing you can do is to delete all your deployed processes and start again from the beginning. This, of course, isn’t a great option in a true production environment, but for learning it can be quite helpful.

The other question is how are you starting the process? If you don’t want to delete the resources, it’s worthwhile to make sure you’re starting the newest instance. How you do that differs a bit depending on how you’re currently starting the process though.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.