You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ode.apache.org by "Rafal Rusin (JIRA)" <ji...@apache.org> on 2009/04/20 13:56:47 UTC

[jira] Created: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Scope inside OnEvent doesn't register variables on runtime
----------------------------------------------------------

                 Key: ODE-588
                 URL: https://issues.apache.org/jira/browse/ODE-588
             Project: ODE
          Issue Type: Bug
          Components: BPEL Runtime
    Affects Versions: 1.3.2
            Reporter: Rafal Rusin
             Fix For: 1.3.2
         Attachments: onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff

I did a construct like this:
<scope>
  <onevent operation="...">
    <scope>
      <variables>
            ...
      </variables>
      <assign>...</assign>
     </scope>
  </onevent>
</scope>

When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 

Surrounding scope with another scope is a workaround for this problem.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin updated ODE-588:
----------------------------

    Comment: was deleted

(was: I'm attaching a failing test case.)

> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.2
>            Reporter: Rafal Rusin
>             Fix For: 1.3.2
>
>         Attachments: onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin updated ODE-588:
----------------------------

    Attachment:     (was: onevent-scope-variable-workaround.diff)

> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.2
>            Reporter: Rafal Rusin
>             Fix For: 1.3.2
>
>         Attachments: onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin reassigned ODE-588:
-------------------------------

    Assignee: Rafal Rusin

> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.3
>            Reporter: Rafal Rusin
>            Assignee: Rafal Rusin
>             Fix For: 1.3.3
>
>         Attachments: onevent-scope-variable-fix.diff, onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin updated ODE-588:
----------------------------

    Attachment: onevent-scope-variable-fix.diff

It looks like this simple patch resolves problem:

Index: bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java
===================================================================
--- bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java	(revision 760397)
+++ bpel-runtime/src/main/java/org/apache/ode/bpel/runtime/EH_EVENT.java	(working copy)
@@ -292,7 +292,7 @@
                             // load 'onMessage' activity; we'll do this even if a stop/terminate has been
                             // requested becasue we cannot undo the receipt of the message at this point.
                             ActivityInfo child = new ActivityInfo(genMonotonic(),
-                                    _oevent.activity,
+                                    _oevent,
                                     newChannel(TerminationChannel.class), newChannel(ParentScopeChannel.class));
 
 


It looks like scope inside event handler was instantiated by its internal activity instead of the whole scope activity. 


> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.2
>            Reporter: Rafal Rusin
>             Fix For: 1.3.2
>
>         Attachments: onevent-scope-variable-fix.diff, onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin updated ODE-588:
----------------------------

    Attachment:     (was: onevent-scope-variable-test.diff)

> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.2
>            Reporter: Rafal Rusin
>             Fix For: 1.3.2
>
>         Attachments: onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin updated ODE-588:
----------------------------

    Attachment: onevent-scope-variable-workaround.diff
                onevent-scope-variable-test.diff

I'm attaching a failing test case.

> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.2
>            Reporter: Rafal Rusin
>             Fix For: 1.3.2
>
>         Attachments: onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12700778#action_12700778 ] 

Rafal Rusin commented on ODE-588:
---------------------------------

Here's an exception

04-20@12:55:20 ERROR (BpelEngineImpl.java:408)     - Scheduled job failed; jobDetail={type=INVOKE_INTERNAL, inmem=true, mexid=4611686018427387963, pid={http://ode/bpel/unit-test/TestStaticOnMessage}TestStaticOnMessageProcess-1}
java.lang.RuntimeException: java.lang.NullPointerException
        at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:464)
        at org.apache.ode.jacob.vpu.JacobVPU.execute(JacobVPU.java:139)
        at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.execute(BpelRuntimeContextImpl.java:870)
        at org.apache.ode.bpel.engine.PartnerLinkMyRoleImpl.invokeInstance(PartnerLinkMyRoleImpl.java:240)
        at org.apache.ode.bpel.engine.BpelProcess.invokeProcess(BpelProcess.java:226)
        at org.apache.ode.bpel.engine.BpelProcess.handleWorkEvent(BpelProcess.java:394)
        at org.apache.ode.bpel.engine.BpelEngineImpl.onScheduledJob(BpelEngineImpl.java:399)
        at org.apache.ode.bpel.engine.BpelServerImpl.onScheduledJob(BpelServerImpl.java:391)
        at org.apache.ode.il.MockScheduler.doExecute(MockScheduler.java:265)
        at org.apache.ode.il.MockScheduler.access$000(MockScheduler.java:46)
        at org.apache.ode.il.MockScheduler$3$1.call(MockScheduler.java:110)
        at org.apache.ode.il.MockScheduler.execTransaction(MockScheduler.java:134)
        at org.apache.ode.il.MockScheduler$4.call(MockScheduler.java:151)
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:269)
        at java.util.concurrent.FutureTask.run(FutureTask.java:123)
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
        at org.apache.ode.bpel.engine.BpelRuntimeContextImpl.isVariableInitialized(BpelRuntimeContextImpl.java:188)
        at org.apache.ode.bpel.runtime.ASSIGN.evalLValue(ASSIGN.java:128)
        at org.apache.ode.bpel.runtime.ASSIGN.copy(ASSIGN.java:361)
        at org.apache.ode.bpel.runtime.ASSIGN.run(ASSIGN.java:81)
        at sun.reflect.GeneratedMethodAccessor11.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.apache.ode.jacob.vpu.JacobVPU$JacobThreadImpl.run(JacobVPU.java:451)
        ... 17 more


> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.2
>            Reporter: Rafal Rusin
>             Fix For: 1.3.2
>
>         Attachments: onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin updated ODE-588:
----------------------------

    Attachment: onevent-scope-variable-workaround.diff
                onevent-scope-variable-test.diff

I did a failing test case with workaround. 

> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.2
>            Reporter: Rafal Rusin
>             Fix For: 1.3.2
>
>         Attachments: onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (ODE-588) Scope inside OnEvent doesn't register variables on runtime

Posted by "Rafal Rusin (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/ODE-588?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rafal Rusin closed ODE-588.
---------------------------

    Resolution: Fixed

It looks like it was solved by commit 781860 by Karthick "Define a frame for the event handler's <scope> activity, so that its variables are resolved properly."

> Scope inside OnEvent doesn't register variables on runtime
> ----------------------------------------------------------
>
>                 Key: ODE-588
>                 URL: https://issues.apache.org/jira/browse/ODE-588
>             Project: ODE
>          Issue Type: Bug
>          Components: BPEL Runtime
>    Affects Versions: 1.3.3
>            Reporter: Rafal Rusin
>            Assignee: Rafal Rusin
>             Fix For: 1.3.3
>
>         Attachments: onevent-scope-variable-fix.diff, onevent-scope-variable-test.diff, onevent-scope-variable-workaround.diff
>
>
> I did a construct like this:
> <scope>
>   <onevent operation="...">
>     <scope>
>       <variables>
>             ...
>       </variables>
>       <assign>...</assign>
>      </scope>
>   </onevent>
> </scope>
> When ODE enters assign activity, which contains a reference to variable declared in scope, there is a NPE and job fails. 
> Surrounding scope with another scope is a workaround for this problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.