-
Notifications
You must be signed in to change notification settings - Fork 199
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
Optional zeebe:input
and zeebe:output
#565
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can confirm it works, I did not check the implementation.
b64b43a
to
a108a24
Compare
Please note, that {
"value": "input-1-source",
"type": "String",
"optional": true,
"binding": {
"type": "zeebe:input",
"name": "input-1-target"
}
} |
shouldUpdate(newPropertyValue, newProperty) || | ||
(isOptional && propertyChanged(oldInputOrOutput, oldProperty)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Trying to wrap my head around what's checked here. My assumption would be we always want to update when the property changes and when it is not optional.
I'm wondering if isOptional
is needed here. shouldUpdate
returns false
when the value is empty and optional. For the second condition, isOptional
should always be true when we reach it, or am I missing something?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are totally right, the second isOptional
does not make sense here, also syntax-wise: If the property is optional (and has an empty value), the old input/output should be cleaned up (unless changed).
a108a24
to
1042658
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me!
Closes #559
Script to try it out
npx @bpmn-io/sr bpmn-io/bpmn-js-properties-panel#559-optional-inputs-outputs -c "npm run start:cloud-templates"