I can use a Delegate Expression as Sequence Flow condition

XMLWordPrintable

    • Type: Feature Request
    • Resolution: Won't Fix
    • Priority: L3 - Default
    • None
    • Affects Version/s: None
    • Component/s: None
    • None

      User Story (Required on creation):

      I can use a Delegate Expression as a Sequence Flow condition. Currently, it is only possible to define a JUEL expression or a script evaluating true or false as a condition type. Defining a Delegate Expression would allow writing a Sequence Flow condition in Java, which is handy, especially when using the Spring Boot Starter.

      Functional Requirements (Required before implementation):

      • The BPMN XML model is extended by the attribute camunda:delegateExpression
      • Camunda Modeler supports it

      Technical Requirements (Required before implementation):

      -

      Limitations of Scope (Optional):

      1. Support delegate expression only (resolving beans)
      2. Additionally support referencing a Java class (seems sensible for consistency reasons)

      Alternative solutions

      1. A delegate expression can be referenced in the existing sequence flow condition type "expression"
        • Pros
          • Low hanging fruit: might be relatively simple to implement; see PR [1]
            • The code changes in the codebase are relatively straight-forward
          • No changes in Camunda Modeler
          • Documentation effort is low
        • Cons
          • As far as I can see, right now, we don't just reuse JUEL expression attributes to allow resolving delegate beans => this would break consistency and would be super confusing for users
            • This argument against it outweighs those for it
      2. A delegate expression can be referenced in any existing JUEL expression; See prototypical implementation [2]
        • Pros
          • Would enable delegate expressions for any notation element that currently provides support for JUEL expression without adding more delegateExpression attributes to the BPMN model
          • One-time effort that might reduce the effort for future feature requests
            • Since our BPMN coverage is quite complete and we don't see many feature requests in this direction, the argument is rather weak
          • See pros of alternative solution #1
        • Cons
          • The existence of both delegateExpression and expression attributes when the latter covers the functionality of the former might be quite confusing for users
            • If we could remove public API, it might be a nice improvement; however, in the current situation with API guarantees and having delegateExpression already at most places, I don't think it would be an improvement that brings much value
          • Maybe there are breaking changes I cannot oversee right now

      Hints (Optional):

      -

      Original Ticket Submitted by Reporter

      Summary

      Support For Delegates in Gateway Expressions

      Description

      See: https://forum.camunda.org/t/gateway-expressions-do-not-support-delegate-executions/26400/4

       

      The goal here is to add delegate capability to gateway expressions.

       

      Happy to make a PR if we can get this added quickly!

      [1] https://github.com/camunda/camunda-bpm-platform/pull/1391
      [2] https://github.com/camunda/camunda-bpm-platform/pull/1391#issuecomment-809737635

        This is the controller panel for Smart Panels app

              Assignee:
              Unassigned
              Reporter:
              Stephen Russett
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: