Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-11706

Improve scope documentation for setting Variables

    • Icon: Task Task
    • Resolution: Won't Fix
    • Icon: L3 - Default L3 - Default
    • None
    • None
    • documentation
    • None

      Given the following two methods:

      1. DelegateExecution#setVariable(String varName, Object varValue)
      2. DelegateExecution#setVariable(String varName, Object varValue, String destinationScope)

      When invoked, the two methods have different behaviors regarding the Scope of the variables. [1] will set the variable to the lowest possible scope where a variable of that name is found. [2] will set the variable to the specified destinationScope, unless the destinationScope is explicitly set to null.

      Then, as a user, I can read a more clear documentation about this difference in behavior in the JavaDocs, as well as the documentation:

        This is the controller panel for Smart Panels app

            [CAM-11706] Improve scope documentation for setting Variables

            Nikola Koevski created issue -
            Nikola Koevski made changes -
            Link New: This issue is related to CAM-11608 [ CAM-11608 ]
            Nikola Koevski made changes -
            Description Original: *Given* the following two methods:
            # {{DelegateExecution#setVariable(String varName, Object varValue)}}
            # {{DelegateExecution#setVariable(String varName, Object varValue, String destinationScope)}}

            *When* invoked, the two methods have different behaviors regarding the Scope of the variables. [1] will set the variable to the lowest possible scope where a variable of that name is found. [2] will set the variable to the specified {{destinationScope}}, unless the {{destinationScope}} is *explicitly* set to {{null}}.

            *Then,* as a user, I can read about this difference in behavior.
            New: *Given* the following two methods:
            # {{DelegateExecution#setVariable(String varName, Object varValue)}}
            # {{DelegateExecution#setVariable(String varName, Object varValue, String destinationScope)}}

            *When* invoked, the two methods have different behaviors regarding the Scope of the variables. [1] will set the variable to the lowest possible scope where a variable of that name is found. [2] will set the variable to the specified {{destinationScope}}, unless the {{destinationScope}} is *explicitly* set to {{null}}.

            *Then,* as a user, I can read a more clear documentation about this difference in behavior.
            Nikola Koevski made changes -
            Mentioned Roles
            Nikola Koevski made changes -
            Mentioned Groups
            Nikola Koevski made changes -
            Description Original: *Given* the following two methods:
            # {{DelegateExecution#setVariable(String varName, Object varValue)}}
            # {{DelegateExecution#setVariable(String varName, Object varValue, String destinationScope)}}

            *When* invoked, the two methods have different behaviors regarding the Scope of the variables. [1] will set the variable to the lowest possible scope where a variable of that name is found. [2] will set the variable to the specified {{destinationScope}}, unless the {{destinationScope}} is *explicitly* set to {{null}}.

            *Then,* as a user, I can read a more clear documentation about this difference in behavior.
            New: *Given* the following two methods:
            # {{DelegateExecution#setVariable(String varName, Object varValue)}}
            # {{DelegateExecution#setVariable(String varName, Object varValue, String destinationScope)}}

            *When* invoked, the two methods have different behaviors regarding the Scope of the variables. [1] will set the variable to the lowest possible scope where a variable of that name is found. [2] will set the variable to the specified {{destinationScope}}, unless the {{destinationScope}} is *explicitly* set to {{null}}.

            *Then,* as a user, I can read a more clear documentation about this difference in behavior in the JavaDocs, as well as the documentation:
            * https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateExecution.java#L117
            * https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateExecution.java#L117
            Nikola Koevski made changes -
            Mentioned Roles
            Nikola Koevski made changes -
            Mentioned Groups
            Nikola Koevski made changes -
            Description Original: *Given* the following two methods:
            # {{DelegateExecution#setVariable(String varName, Object varValue)}}
            # {{DelegateExecution#setVariable(String varName, Object varValue, String destinationScope)}}

            *When* invoked, the two methods have different behaviors regarding the Scope of the variables. [1] will set the variable to the lowest possible scope where a variable of that name is found. [2] will set the variable to the specified {{destinationScope}}, unless the {{destinationScope}} is *explicitly* set to {{null}}.

            *Then,* as a user, I can read a more clear documentation about this difference in behavior in the JavaDocs, as well as the documentation:
            * https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateExecution.java#L117
            * https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateExecution.java#L117
            New: *Given* the following two methods:
            # {{DelegateExecution#setVariable(String varName, Object varValue)}}
            # {{DelegateExecution#setVariable(String varName, Object varValue, String destinationScope)}}

            *When* invoked, the two methods have different behaviors regarding the Scope of the variables. [1] will set the variable to the lowest possible scope where a variable of that name is found. [2] will set the variable to the specified {{destinationScope}}, unless the {{destinationScope}} is *explicitly* set to {{null}}.

            *Then,* as a user, I can read a more clear documentation about this difference in behavior in the JavaDocs, as well as the documentation:
            * https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/delegate/VariableScope.java#L61
            * https://github.com/camunda/camunda-bpm-platform/blob/master/engine/src/main/java/org/camunda/bpm/engine/delegate/DelegateExecution.java#L117
            Nikola Koevski made changes -
            Mentioned Roles
            Nikola Koevski made changes -
            Mentioned Groups

              thorben.lindhauer Thorben Lindhauer
              nikola.koevski Nikola Koevski
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: