From do-not-reply at jboss.org Tue Aug 30 09:12:54 2011 Content-Type: multipart/mixed; boundary="===============3158852043900875245==" MIME-Version: 1.0 From: do-not-reply at jboss.org To: jbpm-commits at lists.jboss.org Subject: [jbpm-commits] JBoss JBPM SVN: r7008 - in jbpm3/branches/jbpm-3.2-soa/core/src/test: java/org/jbpm/jbpm3213 and 2 other directories. Date: Tue, 30 Aug 2011 09:12:54 -0400 Message-ID: <201108301312.p7UDCsoN006818@svn01.web.mwc.hst.phx2.redhat.com> --===============3158852043900875245== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: marco.rietveld Date: 2011-08-30 09:12:54 -0400 (Tue, 30 Aug 2011) New Revision: 7008 Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3213/ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3213/JBPM321= 3Test.java jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/gp= d.xml jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/pr= ocessdefinition.xml jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/pr= ocessimage.jpg Log: Added simple test for transitions/conditions/decisions (SOA-2010). = Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3213/JBP= M3213Test.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3213/JBPM32= 13Test.java (rev 0) +++ jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbpm/jbpm3213/JBPM32= 13Test.java 2011-08-30 13:12:54 UTC (rev 7008) @@ -0,0 +1,66 @@ +/* + * JBoss, Home of Professional Open Source + * Copyright 2005, JBoss Inc., and individual contributors as indicated + * by the @authors tag. See the copyright.txt in the distribution for a + * full listing of individual contributors. + * + * This is free software; you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of + * the License, or (at your option) any later version. + * + * This software is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this software; if not, write to the Free + * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + * 02110-1301 USA, or see the FSF site: http://www.fsf.org. + */ +package org.jbpm.jbpm3213; + +import org.jbpm.db.AbstractDbTestCase; +import org.jbpm.graph.def.ProcessDefinition; +import org.jbpm.graph.exe.ProcessInstance; + +/** + * Conditions on transitions from decisions. + * = + * @see JBPM-2010= + */ +public class JBPM3213Test extends AbstractDbTestCase { + + protected void setUp() throws Exception { + super.setUp(); + + ProcessDefinition processDefinition =3D ProcessDefinition.parseXmlReso= urce("org/jbpm/jbpm3213/processdefinition.xml"); + deployProcessDefinition(processDefinition); + } + + protected void tearDown() throws Exception { + jbpmConfiguration.getJobExecutor().setNbrOfThreads(1); + super.tearDown(); + } + + public void testConditionsOnDecisions() { + ProcessInstance processInstance =3D jbpmContext.newProcessInstanceForU= pdate("jbpm2010"); + try { = + processInstance.signal(); + fail( "An exception should have been thrown because there are no via= ble guarded transitions."); + } + catch(Exception e ) { = + String message =3D e.getMessage(); + assertTrue("Exception message should refer to failed condition.", me= ssage.matches("condition.*guarding Transition(.*) not met.*")); + } + + long processInstanceId =3D processInstance.getId(); + + processJobs(); + + processInstance =3D jbpmContext.loadProcessInstance(processInstanceId); + assertTrue("expected " + processInstance + " to have NOT ended", ! pro= cessInstance.hasEnded()); + } + +} Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/java/org/jbp= m/jbpm3213/JBPM3213Test.java ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm321= 3/gpd.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/g= pd.xml (rev 0) +++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/g= pd.xml 2011-08-30 13:12:54 UTC (rev 7008) @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or= g/jbpm/jbpm3213/gpd.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm321= 3/processdefinition.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/p= rocessdefinition.xml (rev 0) +++ jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm3213/p= rocessdefinition.xml 2011-08-30 13:12:54 UTC (rev 7008) @@ -0,0 +1,38 @@ + + + + = + + + + = + + + + + + + = + + = + + + + + = + + + + + = + + = + Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or= g/jbpm/jbpm3213/processdefinition.xml ___________________________________________________________________ Added: svn:mime-type + text/plain Added: svn:eol-style + native Added: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/org/jbpm/jbpm321= 3/processimage.jpg =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D (Binary files differ) Property changes on: jbpm3/branches/jbpm-3.2-soa/core/src/test/resources/or= g/jbpm/jbpm3213/processimage.jpg ___________________________________________________________________ Added: svn:mime-type + application/octet-stream --===============3158852043900875245==--