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

Signal throw event inputs not copied when using copy & paste #4674

Open
philippfromme opened this issue Nov 6, 2024 · 4 comments
Open

Signal throw event inputs not copied when using copy & paste #4674

philippfromme opened this issue Nov 6, 2024 · 4 comments
Labels
bug Something isn't working

Comments

@philippfromme
Copy link
Contributor

Describe the bug

When copying and pasting a signal throw event with inputs the inputs aren't copied (compare to message throw event).

Camunda_Modeler_xFFg5nfRku

Steps to reproduce

  1. Create signal throw event
  2. Add inputs
  3. Copy and paste
  4. Inputs not copied

Expected behavior

Inputs copied.

Environment

  • Camunda Modeler Version: 5.29.0

Additional context

@philippfromme philippfromme added the bug Something isn't working label Nov 6, 2024
@philippfromme
Copy link
Contributor Author

philippfromme commented Nov 6, 2024

This issue points to a deeper issue. We have multiple sources of truth for whether an element can have inputs and/or outputs:

  • zeebe-bpmn-moddle - allowedIn is not sufficient as we can only specify types (e.g., bpmn:Event) but not event definition types (e.g., bpmn:MessageEventDefinition) or other properties
  • bpmn-js-properties-panel - combines allowedIn with custom checks (e.g., is the element a bpmn:IntermediateThrowEvent with a bpmn:SignalEventDefinition)
  • camunda-bpmn-js-behaviors - combines allowedIn with custom checks but they are different from the ones in bpmn-js-properties-panel (no single source of truth)

The documentation doesn't tell me what elements support inputs and/or outputs so I asked. The outcome is this list:

Input mappings:

  • Call activity
  • Event sub process
  • Sub process
  • End event
    • Message
    • Signal
    • So no input mappings for None, Error, Terminate, Escalation, Compensation
  • Intermediate catch event
    • All except link
  • Intermediate throw event
    • Message
    • Signal
    • So no input mappings for None, Link, Escalation, Compensation
  • Business rule task
  • Job worker task
    • Every element that's implemented as a job worker
  • Receive task
  • Script task
  • User task

Output mappings:

  • Call activity
  • Event sub process
  • Sub process
  • Boundary event
    • All types
  • End event
    • Escalation
    • Message
    • None
    • Signal
    • So no output mappings for Error, Terminate and Compensation
  • Intermediate catch event
    • Escalation
    • Link
    • Message
    • None
    • Signal
    • So no output mappings for Compensation
  • Start event
    • All types
  • Business rule task
  • Job worker task
    • Every element that's implemented as a job worker
  • Receive task
  • Script task
  • User task

Job worker tasks are:

  • Service task
  • Send task
  • Business rule task
  • Script task
  • User task

Where Business rule, script and user tasks have an alternative way of implementing, but both those ways have input/output mappings

I'd like to make sure that we

  1. Make sure the checks when copying and pasting are the same as when showing the properties panel
  2. Make sure that what we define in zeebe-bpmn-moddle is correct

@barmac
Copy link
Collaborator

barmac commented Nov 6, 2024

Where would you expect the single source of truth to be implemented?

@philippfromme
Copy link
Contributor Author

@barmac I'm not sure it's easily possible. We have the same problem with many other properties. But at least we should make sure bpmn-properties-panel and camunda-bpmn-js-behaviors work the same.

@barmac
Copy link
Collaborator

barmac commented Nov 7, 2024

In today's session with @misiekhardcore, we discussed this topic. We noticed that the CopyPasteBehavior is not strictly a behavior in the diagram-js meaning as it's not a Command Interceptor, and only reacts to events via direct subscription on EventBus. The component's API resembles more BpmnRules. @misiekhardcore suggested that both copy/paste and properties panel entries visibility are controlled much in the rules way, so we could employ rules to steer it.
This is a great topic for the hour of code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants