<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Active Execution with executionId is null?
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/lalitbhatia">Lalit Bhatia</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/550324#550324">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>Hi,</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>m facing this problem when I run my JUnit to test a method to signal an execution which inturn calls this simple code&#160; -</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><h6>&#160;&#160;&#160;&#160; // query the process instance<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ProcessInstanceQuery query = executionService.createProcessInstanceQuery();<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; ProcessInstance pi = query.processInstanceKey(key).list().get(0);<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; if(pi != null){<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; // signal PI to move forward<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; pi = executionService.signalExecutionById(pi.getId());<br/>&#160;&#160;&#160;&#160;&#160;&#160;&#160; }</h6><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>-----------------------------------------------------------------------------------------</p><p>Error Trace</p><p>-----------------------------------------------------------------------------------------</p><p>org.jbpm.api.JbpmException: executionId is null<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.cmd.SignalCmd.&lt;init&gt;(SignalCmd.java:45)<br/>&#160;&#160;&#160; at org.jbpm.pvm.internal.svc.ExecutionServiceImpl.signalExecutionById(ExecutionServiceImpl.java:84)<br/>&#160;&#160;&#160; at com.bankofamerica.crme.clientservice.service.impl.WorkflowServiceImpl.signalExecutionByBusinessKey(WorkflowServiceImpl.java:145)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)<br/>&#160;&#160;&#160; at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)<br/>&#160;&#160;&#160; at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)<br/>&#160;&#160;&#160; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)<br/>&#160;&#160;&#160; at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)<br/>&#160;&#160;&#160; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)<br/>&#160;&#160;&#160; at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89)<br/>&#160;&#160;&#160; at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)<br/>&#160;&#160;&#160; at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)<br/>&#160;&#160;&#160; at $Proxy23.signalExecutionByBusinessKey(Unknown Source)<br/>&#160;&#160;&#160; at com.bankofamerica.crme.clientservice.service.impl.WorkflowServiceNewTest.testSignalExecutionByBusinessKey(WorkflowServiceNewTest.java:52)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br/>&#160;&#160;&#160; at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)<br/>&#160;&#160;&#160; at java.lang.reflect.Method.invoke(Unknown Source)<br/>&#160;&#160;&#160; at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)<br/>&#160;&#160;&#160; at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)<br/>&#160;&#160;&#160; at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)<br/>&#160;&#160;&#160; at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)<br/>&#160;&#160;&#160; at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82)<br/>&#160;&#160;&#160; at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)<br/>&#160;&#160;&#160; at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240)<br/>&#160;&#160;&#160; at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:46)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:180)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.access$000(ParentRunner.java:41)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner$1.evaluate(ParentRunner.java:173)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28)<br/>&#160;&#160;&#160; at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)<br/>&#160;&#160;&#160; at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31)<br/>&#160;&#160;&#160; at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70)<br/>&#160;&#160;&#160; at org.junit.runners.ParentRunner.run(ParentRunner.java:220)<br/>&#160;&#160;&#160; at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180)<br/>&#160;&#160;&#160; at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46)<br/>&#160;&#160;&#160; at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br/>&#160;&#160;&#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)<br/>&#160;&#160;&#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)<br/>&#160;&#160;&#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)<br/>&#160;&#160;&#160; at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>-----------------------------------------------------------------------------------------------------------------------------------------------</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Attached all my config files. </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><strong> </strong>Any suggestion?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thanks,</p><p>Lalit</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/550324#550324">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>