ODE
  1. ODE
  2. ODE-236

Add support for from-spec inside a variable declaration to initialize it. . This is a standard BPEL 2.0 construct

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 1.1.1
    • Fix Version/s: 2.0
    • Component/s: BPEL Runtime
    • Labels:
    1. inline-var-init-trunk-rev-764976-20090415.patch
      50 kB
      Madars Vitolins
    2. inline-var-init-trunk-rev-766035-20090418.patch
      82 kB
      Madars Vitolins
    3. inline-var-init-fix-trunk-rev-769578-20090429.patch
      55 kB
      Madars Vitolins
    4. ODE-236-for-1.4.patch
      103 kB
      Gary Brown

      Issue Links

        Activity

        Hide
        Madars Vitolins added a comment -

        Hello Oders!

        I have attached patch for inline variable initialization (file: inline-var-init-trunk-rev-764976-20090415.patch).
        It also includes compiler and runtime test cases.

        This new functionality extensively reuses already existing code for "<assign><copy><from>" elements.
        Please can you review my patch and give any comments/advices if something should be changed?

        Here is some points to consider:
        1. OScope.variables object type changed from HashMap to LinkedHashMap (so the variables can be initialized from previous in the same scope)
        2. At runtime variable initialization is done when SCOPE is created (in constructor)
        3. For ASSIGN activity some methods made public
        4. SCOPE at variable initialization temporary creates ASSIGN activity to call some of it's public methods

        For 3. & 4. maybe some utility class would help (where do you put such?) Or... leave as is?

        Thanks,
        Madars

        Show
        Madars Vitolins added a comment - Hello Oders! I have attached patch for inline variable initialization (file: inline-var-init-trunk-rev-764976-20090415.patch). It also includes compiler and runtime test cases. This new functionality extensively reuses already existing code for "<assign><copy><from>" elements. Please can you review my patch and give any comments/advices if something should be changed? Here is some points to consider: 1. OScope.variables object type changed from HashMap to LinkedHashMap (so the variables can be initialized from previous in the same scope) 2. At runtime variable initialization is done when SCOPE is created (in constructor) 3. For ASSIGN activity some methods made public 4. SCOPE at variable initialization temporary creates ASSIGN activity to call some of it's public methods For 3. & 4. maybe some utility class would help (where do you put such?) Or... leave as is? Thanks, Madars
        Hide
        Matthieu Riou added a comment -

        Overall it's a very good patch, well tested and implemented.

        About point 3&4 I agree it would be better to externalize the few methods you're reusing, instantiating an ASSIGN in SCOPE just to access those isn't very nice. So I'd create an AssignHelper class also in the runtime package that both ASSIGN and SCOPE could use. It wouldn't be a general purpose helper, just one for the specific problem of doing assignments in the runtime so placing it in the same package is fair. Would it also be doable to make common the code you have in SCOPE.initVar and SCOPE.evalLValue ?

        Thanks a lot for the patch!

        Show
        Matthieu Riou added a comment - Overall it's a very good patch, well tested and implemented. About point 3&4 I agree it would be better to externalize the few methods you're reusing, instantiating an ASSIGN in SCOPE just to access those isn't very nice. So I'd create an AssignHelper class also in the runtime package that both ASSIGN and SCOPE could use. It wouldn't be a general purpose helper, just one for the specific problem of doing assignments in the runtime so placing it in the same package is fair. Would it also be doable to make common the code you have in SCOPE.initVar and SCOPE.evalLValue ? Thanks a lot for the patch!
        Hide
        Madars Vitolins added a comment -

        Hi Matthieu,

        I have updated the patch which now uses AssignHelper BUT it extends ACTIVITY and I have added stub for "run()" method.
        This is done because methods that have been moved to AssignHelper used some sort of methods inherited from super class.

        Initially I tried to move those superclass functions to AssignHelper (so that it would be pure class), but it ended up that it would require to copy & extract the logic from 5-6 functions from ACTIVITY class.
        It wouldn't be clean way to copy them because if something changes, then those changes will be needed to apply in both AssignHelper and in ACTIVITY (or some of it's parents).

        This way is better than first because it states what it does (AssignHelper), and it includes methods shared by both ASSIGN and SCOPE.

        If there is any issues with this, please say, I will try to fix.

        Thanks,
        Madars

        Show
        Madars Vitolins added a comment - Hi Matthieu, I have updated the patch which now uses AssignHelper BUT it extends ACTIVITY and I have added stub for "run()" method. This is done because methods that have been moved to AssignHelper used some sort of methods inherited from super class. Initially I tried to move those superclass functions to AssignHelper (so that it would be pure class), but it ended up that it would require to copy & extract the logic from 5-6 functions from ACTIVITY class. It wouldn't be clean way to copy them because if something changes, then those changes will be needed to apply in both AssignHelper and in ACTIVITY (or some of it's parents). This way is better than first because it states what it does (AssignHelper), and it includes methods shared by both ASSIGN and SCOPE. If there is any issues with this, please say, I will try to fix. Thanks, Madars
        Hide
        Matthieu Riou added a comment -

        Patch applied in r769458. Thanks a lot Madars, good patch!

        Show
        Matthieu Riou added a comment - Patch applied in r769458. Thanks a lot Madars, good patch!
        Hide
        Madars Vitolins added a comment -

        Hi Matthieu,

        Here is patch (inline-var-init-fix-trunk-rev-769578-20090429.patch) for current build issue
        1. There is fixed problem for duplicated content
        2. Added missing compiler test files
        3. Small improvment in BPEL compiler

        Thanks,
        Madars

        Show
        Madars Vitolins added a comment - Hi Matthieu, Here is patch (inline-var-init-fix-trunk-rev-769578-20090429.patch) for current build issue 1. There is fixed problem for duplicated content 2. Added missing compiler test files 3. Small improvment in BPEL compiler Thanks, Madars
        Hide
        Tammo van Lessen added a comment -

        Since ODE 2.0 is marked as experimental, this needs to be ported to ODE 1.x (x >= 4).

        Show
        Tammo van Lessen added a comment - Since ODE 2.0 is marked as experimental, this needs to be ported to ODE 1.x (x >= 4).
        Hide
        Gary Brown added a comment -

        Backport of ODE2 fix for adding inline variable support.

        Show
        Gary Brown added a comment - Backport of ODE2 fix for adding inline variable support.
        Hide
        Jeff Yu added a comment -

        Hi Gary,

        Can you please create another jira (for 1.x branch), and then attach your patch on it, so that we can review and apply it, we will try to leave this as 2.0 branch.
        what do you think?

        Show
        Jeff Yu added a comment - Hi Gary, Can you please create another jira (for 1.x branch), and then attach your patch on it, so that we can review and apply it, we will try to leave this as 2.0 branch. what do you think?
        Hide
        Gary Brown added a comment -

        Yes that is fine - ODE-915.

        Show
        Gary Brown added a comment - Yes that is fine - ODE-915 .

          People

          • Assignee:
            Unassigned
            Reporter:
            Hugues Malphettes
          • Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development