JBoss JBPM SVN: r2489 - in projects/spec/trunk/modules: cts and 3 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 11:53:38 -0400 (Mon, 06 Oct 2008)
New Revision: 2489
Modified:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java
projects/spec/trunk/modules/cts/pom.xml
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive/InclusiveGatewayMergeTest.java
projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel/ParallelGatewayMergeTest.java
projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java
Log:
Pass more gateway tests
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java 2008-10-06 14:16:54 UTC (rev 2488)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/model/Node.java 2008-10-06 15:53:38 UTC (rev 2489)
@@ -72,4 +72,5 @@
* Get the associated FlowHandler
*/
FlowHandler getFlowHandler(boolean defaultHandler);
+
}
\ No newline at end of file
Modified: projects/spec/trunk/modules/cts/pom.xml
===================================================================
--- projects/spec/trunk/modules/cts/pom.xml 2008-10-06 14:16:54 UTC (rev 2488)
+++ projects/spec/trunk/modules/cts/pom.xml 2008-10-06 15:53:38 UTC (rev 2489)
@@ -71,11 +71,8 @@
<configuration>
<excludes>
<exclude>org/jbpm/test/cts/gateway/exclusive/ExclusiveGatewayMergeTest.java</exclude>
- <exclude>org/jbpm/test/cts/gateway/inclusive/InclusiveGatewayMergeTest.java</exclude>
- <exclude>org/jbpm/test/cts/gateway/parallel/ParallelGatewayMergeTest.java</exclude>
<exclude>org/jbpm/test/cts/node/NodeInputSetTest.java</exclude>
<exclude>org/jbpm/test/cts/node/NodeOutputSetTest.java</exclude>
- <exclude>org/jbpm/test/pattern/control/parallelsplit/ParallelSplitTest.java</exclude>
<exclude>org/jbpm/test/pattern/control/simplemerge/SimpleMergeTest.java</exclude>
<exclude>org/jbpm/test/pattern/control/synchronization/SynchronizationTest.java</exclude>
</excludes>
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive/InclusiveGatewayMergeTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive/InclusiveGatewayMergeTest.java 2008-10-06 14:16:54 UTC (rev 2488)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/inclusive/InclusiveGatewayMergeTest.java 2008-10-06 15:53:38 UTC (rev 2489)
@@ -26,17 +26,12 @@
import java.io.IOException;
import java.util.List;
-import org.jbpm.api.client.SignalListener;
import org.jbpm.api.model.Process;
import org.jbpm.api.model.ProcessDefinition;
import org.jbpm.api.model.Signal;
-import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.builder.EventBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.ProcessBuilderService;
-import org.jbpm.api.service.SignalService;
import org.jbpm.api.test.CTSTestCase;
/**
@@ -53,25 +48,12 @@
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
Process proc = procDef.newInstance();
- // Add a signal listener that sends the other start trigger signal
- SignalService sigService = SignalService.locateSignalService();
- MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));
- sigService.addSignalListener(sigListener);
+ // Start the process and send start trigger signal
+ proc.startProcess();
- try
- {
- // Send start trigger signals
- proc.startProcess();
- sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
+ // Wait for the process to end
+ proc.waitForEnd();
- // Wait for the process to end
- proc.waitForEnd();
- }
- finally
- {
- sigService.removeSignalListener(sigListener);
- }
-
List<Signal> endSignals = getSignals(Signal.SignalType.SYSTEM_END_EVENT_EXIT);
assertEquals(2, endSignals.size());
}
@@ -79,37 +61,12 @@
public ProcessDefinition getProcessDefinition() throws IOException
{
ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA", EventDetailType.Signal);
- eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
- eventBuilder = procBuilder.addSequenceFlow("Merge").addStartEvent("StartB", EventDetailType.Signal);
- eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
- procBuilder.addSequenceFlow("Merge").addGateway("Merge", GatewayType.Inclusive).addSequenceFlow("End");
+ procBuilder.addProcess("ParallelGatewayMerge").addStartEvent("Start").addSequenceFlow("Split");
+ procBuilder.addGateway("Split", GatewayType.Inclusive).addSequenceFlow("TaskA").addSequenceFlow("TaskB");
+ procBuilder.addTask("TaskA").addSequenceFlow("Merge");
+ procBuilder.addTask("TaskB").addSequenceFlow("Merge");
+ procBuilder.addGateway("Merge", GatewayType.Inclusive).addSequenceFlow("End");
procBuilder.addEndEvent("End");
return procBuilder.getProcessDefinition();
}
-
- class MergeListener implements SignalListener
- {
- private Signal nextSignal;
-
- public MergeListener(Signal nextSignal)
- {
- this.nextSignal = nextSignal;
- }
-
- public boolean acceptSignal(Signal signal)
- {
- return signal.getSignalType() == SignalType.SYSTEM_GATEWAY_ENTER;
- }
-
- public void catchSignal(Signal signal)
- {
- if (nextSignal != null)
- {
- SignalService sigService = SignalService.locateSignalService();
- sigService.throwSignal(nextSignal);
- nextSignal = null;
- }
- }
- }
}
Modified: projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel/ParallelGatewayMergeTest.java
===================================================================
--- projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel/ParallelGatewayMergeTest.java 2008-10-06 14:16:54 UTC (rev 2488)
+++ projects/spec/trunk/modules/cts/src/test/java/org/jbpm/test/cts/gateway/parallel/ParallelGatewayMergeTest.java 2008-10-06 15:53:38 UTC (rev 2489)
@@ -25,22 +25,16 @@
import java.io.IOException;
-import org.jbpm.api.client.SignalListener;
import org.jbpm.api.model.Message;
import org.jbpm.api.model.Process;
import org.jbpm.api.model.ProcessDefinition;
-import org.jbpm.api.model.Signal;
import org.jbpm.api.model.Assignment.AssignTime;
import org.jbpm.api.model.Event.EventDetailType;
import org.jbpm.api.model.Expression.ExpressionLanguage;
import org.jbpm.api.model.Gateway.GatewayType;
-import org.jbpm.api.model.Signal.SignalType;
-import org.jbpm.api.model.builder.EventBuilder;
import org.jbpm.api.model.builder.MessageBuilder;
import org.jbpm.api.model.builder.ProcessBuilder;
import org.jbpm.api.model.builder.ProcessBuilderService;
-import org.jbpm.api.model.builder.TaskBuilder;
-import org.jbpm.api.service.SignalService;
import org.jbpm.api.test.CTSTestCase;
/**
@@ -57,103 +51,13 @@
{
ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
Process proc = procDef.newInstance();
-
- // Add a signal listener that sends the other start trigger signal
- SignalService sigManager = SignalService.locateSignalService();
- MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));
- sigManager.addSignalListener(sigListener);
-
- try
- {
- // Start the process and send start trigger signal
- proc.startProcess();
- sigManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
-
- // Wait for the process to end
- proc.waitForEnd();
- }
- finally
- {
- sigManager.removeSignalListener(sigListener);
- }
-
- // Verify the result
- Message endMessage = getMessages().get(0);
- assertEquals("TaskA", endMessage.getProperty("taskValueA").getValue());
- assertEquals("TaskB", endMessage.getProperty("taskValueB").getValue());
- }
-
- public void testMergeTimeout() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
+
// Start the process and send start trigger signal
proc.startProcess();
- SignalService sigService = SignalService.locateSignalService();
- sigService.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
// Wait for the process to end
- try
- {
- proc.waitForEnd(1000);
- fail("timeout expected");
- }
- catch (RuntimeException rte)
- {
- // expected
- }
- }
+ proc.waitForEnd();
- public void testInvalidToken() throws Exception
- {
- ProcessDefinition procDef = unregisterOnTearDown(getProcessDefinition());
- Process proc = procDef.newInstance();
-
- // Add a signal listener that sends the other start trigger signal
- SignalService sigManager = SignalService.locateSignalService();
- MergeListener sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
- sigManager.addSignalListener(sigListener);
-
- try
- {
- // Start the process and send start trigger signal
- proc.startProcess();
- sigManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
-
- try
- {
- proc.waitForEnd();
- fail("Expected: Unexpected token from: SequenceFlow[TaskA->Merge]");
- }
- catch (RuntimeException rte)
- {
- // expected
- }
- }
- finally
- {
- sigManager.removeSignalListener(sigListener);
- }
-
- // Add a signal listener that sends the other start trigger signal
- sigListener = new MergeListener(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "B"));
- sigManager.addSignalListener(sigListener);
-
- try
- {
- // Start the process and send start trigger signal
- proc.startProcess();
- sigManager.throwSignal(new Signal(getTestID(), SignalType.SYSTEM_START_TRIGGER, "A"));
-
- // Wait for the process to end
- proc.waitForEnd();
- }
- finally
- {
- sigManager.removeSignalListener(sigListener);
- }
-
// Verify the result
Message endMessage = getMessages().get(0);
assertEquals("TaskA", endMessage.getProperty("taskValueA").getValue());
@@ -163,45 +67,14 @@
public ProcessDefinition getProcessDefinition() throws IOException
{
ProcessBuilder procBuilder = ProcessBuilderService.locateProcessBuilder();
- EventBuilder eventBuilder = procBuilder.addProcess(getName()).addStartEvent("StartA", EventDetailType.Signal);
- eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "A");
- TaskBuilder taskBuilder = procBuilder.addSequenceFlow("TaskA").addTask("TaskA");
- taskBuilder.addNodeAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValueA");
- taskBuilder.addSequenceFlow("Merge");
- eventBuilder = procBuilder.addStartEvent("StartB", EventDetailType.Signal);
- eventBuilder.addSignalRef(SignalType.SYSTEM_START_TRIGGER, "B");
- taskBuilder = procBuilder.addSequenceFlow("TaskB").addTask("TaskB");
- taskBuilder.addNodeAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValueB");
- taskBuilder.addSequenceFlow("Merge");
+ procBuilder.addProcess("ParallelGatewayMerge").addStartEvent("Start").addSequenceFlow("Split");
+ procBuilder.addGateway("Split", GatewayType.Parallel).addSequenceFlow("TaskA").addSequenceFlow("TaskB");
+ procBuilder.addTask("TaskA").addNodeAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskA'", "taskValueA").addSequenceFlow("Merge");
+ procBuilder.addTask("TaskB").addNodeAssignment(AssignTime.Start, ExpressionLanguage.MVEL, "'TaskB'", "taskValueB").addSequenceFlow("Merge");
procBuilder.addGateway("Merge", GatewayType.Parallel).addSequenceFlow("End");
procBuilder.addEndEvent("End", EventDetailType.Message).addMessageRef("EndMessage");
MessageBuilder msgBuilder = procBuilder.addProcessMessage("EndMessage");
msgBuilder.addToRef(getTestID()).addProperty("taskValueA", null, true).addProperty("taskValueB", null, true);
return procBuilder.getProcessDefinition();
}
-
- public static class MergeListener implements SignalListener
- {
- private Signal nextSignal;
-
- public MergeListener(Signal nextSignal)
- {
- this.nextSignal = nextSignal;
- }
-
- public boolean acceptSignal(Signal signal)
- {
- return signal.getSignalType() == SignalType.SYSTEM_GATEWAY_ENTER;
- }
-
- public void catchSignal(Signal signal)
- {
- if (nextSignal != null)
- {
- SignalService sigService = SignalService.locateSignalService();
- sigService.throwSignal(nextSignal);
- nextSignal = null;
- }
- }
- }
}
Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-10-06 14:16:54 UTC (rev 2488)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/InclusiveGatewayImpl.java 2008-10-06 15:53:38 UTC (rev 2489)
@@ -123,17 +123,21 @@
};
}
- // Get applicable gates which' condition evaluates to TRUE
- // Fall back to the default gate if there is one
- // Choke if there is no applicable gate
+ // Get applicable gates which' condition evaluates to TRUE.
+ // Fall back to the default gate if there is one.
+ // Choke if there is no applicable gate.
private List<SequenceFlow> getApplicableGates(Token token)
{
List<SequenceFlow> applicableGates = new ArrayList<SequenceFlow>();
for (SequenceFlow auxGate : getGates())
{
SequenceFlow seqFlow = auxGate;
- if (seqFlow.getConditionType() == ConditionType.Expression)
+ if (seqFlow.getConditionType() == ConditionType.None)
{
+ applicableGates.add(auxGate);
+ }
+ else if (seqFlow.getConditionType() == ConditionType.Expression)
+ {
Expression expr = seqFlow.getConditionExpression();
if (expr.getExpressionLanguage() == ExpressionLanguage.MVEL)
{
@@ -172,17 +176,6 @@
}
}
- // Fallback to the single outgoing gate that is not conditional
- if (applicableGates.size() == 0 && getGates().size() == 1)
- {
- SequenceFlow auxGate = getGates().get(0);
- SequenceFlow seqFlow = auxGate;
- if (seqFlow.getConditionType() == ConditionType.None)
- {
- applicableGates.add(auxGate);
- }
- }
-
if (applicableGates.size() == 0)
throw new IllegalStateException("Cannot select applicable gate in: " + this);
Modified: projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java
===================================================================
--- projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java 2008-10-06 14:16:54 UTC (rev 2488)
+++ projects/spec/trunk/modules/impl/src/main/java/org/jbpm/ri/model/NodeImpl.java 2008-10-06 15:53:38 UTC (rev 2489)
@@ -235,6 +235,7 @@
this.sigHandler = clazz.getName();
}
+ @Override
public ExecutionHandler getExecutionHandler(boolean defaultHandler)
{
if (customExecHandler == null && execHandler != null)
@@ -271,6 +272,7 @@
};
}
+ @Override
public SignalHandler getSignalHandler(boolean defaultHandler)
{
if (customSignalHandler == null && sigHandler != null)
@@ -284,6 +286,7 @@
protected abstract SignalHandler getDefaultSignalHandler();
+ @Override
public FlowHandler getFlowHandler(boolean defaultHandler)
{
if (customFlowHandler == null && flowHandler != null)
15 years, 7 months
JBoss JBPM SVN: r2488 - in jbpm3/trunk/modules/gwt-console: server/src/main/java/org/jboss/bpm/console/server and 4 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-10-06 10:16:54 -0400 (Mon, 06 Oct 2008)
New Revision: 2488
Added:
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java
Modified:
jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
Log:
JSON/GWT DateFormat
Modified: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java 2008-10-06 14:07:27 UTC (rev 2487)
+++ jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -101,7 +101,6 @@
@XmlElement(name = "start")
public String getStartDate()
{
- //"yyyy.MM.dd G 'at' HH:mm:ss vvvv"
SimpleDateFormat df = new SimpleDateFormat("y-M-d H:m:s");
return df.format(startDate);
}
@@ -111,11 +110,16 @@
this.startDate = startDate;
}
- @XmlElement(name = "end")
+ @XmlElement(name = "end")
public String getEndDate()
{
- SimpleDateFormat df = new SimpleDateFormat("y-M-d H:m:s");
- return df.format(endDate);
+ String s = "";
+ if(endDate!=null)
+ {
+ SimpleDateFormat df = new SimpleDateFormat("y-M-d H:m:s");
+ s = df.format(endDate);
+ }
+ return s;
}
public void setEndDate(Date endDate)
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java 2008-10-06 14:07:27 UTC (rev 2487)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/ProcessManagement.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -22,65 +22,46 @@
package org.jboss.bpm.console.server;
import org.jboss.bpm.console.client.model.ProcessDefinitionWrapper;
-import org.jboss.bpm.console.client.model.ProcessDefinition;
import org.jboss.bpm.console.client.model.ProcessInstanceWrapper;
-import org.jboss.bpm.console.client.model.ProcessInstance;
-import org.jboss.resteasy.annotations.providers.jaxb.json.BadgerFish;
+import org.jboss.bpm.console.server.dao.DAOFactory;
+import org.jboss.bpm.console.server.dao.ProcessDAO;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
-import javax.ws.rs.Produces;
import javax.ws.rs.PathParam;
-import java.util.ArrayList;
-import java.util.List;
-import java.util.Date;
+import javax.ws.rs.Produces;
/**
+ * REST server module for accessing process related data.
+ *
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
@Path("process")
public class ProcessManagement
{
- final static List<ProcessDefinition> defs = new ArrayList<ProcessDefinition>();
- static
- {
- defs.add( new ProcessDefinition(1, "OrderProcess", "1"));
- defs.add( new ProcessDefinition(2, "VacationManagement", "1"));
- defs.add( new ProcessDefinition(3, "New Employee walkthrough", "1"));
- defs.add( new ProcessDefinition(4, "Source code review", "2"));
- defs.add( new ProcessDefinition(5, "Loan application", "1"));
- defs.add( new ProcessDefinition(6, "Expense report review", "4"));
- defs.add( new ProcessDefinition(7, "Expense claim", "4"));
- defs.add( new ProcessDefinition(8, "Credit approval", "4"));
- defs.add( new ProcessDefinition(9, "Hello World", "4"));
- }
- final static List instances = new ArrayList();
- static
+ private ProcessDAO processDAO;
+
+
+ public ProcessManagement()
{
- instances.add( new ProcessInstance(2, -1, "Running", new Date(), null));
- instances.add( new ProcessInstance(3, -1, "Stopped", new Date(System.currentTimeMillis()-(1000*60*120)), new Date(System.currentTimeMillis()-(1000*60*12))));
- instances.add( new ProcessInstance(4, -1, "Ended", new Date(System.currentTimeMillis()-(1000*60*60)), new Date(System.currentTimeMillis()-(1000*60*24))));
- instances.add( new ProcessInstance(5, -1, "Suspended", new Date(System.currentTimeMillis()-(1000*60*90)), new Date(System.currentTimeMillis()-(1000*60*17))));
- instances.add( new ProcessInstance(6, -1, "Running", new Date(), null));
- instances.add( new ProcessInstance(7, -1, "Running", new Date(), null));
+ this.processDAO = DAOFactory.createProcessDefinitionDAO();
}
-
@GET
@Path("definitions")
@Produces("application/json")
public ProcessDefinitionWrapper getDefinitionsJSON()
{
- return new ProcessDefinitionWrapper(defs);
+ return new ProcessDefinitionWrapper( processDAO.getAllProcessDefinitions() );
}
@GET
@Path("definitions/{id}/instances")
@Produces("application/json")
- public ProcessInstanceWrapper getInstancesJSON(@PathParam("id") long instanceId)
+ public ProcessInstanceWrapper getInstancesJSON(@PathParam("id") long processId)
{
- return new ProcessInstanceWrapper(instances);
+ return new ProcessInstanceWrapper( processDAO.getInstanceByProcessDefinitionId(processId) );
}
}
Added: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -0,0 +1,37 @@
+/*
+ * 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.server.dao;
+
+import org.jboss.bpm.console.server.dao.internal.MockProcessDAO;
+
+/**
+ * TODO: Add service locator lookup
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DAOFactory
+{
+ public static ProcessDAO createProcessDefinitionDAO()
+ {
+ return new MockProcessDAO();
+ }
+}
+
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/DAOFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -0,0 +1,41 @@
+/*
+ * 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.server.dao;
+
+import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.model.ProcessInstance;
+
+import java.util.List;
+
+/**
+ * Access process related data.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface ProcessDAO
+{
+ List<ProcessDefinition> getAllProcessDefinitions();
+
+ ProcessDefinition getProcessDefinitionById(long id);
+
+ List<ProcessInstance> getInstanceByProcessDefinitionId(long id);
+}
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/ProcessDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -0,0 +1,85 @@
+/*
+ * 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.server.dao.internal;
+
+import org.jboss.bpm.console.server.dao.ProcessDAO;
+import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.model.ProcessInstance;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class MockProcessDAO implements ProcessDAO
+{
+
+ final static List<ProcessDefinition> defs = new ArrayList<ProcessDefinition>();
+ static
+ {
+ defs.add( new ProcessDefinition(1, "OrderProcess", "1"));
+ defs.add( new ProcessDefinition(2, "VacationManagement", "1"));
+ defs.add( new ProcessDefinition(3, "New Employee walkthrough", "1"));
+ defs.add( new ProcessDefinition(4, "Source code review", "2"));
+ defs.add( new ProcessDefinition(5, "Loan application", "1"));
+ defs.add( new ProcessDefinition(6, "Expense report review", "4"));
+ defs.add( new ProcessDefinition(7, "Expense claim", "4"));
+ defs.add( new ProcessDefinition(8, "Credit approval", "4"));
+ }
+
+ final static List instances = new ArrayList();
+ static
+ {
+ instances.add( new ProcessInstance(2, -1, "Running", new Date(), null));
+ instances.add( new ProcessInstance(3, -1, "Stopped", new Date(System.currentTimeMillis()-(1000*60*120)), new Date(System.currentTimeMillis()-(1000*60*12))));
+ instances.add( new ProcessInstance(4, -1, "Ended", new Date(System.currentTimeMillis()-(1000*60*60)), new Date(System.currentTimeMillis()-(1000*60*24))));
+ instances.add( new ProcessInstance(5, -1, "Suspended", new Date(System.currentTimeMillis()-(1000*60*90)), new Date(System.currentTimeMillis()-(1000*60*17))));
+ instances.add( new ProcessInstance(6, -1, "Running", new Date(), null));
+ instances.add( new ProcessInstance(7, -1, "Running", new Date(), null));
+ }
+
+ public List<ProcessDefinition> getAllProcessDefinitions()
+ {
+ return defs;
+ }
+
+ public ProcessDefinition getProcessDefinitionById(long id)
+ {
+ ProcessDefinition match = null;
+ for(ProcessDefinition pd : defs)
+ {
+ if(pd.getProcessId() == id)
+ {
+ match = pd;
+ break;
+ }
+ }
+ return match;
+ }
+
+ public List<ProcessInstance> getInstanceByProcessDefinitionId(long id)
+ {
+ return instances;
+ }
+}
Property changes on: jbpm3/trunk/modules/gwt-console/server/src/main/java/org/jboss/bpm/console/server/dao/internal/MockProcessDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java 2008-10-06 14:07:27 UTC (rev 2487)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -29,6 +29,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public class DAOFactory
{
public static ProcessDefinitionDAO createProcessDefinitionDAO()
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java 2008-10-06 14:07:27 UTC (rev 2487)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -26,6 +26,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public interface ProcessDefinitionDAO
{
List getAllProcessDefinitions();
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java 2008-10-06 14:07:27 UTC (rev 2487)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -26,6 +26,7 @@
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
*/
+@Deprecated
public interface ProcessInstanceDAO
{
List getInstanceByProcessDefinitionId(long id);
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-10-06 14:07:27 UTC (rev 2487)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-10-06 14:16:54 UTC (rev 2488)
@@ -41,6 +41,7 @@
private Map row2InstanceMap = new HashMap();
private ProcessDefinition parent;
+ private static final String DATE_FORMAT = "y-m-j H:i:s"; //08-10-02 13:51:27
public ProcessInstanceList(ProcessDefinition procDef, String titleName, ConsoleView view)
{
@@ -114,8 +115,8 @@
new IntegerFieldDef("parentId"),
new StringFieldDef("key"),
new StringFieldDef("status"),
- new DateFieldDef("start", "Y-m-d H:i:s"), //2008-10-02 13:51:27
- new DateFieldDef("end")
+ new DateFieldDef("start", DATE_FORMAT),
+ new DateFieldDef("end", DATE_FORMAT)
}
);
15 years, 7 months
JBoss JBPM SVN: r2487 - in jbpm3/trunk/modules/core: src/test/java/org/jbpm/job/executor and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 10:07:27 -0400 (Mon, 06 Oct 2008)
New Revision: 2487
Modified:
jbpm3/trunk/modules/core/pom.xml
jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java
Log:
[JBPM-1718] Pass testsuite against postgresql
Create individual issues
Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml 2008-10-06 14:06:05 UTC (rev 2486)
+++ jbpm3/trunk/modules/core/pom.xml 2008-10-06 14:07:27 UTC (rev 2487)
@@ -325,13 +325,11 @@
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
<!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
- <!-- https://jira.jboss.org/jira/browse/JBPM-1718 -->
- <exclude>org/jbpm/graph/exe/SubProcessPlusConcurrencyDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1771 -->
<exclude>org/jbpm/job/executor/JobExecutorDbTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1772 -->
<exclude>org/jbpm/jpdl/exe/JoinDbTest.java</exclude>
- <exclude>org/jbpm/persistence/db/PersistenceServiceDbTest.java</exclude>
- <exclude>org/jbpm/graph/exe/RuntimeActionsTest.java</exclude>
- <exclude>org/jbpm/instantiation/FieldInstantiatorTest.java</exclude>
+ <exclude>org/jbpm/graph/exe/SubProcessPlusConcurrencyDbTest.java</exclude>
</excludes>
</configuration>
</plugin>
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 2008-10-06 14:06:05 UTC (rev 2486)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/job/executor/JobExecutorDbTest.java 2008-10-06 14:07:27 UTC (rev 2487)
@@ -76,49 +76,41 @@
try
{
- ProcessDefinition processDefinition = ProcessDefinition.parseXmlString("<process-definition name='bulk messages'>" + " <start-state>"
- + " <transition to='a' />" + " </start-state>" + " <node name='a' async='true'>" + " <action class='"
- + AutomaticActivity.class.getName()
- + "' />"
+ ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
+ "<process-definition name='bulk messages'>"
+ + " <start-state>"
+ + " <transition to='a' />"
+ + " </start-state>"
+ + " <node name='a' async='true'>"
+ + " <action class='" + AutomaticActivity.class.getName() + "' />"
+ " <transition to='b' />"
+ " </node>"
+ " <node name='b' async='true'>"
+ " <event type='node-enter'>"
- + " <action name='X' async='true' class='"
- + AsyncAction.class.getName()
- + "' />"
+ + " <action name='X' async='true' class='" + AsyncAction.class.getName() + "' />"
+ " </event>"
- + " <action class='"
- + AutomaticActivity.class.getName()
- + "' />"
+ + " <action class='" + AutomaticActivity.class.getName() + "' />"
+ " <transition to='c' />"
+ " </node>"
+ " <node name='c' async='true'>"
- + " <action class='"
- + AutomaticActivity.class.getName()
- + "' />"
+ + " <action class='" + AutomaticActivity.class.getName() + "' />"
+ " <transition to='d'>"
- + " <action name='Y' async='true' class='"
- + AsyncAction.class.getName()
- + "' />"
+ + " <action name='Y' async='true' class='" + AsyncAction.class.getName() + "' />"
+ " </transition>"
+ " </node>"
+ " <node name='d' async='true'>"
- + " <action class='"
- + AutomaticActivity.class.getName()
- + "' />"
+ + " <action class='" + AutomaticActivity.class.getName() + "' />"
+ " <transition to='e' />"
+ " <event type='node-leave'>"
- + " <action name='Z' async='true' class='"
- + AsyncAction.class.getName()
- + "' />"
+ + " <action name='Z' async='true' class='" + AsyncAction.class.getName() + "' />"
+ " </event>"
+ " </node>"
+ " <node name='e' async='true'>"
- + " <action class='"
- + AutomaticActivity.class.getName()
- + "' />"
- + " <transition to='end' />" + " </node>" + " <end-state name='end'/>" + "</process-definition>");
+ + " <action class='" + AutomaticActivity.class.getName() + "' />"
+ + " <transition to='end' />"
+ + " </node>"
+ + " <end-state name='end'/>"
+ + "</process-definition>");
jbpmContext.deployProcessDefinition(processDefinition);
}
15 years, 7 months
JBoss JBPM SVN: r2486 - jbpm3/trunk/modules/core/src/main/java/org/jbpm/db.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 10:06:05 -0400 (Mon, 06 Oct 2008)
New Revision: 2486
Modified:
jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
Log:
System.exit(1) shows up as success in Hudson.
Fail the test instead and drop the schema.
Modified: jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java
===================================================================
--- jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2008-10-06 13:25:04 UTC (rev 2485)
+++ jbpm3/trunk/modules/core/src/main/java/org/jbpm/db/AbstractDbTestCase.java 2008-10-06 14:06:05 UTC (rev 2486)
@@ -71,8 +71,10 @@
if (hasLeftOverRecords())
{
- // We exit because subsequent tests start in an undefined state
- System.exit(1);
+ dropSchema();
+ // Failing here, will probably hide a potential previous failure.
+ // Is there a better way to fail without hiding a potential cause?
+ fail("Test failed to cleanup database records");
}
super.tearDown();
15 years, 7 months
JBoss JBPM SVN: r2485 - jbpm3/trunk/modules.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 09:25:04 -0400 (Mon, 06 Oct 2008)
New Revision: 2485
Removed:
jbpm3/trunk/modules/integration/
Log:
Drop integration module
15 years, 7 months
JBoss JBPM SVN: r2484 - in jbpm3/trunk: modules/distribution and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 09:17:19 -0400 (Mon, 06 Oct 2008)
New Revision: 2484
Modified:
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/pom.xml
Log:
Drop integration module
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-10-06 13:02:54 UTC (rev 2483)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-10-06 13:17:19 UTC (rev 2484)
@@ -83,11 +83,6 @@
</dependency>
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
- <artifactId>jbpm-integration</artifactId>
- <version>${version}</version>
- </dependency>
- <dependency>
- <groupId>org.jbpm.jbpm3</groupId>
<artifactId>jbpm-userguide</artifactId>
<version>${version}</version>
<type>jdocbook</type>
Modified: jbpm3/trunk/pom.xml
===================================================================
--- jbpm3/trunk/pom.xml 2008-10-06 13:02:54 UTC (rev 2483)
+++ jbpm3/trunk/pom.xml 2008-10-06 13:17:19 UTC (rev 2484)
@@ -33,7 +33,6 @@
<module>modules/enterprise</module>
<module>modules/examples</module>
<module>modules/identity</module>
- <module>modules/integration</module>
<module>modules/jbpm4jsf</module>
<module>modules/simulation</module>
</modules>
15 years, 7 months
JBoss JBPM SVN: r2483 - jbpm3/trunk/modules/core.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 09:02:54 -0400 (Mon, 06 Oct 2008)
New Revision: 2483
Modified:
jbpm3/trunk/modules/core/pom.xml
Log:
[JBPM-1735] Reopen: Cleanup ProcessStateDbTest
Modified: jbpm3/trunk/modules/core/pom.xml
===================================================================
--- jbpm3/trunk/modules/core/pom.xml 2008-10-06 12:59:37 UTC (rev 2482)
+++ jbpm3/trunk/modules/core/pom.xml 2008-10-06 13:02:54 UTC (rev 2483)
@@ -284,6 +284,8 @@
<exclude>org/jbpm/perf/StateUpdateTest.java</exclude>
<!-- https://jira.jboss.org/jira/browse/JBPM-1724 -->
<exclude>org/jbpm/seam/SeamPageFlowTest.java</exclude>
+ <!-- https://jira.jboss.org/jira/browse/JBPM-1735 -->
+ <exclude>org/jbpm/graph/node/ProcessStateDbTest.java</exclude>
</excludes>
</configuration>
</plugin>
@@ -293,7 +295,7 @@
<!--
Name: postgresql
- Descr: MySQL Database Setup
+ Descr: PostgreSQL Database Setup
-->
<profile>
<id>postgresql</id>
15 years, 7 months
JBoss JBPM SVN: r2482 - in jbpm3/trunk/modules/gwt-console: rpc and 5 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-10-06 08:59:37 -0400 (Mon, 06 Oct 2008)
New Revision: 2482
Modified:
jbpm3/trunk/modules/gwt-console/pom.xml
jbpm3/trunk/modules/gwt-console/rpc/pom.xml
jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java
jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html
jbpm3/trunk/modules/gwt-console/war/pom.xml
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
Log:
provided dependencies shouldn't get deployed
Modified: jbpm3/trunk/modules/gwt-console/pom.xml
===================================================================
--- jbpm3/trunk/modules/gwt-console/pom.xml 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/pom.xml 2008-10-06 12:59:37 UTC (rev 2482)
@@ -17,6 +17,9 @@
<properties>
<gchart.version>2.2</gchart.version>
<gwtext.version>2.0.5</gwtext.version>
+ <gwt-widgets.version>0.2.0</gwt-widgets.version>
+ <stax-api.version>1.0-2</stax-api.version>
+ <jaf.version>1.1</jaf.version>
</properties>
<modules>
@@ -37,6 +40,21 @@
<artifactId>gchart</artifactId>
<version>${gchart.version}</version>
</dependency>
+ <dependency>
+ <groupId>net.sf.gwt-widget</groupId>
+ <artifactId>gwt-widgets</artifactId>
+ <version>${gwt-widgets.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.xml.stream</groupId>
+ <artifactId>stax-api</artifactId>
+ <version>${stax-api.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <version>${jaf.version}</version>
+ </dependency>
</dependencies>
</dependencyManagement>
</project>
Modified: jbpm3/trunk/modules/gwt-console/rpc/pom.xml
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/pom.xml 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/rpc/pom.xml 2008-10-06 12:59:37 UTC (rev 2482)
@@ -30,10 +30,15 @@
<scope>provided</scope>
</dependency>
<dependency>
- <groupId>javax.xml.bind</groupId>
- <artifactId>jaxb-api</artifactId>
- <scope>provided</scope>
+ <groupId>javax.xml.bind</groupId>
+ <artifactId>jaxb-api</artifactId>
+ <scope>provided</scope>
</dependency>
+ <dependency>
+ <groupId>net.sf.gwt-widget</groupId>
+ <artifactId>gwt-widgets</artifactId>
+ <version>${gwt-widgets.version}</version>
+ </dependency>
</dependencies>
<build>
@@ -43,5 +48,5 @@
<directory>src/main/java</directory>
</resource>
</resources>
- </build>
+ </build>
</project>
Modified: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java 2008-10-06 12:59:37 UTC (rev 2482)
@@ -23,8 +23,8 @@
import com.google.gwt.user.client.rpc.IsSerializable;
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlElement;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
Modified: jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/rpc/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java 2008-10-06 12:59:37 UTC (rev 2482)
@@ -21,8 +21,10 @@
*/
package org.jboss.bpm.console.client.model;
+import org.gwtwidgets.client.util.SimpleDateFormat;
+
+import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
-import javax.xml.bind.annotation.XmlElement;
import java.util.Date;
/**
@@ -97,9 +99,11 @@
}
@XmlElement(name = "start")
- public Date getStartDate()
+ public String getStartDate()
{
- return startDate;
+ //"yyyy.MM.dd G 'at' HH:mm:ss vvvv"
+ SimpleDateFormat df = new SimpleDateFormat("y-M-d H:m:s");
+ return df.format(startDate);
}
public void setStartDate(Date startDate)
@@ -107,10 +111,11 @@
this.startDate = startDate;
}
- @XmlElement(name = "end")
- public Date getEndDate()
+ @XmlElement(name = "end")
+ public String getEndDate()
{
- return endDate;
+ SimpleDateFormat df = new SimpleDateFormat("y-M-d H:m:s");
+ return df.format(endDate);
}
public void setEndDate(Date endDate)
Modified: jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/server/src/main/webapp/index.html 2008-10-06 12:59:37 UTC (rev 2482)
@@ -37,7 +37,7 @@
<pre>
curl -H 'Accept: application/json' http://localhost:8080/gwt-console-server/rs/process/definitions
- curl -H 'Accept: application/json' http://localhrocess/definitions/1/instances
+ curl -H 'Accept: application/json' http://localhost:8080/gwt-console-server/rs/process/definitions/1/instances
</pre>
</body>
</html>
\ No newline at end of file
Modified: jbpm3/trunk/modules/gwt-console/war/pom.xml
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/pom.xml 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/war/pom.xml 2008-10-06 12:59:37 UTC (rev 2482)
@@ -20,7 +20,7 @@
<dependency>
<groupId>org.jbpm.jbpm3</groupId>
<artifactId>gwt-console-rpc</artifactId>
- <version>${version}</version>
+ <version>${version}</version>
</dependency>
<dependency>
@@ -59,18 +59,18 @@
<artifactId>gchart</artifactId>
</dependency>
-<dependency>
- <groupId>javax.xml.stream</groupId>
- <artifactId>stax-api</artifactId>
- <version>1.0-2</version>
-</dependency>
- <dependency>
- <groupId>javax.activation</groupId>
- <artifactId>activation</artifactId>
- <version>1.1</version>
-</dependency>
+ <dependency>
+ <groupId>javax.xml.stream</groupId>
+ <artifactId>stax-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <scope>provided</scope>
+ </dependency>
-</dependencies>
+ </dependencies>
<!-- Plugins -->
<build>
<plugins>
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-10-06 12:59:37 UTC (rev 2482)
@@ -31,6 +31,7 @@
import java.util.HashMap;
import java.util.Map;
+import java.util.Date;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -113,7 +114,7 @@
new IntegerFieldDef("parentId"),
new StringFieldDef("key"),
new StringFieldDef("status"),
- new DateFieldDef("start"),
+ new DateFieldDef("start", "Y-m-d H:i:s"), //2008-10-02 13:51:27
new DateFieldDef("end")
}
);
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2008-10-06 10:54:19 UTC (rev 2481)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/Application.gwt.xml 2008-10-06 12:59:37 UTC (rev 2482)
@@ -4,8 +4,8 @@
<inherits name='com.google.gwt.user.User' />
<inherits name='com.gwtext.GwtExt' />
<inherits name='com.googlecode.gchart.GChart'/>
+ <inherits name='org.gwtwidgets.WidgetLibrary'/>
-
<!-- Specify the app entry point class. -->
<entry-point class='org.jboss.bpm.console.client.Application' />
15 years, 7 months
JBoss JBPM SVN: r2481 - jbpm3/trunk/modules/core/src/test/java/org/jbpm/optimisticlocking.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 06:54:19 -0400 (Mon, 06 Oct 2008)
New Revision: 2481
Modified:
jbpm3/trunk/modules/core/src/test/java/org/jbpm/optimisticlocking/LockingTest.java
Log:
Add javadoc
Modified: jbpm3/trunk/modules/core/src/test/java/org/jbpm/optimisticlocking/LockingTest.java
===================================================================
--- jbpm3/trunk/modules/core/src/test/java/org/jbpm/optimisticlocking/LockingTest.java 2008-10-06 09:31:39 UTC (rev 2480)
+++ jbpm3/trunk/modules/core/src/test/java/org/jbpm/optimisticlocking/LockingTest.java 2008-10-06 10:54:19 UTC (rev 2481)
@@ -13,6 +13,11 @@
import org.jbpm.graph.exe.Comment;
import org.jbpm.graph.exe.ProcessInstance;
+/**
+ * Possible problem in concurrent signalling from multiple threads
+ *
+ * https://jira.jboss.org/jira/browse/JBPM-1071
+ */
public class LockingTest extends AbstractDbTestCase
{
static int nbrOfThreads = 5;
15 years, 7 months
JBoss JBPM SVN: r2480 - in jbpm3/trunk/modules/gwt-console: server and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-10-06 05:31:39 -0400 (Mon, 06 Oct 2008)
New Revision: 2480
Added:
jbpm3/trunk/modules/gwt-console/rpc/.classpath
jbpm3/trunk/modules/gwt-console/rpc/.project
jbpm3/trunk/modules/gwt-console/server/.classpath
jbpm3/trunk/modules/gwt-console/server/.project
Modified:
jbpm3/trunk/modules/gwt-console/rpc/
jbpm3/trunk/modules/gwt-console/server/
jbpm3/trunk/modules/gwt-console/war/
Log:
Add GWT console eclipse stuff
Property changes on: jbpm3/trunk/modules/gwt-console/rpc
___________________________________________________________________
Name: svn:ignore
+ .settings
target
Added: jbpm3/trunk/modules/gwt-console/rpc/.classpath
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/.classpath (rev 0)
+++ jbpm3/trunk/modules/gwt-console/rpc/.classpath 2008-10-06 09:31:39 UTC (rev 2480)
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: jbpm3/trunk/modules/gwt-console/rpc/.project
===================================================================
--- jbpm3/trunk/modules/gwt-console/rpc/.project (rev 0)
+++ jbpm3/trunk/modules/gwt-console/rpc/.project 2008-10-06 09:31:39 UTC (rev 2480)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>gwt-console-rpc</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Property changes on: jbpm3/trunk/modules/gwt-console/server
___________________________________________________________________
Name: svn:ignore
+ .settings
target
Added: jbpm3/trunk/modules/gwt-console/server/.classpath
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/.classpath (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/.classpath 2008-10-06 09:31:39 UTC (rev 2480)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" output="target/classes" path="src/main/java"/>
+ <classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5"/>
+ <classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
+ <classpathentry kind="output" path="target/classes"/>
+</classpath>
Added: jbpm3/trunk/modules/gwt-console/server/.project
===================================================================
--- jbpm3/trunk/modules/gwt-console/server/.project (rev 0)
+++ jbpm3/trunk/modules/gwt-console/server/.project 2008-10-06 09:31:39 UTC (rev 2480)
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>gwt-console-server</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ <nature>org.maven.ide.eclipse.maven2Nature</nature>
+ </natures>
+</projectDescription>
Property changes on: jbpm3/trunk/modules/gwt-console/war
___________________________________________________________________
Name: svn:ignore
- target
.gwt-cache
+ target
.gwt-cache
.settings
15 years, 7 months