question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Initial dynamic element template value is not pre-populated.

See original GitHub issue

Describe the bug

Related to https://github.com/camunda/camunda-modeler/issues/3029 whenever I initially apply an element template the initial value is not applied.

Steps to reproduce

Consider following element template and video attached (works in web modeler and Desktop Modeler (nightly)):

https://user-images.githubusercontent.com/108870003/204857843-927b9ffe-d4e2-4f15-8478-0a7896ba42de.mov

Element template attached below ⬇️.

Expected Behavior

When initially applying an element template with a dynamic binding the valid effects (for which the condition is true) is applied.

Additional Context

Element template to reproduce this:

{
  "$schema": "https://unpkg.com/@camunda/zeebe-element-templates-json-schema/resources/schema.json",
  "name": "dynamic-values",
  "id": "2b9dc4da-6acc-478c-a774-ece1b04ff988",
  "appliesTo": [
    "bpmn:ServiceTask"
  ],
  "properties": [
    {
      "id": "default-changer",
      "label": "Change the default",
      "type": "Dropdown",
      "choices": [
        {
          "name": "Set it as 1",
          "value": "set-1"
        },
        {
          "name": "Set it as 2",
          "value": "set-2"
        },
        {
          "name": "Set it as 3",
          "value": "set-3"
        }
      ],
      "binding": {
        "type": "zeebe:input",
        "name": "ignore"
      },
      "constraints": {
        "notEmpty": true
      }
    },
    {
      "label": "Test",
      "type": "String",
      "value": "1",
      "binding": {
        "type": "zeebe:input",
        "name": "test"
      },
      "condition": {
        "property": "default-changer",
        "equals": "set-1"
      }
    },
    {
      "label": "Test",
      "type": "String",
      "value": "2",
      "binding": {
        "type": "zeebe:input",
        "name": "test"
      },
      "condition": {
        "property": "default-changer",
        "equals": "set-2"
      }
    },
    {
      "label": "Test",
      "type": "String",
      "value": "3",
      "binding": {
        "type": "zeebe:input",
        "name": "test"
      },
      "condition": {
        "property": "default-changer",
        "equals": "set-3"
      }
    }
  ]
}

_Originally posted by @igpetrov in https://github.com/camunda/camunda-modeler/issues/3029#issuecomment-1332453030_


Depends on https://github.com/camunda/camunda-modeler/issues/3327.

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
smbeacommented, Dec 1, 2022

I have a fix for this issue if this is the route we want to go https://github.com/bpmn-io/bpmn-js-properties-panel/pull/824. It also aligns the behaviour with zeebe:property

1reaction
nikkucommented, Dec 1, 2022

As discussed @smbea can you take this one over?

I root caused it and from what it seems like we don’t properly initialize zeebe:input bindings (https://github.com/camunda/camunda-modeler/issues/3327#issuecomment-1333362385).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django: How to pre-populate FormView with dynamic (non ...
1 Answer 1 · Thanks! · @pete try first getting the initial data from super() than update the dictionary with the fields you...
Read more >
Initial Value Templates - Sanity.io
In this article, we'll look at some of the ways you can set your documents with some prefilled initial values. There are two...
Read more >
How to set value in template-driven forms in Angular
We will learn how to set the default or initial value to form controls, dynamically set values, reset the value of the form,...
Read more >
Dynamically prepopulated form field is not saved unless ...
In code, i prepopulate the field based on the user input with: $w('#input8').value = 'XXX'; Hovewer, the field is only saved into database ......
Read more >
Dynamic Data in Forms - Documentation
A form that is saved and retrieved is not prefilled again, even if property or seed values in Manager have changed since the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found