Closed Oleksiivanov closed 8 months ago
Blocker for end-to-end tests of the DynamoDB connector.
The template works correctly within the Modeler on INT and DEV environments, as well as with SM, yet it fails with the element-templates-cli
.
Despite efforts to identify the cause, no solution has been found so far.
Attempts to diagnose the issue have yet to yield any findings.
Notably, the template performs correctly if the condition "property": "input.itemOperation", "equals": "addItem" is omitted, however, this condition is essential and cannot be removed from the current implementation
@barmac , FYI
Thanks for reporting. I'll check if I can reproduce it, and come back with results.
I was able to reproduce the issue, but don't know yet what causes the problem.
I was able to reproduce the issue, but don't know yet what causes the problem.
Thank you for the update. Similarly, I can't find a reason, but this template works with the modeler, and it's already implemented in the connector. It's not urgent, so I will also try to find the reason for this bug when I have time. If there's an update, I'll inform you.
Hey, I tried this out in the current Desktop Modeler nightly build, and the result was:
<bpmn:process id="Process_0mc4oc6" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" />
<bpmn:serviceTask id="Activity_1tnooja" zeebe:modelerTemplate="05d1c06a-b65d-428c-8ca0-10c14b3fb0ee" zeebe:modelerTemplateVersion="3">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:aws-dynamodb:1" />
<zeebe:ioMapping>
<zeebe:input source="itemOperation" target="input.operationGroup" />
<zeebe:input source="addItem" target="input.itemOperation" />
</zeebe:ioMapping>
</bpmn:extensionElements>
</bpmn:serviceTask>
</bpmn:process>
So it's what this tool generates.
And it's the same in Web Modeler:
<bpmn:process id="Process_000j89q" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" />
<bpmn:serviceTask id="Activity_1xauz6b" zeebe:modelerTemplate="7b629c5f-3890-415e-b450-351886a42090" zeebe:modelerTemplateVersion="1707386597105">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:aws-dynamodb:1" />
<zeebe:ioMapping>
<zeebe:input source="itemOperation" target="input.operationGroup" />
<zeebe:input source="addItem" target="input.itemOperation" />
</zeebe:ioMapping>
</bpmn:extensionElements>
</bpmn:serviceTask>
</bpmn:process>
So I believe this is a problem with template or the templates backend, but not the CLI itself.
interesting, rechecked on DEV web modeler:
and in desktop 5.17.0 :
So will try it on other desktop versions on with other environments (INT, PROD) and will add comment with results
5.19.0
<bpmn:process id="Process_1pi1tsj" isExecutable="true">
<bpmn:startEvent id="StartEvent_1" />
<bpmn:serviceTask id="Activity_03hp3ck" zeebe:modelerTemplate="05d1c06a-b65d-428c-8ca0-10c14b3fb0ee" zeebe:modelerTemplateVersion="3">
<bpmn:extensionElements>
<zeebe:taskDefinition type="io.camunda:aws-dynamodb:1" />
<zeebe:ioMapping>
<zeebe:input source="itemOperation" target="input.operationGroup" />
<zeebe:input source="addItem" target="input.itemOperation" />
</zeebe:ioMapping>
</bpmn:extensionElements>
</bpmn:serviceTask>
</bpmn:process>
but on 5.17.0 I can reproduce what you pasted.
So this has changed in 5.18.0, and before was as in your expected diagram.
added question about this in the ask-modeler chat
Between the versions 5.17.0 and 5.18.0, we updated the templates project:
- "bpmn-js-element-templates": "^1.7.0",
+ "bpmn-js-element-templates": "^1.8.0",
Only a single feature was shipped, and it didn't change the production code apart from a comment: https://github.com/bpmn-io/bpmn-js-element-templates/pull/30/files#diff-f8200a0ea8c31c5996490cbd7c2337350b21eea60f66122f98f28dcd37e5838d
❯ git diff v1.7.0 v1.8.0 -- src diff --git a/src/cloud-element-templates/util/propertyUtil.js b/src/cloud-element-templates/util/propertyUtil.js index 267c087..985a7f8 100644 --- a/src/cloud-element-templates/util/propertyUtil.js +++ b/src/cloud-element-templates/util/propertyUtil.js @@ -772,7 +772,7 @@ export function unsetProperty(commandStack, element, property) { }); }
Actually, in v5.18.0 we upgraded camunda-bpmn-js
from v3.8.0 to v3.10.2, and it contained an upgrade of bpmn-js-element-templates
from v1.7.0 to v1.9.2.
This is the diff between these versions: https://github.com/bpmn-io/bpmn-js-element-templates/compare/v1.7.0...v1.9.2
I just noticed that in 5.18.0 the XML looks as expected when I create element from template via triple dot (create/append anything), but is wrong when template is applied to an existing element.
So this is a bug for sure. I will create an issue in the Modeler repo.
The Modeler issue: https://github.com/camunda/camunda-modeler/issues/4124
I am moving this to the backlog until the core issue is fixed. We will then add your template to the test suite.
This is fixed in https://github.com/bpmn-io/element-templates-cli/pull/17
Describe the Bug
The element-templates-cli does not apply specified properties from a JSON template to the BPMN model correctly, affecting the configuration of service tasks for DynamoDB operations.
Steps to Reproduce
Open the element-templates-cli and configure it with the provided JSON template and bpmn files :
add-item.bpmn
totest/fixtures/diagrams
add-item.bpmn click to expand!
test/fixtures/templates/
add-item
test to cliSpec.js :npm run build && npm run test
Observe that properties related to DynamoDB operations, such as tableName and item, are not applied as expected. :
Expected Behavior
The BPMN model generated by the element-templates-cli should correctly include all specified properties from the JSON template. This includes inputs for tableName and item, allowing for proper interaction with DynamoDB within the process.
Environment
Depends on https://github.com/camunda/camunda-modeler/issues/4124