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

Element Templates Feature Can Update Versions #399

Closed
1 task done
philippfromme opened this issue Nov 24, 2020 · 1 comment · Fixed by #404
Closed
1 task done

Element Templates Feature Can Update Versions #399

philippfromme opened this issue Nov 24, 2020 · 1 comment · Fixed by #404
Assignees
Labels
enhancement New feature or request

Comments

@philippfromme
Copy link
Contributor

philippfromme commented Nov 24, 2020

  • applying an element template takes previous element template into account and if there is one the new element template will be applied according to our defined rules:
  1. If property is set in new template it will override unless property was set by old template and changed afterwards
  2. If property is not defined in new template it will unset
  3. Sub-properties of complex properties (e.g. camunda:In, camunda:Out, camunda:ExecutionListener) will be handled according to these rules if they can be identified

Examples:

Element 👴 Old Template 👨 New Template ▶️ Result
"foo" value = "foo" value = "bar" ▶️ "bar"
"baz" value = "foo" value = "bar" ▶️ "baz"
undefined property not specified value = "bar" ▶️ "bar"
"foo" property not specified value = "bar" ▶️ "bar"
"foo" value = "foo" property not specified ▶️ undefined
"foo" value = "foo" value = undefined ▶️ undefined

Child of camunda/camunda-modeler#1969

@philippfromme
Copy link
Contributor Author

philippfromme commented Nov 24, 2020

List of complex properties:

camunda:Property

Can be identified by name. Can have an id property according to the model but it's not set in the properties panel.

Example: <camunda:property name="foo" value="bar" />

camunda:InputParameter

Can be identified by name.

Example: <camunda:inputParameter name="foo">${bar}</camunda:inputParameter>

camunda:OutputParameter

Can be identified by value which is serialized as body.

Example: <camunda:outputParameter name="foo">${bar}</camunda:outputParameter>

camunda:In

Can be identified by target.

Example: <camunda:in source="foo" target="bar" /> or <camunda:in sourceExpression="${foo}" target="bar" />

camunda:Out

Can be identified by source.

Example: <camunda:out source="foo" target="bar" /> or <camunda:out sourceExpression="${foo}" target="bar" />

camunda:ExecutionListener

Execution listeners are always hidden and therefore can be overridden. Only execution listeners with scripts can be created through templates.

Examples:

<camunda:executionListener class="Foo.java" event="start" />

<camunda:executionListener class="Foo.java" event="start">
  <camunda:field name="foo">
    <camunda:string>bar</camunda:string>
  </camunda:field>
</camunda:executionListener>

<camunda:executionListener expression="${foo}" event="start" />

<camunda:executionListener delegateExpression="${foo}" event="start" />

<camunda:executionListener event="start">
  <camunda:script scriptFormat="FooScript">console.log('foo');</camunda:script>
</camunda:executionListener>

camunda:Field

Can be identified by string or expression.

Examples:

<camunda:field name="foo">
  <camunda:string>bar</camunda:string>
</camunda:field>

<camunda:field name="foo">
  <camunda:expression>${bar}</camunda:expression>
</camunda:field>

Scope Elements

camunda:Connector

Can be identified by id.

Example:

<camunda:connector>
  <camunda:inputOutput>
    <camunda:inputParameter name="foo">foo</camunda:inputParameter>
    <camunda:outputParameter name="bar">bar</camunda:outputParameter>
  </camunda:inputOutput>
  <camunda:connectorId>foo</camunda:connectorId>
</camunda:connector>

@nikku nikku added the ready Ready to be worked on label Nov 24, 2020 — with bpmn-io-tasks
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed ready Ready to be worked on labels Dec 3, 2020
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Dec 14, 2020
barmac pushed a commit that referenced this issue Dec 16, 2020
@fake-join fake-join bot closed this as completed in #404 Dec 16, 2020
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Dec 16, 2020
fake-join bot pushed a commit that referenced this issue Dec 16, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants