-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpmnReplace
fails when custom meta model uses a String
array
#1518
Comments
bpmnReplace
fails when custom meta model has uses a String
arraybpmnReplace
fails when custom meta model uses a String
array
Thanks for reporting! Sorry for not reaching out to you. So you have the following metamodel {
"name": "AnalysisDetails",
"superClass": [ "Element" ],
"properties": [
{
"name": "path",
"type": "String",
"isMany": true
}
]
} How should the resulting XML look like? Something like this? <analysisDetails path=[ "one", "two", "three" ] /> I'm not even sure, whether this is possible, syntax-wise. When you want to have a collection attribute, why you don't do it like this {
"name": "Path",
"superClass": [ "Element" ],
"properties": [
{
"name": "value",
"isBody": true,
"type": "String"
}
]
},
{
"name": "AnalysisDetails",
"superClass": [ "Element" ],
"properties": [
{
"name": "path",
"type": "Path",
"isMany": true
}
]
} That would result in what you also defined in your example diagram <qa:analysisDetails>
<qa:path>A</qa:path>
<qa:path>B</qa:path>
<qa:path>C</qa:path>
</qa:analysisDetails> Does this resolve your error? |
Hi there! So the resulting xml should indeed look like how I have it defined in the example diagram, so something like this:
The main issue I would have with defining it as you suggested would be that it doesn't map well to our XML schema, which we use to create the moddle descriptor. This should be valid in an XML schema definition: And I think it should map to what I had in the meta model:
I think your suggested meta model would look more like this in an xml schema: And we have been saving/updating these elements on our diagrams with no problems, except for this instance where |
Thanks for sharing! I checked our So indeed, that seems to be a bug in Since there is a workaround, I will move that one to backlog. We are open to contributions that improve the situation! I'll likely follow up with a test case that reproduces the problem. |
With 832f920 I added a simple test case that show cases the broken behavior. Branch: https://github.com/bpmn-io/bpmn-js/tree/string-array-moddle |
Describe the Bug
I am using a custom meta model that has a property of type
String
andisMany
set to true. I am attempting to callbpmnReplace
(frommodeler.get("bpmnReplace")
) and an error is being thrown when the element is being copied:The error prevents the element from being replaced.
I set up an example reproduction using one of the bpmn example repos. Here's a fork of it.
It is worth noting that the example repo was using bpmn-js v3.2.1, where the issue does not happen:
![](https://camo.githubusercontent.com/f5976ceb2f09c6b9765ab1b446e5c6e610d9b88c79ff3de8a3cc8373fe7a9344/68747470733a2f2f692e696d6775722e636f6d2f6541644d594e732e676966)
It happens with v8.8.2, so it looks like it is a regression.
Steps to Reproduce
npm install && npm start
)bpmnReplace
will fail.Expected Behavior
The task should be replaced successfully.
Environment
The text was updated successfully, but these errors were encountered: