[jbpm-commits] JBoss JBPM SVN: r1993 - in jbossbpm/spec/trunk/modules: dialects/api10/src/main/java/org/jboss/bpm/dialect/api10 and 2 other directories.
do-not-reply at jboss.org
do-not-reply at jboss.org
Mon Aug 25 06:45:38 EDT 2008
Author: thomas.diesler at jboss.com
Date: 2008-08-25 06:45:32 -0400 (Mon, 25 Aug 2008)
New Revision: 1993
Removed:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderFactoryImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderImpl.java
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/ProcessBuilderImpl.java
jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java
Log:
Remove PropertyBuilder
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/GatewayBuilder.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -22,7 +22,7 @@
package org.jboss.bpm.model;
-//$Id:$
+//$Id$
/**
* The GatewayBuilder can be used to build a Gateway dynamically.
@@ -32,9 +32,18 @@
*/
public interface GatewayBuilder extends ProcessBuilder
{
+ /**
+ * Add the default {@link Gate}
+ */
GatewayBuilder addDefaultGate(String targetName);
+ /**
+ * Add a conditional {@link Gate}
+ */
GatewayBuilder addConditionalGate(String targetName, Expression.ExpressionLanguage exprLang, String exprBody);
+ /**
+ * Add an unconditional {@link Gate}
+ */
GatewayBuilder addGate(String targetName);
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -48,7 +48,7 @@
* Add all elements from another {@link Process}.
* This is typically used by a {@link DialectHandler} when processing an include.
*/
- ProcessBuilder addProcessElements(Process proc);
+ ProcessBuilder addProcess(Process proc);
/**
* Get the {@link Process}.
@@ -62,7 +62,7 @@
* Get the {@link Process} for inclusion in another.
* <p/>
* This is the final call to the ProcessBuilder after all elements have been added.
- * The {@link Process} is not initialized and put in state READY
+ * The {@link Process} is not initialized and stays in state CREATED
*/
Process getProcessForInclude();
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilder.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -1,40 +0,0 @@
-/*
- * 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.jboss.bpm.model;
-
-
-
-//$Id$
-
-/**
- * A PropertyBuilder can be used to build a {@link Property} dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public interface PropertyBuilder extends Builder
-{
- /**
- * Create a {@link Property} with a given name and value
- */
- Property newProperty(String name, Object value);
-}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/PropertyBuilderFactory.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -1,64 +0,0 @@
-/*
- * 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.jboss.bpm.model;
-
-//$Id$
-
-import org.jboss.bpm.client.ProcessEngine;
-import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.util.KernelLocator;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-
-/**
- * A Factory for the {@link PropertyBuilder}.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public abstract class PropertyBuilderFactory extends BuilderFactory
-{
- /** The bean name - jBPMMessageBuilderFactory */
- public static final String BEAN_NAME = "jBPMPropertyBuilderFactory";
-
- // Hide the constructor
- protected PropertyBuilderFactory()
- {
- }
-
- /**
- * Get a MessageBuilderFactory instance.
- */
- @SuppressWarnings("deprecation")
- public static PropertyBuilderFactory newInstance()
- {
- // Make sure the engine is bootstrapped
- ProcessEngine.locateProcessEngine();
- Kernel kernel = KernelLocator.getKernel();
- KernelRegistryEntry entry = kernel.getRegistry().getEntry(BEAN_NAME);
- return (PropertyBuilderFactory)entry.getTarget();
- }
-
- /**
- * Get a {@link PropertyBuilder}.
- */
- public abstract PropertyBuilder newPropertyBuilder();
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TaskBuilder.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -32,7 +32,10 @@
*/
public interface TaskBuilder extends ActivityBuilder
{
+ /**
+ * Add a {@link Message} reference.
+ * <p/>
+ * The {@link Message} must be defined at {@link Process} level
+ */
TaskBuilder addMessageRef(String msgName);
-
- TaskBuilder addExecutionHandler(Class<?> clazz);
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessUnmarshaller.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -196,7 +196,7 @@
dhapi.marshallProcess(procIncl, strwr);
// System.out.println(strwr);
- procBuilder.addProcessElements(procIncl);
+ procBuilder.addProcess(procIncl);
}
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/ProcessBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/ProcessBuilderImpl.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/ProcessBuilderImpl.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -69,7 +69,7 @@
return this;
}
- public ProcessBuilder addProcessElements(Process addProc)
+ public ProcessBuilder addProcess(Process addProc)
{
ProcessImpl procImpl = (ProcessImpl)addProc;
for(Message msg : procImpl.getMessages())
Deleted: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderFactoryImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderFactoryImpl.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderFactoryImpl.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -1,42 +0,0 @@
-/*
- * 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.jboss.bpm.ri.model.impl;
-
-//$Id$
-
-import org.jboss.bpm.model.PropertyBuilder;
-import org.jboss.bpm.model.PropertyBuilderFactory;
-
-/**
- * A Factory for the {@link PropertyBuilder}.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class PropertyBuilderFactoryImpl extends PropertyBuilderFactory
-{
- @Override
- public PropertyBuilder newPropertyBuilder()
- {
- return new PropertyBuilderImpl();
- }
-}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderImpl.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/ri/model/impl/PropertyBuilderImpl.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -1,41 +0,0 @@
-/*
- * 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.jboss.bpm.ri.model.impl;
-
-//$Id$
-
-import org.jboss.bpm.model.Property;
-import org.jboss.bpm.model.PropertyBuilder;
-
-/**
- * A PropertyBuilder can be used to build a {@link Property} dynamically.
- *
- * @author thomas.diesler at jboss.com
- * @since 08-Jul-2008
- */
-public class PropertyBuilderImpl implements PropertyBuilder
-{
- public Property newProperty(String name, Object value)
- {
- return new PropertyImpl(name, new ExpressionImpl(value));
- }
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java
===================================================================
--- jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java 2008-08-25 07:59:14 UTC (rev 1992)
+++ jbossbpm/spec/trunk/modules/testsuite/src/test/java/org/jboss/bpm/cts/process/ProcessIntegrityTest.java 2008-08-25 10:45:32 UTC (rev 1993)
@@ -24,7 +24,6 @@
// $Id$
import org.jboss.bpm.InvalidProcessException;
-import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.ProcessBuilder;
import org.jboss.bpm.model.ProcessBuilderFactory;
import org.jboss.bpm.test.DefaultEngineTestCase;
@@ -37,22 +36,13 @@
*/
public class ProcessIntegrityTest extends DefaultEngineTestCase
{
- public void testAnonymousProcess() throws Exception
- {
- // Create a Process through the ProcessBuilder
- ProcessBuilder builder = ProcessBuilderFactory.newInstance().newProcessBuilder();
- Process proc = builder.addProcess(null).addStartEvent("Start").addSequenceFlow("taskA").addTask("taskA").
- addSequenceFlow("End").addEndEvent("End").getProcess();
- assertEquals("AnonymousProcess#0", proc.getName());
- }
-
public void testNoStartState() throws Exception
{
try
{
// Create a Process through the ProcessBuilder
ProcessBuilder builder = ProcessBuilderFactory.newInstance().newProcessBuilder();
- builder.addProcess(null).addTask("taskA").addSequenceFlow("end").addEndEvent("end").getProcess();
+ builder.addProcess("NoStartState").addTask("taskA").addSequenceFlow("end").addEndEvent("end").getProcess();
fail("InvalidProcessException expected");
}
catch (InvalidProcessException ex)
@@ -67,7 +57,7 @@
{
// Create a Process through the ProcessBuilder
ProcessBuilder builder = ProcessBuilderFactory.newInstance().newProcessBuilder();
- builder.addProcess(null).addStartEvent("Start").addSequenceFlow("taskA").addTask("taskA").addSequenceFlow("end").
+ builder.addProcess("NoEndState").addStartEvent("Start").addSequenceFlow("taskA").addTask("taskA").addSequenceFlow("end").
addTask("end").getProcess();
fail("InvalidProcessException expected");
}
More information about the jbpm-commits
mailing list