JBoss JBPM SVN: r3657 - in projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client: mapsplugin and 1 other directory.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-01-15 16:21:47 -0500 (Thu, 15 Jan 2009)
New Revision: 3657
Added:
projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/
projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java
projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java
Log:
maps editor impl
Added: projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java
===================================================================
--- projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java (rev 0)
+++ projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsEditor.java 2009-01-15 21:21:47 UTC (rev 3657)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.console.client.mapsplugin;
+
+import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.MenuSection;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.View;
+import com.google.gwt.user.client.ui.Frame;
+
+/**
+ * An example editor that embeds google maps into the console
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class MapsEditor extends Editor
+{
+ public final static String ID = "org.jboss.bpm.console.plugin.MapsEditor";
+
+ public MapsEditor(ApplicationContext appContext)
+ {
+ super(appContext);
+
+ // an example view component added to the editor
+ final View defaultView = new View(appContext) {
+
+ public String getViewId()
+ {
+ return ID+".defaultView";
+ }
+
+ public String getIconCSS()
+ {
+ return "";
+ }
+ };
+
+ // keep it simple, just use an iframe
+ Frame frame = new Frame();
+ frame.setWidth("660");
+ frame.setHeight("448");
+ frame.setUrl("http://maps.google.com");
+
+ // assemble the view
+ defaultView.add(frame);
+ defaultView.setPaddings(10,0,0,0);
+ defaultView.setTitle("Maps");
+
+ // add it to the editor
+ addView(defaultView, false);
+ }
+
+ public String getEditorId()
+ {
+ return ID;
+ }
+
+ public String getTitle()
+ {
+ return "Google Maps Plugin Example";
+ }
+
+ public String getIconCSS()
+ {
+ return "";
+ }
+
+ public MenuSection provideMenuSection()
+ {
+ return new MenuSection("Maps Plugin", "", new MapsNavigationTree(appContext));
+ }
+}
Added: projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java
===================================================================
--- projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java (rev 0)
+++ projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/mapsplugin/MapsNavigationTree.java 2009-01-15 21:21:47 UTC (rev 3657)
@@ -0,0 +1,65 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.console.client.mapsplugin;
+
+import com.gwtext.client.widgets.tree.TreePanel;
+import com.gwtext.client.widgets.tree.TreeNode;
+import com.gwtext.client.widgets.tree.event.TreeNodeListenerAdapter;
+import com.gwtext.client.data.Node;
+import com.gwtext.client.core.EventObject;
+import org.jboss.bpm.console.client.ApplicationContext;
+
+class MapsNavigationTree extends TreePanel
+{
+
+ public MapsNavigationTree(final ApplicationContext appContext)
+ {
+
+ TreeNode root = new TreeNode("Google Maps");
+
+ TreeNode navEntry = new TreeNode("Open maps");
+ navEntry.setExpanded(true);
+ navEntry.addListener(
+ new TreeNodeListenerAdapter()
+ {
+ public void onClick(Node node, EventObject eventObject)
+ {
+ if (appContext.hasEditor(MapsEditor.ID))
+ {
+ appContext.showEditor(MapsEditor.ID);
+ }
+ else
+ {
+ appContext.addEditor(new MapsEditor(appContext));
+ }
+
+ }
+ }
+ );
+
+ root.appendChild(navEntry);
+
+ setRootVisible(true);
+ setRootNode(root);
+ root.setExpanded(true);
+ }
+}
17 years, 3 months
JBoss JBPM SVN: r3656 - in jbpm3/trunk/modules: core/src/test/java/org/jbpm/jbpm1778 and 3 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-01-15 12:44:42 -0500 (Thu, 15 Jan 2009)
New Revision: 3656
Added:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1798/
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1798/JBPM1798Test.java
Removed:
jbpm3/trunk/modules/userguide/src/main/docbook/de/
Modified:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1778/JBPM1778Test.java
jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java
Log:
remove unsupported german userguide
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1778/JBPM1778Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1778/JBPM1778Test.java 2009-01-15 17:24:16 UTC (rev 3655)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1778/JBPM1778Test.java 2009-01-15 17:44:42 UTC (rev 3656)
@@ -19,7 +19,7 @@
{
public void testEmptyMapVariables()
{
- ProcessDefinition pd = getProcessDEfinition();
+ ProcessDefinition pd = getProcessDefinition();
ProcessInstance pi = pd.createProcessInstance(new HashMap<String, String>());
TaskMgmtInstance tmi = pi.getTaskMgmtInstance();
@@ -32,7 +32,7 @@
public void testNonEmptyMapVariables()
{
- ProcessDefinition pd = getProcessDEfinition();
+ ProcessDefinition pd = getProcessDefinition();
HashMap<String, String> vars = new HashMap<String, String>();
vars.put("uno", "dos");
@@ -46,7 +46,7 @@
assertEquals("ProcessInstance vars not empty", 1, piVars.size());
}
- private ProcessDefinition getProcessDEfinition()
+ private ProcessDefinition getProcessDefinition()
{
ProcessDefinition pd = ProcessDefinition.parseXmlString(
"<process-definition>" +
Added: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1798/JBPM1798Test.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1798/JBPM1798Test.java (rev 0)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1798/JBPM1798Test.java 2009-01-15 17:44:42 UTC (rev 3656)
@@ -0,0 +1,53 @@
+package org.jbpm.jbpm1798;
+
+import org.jbpm.db.AbstractDbTestCase;
+import org.jbpm.graph.def.ActionHandler;
+import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.graph.exe.ExecutionContext;
+import org.jbpm.graph.exe.ProcessInstance;
+
+/**
+ * Potential nullpointer in asynchronous jobs when process ends
+ *
+ * https://jira.jboss.org/jira/browse/JBPM-1798
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ */
+public class JBPM1798Test extends AbstractDbTestCase
+{
+ public void testJobExecution()
+ {
+ ProcessDefinition pd = getProcessDefinition();
+ jbpmContext.deployProcessDefinition(pd);
+
+ pd.createProcessInstance();
+
+ newTransaction();
+
+ startJobExecutor();
+ }
+
+ private ProcessDefinition getProcessDefinition()
+ {
+ ProcessDefinition pd = ProcessDefinition.parseXmlString(
+ "<process-definition name='customjobexecution' initial='start'>" +
+ " <node name='start'>" +
+ " <transition to='end'>" +
+ " <action async='true' class='" + AsyncAction.class.getName() + "' />" +
+ " </transition>" +
+ " </node>" +
+ " <end-state name='end' />" +
+ "</process-definition>");
+ return pd;
+ }
+
+ public static class AsyncAction implements ActionHandler
+ {
+ private static final long serialVersionUID = 1L;
+
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
+ System.out.println("do stuff");
+ }
+ }
+}
Property changes on: jbpm3/trunk/modules/core/src/test/java/org/jbpm/jbpm1798/JBPM1798Test.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java 2009-01-15 17:24:16 UTC (rev 3655)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java 2009-01-15 17:44:42 UTC (rev 3656)
@@ -13,7 +13,8 @@
import org.jbpm.graph.exe.ExecutionContext;
import org.jbpm.graph.exe.ProcessInstance;
-public class JobExecutorDbTest extends AbstractDbTestCase {
+public class JobExecutorDbTest extends AbstractDbTestCase
+{
static final int nbrOfConcurrentProcessExecutions = 20;
static final int timeout = 60000;
@@ -22,20 +23,23 @@
static List<Long> allocatedProcessIds = Collections.synchronizedList(new ArrayList<Long>());
@Override
- protected void setUp() throws Exception {
+ protected void setUp() throws Exception
+ {
super.setUp();
- deployProcess();
+ deployProcess();
getJbpmConfiguration().getJobExecutor().setNbrOfThreads(5);
}
@Override
- protected void tearDown() throws Exception {
+ protected void tearDown() throws Exception
+ {
getJbpmConfiguration().getJobExecutor().setNbrOfThreads(1);
deleteProcess();
super.tearDown();
}
- public void testJobExecutor() {
+ public void testJobExecutor()
+ {
launchProcesses();
processJobs(timeout);
assertEquals(createExpectedResults(), collectedResults);
@@ -96,17 +100,21 @@
jbpmContext.deployProcessDefinition(processDefinition);
}
- void launchProcesses() {
- for (int i = 0; i < nbrOfConcurrentProcessExecutions; i++) {
+ void launchProcesses()
+ {
+ for (int i = 0; i < nbrOfConcurrentProcessExecutions; i++)
+ {
newTransaction();
ProcessInstance processInstance = jbpmContext.newProcessInstanceForUpdate("bulk messages");
processInstance.signal();
}
}
- Set<String> createExpectedResults() {
+ Set<String> createExpectedResults()
+ {
Set<String> expectedResults = new TreeSet<String>();
- for (int i = 0; i < nbrOfConcurrentProcessExecutions; i++) {
+ for (int i = 0; i < nbrOfConcurrentProcessExecutions; i++)
+ {
String prefix = (i < 10 ? "0" : "");
expectedResults.add(prefix + i + "a");
expectedResults.add(prefix + i + "b");
@@ -120,16 +128,19 @@
return expectedResults;
}
- void deleteProcess() {
+ void deleteProcess()
+ {
ProcessDefinition processDefinition = graphSession.findLatestProcessDefinition("bulk messages");
graphSession.deleteProcessDefinition(processDefinition);
}
- public static class AutomaticActivity implements ActionHandler {
+ public static class AutomaticActivity implements ActionHandler
+ {
private static final long serialVersionUID = 1L;
- public void execute(ExecutionContext executionContext) throws Exception {
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
Long id = executionContext.getProcessInstance().getId();
String procIndex = getProcessIndex(id);
@@ -139,11 +150,13 @@
}
}
- public static class AsyncAction implements ActionHandler {
+ public static class AsyncAction implements ActionHandler
+ {
private static final long serialVersionUID = 1L;
- public void execute(ExecutionContext executionContext) throws Exception {
+ public void execute(ExecutionContext executionContext) throws Exception
+ {
Long id = executionContext.getProcessInstance().getId();
String procIndex = getProcessIndex(id);
@@ -153,7 +166,8 @@
}
}
- static synchronized String getProcessIndex(Long id) {
+ static synchronized String getProcessIndex(Long id)
+ {
if (allocatedProcessIds.contains(id) == false)
allocatedProcessIds.add(id);
17 years, 3 months
JBoss JBPM SVN: r3655 - jbpm3/trunk/modules/userguide/src/main/docbook/en/modules.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-01-15 12:24:16 -0500 (Thu, 15 Jan 2009)
New Revision: 3655
Modified:
jbpm3/trunk/modules/userguide/src/main/docbook/en/modules/configuration.xml
Log:
[JBPM-1161] Bad references to property "jbpm.hibernate.cfg.xml"
Modified: jbpm3/trunk/modules/userguide/src/main/docbook/en/modules/configuration.xml
===================================================================
--- jbpm3/trunk/modules/userguide/src/main/docbook/en/modules/configuration.xml 2009-01-15 17:01:29 UTC (rev 3654)
+++ jbpm3/trunk/modules/userguide/src/main/docbook/en/modules/configuration.xml 2009-01-15 17:24:16 UTC (rev 3655)
@@ -207,7 +207,7 @@
<para>This file contains hibernate configurations and references to the
hibernate mapping resource files.</para>
<para>Location: <literal>hibernate.cfg.xml</literal> unless specified
- otherwise in the jbpm.hibernate.cfg.xml property in the jbpm.properties file.
+ otherwise in the resource.hibernate.cfg.xml property in the jbpm.cfg.xml file.
In the jbpm project the default hibernate cfg xml file is located in
directory <literal>src/config.files/hibernate.cfg.xml</literal></para>
</section>
17 years, 3 months
JBoss JBPM SVN: r3654 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/command.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-01-15 12:01:29 -0500 (Thu, 15 Jan 2009)
New Revision: 3654
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/StartProcessInstanceCommand.java
Log:
[JBPM-1876] Missing jpbmContext.save on StartProcessInstanceCommand
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/StartProcessInstanceCommand.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/StartProcessInstanceCommand.java 2009-01-15 17:01:17 UTC (rev 3653)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/command/StartProcessInstanceCommand.java 2009-01-15 17:01:29 UTC (rev 3654)
@@ -31,6 +31,9 @@
processInstance.signal();
else
processInstance.signal(startTransitionName);
+
+ // [JBPM-1876] Missing jpbmContext.save on StartProcessInstanceCommand
+ jbpmContext.save(processInstance);
}
return object;
}
17 years, 3 months
JBoss JBPM SVN: r3653 - in jbpm4/trunk/modules: jpdl/src/main/java/org/jbpm/jpdl/activity and 17 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-01-15 12:01:17 -0500 (Thu, 15 Jan 2009)
New Revision: 3653
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBehaviourBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/EnvironmentDefaults.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultTypeSet.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/TypeSet.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestBehaviourBuilder.java
Removed:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/builder/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/builder/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/DescriptorBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/NodeBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebRequestContext.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebSessionContext.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/VariableTypeResolver.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestActivityBuilder.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/execution/
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/externalactivity/
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/VariablesTest.java
Modified:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/CompositeBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/EventBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/FlowBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ProcessDefinitionBuilder.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/VariableTypeResolverDescriptor.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/activities/PrintLnBuilder.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/CustomTypeVariableTest.java
Log:
JBPM-1973 further conversions to ProcessDefinitionBuilder
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveBuilder.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/activity/ExclusiveBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -21,18 +21,19 @@
*/
package org.jbpm.jpdl.activity;
+import org.jbpm.pvm.builder.ActivityBehaviourBuilder;
import org.jbpm.pvm.builder.CompositeBuilder;
-import org.jbpm.pvm.builder.NodeBuilder;
+import org.jbpm.pvm.builder.ActivityBuilder;
import org.jbpm.pvm.internal.wire.Descriptor;
/**
* @author Tom Baeyens
*/
-public class ExclusiveBuilder extends NodeBuilder<ExclusiveBuilder> {
+public class ExclusiveBuilder extends ActivityBehaviourBuilder {
- public ExclusiveBuilder(CompositeBuilder compositeBuilder, String nodeName) {
- super(compositeBuilder, nodeName);
+ public ExclusiveBuilder(ActivityBuilder activityBuilder) {
+ super(activityBuilder);
}
public ExclusiveBuilder handler(Descriptor descriptor) {
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBehaviourBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBehaviourBuilder.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBehaviourBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -0,0 +1,43 @@
+/*
+ * 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.pvm.builder;
+
+import org.jbpm.pvm.internal.model.NodeImpl;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class ActivityBehaviourBuilder {
+
+ protected ActivityBuilder activityBuilder;
+ protected NodeImpl node;
+
+ public ActivityBehaviourBuilder(ActivityBuilder activityBuilder) {
+ this.activityBuilder = activityBuilder;
+ this.node = activityBuilder.node;
+ }
+
+ public ActivityBuilder endBehaviour() {
+ return activityBuilder;
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBehaviourBuilder.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBuilder.java (from rev 3641, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/NodeBuilder.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBuilder.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -0,0 +1,102 @@
+/*
+ * 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.pvm.builder;
+
+import java.lang.reflect.Constructor;
+
+import org.jbpm.pvm.internal.model.NodeImpl;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+
+/**
+ * @author Tom Baeyens
+ */
+public class ActivityBuilder extends CompositeBuilder {
+
+ private static final Class<?>[] ACTIVITYBEHAVIOURBUILDER_PARAMTYPES = new Class<?>[]{ActivityBuilder.class};
+
+ /** the enclosing composite */
+ protected CompositeBuilder compositeBuilder;
+ protected NodeImpl node;
+
+ public ActivityBuilder(CompositeBuilder compositeBuilder, String nodeName) {
+ this.compositeBuilder = compositeBuilder;
+ this.node = compositeBuilder.createActivity();
+ this.compositeElement = node;
+ this.node.setName(nodeName);
+ }
+
+ public ActivityBuilder initial() {
+ setProcessDefinitionInitial(node);
+ return this;
+ }
+
+ protected void setProcessDefinitionInitial(NodeImpl initial) {
+ compositeBuilder.setProcessDefinitionInitial(initial);
+ }
+
+ public <T extends ActivityBehaviourBuilder> T startBehaviour(Class<T> activityBehaviourBuilderType) {
+ return startBehaviour(null, activityBehaviourBuilderType);
+ }
+
+ public <T extends ActivityBehaviourBuilder> T startBehaviour(String nodeName, Class<T> activityBehaviourBuilderType) {
+ if (activityBehaviourBuilderType==null) {
+ throw new RuntimeException("activityBuilderType is null");
+ }
+ try {
+ Constructor<T> constructor = activityBehaviourBuilderType.getConstructor(ACTIVITYBEHAVIOURBUILDER_PARAMTYPES);
+ T nodeBuilder = constructor.newInstance(new Object[]{this});
+ return nodeBuilder;
+ } catch (Exception e) {
+ throw new RuntimeException("couldn't instantiate activity behaviour builder type "+activityBehaviourBuilderType.getName(), e);
+ }
+ }
+
+ public CompositeBuilder endActivity() {
+ return compositeBuilder;
+ }
+
+ public FlowBuilder startFlow(String to) {
+ UnresolvedFlow unresolvedFlow = new UnresolvedFlow();
+ unresolvedFlow.transition = node.createOutgoingTransition();
+ unresolvedFlow.destinationName = to;
+ addUnresolvedFlow(unresolvedFlow);
+ return new FlowBuilder(this, unresolvedFlow.transition);
+ }
+
+ public ProcessDefinitionImpl endProcess() {
+ return compositeBuilder.endProcess();
+ }
+
+ public ActivityBuilder flow(String to) {
+ startFlow(to);
+ return this;
+ }
+
+ public ActivityBuilder flow(String to, String name) {
+ startFlow(to).name(name);
+ return this;
+ }
+
+ protected void addUnresolvedFlow(UnresolvedFlow unresolvedFlow) {
+ compositeBuilder.addUnresolvedFlow(unresolvedFlow);
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ActivityBuilder.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/CompositeBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/CompositeBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/CompositeBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -21,86 +21,88 @@
*/
package org.jbpm.pvm.builder;
-import java.lang.reflect.Constructor;
-
import org.jbpm.JbpmException;
import org.jbpm.activity.Activity;
import org.jbpm.pvm.internal.model.CompositeElementImpl;
import org.jbpm.pvm.internal.model.EventImpl;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.internal.model.VariableDefinitionImpl;
import org.jbpm.pvm.internal.wire.Descriptor;
-
/**
* @author Tom Baeyens
*/
public abstract class CompositeBuilder {
- private static final Class<?>[] NODEBUILDER_PARAMTYPES = new Class<?>[]{CompositeBuilder.class, String.class};
+ private static final Class<?>[] ACTIVITYBUILDER_PARAMTYPES = new Class<?>[]{CompositeBuilder.class, String.class};
protected CompositeElementImpl compositeElement;
+ public abstract ProcessDefinitionImpl endProcess();
protected abstract void addUnresolvedFlow(UnresolvedFlow unresolvedFlow);
- public abstract ProcessDefinitionImpl endProcess();
+ protected abstract void setProcessDefinitionInitial(NodeImpl initial);
- protected NodeImpl createNode() {
+ protected NodeImpl createActivity() {
return compositeElement.createNode();
}
public EventImpl createEvent(String eventName) {
return compositeElement.createEvent(eventName);
}
+
+ public CompositeBuilder variable(String name, String type) {
+ variable(name, type, null);
+ return this;
+ }
+ public CompositeBuilder variable(String name, String type, Descriptor descriptor) {
+ VariableDefinitionImpl variableDefinition = compositeElement.createVariableDefinition();
+ variableDefinition.setDestination(name);
+ variableDefinition.setTypeName(type);
+ variableDefinition.setSourceDescriptor(descriptor);
+ return this;
+ }
- public <T extends NodeBuilder> T startNode(Descriptor activityDescriptor) {
- return (T) startNode(null, activityDescriptor);
+ public ActivityBuilder startActivity() {
+ return startActivity((String)null);
}
- public NodeBuilder<NodeBuilder<?>> startNode(String nodeName, Descriptor activityDescriptor) {
+ public ActivityBuilder startActivity(String nodeName) {
+ return new ActivityBuilder(this, nodeName);
+ }
+
+ public ActivityBuilder startActivity(Descriptor activityDescriptor) {
+ return startActivity(null, activityDescriptor);
+ }
+
+ public ActivityBuilder startActivity(String nodeName, Descriptor activityDescriptor) {
if (activityDescriptor==null) {
throw new RuntimeException("activityDescriptor is null");
}
- NodeBuilder<NodeBuilder<?>> nodeBuilder = new NodeBuilder<NodeBuilder<?>>(this, nodeName);
- nodeBuilder.node.setBehaviour(activityDescriptor);
- return nodeBuilder;
+ ActivityBuilder activityBuilder = new ActivityBuilder(this, nodeName);
+ activityBuilder.node.setBehaviour(activityDescriptor);
+ return activityBuilder;
}
- public NodeBuilder<NodeBuilder<?>> startNode(Activity activity) {
- return startNode(null, activity);
+ public ActivityBuilder startActivity(Activity activity) {
+ return startActivity(null, activity);
}
- public NodeBuilder<NodeBuilder<?>> startNode(String nodeName, Activity activity) {
+ public ActivityBuilder startActivity(String nodeName, Activity activity) {
if (activity==null) {
throw new RuntimeException("activity is null");
}
- NodeBuilder<NodeBuilder<?>> nodeBuilder = new NodeBuilder<NodeBuilder<?>>(this, nodeName);
- nodeBuilder.node.setBehaviour(activity);
- return nodeBuilder;
+ ActivityBuilder activityBuilder = new ActivityBuilder(this, nodeName);
+ activityBuilder.node.setBehaviour(activity);
+ return activityBuilder;
}
- public <T extends NodeBuilder> T startNode(Class<T> nodeBuilderType) {
- return startNode(null, nodeBuilderType);
- }
-
- public <T extends NodeBuilder> T startNode(String nodeName, Class<T> nodeBuilderType) {
- if (nodeBuilderType==null) {
- throw new RuntimeException("nodeBuilderType is null");
- }
- try {
- Constructor<T> constructor = nodeBuilderType.getConstructor(NODEBUILDER_PARAMTYPES);
- T nodeBuilder = constructor.newInstance(new Object[]{this, nodeName});
- return nodeBuilder;
- } catch (Exception e) {
- throw new RuntimeException("couldn't instantiate node builder type "+nodeBuilderType.getName(), e);
- }
- }
-
public EventBuilder startEvent(String eventName) {
return new EventBuilder(this, compositeElement, eventName);
}
- public CompositeBuilder endNode() {
+ public CompositeBuilder endActivity() {
throw new JbpmException("calling endNode on a processBuilder is invalid");
}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/DescriptorBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/DescriptorBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/DescriptorBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,83 +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.jbpm.pvm.builder;
-
-import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.internal.wire.descriptor.LongDescriptor;
-import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
-import org.jbpm.pvm.internal.wire.descriptor.ReferenceDescriptor;
-import org.jbpm.pvm.internal.wire.descriptor.StringDescriptor;
-
-
-/**
- * @author Tom Baeyens
- */
-public class DescriptorBuilder {
-
- ObjectDescriptor objectDescriptor;
-
- protected DescriptorBuilder(String className) {
- objectDescriptor = new ObjectDescriptor();
- objectDescriptor.setClassName(className);
- }
-
- public static DescriptorBuilder startObjectDescriptor(String className) {
- return new DescriptorBuilder(className);
- }
-
- public static Descriptor createObjectDescriptor(String className) {
- return new ObjectDescriptor(className);
- }
-
- public static Descriptor createReferenceDescriptor(String objectName) {
- return new ReferenceDescriptor(objectName);
- }
-
- public static Descriptor createStringDescriptor(String text) {
- return new StringDescriptor(text);
- }
-
- public static Descriptor createLongDescriptor(Long l) {
- return new LongDescriptor(l);
- }
-
- public DescriptorBuilder inject(String fieldName, Descriptor valueDescriptor) {
- objectDescriptor.addInjection(fieldName, valueDescriptor);
- return this;
- }
-
- public DescriptorBuilder inject(String fieldName, String value) {
- StringDescriptor stringDescriptor = new StringDescriptor(value);
- objectDescriptor.addInjection(fieldName, stringDescriptor);
- return this;
- }
-
- public DescriptorBuilder inject(String fieldName, Long value) {
- LongDescriptor longDescriptor = new LongDescriptor(value);
- objectDescriptor.addInjection(fieldName, longDescriptor);
- return this;
- }
-
- public Descriptor endObjectDescriptor() {
- return objectDescriptor;
- }
-}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/EventBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/EventBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/EventBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -49,6 +49,12 @@
return this;
}
+ public EventBuilder listener(EventListener eventListener, boolean propagation) {
+ EventListenerReference eventListenerReference = getEvent().createEventListenerReference(eventListener);
+ eventListenerReference.setPropagationEnabled(propagation);
+ return this;
+ }
+
private EventImpl getEvent() {
if (event==null) {
this.event = observableElement.createEvent(eventName);
@@ -60,8 +66,7 @@
return compositeBuilder;
}
- public NodeBuilder<NodeBuilder<?>> endFlow() {
+ public ActivityBuilder endFlow() {
throw new JbpmException("endFlow is only allowed on flows");
}
-
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/FlowBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/FlowBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/FlowBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -30,12 +30,12 @@
*/
public class FlowBuilder extends EventBuilder {
- protected NodeBuilder<?> nodeBuilder;
+ protected ActivityBuilder activityBuilder;
protected TransitionImpl transition;
- public FlowBuilder(NodeBuilder<?> nodeBuilder, TransitionImpl transition) {
+ public FlowBuilder(ActivityBuilder nodeBuilder, TransitionImpl transition) {
super(nodeBuilder, transition, Event.TRANSITION_TAKE);
- this.nodeBuilder = nodeBuilder;
+ this.activityBuilder = nodeBuilder;
this.transition = transition;
}
@@ -49,7 +49,7 @@
return this;
}
- public NodeBuilder<NodeBuilder<?>> endFlow() {
- return (NodeBuilder) nodeBuilder;
+ public ActivityBuilder endFlow() {
+ return (ActivityBuilder) activityBuilder;
}
}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/NodeBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/NodeBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/NodeBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,72 +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.jbpm.pvm.builder;
-
-import org.jbpm.pvm.internal.model.NodeImpl;
-import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-
-/**
- * @author Tom Baeyens
- */
-public class NodeBuilder<T> extends CompositeBuilder {
-
- /** the enclosing composite */
- protected CompositeBuilder compositeBuilder;
- protected NodeImpl node;
-
- public NodeBuilder(CompositeBuilder compositeBuilder, String nodeName) {
- this.compositeBuilder = compositeBuilder;
- this.node = compositeBuilder.createNode();
- this.compositeElement = node;
- this.node.setName(nodeName);
- }
-
- public CompositeBuilder endNode() {
- return compositeBuilder;
- }
-
- public FlowBuilder startFlow(String to) {
- UnresolvedFlow unresolvedFlow = new UnresolvedFlow();
- unresolvedFlow.transition = node.createOutgoingTransition();
- unresolvedFlow.destinationName = to;
- addUnresolvedFlow(unresolvedFlow);
- return new FlowBuilder(this, unresolvedFlow.transition);
- }
-
- public ProcessDefinitionImpl endProcess() {
- return compositeBuilder.endProcess();
- }
-
- public T flow(String to) {
- startFlow(to);
- return (T) this;
- }
-
- public T flow(String to, String name) {
- startFlow(to).name(name);
- return (T) this;
- }
-
- protected void addUnresolvedFlow(UnresolvedFlow unresolvedFlow) {
- compositeBuilder.addUnresolvedFlow(unresolvedFlow);
- }
-}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ProcessDefinitionBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ProcessDefinitionBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/builder/ProcessDefinitionBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -36,7 +36,6 @@
private static final Log log = Log.getLog(ProcessDefinitionBuilder.class.getName());
protected ProcessDefinitionImpl processDefinition;
- protected String initialNodeName = null;
protected List<UnresolvedFlow> unresolvedFlows = new ArrayList<UnresolvedFlow>();
protected ProcessDefinitionBuilder(ProcessDefinitionImpl processDefinition) {
@@ -55,17 +54,15 @@
}
public ProcessDefinitionImpl endProcess() {
- resolveInitialNode();
+ verifyInitial();
resolveFlows();
return processDefinition;
}
- protected void resolveInitialNode() {
- NodeImpl initial = (NodeImpl) processDefinition.findNode(initialNodeName);
- if (initial==null) {
- errorUnexistingInitial();
+ protected void verifyInitial() {
+ if (processDefinition.getInitial()==null) {
+ errorNoInitial();
}
- processDefinition.setInitial(initial);
}
protected void resolveFlows() {
@@ -78,15 +75,6 @@
}
}
- protected void errorUnexistingInitial() {
- log.error("unexisting initial "+initialNodeName);
- }
-
- protected void errorUnexistingFlowDestination(UnresolvedFlow unresolvedFlow) {
- String sourceNodeName = unresolvedFlow.transition.getSource().getName();
- log.error("unexisting flow destination: "+sourceNodeName+"-->"+unresolvedFlow.destinationName);
- }
-
public ProcessDefinitionBuilder key(String key) {
processDefinition.setKey(key);
return this;
@@ -102,12 +90,27 @@
return this;
}
- public ProcessDefinitionBuilder initial(String initialNodeName) {
- this.initialNodeName = initialNodeName;
- return this;
- }
-
protected void addUnresolvedFlow(UnresolvedFlow unresolvedFlow) {
unresolvedFlows.add(unresolvedFlow);
}
+
+ protected void setProcessDefinitionInitial(NodeImpl initial) {
+ if (processDefinition.getInitial()!=null) {
+ errorMultipleInitials(initial);
+ }
+ processDefinition.setInitial(initial);
+ }
+
+ protected void errorMultipleInitials(NodeImpl initial) {
+ log.error("multiple initial activities: "+processDefinition.getInitial()+" and "+initial);
+ }
+
+ protected void errorNoInitial() {
+ log.error("no initial activity");
+ }
+
+ protected void errorUnexistingFlowDestination(UnresolvedFlow unresolvedFlow) {
+ String sourceNodeName = unresolvedFlow.transition.getSource().getName();
+ log.error("unexisting flow destination: "+sourceNodeName+"-->"+unresolvedFlow.destinationName);
+ }
}
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/EnvironmentDefaults.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/EnvironmentDefaults.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/EnvironmentDefaults.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -0,0 +1,57 @@
+/*
+ * 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.pvm.internal.env;
+
+import org.jbpm.env.Environment;
+import org.jbpm.pvm.internal.script.ScriptManager;
+import org.jbpm.pvm.internal.type.DefaultTypeSet;
+import org.jbpm.pvm.internal.type.TypeSet;
+
+
+/** central location for configuration objects that also
+ * have a default so that they can be obtained without a
+ * configuration and an environment block.
+ *
+ * for every object, first, the current environment will
+ * be searched if there is one, if not, the default object
+ * is returned.
+ *
+ * @author Tom Baeyens
+ */
+public abstract class EnvironmentDefaults {
+
+ public static ScriptManager getScriptManager() {
+ ScriptManager scriptManager = Environment.getFromCurrent(ScriptManager.class);
+ if (scriptManager!=null) {
+ return scriptManager;
+ }
+ return ScriptManager.getDefaultScriptManager();
+ }
+
+ public static TypeSet getTypeSet() {
+ TypeSet typeSet = Environment.getFromCurrent(TypeSet.class);
+ if (typeSet!=null) {
+ return typeSet;
+ }
+ return DefaultTypeSet.getDefaultTypeSet();
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/EnvironmentDefaults.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebRequestContext.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebRequestContext.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebRequestContext.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,61 +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.jbpm.pvm.internal.env;
-
-import java.util.Set;
-
-import org.jbpm.env.Context;
-import org.jbpm.env.Environment;
-
-public class WebRequestContext implements Context {
-
- /*
- HttpServletRequest request;
- public WebRequestScope(HttpServletRequest request) {
- this.request = request;
- }
- */
-
- public Object get(String key) {
- return null;
- }
-
- public boolean has(String key) {
- return false;
- }
-
- public Set<String> keys() {
- return null;
- }
-
- public Object set(String key, Object value) {
- return null;
- }
-
- public <T> T get(Class<T> type) {
- return null;
- }
-
- public String getName() {
- return null;
- }
-}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebSessionContext.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebSessionContext.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/env/WebSessionContext.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,61 +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.jbpm.pvm.internal.env;
-
-import java.util.Set;
-
-import org.jbpm.env.Context;
-
-public class WebSessionContext implements Context {
-
- /*
- HttpSession session;
- public WebRequestScope(HttpSession session) {
- this.session = session;
- }
- */
-
- public Object get(String key) {
- return null;
- }
-
- public boolean has(String key) {
- return false;
- }
-
- public Set<String> keys() {
- return null;
- }
-
- public Object set(String key, Object value) {
- return null;
- }
-
- public <T> T get(Class<T> type) {
- return null;
- }
-
- public String getName() {
- return null;
- }
-
-}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -67,7 +67,7 @@
import org.jbpm.pvm.internal.type.Converter;
import org.jbpm.pvm.internal.type.Type;
import org.jbpm.pvm.internal.type.Variable;
-import org.jbpm.pvm.internal.type.VariableTypeResolver;
+import org.jbpm.pvm.internal.type.TypeSet;
import org.jbpm.pvm.internal.type.variable.NullVariable;
import org.jbpm.pvm.internal.type.variable.UnpersistableVariable;
import org.jbpm.pvm.internal.util.Clock;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExpressionEvaluator.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -23,6 +23,7 @@
import org.jbpm.model.Condition;
import org.jbpm.model.OpenExecution;
+import org.jbpm.pvm.internal.env.EnvironmentDefaults;
import org.jbpm.pvm.internal.script.ScriptManager;
/**
@@ -47,7 +48,7 @@
}
public Object evaluateExpression(OpenExecution execution) {
- ScriptManager scriptManager = ScriptManager.getScriptManager();
+ ScriptManager scriptManager = EnvironmentDefaults.getScriptManager();
return scriptManager.evaluateExpression(expr, execution, lang);
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessElementImpl.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -92,7 +92,7 @@
public long getDbid() {
return dbid;
}
- public OpenProcessDefinition getProcessDefinition() {
+ public ProcessDefinitionImpl getProcessDefinition() {
return processDefinition;
}
public void setProcessDefinition(ProcessDefinitionImpl processDefinition) {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ScopeInstanceImpl.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -40,7 +40,7 @@
import org.jbpm.pvm.internal.type.Converter;
import org.jbpm.pvm.internal.type.Type;
import org.jbpm.pvm.internal.type.Variable;
-import org.jbpm.pvm.internal.type.VariableTypeResolver;
+import org.jbpm.pvm.internal.type.TypeSet;
import org.jbpm.pvm.internal.type.variable.NullVariable;
import org.jbpm.pvm.internal.type.variable.UnpersistableVariable;
import org.jbpm.session.TimerSession;
@@ -125,13 +125,13 @@
if (type==null) {
Environment environment = Environment.getCurrent();
if (environment!=null) {
- VariableTypeResolver variableTypeResolver = environment.get(VariableTypeResolver.class);
- if (variableTypeResolver!=null) {
+ TypeSet typeSet = environment.get(TypeSet.class);
+ if (typeSet!=null) {
if (typeName!=null) {
- type = variableTypeResolver.findTypeByName(typeName);
+ type = typeSet.findTypeByName(typeName);
}
if (type==null) {
- type = variableTypeResolver.findTypeByMatch(key, value);
+ type = typeSet.findTypeByMatch(key, value);
}
}
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -23,10 +23,9 @@
import java.io.Serializable;
-import org.jbpm.env.Context;
-import org.jbpm.env.Environment;
-import org.jbpm.pvm.internal.env.PvmEnvironment;
+import org.jbpm.pvm.internal.env.EnvironmentDefaults;
import org.jbpm.pvm.internal.type.Type;
+import org.jbpm.pvm.internal.type.TypeSet;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
@@ -83,6 +82,11 @@
return null;
}
+ public void setTypeName(String typeName) {
+ TypeSet typeSet = EnvironmentDefaults.getTypeSet();
+ type = typeSet.findTypeByName(typeName);
+ }
+
public long getDbid() {
return dbid;
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/script/ScriptManager.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -43,44 +43,38 @@
public class ScriptManager {
private static Log log = Log.getLog(ScriptManager.class.getName());
- private static final ScriptManager defaultScriptManager = createDefault();
+ private static ScriptManager defaultScriptManager = null;
+
protected String defaultExpressionLanguage;
protected String defaultScriptLanguage;
protected ScriptEngineManager scriptEngineManager;
protected String[] readContextNames = null;
protected String writeContextName;
- public static ScriptManager getScriptManager() {
- Environment environment = Environment.getCurrent();
- if (environment!=null) {
- ScriptManager scriptManager = environment.get(ScriptManager.class);
- if (scriptManager!=null) {
- return scriptManager;
- }
- }
- return defaultScriptManager;
- }
-
- public static ScriptManager createDefault() {
- WireDefinition wireDefinition = (WireDefinition) new WireParser().createParse()
+ public static synchronized ScriptManager getDefaultScriptManager() {
+ if (defaultScriptManager==null) {
+ WireDefinition wireDefinition = (WireDefinition) new WireParser()
+ .createParse()
.setString(
- "<objects>" +
- " <script-manager default-expression-language='juel'" +
- " default-script-language='beanshell' " +
- " read-contexts='execution, environment, process-engine' " +
- " write-context='execution'>" +
- " <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />" +
- " </script-manager>" +
- "</objects>"
+ "<objects>" +
+ " <script-manager default-expression-language='juel'" +
+ " default-script-language='beanshell' " +
+ " read-contexts='execution, environment, process-engine' " +
+ " write-context=''>" +
+ " <script-language name='juel' factory='com.sun.script.juel.JuelScriptEngineFactory' />" +
+ " </script-manager>" +
+ "</objects>"
)
.execute()
.getDocumentObject();
-
- WireContext wireContext = new WireContext(wireDefinition);
- return wireContext.get(ScriptManager.class);
+
+ WireContext wireContext = new WireContext(wireDefinition);
+ defaultScriptManager = wireContext.get(ScriptManager.class);
+ }
+ return defaultScriptManager;
}
-
+
/** {@link #evaluate(String, Execution, String) evaluates} the expression
* with the given language or with the defaultExpressionLanguage if the
* given language is null. */
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultTypeSet.java (from rev 3641, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultTypeSet.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultTypeSet.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -0,0 +1,77 @@
+/*
+ * 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.pvm.internal.type;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.jbpm.log.Log;
+
+/**
+ * @author Tom Baeyens
+ */
+public class DefaultTypeSet implements TypeSet, Serializable {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log = Log.getLog(DefaultTypeSet.class.getName());
+
+ protected List<TypeMapping> typeMappings;
+
+ public static TypeSet getDefaultTypeSet() {
+ return null;
+ }
+
+ public Type findTypeByMatch(String key, Object value) {
+ if (typeMappings!=null) {
+ for (TypeMapping typeMapping: typeMappings) {
+ if (typeMapping.matches(key, value)) {
+ return typeMapping.getType();
+ }
+ }
+ }
+
+ return null;
+ }
+
+ public Type findTypeByName(String typeName) {
+ if ( (typeMappings!=null)
+ && (typeName!=null)
+ ) {
+ for (TypeMapping typeMapping: typeMappings) {
+ Type type = typeMapping.getType();
+ if (typeName.equals(type.getName())) {
+ return type;
+ }
+ }
+ }
+ return null;
+ }
+
+ public void addTypeMapping(TypeMapping typeMapping) {
+ if (typeMappings==null) {
+ typeMappings = new ArrayList<TypeMapping>();
+ }
+ typeMappings.add(typeMapping);
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultTypeSet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/DefaultVariableTypeResolver.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,73 +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.jbpm.pvm.internal.type;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jbpm.log.Log;
-
-/**
- * @author Tom Baeyens
- */
-public class DefaultVariableTypeResolver implements VariableTypeResolver, Serializable {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log = Log.getLog(DefaultVariableTypeResolver.class.getName());
-
- List<TypeMapping> typeMappings;
-
- public Type findTypeByMatch(String key, Object value) {
- if (typeMappings!=null) {
- for (TypeMapping typeMapping: typeMappings) {
- if (typeMapping.matches(key, value)) {
- return typeMapping.getType();
- }
- }
- }
-
- return null;
- }
-
- public Type findTypeByName(String typeName) {
- if ( (typeMappings!=null)
- && (typeName!=null)
- ) {
- for (TypeMapping typeMapping: typeMappings) {
- Type type = typeMapping.getType();
- if (typeName.equals(type.getName())) {
- return type;
- }
- }
- }
- return null;
- }
-
- public void addTypeMapping(TypeMapping typeMapping) {
- if (typeMappings==null) {
- typeMappings = new ArrayList<TypeMapping>();
- }
- typeMappings.add(typeMapping);
- }
-}
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/TypeSet.java (from rev 3641, jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/VariableTypeResolver.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/TypeSet.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/TypeSet.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -0,0 +1,33 @@
+/*
+ * 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.pvm.internal.type;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface TypeSet {
+
+ Type findTypeByMatch(String key, Object value);
+ Type findTypeByName(String typeName);
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/TypeSet.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/VariableTypeResolver.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/VariableTypeResolver.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/type/VariableTypeResolver.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,33 +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.jbpm.pvm.internal.type;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface VariableTypeResolver {
-
- Type findTypeByMatch(String key, Object value);
- Type findTypeByName(String typeName);
-
-}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/VariableTypeResolverDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/VariableTypeResolverDescriptor.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/VariableTypeResolverDescriptor.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.descriptor;
-import org.jbpm.pvm.internal.type.DefaultVariableTypeResolver;
+import org.jbpm.pvm.internal.type.DefaultTypeSet;
import org.jbpm.pvm.internal.type.TypeMapping;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireDefinition;
@@ -33,17 +33,17 @@
private static final long serialVersionUID = 1L;
- DefaultVariableTypeResolver defaultVariableTypeResolver = new DefaultVariableTypeResolver();
+ DefaultTypeSet defaultTypeSet = new DefaultTypeSet();
public Object construct(WireContext wireContext) {
- return defaultVariableTypeResolver;
+ return defaultTypeSet;
}
public Class< ? > getType(WireDefinition wireDefinition) {
- return DefaultVariableTypeResolver.class;
+ return DefaultTypeSet.class;
}
public void addTypeMapping(TypeMapping typeMapping) {
- defaultVariableTypeResolver.addTypeMapping(typeMapping);
+ defaultTypeSet.addTypeMapping(typeMapping);
}
}
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/activities/PrintLnBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/activities/PrintLnBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/activities/PrintLnBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -21,19 +21,19 @@
*/
package org.jbpm.pvm.activities;
-import org.jbpm.pvm.builder.CompositeBuilder;
-import org.jbpm.pvm.builder.NodeBuilder;
+import org.jbpm.pvm.builder.ActivityBehaviourBuilder;
+import org.jbpm.pvm.builder.ActivityBuilder;
/**
* @author Tom Baeyens
*/
-public class PrintLnBuilder extends NodeBuilder<PrintLnBuilder> {
+public class PrintLnBuilder extends ActivityBehaviourBuilder {
PrintLn printLn = new PrintLn();
- public PrintLnBuilder(CompositeBuilder compositeBuilder, String nodeName) {
- super(compositeBuilder, nodeName);
+ public PrintLnBuilder(ActivityBuilder activityBuilder) {
+ super(activityBuilder);
node.setBehaviour(printLn);
}
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -52,9 +52,9 @@
public void testBuilderInitialNode() {
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
.startProcess("p")
- .initial("start")
- .startNode("start", TestActivityBuilder.class)
- .endNode()
+ .startActivity("start")
+ .initial()
+ .endActivity()
.endProcess();
NodeImpl start = (NodeImpl) processDefinition.getInitial();
@@ -65,9 +65,11 @@
public void testBuilderActivityProperties() {
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
.startProcess("p")
- .startNode("start", TestActivityBuilder.class)
- .testActivityProperty("some cfg value")
- .endNode()
+ .startActivity("start")
+ .startBehaviour(TestBehaviourBuilder.class)
+ .testActivityProperty("some cfg value")
+ .endBehaviour()
+ .endActivity()
.endProcess();
NodeImpl decisionNode = (NodeImpl) processDefinition.getNode("start");
@@ -81,19 +83,20 @@
public void testBuilderMultipleOutgoingFlows() {
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
.startProcess("p")
- .startNode("x", TestActivityBuilder.class)
+ .startActivity("x")
.flow("a")
.flow("b", "to b")
.startFlow("c")
.name("to c")
.endFlow()
- .endNode()
- .startNode("a", TestActivityBuilder.class)
- .endNode()
- .startNode("b", TestActivityBuilder.class)
- .endNode()
- .startNode("c", TestActivityBuilder.class)
- .endNode()
+ .flow("x")
+ .endActivity()
+ .startActivity("a")
+ .endActivity()
+ .startActivity("b")
+ .endActivity()
+ .startActivity("c")
+ .endActivity()
.endProcess();
NodeImpl decisionNode = (NodeImpl) processDefinition.getNode("x");
@@ -101,7 +104,7 @@
List<Transition> outgoingTransitions = decisionNode.getOutgoingTransitions();
assertNotNull(outgoingTransitions);
- assertEquals("expected 3 transitions: "+outgoingTransitions, 3, outgoingTransitions.size());
+ assertEquals("expected 4 transitions: "+outgoingTransitions, 4, outgoingTransitions.size());
Transition toA = outgoingTransitions.get(0);
assertNull(toA.getName());
assertEquals("a", toA.getDestination().getName());
@@ -114,6 +117,10 @@
assertEquals("to c", toC.getName());
assertEquals("c", toC.getDestination().getName());
+ Transition toX = outgoingTransitions.get(3);
+ assertNull(toX.getName());
+ assertEquals("x", toX.getDestination().getName());
+
Map<String, Transition> outgoingTransitionsMap = decisionNode.getOutgoingTransitionsMap();
assertSame(toA, outgoingTransitionsMap.get(null));
assertSame(toB, outgoingTransitionsMap.get("to b"));
@@ -123,23 +130,23 @@
public void testBuilderCompositeNodes() {
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
.startProcess()
- .initial("1.2.2")
- .startNode("1", TestActivityBuilder.class)
- .startNode("1.1", TestActivityBuilder.class)
+ .startActivity("1")
+ .startActivity("1.1")
.flow("1.2.1", "to onedottwodotone")
- .endNode()
- .startNode("1.2", TestActivityBuilder.class)
- .startNode("1.2.1", TestActivityBuilder.class)
- .endNode()
- .startNode("1.2.2", TestActivityBuilder.class)
+ .endActivity()
+ .startActivity("1.2")
+ .startActivity("1.2.1")
+ .endActivity()
+ .startActivity("1.2.2")
+ .initial()
.flow("1", "to one")
- .endNode()
- .startNode("1.2.3", TestActivityBuilder.class)
- .endNode()
- .endNode()
- .startNode("1.3", TestActivityBuilder.class)
- .endNode()
- .endNode()
+ .endActivity()
+ .startActivity("1.2.3")
+ .endActivity()
+ .endActivity()
+ .startActivity("1.3")
+ .endActivity()
+ .endActivity()
.endProcess();
NodeImpl node1 = (NodeImpl) processDefinition.findNode("1");
@@ -186,5 +193,4 @@
assertSame(node1, node122.getOutgoingTransition("to one").getDestination());
assertSame(node121, node11.getOutgoingTransition("to onedottwodotone").getDestination());
}
-
}
Deleted: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestActivityBuilder.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestActivityBuilder.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestActivityBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,45 +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.jbpm.pvm.builder;
-
-import org.jbpm.pvm.builder.CompositeBuilder;
-import org.jbpm.pvm.builder.NodeBuilder;
-
-
-
-/**
- * @author Tom Baeyens
- */
-public class TestActivityBuilder extends NodeBuilder<TestActivityBuilder> {
-
- TestActivity testActivity = new TestActivity();
-
- public TestActivityBuilder(CompositeBuilder compositeBuilder, String nodeName) {
- super(compositeBuilder, nodeName);
- node.setBehaviour(testActivity);
- }
-
- public TestActivityBuilder testActivityProperty(String testActivityProperty) {
- testActivity.testActivityProperty = testActivityProperty;
- return this;
- }
-}
Copied: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestBehaviourBuilder.java (from rev 3641, jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestActivityBuilder.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestBehaviourBuilder.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestBehaviourBuilder.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -0,0 +1,41 @@
+/*
+ * 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.pvm.builder;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class TestBehaviourBuilder extends ActivityBehaviourBuilder {
+
+ TestActivity testActivity = new TestActivity();
+
+ public TestBehaviourBuilder(ActivityBuilder activityBuilder) {
+ super(activityBuilder);
+ node.setBehaviour(testActivity);
+ }
+
+ public TestBehaviourBuilder testActivityProperty(String testActivityProperty) {
+ testActivity.testActivityProperty = testActivityProperty;
+ return this;
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/TestBehaviourBuilder.java
___________________________________________________________________
Name: svn:mergeinfo
+
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -35,8 +35,8 @@
public void testEventListener() {
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
.startProcess()
- .initial("a")
- .startNode("a", new AutomaticActivity())
+ .startActivity("a", new AutomaticActivity())
+ .initial()
.startEvent(Event.NODE_END)
.listener(new PrintLn("leaving a"))
.listener(new PrintLn("second message while leaving a"))
@@ -44,12 +44,12 @@
.startFlow("b")
.listener(new PrintLn("taking transition"))
.endFlow()
- .endNode()
- .startNode("b", new WaitState())
+ .endActivity()
+ .startActivity("b", new WaitState())
.startEvent(Event.NODE_BEGIN)
.listener(new PrintLn("entering b"))
.endEvent()
- .endNode()
+ .endActivity()
.endProcess();
ClientExecution execution = processDefinition.startProcessInstance();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -30,7 +30,7 @@
import org.jbpm.pvm.activities.DisplaySource;
import org.jbpm.pvm.activities.TestConsole;
import org.jbpm.pvm.activities.WaitState;
-import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.builder.ProcessDefinitionBuilder;
import org.jbpm.test.JbpmTestCase;
@@ -48,18 +48,24 @@
}
public void testEventPropagation() {
- ClientProcessDefinition processDefinition = ProcessFactory.build("propagate")
- .compositeNode("composite")
- .event(Event.NODE_END)
+ ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
+ .startProcess("propagate")
+ .startActivity("composite")
+ .startEvent(Event.NODE_END)
.listener(new DisplaySource())
- .node("a").initial().behaviour(new WaitState())
- .transition().to("b")
- .node("b").behaviour(new WaitState())
- .transition().to("c")
- .compositeEnd()
- .node("c").behaviour(new WaitState())
- .done();
-
+ .endEvent()
+ .startActivity("a", new WaitState())
+ .initial()
+ .flow("b")
+ .endActivity()
+ .startActivity("b", new WaitState())
+ .flow("c")
+ .endActivity()
+ .endActivity()
+ .startActivity("c", new WaitState())
+ .endActivity()
+ .endProcess();
+
ClientExecution execution = processDefinition.startProcessInstance();
List<String> expectedLines = new ArrayList<String>();
@@ -78,19 +84,24 @@
}
public void testEventPropagationDisabled() {
- ClientProcessDefinition processDefinition = ProcessFactory.build("propagate")
- .compositeNode("composite")
- .event(Event.NODE_END)
- .listener(new DisplaySource())
- .propagationDisabled()
- .node("a").initial().behaviour(new WaitState())
- .transition().to("b")
- .node("b").behaviour(new WaitState())
- .transition().to("c")
- .compositeEnd()
- .node("c").behaviour(new WaitState())
- .done();
-
+ ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
+ .startProcess("propagate")
+ .startActivity("composite")
+ .startEvent(Event.NODE_END)
+ .listener(new DisplaySource(), false)
+ .endEvent()
+ .startActivity("a", new WaitState())
+ .initial()
+ .flow("b")
+ .endActivity()
+ .startActivity("b", new WaitState())
+ .flow("c")
+ .endActivity()
+ .endActivity()
+ .startActivity("c", new WaitState())
+ .endActivity()
+ .endProcess();
+
ClientExecution execution = processDefinition.startProcessInstance();
List<String> expectedLines = new ArrayList<String>();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -24,7 +24,7 @@
import org.jbpm.client.ClientExecution;
import org.jbpm.client.ClientProcessDefinition;
-import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.builder.ProcessDefinitionBuilder;
/**
* @author Tom Baeyens
@@ -35,18 +35,25 @@
private static final ClientProcessDefinition processDefinition = createLoanProcess();
private static ClientProcessDefinition createLoanProcess() {
- ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
- .node("submit loan request").initial().behaviour(AutomaticActivity.class)
- .transition().to("evaluate")
- .node("evaluate").behaviour(WaitState.class)
- .transition("approve").to("wire money")
- .transition("reject").to("end")
- .node("wire money").behaviour(AutomaticActivity.class)
- .transition().to("archive")
- .node("archive").behaviour(WaitState.class)
- .transition().to("end")
- .node("end").behaviour(WaitState.class)
- .done();
+ ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
+ .startProcess("loan")
+ .startActivity("submit loan request", new AutomaticActivity())
+ .initial()
+ .flow("evaluate")
+ .endActivity()
+ .startActivity("evaluate", new WaitState())
+ .flow("wire money", "approve")
+ .flow("end", "reject")
+ .endActivity()
+ .startActivity("wire money", new AutomaticActivity())
+ .flow("archive")
+ .endActivity()
+ .startActivity("archive", new WaitState())
+ .flow("end")
+ .endActivity()
+ .startActivity("end", new WaitState())
+ .endActivity()
+ .endProcess();
return processDefinition;
}
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -27,25 +27,31 @@
import org.jbpm.client.ClientProcessDefinition;
import org.jbpm.pvm.activities.AutomaticActivity;
import org.jbpm.pvm.activities.WaitState;
-import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.builder.ProcessDefinitionBuilder;
-
public class ObjectExecutionModeTest extends TestCase {
public void testObjectExecutionMode(){
- ClientProcessDefinition processDefinition = ProcessFactory.build("loan")
- .node("submit loan request").initial().behaviour(AutomaticActivity.class)
- .transition().to("evaluate")
- .node("evaluate").behaviour(WaitState.class)
- .transition("approve").to("wire money")
- .transition("reject").to("end")
- .node("wire money").behaviour(AutomaticActivity.class)
- .transition().to("archive")
- .node("archive").behaviour(WaitState.class)
- .transition().to("end")
- .node("end").behaviour(WaitState.class)
- .done();
+ ClientProcessDefinition processDefinition = ProcessDefinitionBuilder
+ .startProcess("loan")
+ .startActivity("submit loan request", new AutomaticActivity())
+ .initial()
+ .flow("evaluate")
+ .endActivity()
+ .startActivity("evaluate", new WaitState())
+ .flow("wire money", "approve")
+ .flow("end", "reject")
+ .endActivity()
+ .startActivity("wire money", new AutomaticActivity())
+ .flow("archive")
+ .endActivity()
+ .startActivity("archive", new WaitState())
+ .flow("end")
+ .endActivity()
+ .startActivity("end", new WaitState())
+ .endActivity()
+ .endProcess();
ClientExecution execution = processDefinition.startProcessInstance();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -15,8 +15,6 @@
import java.util.List;
-import junit.framework.Test;
-
import org.hibernate.Session;
import org.jbpm.client.ClientProcessDefinition;
import org.jbpm.model.Node;
@@ -28,7 +26,6 @@
import org.jbpm.session.DbSession;
import org.jbpm.session.PvmDbSession;
import org.jbpm.test.EnvironmentDbTestCase;
-import org.jbpm.test.EnvironmentFactoryTestSetup;
/**
* @author Guillaume Porcher
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -25,7 +25,7 @@
import org.jbpm.client.ClientExecution;
import org.jbpm.env.Environment;
import org.jbpm.env.EnvironmentFactory;
-import org.jbpm.pvm.externalactivity.WaitState;
+import org.jbpm.pvm.activities.WaitState;
import org.jbpm.pvm.internal.script.ScriptManager;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.test.JbpmTestCase;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -25,7 +25,7 @@
import org.jbpm.client.ClientExecution;
import org.jbpm.env.Environment;
import org.jbpm.env.EnvironmentFactory;
-import org.jbpm.pvm.externalactivity.WaitState;
+import org.jbpm.pvm.activities.WaitState;
import org.jbpm.pvm.internal.script.ScriptManager;
import org.jbpm.pvm.model.ProcessFactory;
import org.jbpm.test.JbpmTestCase;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -30,9 +30,12 @@
public void testHelloWorld() {
ClientProcessDefinition processDefinition = ProcessDefinitionBuilder.startProcess()
- .startNode(PrintLnBuilder.class)
- .message("print me")
- .endNode()
+ .startActivity()
+ .initial()
+ .startBehaviour(PrintLnBuilder.class)
+ .message("print me")
+ .endBehaviour()
+ .endActivity()
.endProcess();
processDefinition.startProcessInstance();
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/CustomTypeVariableTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/CustomTypeVariableTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/CustomTypeVariableTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -23,20 +23,15 @@
import java.util.Calendar;
import java.util.GregorianCalendar;
-import java.util.Map;
-import junit.framework.Test;
-import junit.framework.TestSuite;
-
-import org.jbpm.activity.ActivityExecution;
-import org.jbpm.activity.ExternalActivity;
import org.jbpm.client.ClientProcessDefinition;
+import org.jbpm.pvm.activities.WaitState;
+import org.jbpm.pvm.builder.ProcessDefinitionBuilder;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.type.Variable;
import org.jbpm.pvm.internal.type.variable.DateVariable;
-import org.jbpm.pvm.model.ProcessFactory;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.test.EnvironmentDbTestCase;
-import org.jbpm.test.EnvironmentFactoryTestSetup;
/**
* @author Guillaume Porcher
@@ -49,21 +44,15 @@
super(ENVIRONMENT_CFG_XML);
}
- public static class WaitState implements ExternalActivity {
-
- private static final long serialVersionUID = 1L;
-
- public void execute(ActivityExecution execution) {
- execution.waitForSignal();
- }
-
- public void signal(ActivityExecution execution, String signalName, Map<String, Object> parameters) {
- execution.take(signalName);
- }
- }
-
public void testDateVariable() {
- ClientProcessDefinition clientProcessDefinition = ProcessFactory.build().node().initial().behaviour(WaitState.class).done();
+ ClientProcessDefinition clientProcessDefinition = ProcessDefinitionBuilder
+ .startProcess()
+ .startActivity(
+ new ObjectDescriptor(WaitState.class)
+ )
+ .initial()
+ .endActivity()
+ .endProcess();
getDbSession().save(clientProcessDefinition);
Deleted: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/VariablesTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/VariablesTest.java 2009-01-15 16:44:27 UTC (rev 3652)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/variables/VariablesTest.java 2009-01-15 17:01:17 UTC (rev 3653)
@@ -1,69 +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.jbpm.pvm.variables;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import junit.framework.TestCase;
-
-import org.jbpm.client.ClientProcessDefinition;
-import org.jbpm.client.ClientProcessInstance;
-import org.jbpm.pvm.externalactivity.WaitState;
-import org.jbpm.pvm.model.ProcessFactory;
-
-
-/**
- * @author Tom Baeyens
- */
-public class VariablesTest extends TestCase {
-
- public void testVariables() {
- ClientProcessDefinition processDefinition = ProcessFactory.build("expenses")
- .node("evaluate").initial().behaviour(WaitState.class)
- .transition().to("pay back")
- .node("pay back").behaviour(WaitState.class)
- .done();
-
- Map<String, Object> variables = new HashMap<String, Object>();
- variables.put("reason", "business trip");
- variables.put("total amount", "$1500");
-
- ClientProcessInstance execution = processDefinition.createProcessInstance();
- execution.setVariables(variables);
- execution.start();
-
- assertEquals("business trip", execution.getVariable("reason"));
- assertEquals("$1500", execution.getVariable("total amount"));
-
- execution.setVariable("total amount", "$1400");
- execution.setVariable("approver", "me");
- execution.setVariable("cost center", 87364);
-
- execution.signal();
-
- assertEquals("business trip", execution.getVariable("reason"));
- assertEquals("$1400", execution.getVariable("total amount"));
- assertEquals("me", execution.getVariable("approver"));
- assertEquals(new Integer(87364), execution.getVariable("cost center"));
- }
-}
17 years, 3 months
JBoss JBPM SVN: r3652 - jbpm3/trunk/modules/distribution/src/main/resources/installer.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-01-15 11:44:27 -0500 (Thu, 15 Jan 2009)
New Revision: 3652
Modified:
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
Log:
[JBPM-1910] dont install userguide in jboss. It's still in the docs folder
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2009-01-15 16:26:31 UTC (rev 3651)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2009-01-15 16:44:27 UTC (rev 3652)
@@ -211,11 +211,6 @@
<file src="@{deploy.artifacts.dir}/lib/jbpm-enterprise.jar" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-enterprise.jar"
unpack="true" override="true" />
-
- <!-- jbpm/jbpm-userguide.war -->
- <file src="@{deploy.artifacts.dir}/lib/jbpm-userguide.jdocbook" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-userguide.war"
- unpack="true" override="true" />
-
<!-- jbpm-destinations-service -->
<file src="@{resources.dir}/destination/jbpm-destinations-service.xml" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/jbpm" />
17 years, 3 months
JBoss JBPM SVN: r3651 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-01-15 11:26:31 -0500 (Thu, 15 Jan 2009)
New Revision: 3651
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java
Log:
[JBPM-1153] Cannot reproduce. JbpmVariableResolver - is not looking for the variable on the current token
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java 2009-01-15 16:20:07 UTC (rev 3650)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/jpdl/el/impl/JbpmVariableResolver.java 2009-01-15 16:26:31 UTC (rev 3651)
@@ -1,5 +1,6 @@
package org.jbpm.jpdl.el.impl;
+// $Id$
import org.jbpm.JbpmConfiguration;
import org.jbpm.context.exe.ContextInstance;
@@ -10,58 +11,71 @@
import org.jbpm.taskmgmt.exe.SwimlaneInstance;
import org.jbpm.taskmgmt.exe.TaskMgmtInstance;
-public class JbpmVariableResolver implements VariableResolver {
+public class JbpmVariableResolver implements VariableResolver
+{
- public Object resolveVariable(String name) throws ELException {
+ public Object resolveVariable(String name) throws ELException
+ {
ExecutionContext executionContext = ExecutionContext.currentExecutionContext();
Object value = null;
-
- if ("taskInstance".equals(name)) {
+
+ if ("taskInstance".equals(name))
+ {
value = executionContext.getTaskInstance();
- } else if ("processInstance".equals(name)) {
+ }
+ else if ("processInstance".equals(name))
+ {
value = executionContext.getProcessInstance();
- } else if ("processDefinition".equals(name)) {
+ }
+ else if ("processDefinition".equals(name))
+ {
value = executionContext.getProcessDefinition();
- } else if ("token".equals(name)) {
+ }
+ else if ("token".equals(name))
+ {
value = executionContext.getToken();
- } else if ("taskMgmtInstance".equals(name)) {
+ }
+ else if ("taskMgmtInstance".equals(name))
+ {
value = executionContext.getTaskMgmtInstance();
-
- } else if ("contextInstance".equals(name)) {
+
+ }
+ else if ("contextInstance".equals(name))
+ {
value = executionContext.getContextInstance();
- } else if ( (executionContext.getTaskInstance()!=null)
- && (executionContext.getTaskInstance().hasVariableLocally(name))
- ) {
+ }
+ else if ((executionContext.getTaskInstance() != null) && (executionContext.getTaskInstance().hasVariableLocally(name)))
+ {
value = executionContext.getTaskInstance().getVariable(name);
- } else {
+ }
+ else
+ {
ContextInstance contextInstance = executionContext.getContextInstance();
TaskMgmtInstance taskMgmtInstance = executionContext.getTaskMgmtInstance();
Token token = executionContext.getToken();
-
- if ( (contextInstance!=null)
- && (contextInstance.hasVariable(name, token))
- ) {
+
+ if ((contextInstance != null) && (contextInstance.hasVariable(name, token)))
+ {
value = contextInstance.getVariable(name, token);
-
- } else if ( (contextInstance!=null)
- && (contextInstance.hasTransientVariable(name))
- ) {
+ }
+ else if ((contextInstance != null) && (contextInstance.hasTransientVariable(name)))
+ {
value = contextInstance.getTransientVariable(name);
-
- } else if ( (taskMgmtInstance!=null)
- && (taskMgmtInstance.getSwimlaneInstances()!=null)
- && (taskMgmtInstance.getSwimlaneInstances().containsKey(name))
- ) {
+ }
+ else if ((taskMgmtInstance != null) && (taskMgmtInstance.getSwimlaneInstances() != null) && (taskMgmtInstance.getSwimlaneInstances().containsKey(name)))
+ {
SwimlaneInstance swimlaneInstance = taskMgmtInstance.getSwimlaneInstance(name);
- value = (swimlaneInstance!=null ? swimlaneInstance.getActorId() : null);
-
- } else if (JbpmConfiguration.Configs.hasObject(name)) {
+ value = (swimlaneInstance != null ? swimlaneInstance.getActorId() : null);
+
+ }
+ else if (JbpmConfiguration.Configs.hasObject(name))
+ {
value = JbpmConfiguration.Configs.getObject(name);
}
}
17 years, 3 months
JBoss JBPM SVN: r3650 - jbpm3/trunk/modules/db/scripts.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-01-15 11:20:07 -0500 (Thu, 15 Jan 2009)
New Revision: 3650
Modified:
jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml
Log:
[JBPM-1813] Won't Fix create schema generation
Modified: jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml
===================================================================
--- jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml 2009-01-15 14:47:17 UTC (rev 3649)
+++ jbpm3/trunk/modules/db/scripts/antrun-jbpmschema.xml 2009-01-15 16:20:07 UTC (rev 3650)
@@ -43,11 +43,6 @@
<jbpmschema output="${scriptsdir}/jbpm.jpdl.sapdb.sql" config="hibernate.cfg.sapdb.xml" action="create"/>
<jbpmschema output="${scriptsdir}/jbpm.jpdl.sybase.sql" config="hibernate.cfg.sybase.xml" action="create"/>
- <!--[JBPM-1813] Fix create schema generation -->
- <!--jbpmschema output="${scriptsdir}/jbpm.jpdl.informix.sql" config="hibernate.cfg.informix.xml" action="create"/-->
- <!--jbpmschema output="${scriptsdir}/jbpm.jpdl.pointbase.sql" config="hibernate.cfg.pointbase.xml" action="create"/-->
- <!--jbpmschema output="${scriptsdir}/jbpm.jpdl.progress.sql" config="hibernate.cfg.progress.xml" action="create"/-->
-
</target>
<target name="update-schema" depends="setup-schema" description="Generate jBPM Database Update Scripts">
17 years, 3 months
JBoss JBPM SVN: r3649 - in projects/gwt-console/trunk: plugin/src/main/java/org/jboss/bpm/console/client and 9 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-01-15 09:47:17 -0500 (Thu, 15 Jan 2009)
New Revision: 3649
Added:
projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/client/
projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.cfg
projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
Removed:
projects/gwt-console/trunk/plugin-example/src/main/java/org/jboss/bpm/console/mapsplugin/
projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt
projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace.txt
Modified:
projects/gwt-console/trunk/plugin-example/plugin-example.iml
projects/gwt-console/trunk/plugin-example/pom.xml
projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java
projects/gwt-console/trunk/pom.xml
projects/gwt-console/trunk/war/gwt-war.iml
projects/gwt-console/trunk/war/pom.xml
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java
Log:
Pugin example first cut. Lauch with -Pplugin-example switch
Modified: projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java
===================================================================
--- projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/plugin/src/main/java/org/jboss/bpm/console/client/Editor.java 2009-01-15 14:47:17 UTC (rev 3649)
@@ -36,13 +36,13 @@
*/
public abstract class Editor extends Panel
{
- protected ApplicationContext main;
+ protected ApplicationContext appContext;
private TabPanel tabPanel;
- protected Editor(ApplicationContext main)
+ protected Editor(ApplicationContext applicationContext)
{
super();
- this.main = main;
+ this.appContext = applicationContext;
this.setPaddings(10);
// -------
@@ -133,6 +133,7 @@
view.setId(view.getViewId() + ".tab");
view.setClosable(closable);
view.setIconCls(view.getIconCSS());
+ view.setAutoScroll(true);
this.tabPanel.add(view);
this.tabPanel.setActiveTab(view.getId());
Modified: projects/gwt-console/trunk/plugin-example/plugin-example.iml
===================================================================
--- projects/gwt-console/trunk/plugin-example/plugin-example.iml 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/plugin-example/plugin-example.iml 2009-01-15 14:47:17 UTC (rev 3649)
@@ -9,7 +9,8 @@
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
- <orderEntry type="module-library">
+ <orderEntry type="module" module-name="plugin" />
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
@@ -18,7 +19,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.2/gwt-servlet-1.5.2.jar!/" />
@@ -27,7 +28,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: org.jbpm.jbpm3:gwt-console-rpc:jar:1.0.0-SNAPSHOT:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT.jar!/" />
@@ -38,7 +39,7 @@
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="module-library">
+ <orderEntry type="module-library" exported="">
<library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
@@ -47,6 +48,44 @@
<SOURCES />
</library>
</orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library" exported="">
+ <library name="M2 Dep: javax.activation:activation:jar:1.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/trunk/plugin-example/pom.xml
===================================================================
--- projects/gwt-console/trunk/plugin-example/pom.xml 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/plugin-example/pom.xml 2009-01-15 14:47:17 UTC (rev 3649)
@@ -29,11 +29,49 @@
<scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>org.jbpm.jbpm3</groupId>
+ <artifactId>gwt-console-plugin</artifactId>
+ <version>${version}</version>
+ </dependency>
+
</dependencies>
<!-- Plugins -->
- <build>
- <finalName>mapsplugin</finalName>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ <showDeprecation>true</showDeprecation>
+ <showWarnings>true</showWarnings>
+ <optimize>true</optimize>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>
Added: projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.cfg
===================================================================
--- projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.cfg (rev 0)
+++ projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.cfg 2009-01-15 14:47:17 UTC (rev 3649)
@@ -0,0 +1,5 @@
+#org.jboss.bpm.console.client.process.ProcessEditor
+#org.jboss.bpm.console.client.task.TaskEditor
+#org.jboss.bpm.console.client.report.ReportEditor
+
+org.jboss.bpm.console.client.mapsplugin.MapsEditor
\ No newline at end of file
Deleted: projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt
===================================================================
--- projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/plugin-example/src/main/resources/org/jboss/bpm/console/workspace.txt 2009-01-15 14:47:17 UTC (rev 3649)
@@ -1,3 +0,0 @@
-#org.jboss.bpm.console.client.process.ProcessEditor
-#org.jboss.bpm.console.client.task.TaskEditor
-#org.jboss.bpm.console.client.report.ReportEditor
\ No newline at end of file
Modified: projects/gwt-console/trunk/pom.xml
===================================================================
--- projects/gwt-console/trunk/pom.xml 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/pom.xml 2009-01-15 14:47:17 UTC (rev 3649)
@@ -38,6 +38,7 @@
<module>server</module>
<module>war</module>
<module>plugin/</module>
+ <!--module>plugin-example</module-->
</modules>
<dependencyManagement>
Modified: projects/gwt-console/trunk/war/gwt-war.iml
===================================================================
--- projects/gwt-console/trunk/war/gwt-war.iml 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/war/gwt-war.iml 2009-01-15 14:47:17 UTC (rev 3649)
@@ -13,7 +13,16 @@
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="module" module-name="gwt-parent" />
<orderEntry type="module" module-name="plugin" />
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
+ <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES />
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
<library name="M2 Dep: junit:junit:jar:3.8.1:test">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/junit/junit/3.8.1/junit-3.8.1.jar!/" />
@@ -22,7 +31,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: com.google.code.gson:gson:jar:1.2.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gson/gson/1.2.2/gson-1.2.2.jar!/" />
@@ -31,7 +40,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: com.google.gwt:gwt-dev:jar:mac:1.5.2:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-dev/1.5.2/gwt-dev-1.5.2-mac.jar!/" />
@@ -40,7 +49,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: com.google.gwt:gwt-user:jar:1.5.2:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-user/1.5.2/gwt-user-1.5.2.jar!/" />
@@ -49,7 +58,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: com.google.gwt:gwt-servlet:jar:1.5.2:runtime">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/gwt/gwt-servlet/1.5.2/gwt-servlet-1.5.2.jar!/" />
@@ -58,7 +67,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: javax.xml.stream:stax-api:jar:1.0-2:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/stream/stax-api/1.0-2/stax-api-1.0-2.jar!/" />
@@ -67,7 +76,18 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
+ <library name="M2 Dep: org.jbpm.jbpm3:gwt-console-rpc:jar:1.0.0-SNAPSHOT:compile">
+ <CLASSES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT.jar!/" />
+ </CLASSES>
+ <JAVADOC />
+ <SOURCES>
+ <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT-sources.jar!/" />
+ </SOURCES>
+ </library>
+ </orderEntry>
+ <orderEntry type="module-library">
<library name="M2 Dep: javax.activation:activation:jar:1.1:provided">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/activation/activation/1.1/activation-1.1.jar!/" />
@@ -78,7 +98,7 @@
</SOURCES>
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: com.google.code.gwt-log:gwt-log:jar:2.5.2:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/google/code/gwt-log/gwt-log/2.5.2/gwt-log-2.5.2.jar!/" />
@@ -87,7 +107,7 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library" exported="">
+ <orderEntry type="module-library">
<library name="M2 Dep: com.gwtext:gwtext:jar:2.0.5:compile">
<CLASSES>
<root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/com/gwtext/gwtext/2.0.5/gwtext-2.0.5.jar!/" />
@@ -96,26 +116,6 @@
<SOURCES />
</library>
</orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: org.jbpm.jbpm3:gwt-console-rpc:jar:1.0.0-SNAPSHOT:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/org/jbpm/jbpm3/gwt-console-rpc/1.0.0-SNAPSHOT/gwt-console-rpc-1.0.0-SNAPSHOT-sources.jar!/" />
- </SOURCES>
- </library>
- </orderEntry>
- <orderEntry type="module-library">
- <library name="M2 Dep: javax.xml.bind:jaxb-api:jar:2.1:compile">
- <CLASSES>
- <root url="jar://$MODULE_DIR$/../../../../../../../.m2/repository/javax/xml/bind/jaxb-api/2.1/jaxb-api-2.1.jar!/" />
- </CLASSES>
- <JAVADOC />
- <SOURCES />
- </library>
- </orderEntry>
<orderEntryProperties />
</component>
</module>
Modified: projects/gwt-console/trunk/war/pom.xml
===================================================================
--- projects/gwt-console/trunk/war/pom.xml 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/war/pom.xml 2009-01-15 14:47:17 UTC (rev 3649)
@@ -21,6 +21,7 @@
<!-- Dependencies -->
<dependencies>
+ <!-- JBPM -->
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>gwt-console-rpc</artifactId>
@@ -40,6 +41,7 @@
<version>${version}</version>
</dependency>
+ <!-- GWT -->
<dependency>
<groupId>com.google.gwt</groupId>
<artifactId>gwt-servlet</artifactId>
@@ -67,6 +69,8 @@
<classifier>${platform}</classifier>
<scope>provided</scope>
</dependency>
+
+ <!-- GWT extensions -->
<dependency>
<groupId>com.gwtext</groupId>
<artifactId>gwtext</artifactId>
@@ -76,6 +80,8 @@
<artifactId>gwt-log</artifactId>
</dependency>
+ <!-- 3rd party -->
+
<dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
@@ -96,6 +102,7 @@
<!-- Plugins -->
<build>
<finalName>gwt-console</finalName>
+
<plugins>
<plugin>
<groupId>com.totsp.gwt</groupId>
@@ -226,27 +233,25 @@
</activation>
</profile>
- <!--profile>
- <id>alltests</id>
- <build>
- <plugins>
- <plugin>
- <groupId>com.totsp.gwt</groupId>
- <artifactId>maven-googlewebtoolkit2-plugin</artifactId>
- <version>${gwt-maven.version}</version>
- <executions>
- <execution>
- <goals>
- <goal>mergewebxml</goal>
- <goal>compile</goal>
- <goal>gwt</goal>
- <goal>test</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </profile-->
+ <profile>
+ <id>plugin-example</id>
+ <dependencies>
+ <!-- example plugin, GWT requires the soures as well -->
+
+ <dependency>
+ <groupId>org.jboss.bpm.console</groupId>
+ <artifactId>mapsplugin</artifactId>
+ <version>${version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.jboss.bpm.console</groupId>
+ <artifactId>mapsplugin</artifactId>
+ <classifier>sources</classifier>
+ <version>${version}</version>
+ </dependency>
+ </dependencies>
+
+ </profile>
</profiles>
</project>
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessEditor.java 2009-01-15 14:47:17 UTC (rev 3649)
@@ -145,7 +145,7 @@
// ----------------------------------
- final View defaultView = new View(main)
+ final View defaultView = new View(appContext)
{
public String getViewId()
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/report/ReportEditor.java 2009-01-15 14:47:17 UTC (rev 3649)
@@ -106,7 +106,7 @@
toolsPanel.add(new Separator());
toolsPanel.add(refreshBtn);
- final View defaultView = new View(main)
+ final View defaultView = new View(appContext)
{
public String getViewId()
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskEditor.java 2009-01-15 14:47:17 UTC (rev 3649)
@@ -155,7 +155,7 @@
// -------
- final View defaultView = new View(main)
+ final View defaultView = new View(appContext)
{
public String getViewId()
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/rebind/WorkspaceGenerator.java 2009-01-15 14:47:17 UTC (rev 3649)
@@ -37,7 +37,6 @@
*/
public class WorkspaceGenerator extends Generator
{
-
/**
* Simple name of class to be generated
*/
@@ -51,6 +50,9 @@
*/
private String typeName = null;
+ public static final String WORKSPACE_CONFIG_DEFAULT = "org/jboss/bpm/console/workspace-default.cfg";
+ public static final String WORKSPACE_CONFIG = "org/jboss/bpm/console/workspace.cfg";
+
public String generate(TreeLogger logger, GeneratorContext context, String typeName)
throws UnableToCompleteException
{
@@ -129,12 +131,14 @@
sourceWriter.println("public void launch(ApplicationContext appContext, Workspace workspace) { ");
sourceWriter.indent();
- InputStream in = getClass().getClassLoader().getResourceAsStream(
- "org/jboss/bpm/console/workspace.txt"
- );
+ InputStream in = getClass().getClassLoader().getResourceAsStream(WORKSPACE_CONFIG);
if (null == in)
- throw new RuntimeException("Cannot find 'org/jboss/bpm/console/workspace.txt'");
+ {
+ in = getClass().getClassLoader().getResourceAsStream(WORKSPACE_CONFIG_DEFAULT);
+ if(null==in)
+ throw new RuntimeException("Cannot find '"+WORKSPACE_CONFIG+"' or '"+WORKSPACE_CONFIG_DEFAULT+"'");
+ }
try
{
@@ -161,7 +165,7 @@
}
catch (IOException ex)
{
- throw new RuntimeException("Error reading 'org/jboss/bpm/console/workspace.txt'");
+ throw new RuntimeException("Error reading '"+WORKSPACE_CONFIG+"'");
}
// end constructor source generation
Added: projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
===================================================================
--- projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg (rev 0)
+++ projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg 2009-01-15 14:47:17 UTC (rev 3649)
@@ -0,0 +1,3 @@
+org.jboss.bpm.console.client.process.ProcessEditor
+org.jboss.bpm.console.client.task.TaskEditor
+org.jboss.bpm.console.client.report.ReportEditor
\ No newline at end of file
Deleted: projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace.txt
===================================================================
--- projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace.txt 2009-01-15 14:18:26 UTC (rev 3648)
+++ projects/gwt-console/trunk/war/src/main/resources/org/jboss/bpm/console/workspace.txt 2009-01-15 14:47:17 UTC (rev 3649)
@@ -1,3 +0,0 @@
-org.jboss.bpm.console.client.process.ProcessEditor
-org.jboss.bpm.console.client.task.TaskEditor
-org.jboss.bpm.console.client.report.ReportEditor
\ No newline at end of file
17 years, 3 months
JBoss JBPM SVN: r3648 - jbpm3/trunk.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-01-15 09:18:26 -0500 (Thu, 15 Jan 2009)
New Revision: 3648
Modified:
jbpm3/trunk/pom.xml
Log:
quite javadoc
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2009-01-15 14:07:00 UTC (rev 3647)
+++ jbpm3/trunk/pom.xml 2009-01-15 14:18:26 UTC (rev 3648)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jbpm</groupId>
<artifactId>jbpm-parent</artifactId>
- <version>1.0.0.GA</version>
+ <version>1.0.1.GA</version>
</parent>
<!-- Modules -->
@@ -448,6 +448,9 @@
<plugins>
<plugin>
<artifactId>maven-javadoc-plugin</artifactId>
+ <configuration>
+ <quite>true</quite>
+ </configuration>
<executions>
<execution>
<id>attach-javadocs</id>
17 years, 3 months