Skip to content
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

Ability for user to still add ExecutionListeners when Element Template is applied #893

Open
codygulley opened this issue Mar 17, 2023 · 3 comments
Labels

Comments

@codygulley
Copy link

codygulley commented Mar 17, 2023

Is your feature request related to a problem? Please describe.

When an element template is applied only explicitly defined properties in the element template are rendered. This means that when I select an element template I lose the ability to add execution listeners.

Screen Shot 2023-03-17 at 2 56 30 PM

Business Case:
I have a custom delegate defined and I want to provide an element template for that delegate so that the model designer does not need to know implementation details such as Java Class path, input/output names, etc. However, there are cases where inputs/output variables may need to be pre/post processed (or other actions taken) in an execution listener and I lose the ability for a user to add execution listeners when the template is applied.

Describe the solution you'd like

On the element template definition allow for a variable at the root called allowUserDefinedExecutionListeners that is a boolean that will show/hide the section for execution listeners and will allow/disallow the ability to add new ones.

It will enable this section in the properties panel (as seen on a basic service task)
Screen Shot 2023-03-17 at 2 58 51 PM

Describe alternatives you've considered

  1. Not using element templates
    Not good UX because a user needs to know technical details of the implementation.
  2. Apply the element template, defined the values, then unlink the element template to allow adding execution listeners.
    Will allow for applying execution listeners, but loses the ability update to a newer version of an element template.
@codygulley codygulley added the enhancement New feature or request label Mar 17, 2023
@nikku
Copy link
Member

nikku commented Mar 20, 2023

@codygulley Essentially, as part of element templates, you'd like to control which additional (stock) editing sections are being shown? This is a feature we had in the old 0.x properties panel.

Focussed on execution listeners only it would be more controlled (less risk) to implement.

@codygulley
Copy link
Author

@nikku That is correct. I am mainly interested in execution listeners.

IMHO I can't think of a use case where I would need to supply other "stock" sections outside the template (i.e. input, outputs, etc) as those would have a strong contract with the delegate/connector.

@nikku
Copy link
Member

nikku commented Mar 22, 2023

Issue understood. Moving to backlog.


If you want to contribute @codygulley a reasonable way is to re-use entriesVisible.

Allow it to (optionally) be an object of 'component -> boolean' mappings, or a list of components that may be visible. The only allowed option shall be executionListeners.

Alternatively we could go a little leaner approach and simply allow that property to be an object entry names as keys.

But either way we'd need to realize the foundation in https://github.com/camunda/element-templates-json-schema/blob/9e7328bdb70118c0f71cc21563b2c00d6946d242/packages/element-templates-json-schema-shared/src/defs/base.json#L77.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants