Return-Path: X-Original-To: apmail-ode-commits-archive@www.apache.org Delivered-To: apmail-ode-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 2D7FA18C52 for ; Wed, 30 Dec 2015 06:19:00 +0000 (UTC) Received: (qmail 4984 invoked by uid 500); 30 Dec 2015 06:19:00 -0000 Delivered-To: apmail-ode-commits-archive@ode.apache.org Received: (qmail 4938 invoked by uid 500); 30 Dec 2015 06:19:00 -0000 Mailing-List: contact commits-help@ode.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ode.apache.org Delivered-To: mailing list commits@ode.apache.org Received: (qmail 4929 invoked by uid 99); 30 Dec 2015 06:18:59 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Dec 2015 06:18:59 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D22FFE091A; Wed, 30 Dec 2015 06:18:59 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sathwik@apache.org To: commits@ode.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: ode git commit: ODE-829: Fixed in 1.3.7 for Hibernate DAO Date: Wed, 30 Dec 2015 06:18:59 +0000 (UTC) Repository: ode Updated Branches: refs/heads/ode-1.3.x 1c73c046b -> c0c7b497a ODE-829: Fixed in 1.3.7 for Hibernate DAO Project: http://git-wip-us.apache.org/repos/asf/ode/repo Commit: http://git-wip-us.apache.org/repos/asf/ode/commit/c0c7b497 Tree: http://git-wip-us.apache.org/repos/asf/ode/tree/c0c7b497 Diff: http://git-wip-us.apache.org/repos/asf/ode/diff/c0c7b497 Branch: refs/heads/ode-1.3.x Commit: c0c7b497a8ec1db2dd6d4ee36e00563a19285d16 Parents: 1c73c04 Author: sathwik Authored: Wed Dec 30 11:48:39 2015 +0530 Committer: sathwik Committed: Wed Dec 30 11:48:39 2015 +0530 ---------------------------------------------------------------------- .../ode/axis2/management/RedeployTest.java | 53 ++++++++++++++ .../ode/axis2/management/Retire2Test.java | 2 + .../apache/ode/axis2/management/RetireTest.java | 2 + .../ode/axis2/management/RetireTestVar.java | 65 +++++++++++++++++ .../TestInstanceRetire/noVar/TestRetire.bpel | 67 ++++++++++++++++++ .../TestInstanceRetire/noVar/TestRetire.wsdl | 73 ++++++++++++++++++++ .../TestInstanceRetire/noVar/deploy.xml | 30 ++++++++ .../TestInstanceRetire/withVar/TestRetire.bpel | 71 +++++++++++++++++++ .../TestInstanceRetire/withVar/TestRetire.wsdl | 73 ++++++++++++++++++++ .../TestInstanceRetire/withVar/deploy.xml | 29 ++++++++ .../apache/ode/bpel/engine/BpelEngineImpl.java | 43 ++++++++++-- .../org/apache/ode/bpel/engine/BpelProcess.java | 68 ++++++++++-------- .../ode/bpel/engine/PartnerLinkMyRoleImpl.java | 7 +- .../ode/bpel/engine/replayer/Replayer.java | 2 +- .../ReplayerBpelRuntimeContextImpl.java | 2 +- .../bpel/engine/replayer/ReplayerContext.java | 2 +- .../apache/ode/daohib/bpel/ProcessDaoImpl.java | 4 +- 17 files changed, 551 insertions(+), 42 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/java/org/apache/ode/axis2/management/RedeployTest.java ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/java/org/apache/ode/axis2/management/RedeployTest.java b/axis2-war/src/test/java/org/apache/ode/axis2/management/RedeployTest.java new file mode 100644 index 0000000..23e0415 --- /dev/null +++ b/axis2-war/src/test/java/org/apache/ode/axis2/management/RedeployTest.java @@ -0,0 +1,53 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.ode.axis2.management; + +import org.apache.ode.axis2.Axis2TestBase; +import static org.testng.AssertJUnit.assertTrue; +import org.testng.annotations.Test; + +import javax.xml.namespace.QName; + +/** + * @author Anurag Aggarwal + */ +public class RedeployTest extends Axis2TestBase { + + // @Test(dataProvider="configs") + // not supposed to work, user should not rm .deploy folder maybe ? + public void testRedeploy() throws Exception { + String bundleName = "TestInstanceRetire"; + System.out.println("=> " + server.getODEServer().getProcessStore().getPackages()); + if (server.isDeployed("withVar")) server.undeployProcess(bundleName + "/withVar"); + + QName deployedQName = server.deployProcess(bundleName + "/withVar").iterator().next(); + + server.sendRequestFile("http://localhost:8888/processes/testretire", + bundleName + "/1", "testRequest1.soap"); + + server.undeployProcess(bundleName + "/withVar"); + server.deployProcess(bundleName + "/withVar").iterator().next(); + + String response = server.sendRequestFile("http://localhost:8888/processes/testretire", + bundleName + "/1", "testRequest2.soap"); + + if (server.isDeployed("withVar")) server.undeployProcess(bundleName + "/withVar"); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/java/org/apache/ode/axis2/management/Retire2Test.java ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/java/org/apache/ode/axis2/management/Retire2Test.java b/axis2-war/src/test/java/org/apache/ode/axis2/management/Retire2Test.java index 8562397..81c0f1a 100644 --- a/axis2-war/src/test/java/org/apache/ode/axis2/management/Retire2Test.java +++ b/axis2-war/src/test/java/org/apache/ode/axis2/management/Retire2Test.java @@ -53,5 +53,7 @@ public class Retire2Test extends Axis2TestBase { System.out.println(response); System.out.println("###############################################"); assertTrue(response.indexOf("TEST2") > 0); + if (server.isDeployed("1")) server.undeployProcess(bundleName + "/1"); + if (server.isDeployed("2")) server.undeployProcess(bundleName + "/2"); } } http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java b/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java index 39c7068..32646de 100644 --- a/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java +++ b/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTest.java @@ -52,5 +52,7 @@ public class RetireTest extends Axis2TestBase { System.out.println(response); System.out.println("###############################################"); assertTrue(response.indexOf("DONE") > 0); + if (server.isDeployed("1")) server.undeployProcess(bundleName + "/1"); + if (server.isDeployed("2")) server.undeployProcess(bundleName + "/2"); } } http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTestVar.java ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTestVar.java b/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTestVar.java new file mode 100644 index 0000000..011aeda --- /dev/null +++ b/axis2-war/src/test/java/org/apache/ode/axis2/management/RetireTestVar.java @@ -0,0 +1,65 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ + +package org.apache.ode.axis2.management; + +import org.apache.ode.axis2.Axis2TestBase; +import static org.testng.AssertJUnit.assertTrue; +import org.testng.annotations.Test; + +import javax.xml.namespace.QName; + +/** + * @author Anurag Aggarwal + */ +public class RetireTestVar extends Axis2TestBase { + + @Test(dataProvider="configs") + public void testRetiredInstance() throws Exception { + String response = null; + String bundleName = "TestInstanceRetire"; + System.out.println("=> " + server.getODEServer().getProcessStore().getPackages()); + if (server.isDeployed("withVar")) server.undeployProcess(bundleName + "/withVar"); + if (server.isDeployed("noVar")) server.undeployProcess(bundleName + "/noVar"); + + QName deployedQName = server.deployProcess(bundleName + "/withVar").iterator().next(); + + server.sendRequestFile("http://localhost:8888/processes/testretire", + bundleName + "/1", "testRequest1.soap"); + + server.getODEServer().getProcessManagement().setRetired(deployedQName, true); + server.deployProcess(bundleName + "/noVar"); + + response = server.sendRequestFile("http://localhost:8888/processes/testretire", + bundleName + "/1", "testRequest2.soap"); + + assertTrue("'" + response + "' does not contain 'DONE'.", response.indexOf("DONE") > 0); + + server.sendRequestFile("http://localhost:8888/processes/testretire", + bundleName + "/1", "testRequest1.soap"); + + response = server.sendRequestFile("http://localhost:8888/processes/testretire", + bundleName + "/1", "testRequest2.soap"); + + assertTrue("'" + response + "' does not contain 'XYZ'.", response.indexOf("XYZ") > 0); + + if (server.isDeployed("withVar")) server.undeployProcess(bundleName + "/withVar"); + if (server.isDeployed("noVar")) server.undeployProcess(bundleName + "/noVar"); + } +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.bpel ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.bpel b/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.bpel new file mode 100644 index 0000000..d2e84eb --- /dev/null +++ b/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.bpel @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DONE + $dummy3.TestPart + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.wsdl ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.wsdl b/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.wsdl new file mode 100644 index 0000000..90b70a9 --- /dev/null +++ b/axis2-war/src/test/resources/TestInstanceRetire/noVar/TestRetire.wsdl @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/resources/TestInstanceRetire/noVar/deploy.xml ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/resources/TestInstanceRetire/noVar/deploy.xml b/axis2-war/src/test/resources/TestInstanceRetire/noVar/deploy.xml new file mode 100644 index 0000000..bac2ba8 --- /dev/null +++ b/axis2-war/src/test/resources/TestInstanceRetire/noVar/deploy.xml @@ -0,0 +1,30 @@ + + + + + true + + + + + + http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.bpel ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.bpel b/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.bpel new file mode 100644 index 0000000..3fb8eff --- /dev/null +++ b/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.bpel @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DONE + $dummy.TestPart + + + DONE + $dummy2.TestPart + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.wsdl ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.wsdl b/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.wsdl new file mode 100644 index 0000000..90b70a9 --- /dev/null +++ b/axis2-war/src/test/resources/TestInstanceRetire/withVar/TestRetire.wsdl @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/axis2-war/src/test/resources/TestInstanceRetire/withVar/deploy.xml ---------------------------------------------------------------------- diff --git a/axis2-war/src/test/resources/TestInstanceRetire/withVar/deploy.xml b/axis2-war/src/test/resources/TestInstanceRetire/withVar/deploy.xml new file mode 100644 index 0000000..1c566d2 --- /dev/null +++ b/axis2-war/src/test/resources/TestInstanceRetire/withVar/deploy.xml @@ -0,0 +1,29 @@ + + + + + true + + + + + \ No newline at end of file http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java ---------------------------------------------------------------------- diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java index 0cbb05e..7fdf924 100644 --- a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java +++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelEngineImpl.java @@ -418,9 +418,9 @@ public class BpelEngineImpl implements BpelEngine { final JobDetails we = jobInfo.jobDetail; if( __log.isTraceEnabled() ) __log.trace("[JOB] onScheduledJob " + jobInfo + "" + we.getInstanceId()); - + acquireInstanceLock(we.getInstanceId()); - + // DONT PUT CODE HERE-need this method real tight in a try/catch block, we need to handle // all types of failure here, the scheduler is not going to know how to handle our errors, // ALSO we have to release the lock obtained above (IMPORTANT), lest the whole system come @@ -452,10 +452,10 @@ public class BpelEngineImpl implements BpelEngine { ClassLoader cl = Thread.currentThread().getContextClassLoader(); try { - Thread.currentThread().setContextClassLoader(process._classLoader); + Thread.currentThread().setContextClassLoader(process._classLoader); if (we.getType().equals(JobType.INVOKE_CHECK)) { if (__log.isDebugEnabled()) __log.debug("handleJobDetails: InvokeCheck event for mexid " + we.getMexId()); - + sendPartnerRoleFailure(we, MessageExchange.FailureType.COMMUNICATION_ERROR); return; } else if (we.getType().equals(JobType.INVOKE_INTERNAL)) { @@ -476,7 +476,24 @@ public class BpelEngineImpl implements BpelEngine { } } } - process.handleJobDetails(jobInfo.jobDetail); + + if (we.getType().equals(JobType.INVOKE_INTERNAL)) { + List processes = getAllProcesses(we.getProcessId()); + boolean routed = false; + jobInfo.jobDetail.detailsExt.put("enqueue", false); + + for(BpelProcess proc : processes) { + routed = routed || proc.handleJobDetails(jobInfo.jobDetail); + } + + if(!routed) { + jobInfo.jobDetail.detailsExt.put("enqueue", true); + process.handleJobDetails(jobInfo.jobDetail); + } + } + else { + process.handleJobDetails(jobInfo.jobDetail); + } debuggingDelay(); } finally { Thread.currentThread().setContextClassLoader(cl); @@ -783,5 +800,21 @@ public class BpelEngineImpl implements BpelEngine { } return q; } + + private List getAllProcesses(QName processId) { + String qName = processId.toString(); + if(qName.lastIndexOf("-") > 0) { + qName = qName.substring(0, qName.lastIndexOf("-")); + } + List ret = new ArrayList(); + Iterator> it = _activeProcesses.entrySet().iterator(); + while (it.hasNext()) { + Map.Entry pairs = it.next(); + if(pairs.getKey().toString().startsWith(qName)) { + ret.add(pairs.getValue()); + } + } + return ret; + } } http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java ---------------------------------------------------------------------- diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java index bbf6aff..cfddef7 100644 --- a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java +++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/BpelProcess.java @@ -203,25 +203,25 @@ public class BpelProcess { public interface InvokeHandler { boolean invoke(PartnerLinkMyRoleImpl target, PartnerLinkMyRoleImpl.RoutingInfo routingInfo, boolean createInstance); } - - public void invokeProcess(MyRoleMessageExchangeImpl mex, InvokeHandler invokeHandler) { + + public boolean invokeProcess(MyRoleMessageExchangeImpl mex, InvokeHandler invokeHandler, boolean enqueue) { boolean routed = false; try { _hydrationLatch.latch(1); List targets = getMyRolesForService(mex.getServiceName()); if (targets.isEmpty()) { - String errmsg = __msgs.msgMyRoleRoutingFailure(mex.getMessageExchangeId()); - __log.error(errmsg); - mex.setFailure(MessageExchange.FailureType.UNKNOWN_ENDPOINT, errmsg, null); - return; + //String errmsg = __msgs.msgMyRoleRoutingFailure(mex.getMessageExchangeId()); + //__log.error(errmsg); + //mex.setFailure(MessageExchange.FailureType.UNKNOWN_ENDPOINT, errmsg, null); + return false; } mex.getDAO().setProcess(getProcessDAO()); if (!processInterceptors(mex, InterceptorInvoker.__onProcessInvoked)) { __log.debug("Aborting processing of mex " + mex + " due to interceptors."); - return; + return false; } markused(); @@ -233,7 +233,7 @@ public class BpelProcess { routings = target.findRoute(mex); boolean createInstance = target.isCreateInstance(mex); - if (mex.getStatus() != MessageExchange.Status.FAILURE) { + if (mex.getStatus() != MessageExchange.Status.FAILURE && routings!=null) { for (PartnerLinkMyRoleImpl.RoutingInfo routing : routings) { routed = routed || invokeHandler.invoke(target, routing, createInstance); } @@ -244,7 +244,7 @@ public class BpelProcess { } // Nothing found, saving for later - if (!routed) { + if (!routed && enqueue) { // TODO this is kind of hackish when no match and more than one myrole is selected. // we save the routing on the last myrole // actually the message queue should be attached to the instance instead of the correlator @@ -268,29 +268,35 @@ public class BpelProcess { if (mex.getPattern().equals(MessageExchange.MessageExchangePattern.REQUEST_ONLY) && routed && getCleanupCategories(false).contains(CLEANUP_CATEGORY.MESSAGES)) { mex.release(); } + + return routed; } - + + private boolean isActive() { + return _pconf.getState() == org.apache.ode.bpel.iapi.ProcessState.ACTIVE; + } + /** * Entry point for message exchanges aimed at the my role. * * @param mex */ - void invokeProcess(final MyRoleMessageExchangeImpl mex) { - invokeProcess(mex, new InvokeHandler() { - public boolean invoke(PartnerLinkMyRoleImpl target, PartnerLinkMyRoleImpl.RoutingInfo routing, boolean createInstance) { - if (routing.messageRoute == null && createInstance) { - // No route but we can create a new instance - target.invokeNewInstance(mex, routing); - return true; - } else if (routing.messageRoute != null) { - // Found a route, hitting it - _engine.acquireInstanceLock(routing.messageRoute.getTargetInstance().getInstanceId()); - target.invokeInstance(mex, routing); - return true; - } - return false; - } - }); + boolean invokeProcess(final MyRoleMessageExchangeImpl mex, boolean enqueue) { + return invokeProcess(mex, new InvokeHandler() { + public boolean invoke(PartnerLinkMyRoleImpl target, PartnerLinkMyRoleImpl.RoutingInfo routing, boolean createInstance) { + if (routing.messageRoute == null && createInstance && isActive()) { + // No route but we can create a new instance + target.invokeNewInstance(mex, routing); + return true; + } else if (routing.messageRoute != null) { + // Found a route, hitting it + _engine.acquireInstanceLock(routing.messageRoute.getTargetInstance().getInstanceId()); + target.invokeInstance(mex, routing); + return true; + } + return false; + } + },enqueue); } /** Several myroles can use the same service in a given process */ @@ -407,7 +413,8 @@ public class BpelProcess { /** * @see org.apache.ode.bpel.engine.BpelProcess#handleJobDetails(java.util.Map) */ - public void handleJobDetails(JobDetails jobData) { + public boolean handleJobDetails(JobDetails jobData) { + boolean ret = true; try { _hydrationLatch.latch(1); markused(); @@ -423,7 +430,7 @@ public class BpelProcess { __log.debug("InvokeInternal event for mexid " + we.getMexId()); } MyRoleMessageExchangeImpl mex = (MyRoleMessageExchangeImpl) _engine.getMessageExchange(we.getMexId()); - invokeProcess(mex); + ret = invokeProcess(mex, (Boolean) jobData.detailsExt.get("enqueue")); } else { // Instance level events ProcessInstanceDAO procInstance = getProcessDAO().getInstance(we.getInstanceId()); @@ -431,7 +438,7 @@ public class BpelProcess { if (__log.isDebugEnabled()) { __log.debug("handleJobDetails: no ProcessInstance found with iid " + we.getInstanceId() + "; ignoring."); } - return; + return true; } BpelRuntimeContextImpl processInstance = createRuntimeContext(procInstance, null, null); @@ -462,7 +469,7 @@ public class BpelProcess { if( procInstance.getState() == ProcessState.STATE_COMPLETED_OK || procInstance.getState() == ProcessState.STATE_COMPLETED_WITH_FAULT ) { __log.debug("A matcher event was aborted. The process is already completed."); - return; + return true; } processInstance.matcherEvent(we.getCorrelatorId(), we.getCorrelationKeySet()); } @@ -470,6 +477,7 @@ public class BpelProcess { } finally { _hydrationLatch.release(1); } + return ret; } private void setRoles(OProcess oprocess) { http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java ---------------------------------------------------------------------- diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java index de63dc6..4537286 100644 --- a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java +++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/PartnerLinkMyRoleImpl.java @@ -85,6 +85,9 @@ public class PartnerLinkMyRoleImpl extends PartnerLinkRoleImpl { public boolean isCreateInstance(MyRoleMessageExchangeImpl mex) { Operation operation = getMyRoleOperation(mex.getOperationName()); + if(operation == null) { + return false; + } return _plinkDef.isCreateInstanceOperation(operation); } @@ -98,8 +101,8 @@ public class PartnerLinkMyRoleImpl extends PartnerLinkRoleImpl { Operation operation = getMyRoleOperation(mex.getOperationName()); if (operation == null) { - __log.error(__msgs.msgUnknownOperation(mex.getOperationName(), _plinkDef.myRolePortType.getQName())); - mex.setFailure(MessageExchange.FailureType.UNKNOWN_OPERATION, mex.getOperationName(), null); + //__log.error(__msgs.msgUnknownOperation(mex.getOperationName(), _plinkDef.myRolePortType.getQName())); + //mex.setFailure(MessageExchange.FailureType.UNKNOWN_OPERATION, mex.getOperationName(), null); return null; } setMexRole(mex); http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java ---------------------------------------------------------------------- diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java index 1025ec9..6d07b13 100644 --- a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java +++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/Replayer.java @@ -274,7 +274,7 @@ public class Replayer { } return false; } - }); + },true); } else if (we.getType() == JobType.INVOKE_RESPONSE) { __log.debug("reply for live communication"); ReplayerContext ctx = findReplayedInstance(we.getInstanceId()); http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java ---------------------------------------------------------------------- diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java index 876d859..713abc0 100644 --- a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java +++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerBpelRuntimeContextImpl.java @@ -308,7 +308,7 @@ public class ReplayerBpelRuntimeContextImpl extends BpelRuntimeContextImpl { } return false; } - }); + },true); } http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java ---------------------------------------------------------------------- diff --git a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java index 631c499..a34beec 100644 --- a/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java +++ b/bpel-runtime/src/main/java/org/apache/ode/bpel/engine/replayer/ReplayerContext.java @@ -270,7 +270,7 @@ public class ReplayerContext { } return false; } - }); + },true); for (Exchange e : exchanges) { if (e.getType() == ExchangeType.M) { http://git-wip-us.apache.org/repos/asf/ode/blob/c0c7b497/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ProcessDaoImpl.java ---------------------------------------------------------------------- diff --git a/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ProcessDaoImpl.java b/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ProcessDaoImpl.java index 85d4835..278eb73 100644 --- a/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ProcessDaoImpl.java +++ b/dao-hibernate/src/main/java/org/apache/ode/daohib/bpel/ProcessDaoImpl.java @@ -151,10 +151,10 @@ public class ProcessDaoImpl extends HibernateDao implements ProcessDAO, Deferred @SuppressWarnings("unchecked") public void deleteProcessAndRoutes() { // delete routes - deleteByIds(HCorrelatorSelector.class, getSession().getNamedQuery(HCorrelatorSelector.SELECT_MESSAGE_ROUTE_IDS_BY_PROCESS).setParameter("process", _process).list()); + //deleteByIds(HCorrelatorSelector.class, getSession().getNamedQuery(HCorrelatorSelector.SELECT_MESSAGE_ROUTE_IDS_BY_PROCESS).setParameter("process", _process).list()); // delete process dao - deleteByIds(HCorrelator.class, getSession().getNamedQuery(HCorrelator.SELECT_CORRELATOR_IDS_BY_PROCESS).setParameter("process", _process).list()); + //deleteByIds(HCorrelator.class, getSession().getNamedQuery(HCorrelator.SELECT_CORRELATOR_IDS_BY_PROCESS).setParameter("process", _process).list()); try { getSession().refresh(_process); getSession().delete(_process); // this deletes HCorrelator -> HCorrelatorSelector