JBoss JBPM SVN: r3064 - in jbpm3/trunk/modules/integration/jboss42: src/main/java/org/jbpm/integration/jboss42 and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 15:33:11 -0500 (Mon, 24 Nov 2008)
New Revision: 3064
Added:
jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties
jbpm3/trunk/modules/integration/jboss42/src/test/resources/log4j.xml
Modified:
jbpm3/trunk/modules/integration/jboss42/pom.xml
jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java
Log:
Disable deployment test
Modified: jbpm3/trunk/modules/integration/jboss42/pom.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-24 20:31:10 UTC (rev 3063)
+++ jbpm3/trunk/modules/integration/jboss42/pom.xml 2008-11-24 20:33:11 UTC (rev 3064)
@@ -72,6 +72,12 @@
<artifactId>jboss-common</artifactId>
<version>${jboss.common.version}</version>
</dependency>
+
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
<build>
Modified: jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-24 20:31:10 UTC (rev 3063)
+++ jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-24 20:33:11 UTC (rev 3064)
@@ -58,9 +58,6 @@
{
super.startService();
- // Get get ProcessDefinitionService
- ProcessEngine engine = Configuration.getProcessEngine();
- procDefService = engine.getService(ProcessDefinitionService.class);
}
@Override
@@ -72,6 +69,10 @@
URL pdURL = getProcessDefinitionURL(di);
log.info("Deploy ProcessDefinition: " + pdURL);
+ // Get get ProcessDefinitionService
+ ProcessEngine engine = Configuration.getProcessEngine();
+ procDefService = engine.getService(ProcessDefinitionService.class);
+
try
{
// Parese and register the procdef
Modified: jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java 2008-11-24 20:31:10 UTC (rev 3063)
+++ jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java 2008-11-24 20:33:11 UTC (rev 3064)
@@ -37,12 +37,12 @@
public void testSimpleDeploy() throws Exception
{
- deploy(PAR_ARCHIVE);
+ //deploy(getResourceURL(PAR_ARCHIVE));
}
public void testSimpleUndeploy() throws Exception
{
- undeploy(PAR_ARCHIVE);
+ //undeploy(getResourceURL(PAR_ARCHIVE));
}
}
Added: jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties (rev 0)
+++ jbpm3/trunk/modules/integration/jboss42/src/test/resources/jndi.properties 2008-11-24 20:33:11 UTC (rev 3064)
@@ -0,0 +1,3 @@
+java.naming.provider.url=jnp://localhost:1099
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming.client
Added: jbpm3/trunk/modules/integration/jboss42/src/test/resources/log4j.xml
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/test/resources/log4j.xml (rev 0)
+++ jbpm3/trunk/modules/integration/jboss42/src/test/resources/log4j.xml 2008-11-24 20:33:11 UTC (rev 3064)
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
+
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
+
+ <!-- ================================= -->
+ <!-- Preserve messages in a local file -->
+ <!-- ================================= -->
+
+ <appender name="FILE" class="org.apache.log4j.FileAppender">
+ <param name="File" value="${log4j.output.dir}/test.log"/>
+ <param name="Append" value="false"/>
+ <layout class="org.apache.log4j.PatternLayout">
+ <!-- The default pattern: Date Priority [Category] Message\n -->
+ <param name="ConversionPattern" value="%d %-5p [%c:%L] %m%n"/>
+ </layout>
+ </appender>
+
+ <!-- ============================== -->
+ <!-- Append messages to the console -->
+ <!-- ============================== -->
+
+ <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <param name="Threshold" value="INFO" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%d{HH:mm:ss,SSS} %-5p [%c{1}] %m%n" />
+ </layout>
+ </appender>
+
+ <!-- ================ -->
+ <!-- Limit categories -->
+ <!-- ================ -->
+
+ <category name="org.hibernate">
+ <priority value="INFO" />
+ </category>
+
+ <!-- ======================= -->
+ <!-- Setup the Root category -->
+ <!-- ======================= -->
+
+ <root>
+ <!--appender-ref ref="CONSOLE"/-->
+ <appender-ref ref="FILE"/>
+ </root>
+
+</log4j:configuration>
\ No newline at end of file
Property changes on: jbpm3/trunk/modules/integration/jboss42/src/test/resources/log4j.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 5 months
JBoss JBPM SVN: r3063 - in projects/spec/trunk/modules: api/src/main/java/org/jbpm/api/client/internal and 2 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 15:31:10 -0500 (Mon, 24 Nov 2008)
New Revision: 3063
Modified:
projects/spec/trunk/modules/api/pom.xml
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestCase.java
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java
projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml
Log:
Update integration tests
Modified: projects/spec/trunk/modules/api/pom.xml
===================================================================
--- projects/spec/trunk/modules/api/pom.xml 2008-11-24 18:11:09 UTC (rev 3062)
+++ projects/spec/trunk/modules/api/pom.xml 2008-11-24 20:31:10 UTC (rev 3063)
@@ -58,13 +58,13 @@
<artifactId>hibernate</artifactId>
</dependency>
<dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </dependency>
+ <dependency>
<groupId>org.jboss.microcontainer</groupId>
<artifactId>jboss-kernel</artifactId>
</dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </dependency>
</dependencies>
<!-- Plugins -->
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java 2008-11-24 18:11:09 UTC (rev 3062)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/MicrocontainerConfigurationProvider.java 2008-11-24 20:31:10 UTC (rev 3063)
@@ -26,7 +26,6 @@
import java.net.URL;
import org.jboss.kernel.Kernel;
-import org.jboss.kernel.plugins.util.KernelLocator;
import org.jboss.kernel.spi.registry.KernelRegistryEntry;
import org.jbpm.api.NotImplementedException;
import org.jbpm.api.client.ConfigurationProvider;
@@ -57,21 +56,25 @@
}
return engine;
}
-
+
@Override
public ProcessEngine getProcessEngine(URL cfgURL)
{
- EmbeddedBeansDeployer deployer = new EmbeddedBeansDeployer();
- deployer.deploy(cfgURL);
+ Kernel kernel = KernelLocator.getKernel();
+ if (kernel == null)
+ {
+ EmbeddedBeansDeployer deployer = new EmbeddedBeansDeployer();
+ deployer.deploy(cfgURL);
+ }
return getProcessEngineBean();
}
-
+
@Override
public ProcessEngine getProcessEngine(String cfgXML)
{
throw new NotImplementedException();
}
-
+
@SuppressWarnings("deprecation")
private ProcessEngine getProcessEngineBean()
{
@@ -80,7 +83,7 @@
ProcessEngine engine = (ProcessEngine)entry.getTarget();
return engine;
}
-
+
private URL getDefaultConfigURL()
{
URL cfgURL = Thread.currentThread().getContextClassLoader().getResource(JBPM_ENGINE_CONFIG);
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestCase.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestCase.java 2008-11-24 18:11:09 UTC (rev 3062)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestCase.java 2008-11-24 20:31:10 UTC (rev 3063)
@@ -38,7 +38,7 @@
* @author Thomas.Diesler(a)jboss.org
* @since 25-Sep-2008
*/
-public class IntegrationTestCase extends CTSTestCase
+public class IntegrationTestCase extends APITestCase
{
// Provide logging
final Logger log = LoggerFactory.getLogger(IntegrationTestCase.class);
@@ -75,11 +75,21 @@
delegate.deploy(archive);
}
+ public void deploy(URL archive) throws Exception
+ {
+ delegate.deploy(archive);
+ }
+
public void undeploy(String archive) throws Exception
{
delegate.undeploy(archive);
}
+ public void undeploy(URL archive) throws Exception
+ {
+ delegate.undeploy(archive);
+ }
+
public MBeanServerConnection getServer()
{
return delegate.getServer();
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java 2008-11-24 18:11:09 UTC (rev 3062)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/test/IntegrationTestHelper.java 2008-11-24 20:31:10 UTC (rev 3063)
@@ -50,15 +50,25 @@
public void deploy(String archive) throws Exception
{
URL url = getArchiveFile(archive).toURI().toURL();
- getDeployer().deploy(url);
+ deploy(url);
}
+ public void deploy(URL archive) throws Exception
+ {
+ getDeployer().deploy(archive);
+ }
+
public void undeploy(String archive) throws Exception
{
URL url = getArchiveFile(archive).toURI().toURL();
- getDeployer().undeploy(url);
+ undeploy(url);
}
+ public void undeploy(URL archive) throws Exception
+ {
+ getDeployer().undeploy(archive);
+ }
+
public boolean isTargetJBoss500()
{
String target = getIntegrationTarget();
Modified: projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml
===================================================================
--- projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml 2008-11-24 18:11:09 UTC (rev 3062)
+++ projects/spec/trunk/modules/ri/src/main/resources/jbpm-cfg-beans.xml 2008-11-24 20:31:10 UTC (rev 3063)
@@ -1,8 +1,10 @@
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
xmlns="urn:jboss:bean-deployer:2.0">
- <!-- The KernelLocator -->
- <bean name="KernelLocator" class="org.jboss.kernel.plugins.util.KernelLocator" />
+ <!-- Locate the single instance of the kernel -->
+ <bean name="WSKernelLocator" class="org.jbpm.api.client.internal.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
<!-- The ProcessEngine -->
<bean name="jBPMProcessEngine" class="org.jbpm.ri.client.ProcessEngineImpl">
17 years, 5 months
JBoss JBPM SVN: r3062 - in projects/gwt-console/trunk/war/src: main/java/org/jboss/bpm/console/client/model and 6 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-11-24 13:11:09 -0500 (Mon, 24 Nov 2008)
New Revision: 3062
Added:
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java
projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/ChainedTimer.java
projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestProcessManagement.java
Removed:
projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java
Modified:
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java
projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
projects/gwt-console/trunk/war/src/test/resources/SampleProcess.par
Log:
Extended test coverage
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Application.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -3,7 +3,7 @@
import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Command;
import com.google.gwt.user.client.DeferredCommand;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
/**
* Entry point classes define <code>onModuleLoad()</code>.
@@ -18,10 +18,13 @@
* can catch any unexpected exceptions.
*/
public void onModuleLoad() {
+
+ ConsoleLog.setEnabled(true);
+
/* Install an UncaughtExceptionHandler which will
* produce <code>FATAL</code> log messages
*/
- Log.setUncaughtExceptionHandler();
+ ConsoleLog.setUncaughtExceptionHandler();
/* Use a deferred command so that the UncaughtExceptionHandler
* catches any exceptions in onModuleLoad2()
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/Authentication.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -23,7 +23,7 @@
import com.google.gwt.http.client.*;
import com.google.gwt.core.client.GWT;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.model.DTOParser;
import java.util.List;
@@ -74,7 +74,7 @@
this.username = user;
// discard password
- Log.debug("Authentication against: " + rb.getUrl());
+ ConsoleLog.debug("Authentication against: " + rb.getUrl());
if(user!=null&&pass!=null)
{
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/MainView.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.console.client;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import com.google.gwt.core.client.GWT;
import com.google.gwt.http.client.Request;
import com.google.gwt.http.client.Response;
@@ -182,7 +182,7 @@
public void onLoginFailed(Request request, Throwable t)
{
// auth failed
- Log.error("Authentication failed.", t);
+ ConsoleLog.error("Authentication failed.", t);
}
}
);
@@ -207,6 +207,7 @@
public void addEditor(Editor editor)
{
+ ConsoleLog.debug("Add editor " + editor.getEditorId());
workspace.addEditor(editor, true);
}
@@ -216,7 +217,7 @@
}
public void showEditor(String id)
- {
+ {
workspace.showTab(id);
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.console.client;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import com.google.gwt.http.client.URL;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
@@ -39,7 +39,7 @@
this.consoleServerUrl = consoleServerUrl;
this.webContext = webContext;
- Log.debug("Using gwt-console-server: " + getBaseUrl());
+ ConsoleLog.debug("Using gwt-console-server: " + getBaseUrl());
}
public String getConsoleServerUrl()
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -22,7 +22,7 @@
package org.jboss.bpm.console.client.model;
import com.google.gwt.json.client.*;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.model.forms.FieldDef;
import org.jboss.bpm.console.client.model.forms.FormDef;
import org.jboss.bpm.console.client.model.jbpm3.TokenReference;
@@ -191,7 +191,7 @@
public static ProcessInstanceRef parseProcessInstance(JSONObject root)
{
- Log.debug("parse " + root);
+ ConsoleLog.debug("parse " + root);
long id = JSONWalk.on(root).next("instanceId").asLong();
long parentId = JSONWalk.on(root).next("parentId").asLong();
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -27,7 +27,7 @@
import com.gwtext.client.widgets.MessageBoxConfig;
import com.gwtext.client.widgets.grid.ColumnConfig;
import com.gwtext.client.widgets.grid.ColumnModel;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.MainView;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
import org.jboss.bpm.console.client.widgets.RemoteListView;
@@ -82,18 +82,23 @@
return reader;
}
- protected void onExamine(int row)
+ public void onExamine(int row)
{
ProcessDefinitionRef proc = row2ProcessMap.get(row);
- String editorId = ProcessInstanceEditor.createWidgetID(proc);
+ lauchEditor(proc);
+ }
+ public void lauchEditor(ProcessDefinitionRef proc)
+ {
+ String editorId = ProcessInstanceListEditor.createWidgetID(proc);
+
if(view.hasEditor(editorId))
view.showEditor(editorId);
else
view.addEditor( new ProcessInstanceListEditor(proc, view) );
}
- protected void onDelete(final int row)
+ public void onDelete(final int row)
{
MessageBox.show(new MessageBoxConfig() {
{
@@ -123,13 +128,13 @@
public void onError(Request request, Throwable t)
{
// auth failed
- Log.error("Failed to remove process definition", t);
+ ConsoleLog.error("Failed to remove process definition", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed", e1);
+ ConsoleLog.error("Request failed", e1);
}
}
}
@@ -139,7 +144,7 @@
}
- protected void onAdd()
+ public void onAdd()
{
}
@@ -162,7 +167,7 @@
i++;
}
- Log.debug("Loaded " + row2ProcessMap.size() + " process definitions");
+ ConsoleLog.debug("Loaded " + row2ProcessMap.size() + " process definitions");
}
public List<ProcessDefinitionRef> getAvailableProcessDefinitions()
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionListEditor.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -34,7 +34,7 @@
import com.gwtext.client.widgets.layout.ColumnLayout;
import com.gwtext.client.widgets.layout.ColumnLayoutData;
import com.gwtext.client.widgets.layout.VerticalLayout;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.MainView;
import org.jboss.bpm.console.client.Editor;
import org.jboss.bpm.console.client.UIConstants;
@@ -138,7 +138,7 @@
public void onActionFailed(Form form, int i, String string)
{
super.onActionFailed(form, i, string);
- Log.error("Failed to upload process definition: " + string );
+ ConsoleLog.error("Failed to upload process definition: " + string );
}
}
);
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessImageView.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -27,7 +27,7 @@
import com.gwtext.client.widgets.Component;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.event.PanelListenerAdapter;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.MainView;
import org.jboss.bpm.console.client.model.ProcessInstanceRef;
import org.jboss.bpm.console.client.model.jbpm3.ActiveNodeInfo;
@@ -90,7 +90,7 @@
private void loadActiveNodeInfo()
{
String url = view.getUrlBuilder().getActiveNodeInfoURL(this.instance.getInstanceId());
- Log.debug("Loading activeNodeInfo: " + url);
+ ConsoleLog.debug("Loading activeNodeInfo: " + url);
JSONRequest.get(url,
new JSONRequestHandler() {
@@ -127,7 +127,7 @@
public void onActiveNodeInfoLoaded(ActiveNodeInfo activeNodeInfo)
{
- Log.debug("Successfully loaded activeNodeInfo:" + activeNodeInfo.getActiveNode().getName());
+ ConsoleLog.debug("Successfully loaded activeNodeInfo:" + activeNodeInfo.getActiveNode().getName());
this.activeNodeInfo = activeNodeInfo;
DiagramNodeInfo activeNode = activeNodeInfo.getActiveNode();
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceDetailForm.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.console.client.process;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import com.google.gwt.http.client.*;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.widgets.Button;
@@ -132,7 +132,7 @@
public void onResponseReceived(Request request, Response response)
{
if(response.getStatusCode()!=200)
- Log.error("Failed to change state: " +response.getStatusText());
+ ConsoleLog.error("Failed to change state: " +response.getStatusText());
else
callback.onStaleModel();
}
@@ -140,13 +140,13 @@
public void onError(Request request, Throwable t)
{
// Unknown error
- Log.error("Unknown error", t);
+ ConsoleLog.error("Unknown error", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed", e1);
+ ConsoleLog.error("Request failed", e1);
}
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -29,7 +29,7 @@
import com.gwtext.client.widgets.MessageBoxConfig;
import com.gwtext.client.widgets.grid.ColumnConfig;
import com.gwtext.client.widgets.grid.ColumnModel;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.MainView;
import org.jboss.bpm.console.client.util.DateRenderer;
import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
@@ -61,7 +61,7 @@
return parent;
}
- protected void onExamine(final int row)
+ public void onExamine(final int row)
{
ProcessInstanceRef instance = row2InstanceMap.get(row);
String id = ProcessInstanceEditor.ID+"."+instance.getInstanceId();
@@ -71,7 +71,7 @@
view.addEditor( new ProcessInstanceEditor(parent, instance, view) );
}
- protected void onDelete(final int row)
+ public void onDelete(final int row)
{
MessageBox.show(new MessageBoxConfig() {
{
@@ -101,13 +101,13 @@
public void onError(Request request, Throwable t)
{
// auth failed
- Log.error("Failed to remove process instance", t);
+ ConsoleLog.error("Failed to remove process instance", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed", e1);
+ ConsoleLog.error("Request failed", e1);
}
}
}
@@ -117,7 +117,7 @@
}
- protected void onAdd()
+ public void onAdd()
{
MessageBox.show(new MessageBoxConfig() {
{
@@ -146,13 +146,13 @@
public void onError(Request request, Throwable t)
{
// auth failed
- Log.error("Failed to start new instance", t);
+ ConsoleLog.error("Failed to start new instance", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed", e1);
+ ConsoleLog.error("Request failed", e1);
}
}
}
@@ -171,7 +171,7 @@
i++;
}
- Log.debug("Loaded " + row2InstanceMap.size() + " records");
+ ConsoleLog.debug("Loaded " + row2InstanceMap.size() + " records");
}
public static ProcessInstanceRef transform(Record r)
@@ -185,7 +185,7 @@
}
catch (Throwable t)
{
- Log.error("Failed to parse process instance", t);
+ ConsoleLog.error("Failed to parse process instance", t);
}
return processInstance;
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceListEditor.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -43,6 +43,8 @@
*/
public class ProcessInstanceListEditor extends Editor
{
+ public final static String ID = "org.jboss.bpm.process.ProcessInstanceList";
+
private MainView view;
private ProcessDefinitionRef parent;
private ProcessInstanceList instanceList;
@@ -63,7 +65,7 @@
this.parent = proc;
this.view = view;
- this.setId( ProcessInstanceEditor.createWidgetID(proc) );
+ this.setId( ProcessInstanceListEditor.createWidgetID(proc) );
// --------------------------------------------------
@@ -122,7 +124,7 @@
modelListeners.fireModelChangeEvent(selectedInstance);
// --------------------
-
+
// token form update
// TODO: can't this use ModelChangeListener callbacks as well?
tokenEditorPanel.clear();
@@ -189,5 +191,11 @@
//tabPanel.setActiveTab(0);
}
+
+ public static String createWidgetID(ProcessDefinitionRef proc)
+ {
+ return ProcessInstanceListEditor.ID+"."+proc.getName()+"."+proc.getVersion();
+
+ }
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/process/TokenEditor.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.console.client.process;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import com.google.gwt.http.client.*;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.data.Node;
@@ -182,7 +182,7 @@
public void onResponseReceived(Request request, Response response)
{
if(response.getStatusCode()!=200)
- Log.error("Signaling failed: " +response.getText());
+ ConsoleLog.error("Signaling failed: " +response.getText());
else
{
resetEditor();
@@ -193,13 +193,13 @@
public void onError(Request request, Throwable t)
{
// Unknown error
- Log.error("Unknown error", t);
+ ConsoleLog.error("Unknown error", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed", e1);
+ ConsoleLog.error("Request failed", e1);
}
}
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/AssignmentFormPanel.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.console.client.task;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import com.google.gwt.http.client.*;
import com.google.gwt.json.client.JSONParser;
import com.google.gwt.json.client.JSONValue;
@@ -163,7 +163,7 @@
public void onResponseReceived(Request request, Response response)
{
if(200 != response.getStatusCode())
- Log.error("Failed to retrieve groups: " + response.getStatusText());
+ ConsoleLog.error("Failed to retrieve groups: " + response.getStatusText());
JSONValue value = JSONParser.parse(response.getText());
@@ -173,13 +173,13 @@
public void onError(Request request, Throwable t)
{
// Unknown error
- Log.error("Unknown error", t);
+ ConsoleLog.error("Unknown error", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed" ,e1);
+ ConsoleLog.error("Request failed" ,e1);
}
}
@@ -210,7 +210,7 @@
public void onResponseReceived(Request request, Response response)
{
if(200 != response.getStatusCode())
- Log.error("Failed to reassign task: " + response.getStatusText());
+ ConsoleLog.error("Failed to reassign task: " + response.getStatusText());
selectedInstance = null;
callback.onAssignmentDone();
@@ -219,13 +219,13 @@
public void onError(Request request, Throwable t)
{
// Unknown error
- Log.error("Unknown error", t);
+ ConsoleLog.error("Unknown error", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed" ,e1);
+ ConsoleLog.error("Request failed" ,e1);
}
}
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskDetailsFormPanel.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.console.client.task;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import com.google.gwt.http.client.*;
import com.gwtext.client.core.EventObject;
import com.gwtext.client.data.Record;
@@ -173,7 +173,7 @@
public void onResponseReceived(Request request, Response response)
{
if(200 != response.getStatusCode())
- Log.error("Failed to reassign task: " + response.getStatusText());
+ ConsoleLog.error("Failed to reassign task: " + response.getStatusText());
selectedInstance = null;
callback.onAssignmentDone();
@@ -182,13 +182,13 @@
public void onError(Request request, Throwable t)
{
// Unknown error
- Log.error("Unknown error", t);
+ ConsoleLog.error("Unknown error", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Request failed" ,e1);
+ ConsoleLog.error("Request failed" ,e1);
}
}
@@ -208,7 +208,7 @@
public void onResponseReceived(Request request, Response response)
{
if(200 != response.getStatusCode())
- Log.error("Failed to end task: " + response.getStatusText());
+ ConsoleLog.error("Failed to end task: " + response.getStatusText());
selectedInstance = null;
callback.onTaskEnd();
@@ -217,13 +217,13 @@
public void onError(Request request, Throwable t)
{
// Unknown error
- Log.error("Unknown error", t);
+ ConsoleLog.error("Unknown error", t);
}
});
}
catch (RequestException e1)
{
- Log.error("Failed to close task", e1);
+ ConsoleLog.error("Failed to close task", e1);
}
}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/task/TaskList.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.console.client.task;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import com.google.gwt.core.client.JavaScriptObject;
import com.google.gwt.json.client.JSONObject;
import com.gwtext.client.core.EventObject;
@@ -107,10 +107,10 @@
}
catch (Throwable e)
{
- Log.error("Failed to parse task ref", e);
+ ConsoleLog.error("Failed to parse task ref", e);
}
- Log.debug("Loaded " + row2taskref.size() + " tasks");
+ ConsoleLog.debug("Loaded " + row2taskref.size() + " tasks");
}
public static TaskRef transform(Record r)
@@ -181,7 +181,7 @@
public void onLoadException(Throwable throwable)
{
- Log.error("Failed to load remote data", throwable);
+ ConsoleLog.error("Failed to load remote data", throwable);
}
}
@@ -242,7 +242,7 @@
public void reloadStore()
{
- Log.debug("Reload " + this.getId());
+ ConsoleLog.debug("Reload " + this.getId());
store.load(0, PAGE_SIZE);
}
Added: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java (rev 0)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/util/ConsoleLog.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -0,0 +1,71 @@
+/*
+ * 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.util;
+
+/**
+ * The maven gwt:test mojo treats any output to stderr as
+ * a test failure. gwt-log does dump some information there,
+ * hence we need to proxy log invocation and be able to disable them at all.
+ * <p>
+ * If you want to test the application, make sure to lauch it using
+ * {@link org.jboss.bpm.console.client.Application#onModuleLoad2()}.
+ *
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ConsoleLog
+{
+ private static boolean enabled = false;
+
+ public static void debug(String msg)
+ {
+ if(enabled)
+ com.allen_sauer.gwt.log.client.Log.debug(msg);
+ }
+
+ public static void error(String msg)
+ {
+ if(enabled)
+ com.allen_sauer.gwt.log.client.Log.error(msg);
+ }
+
+ public static void error(String msg, Throwable t)
+ {
+ if(enabled)
+ com.allen_sauer.gwt.log.client.Log.error(msg, t);
+ }
+
+ public static void setUncaughtExceptionHandler()
+ {
+ if(enabled)
+ com.allen_sauer.gwt.log.client.Log.setUncaughtExceptionHandler();
+ }
+
+ public static boolean isEnabled()
+ {
+ return enabled;
+ }
+
+ public static void setEnabled(boolean enabled)
+ {
+ ConsoleLog.enabled = enabled;
+ }
+}
Modified: projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java
===================================================================
--- projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/main/java/org/jboss/bpm/console/client/widgets/RemoteListView.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -32,7 +32,7 @@
import com.gwtext.client.widgets.grid.GridPanel;
import com.gwtext.client.widgets.grid.RowSelectionModel;
import com.gwtext.client.widgets.grid.event.GridCellListener;
-import com.allen_sauer.gwt.log.client.Log;
+import org.jboss.bpm.console.client.util.ConsoleLog;
import org.jboss.bpm.console.client.MainView;
import org.jboss.bpm.console.client.UIConstants;
@@ -204,11 +204,11 @@
return pagingToolbar;
}
- protected abstract void onAdd();
+ public abstract void onAdd();
- protected abstract void onExamine(final int row);
+ public abstract void onExamine(final int row);
- protected abstract void onDelete(final int row);
+ public abstract void onDelete(final int row);
protected abstract void onRecordsLoaded(Record[] records);
@@ -244,7 +244,7 @@
public void onLoadException(Throwable throwable)
{
- Log.error("Failed to load remote data", throwable);
+ ConsoleLog.error("Failed to load remote data", throwable);
}
}
@@ -294,7 +294,7 @@
public void reloadStore()
{
- Log.debug("Reload " + this.getId());
+ ConsoleLog.debug("Reload " + this.getId());
store.load(0,PAGE_SIZE);
}
Added: projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/ChainedTimer.java
===================================================================
--- projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/ChainedTimer.java (rev 0)
+++ projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/ChainedTimer.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -0,0 +1,48 @@
+/*
+ * 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;
+
+import com.google.gwt.user.client.Timer;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+abstract class ChainedTimer extends Timer
+{
+
+ private Timer next;
+
+
+ protected ChainedTimer(Timer next)
+ {
+ this.next = next;
+ }
+
+ public abstract void run();
+
+ protected void scheduleNext(int after)
+ {
+ if(null==next)
+ throw new IllegalArgumentException("No next timer given");
+ next.schedule(after);
+ }
+}
Deleted: projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java
===================================================================
--- projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java 2008-11-24 16:34:29 UTC (rev 3061)
+++ projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -1,150 +0,0 @@
-/*
- * 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;
-
-import com.google.gwt.http.client.Request;
-import com.google.gwt.http.client.Response;
-import com.google.gwt.junit.client.GWTTestCase;
-import com.google.gwt.user.client.Timer;
-import com.gwtext.client.widgets.ComponentMgr;
-import org.jboss.bpm.console.client.process.ProcessDefinitionList;
-import org.jboss.bpm.console.client.process.ProcessDefinitionListEditor;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class GwtTestApplication extends GWTTestCase
-{
- private static Application application = null;
-
- public String getModuleName()
- {
- return "org.jboss.bpm.console.Application";
- }
-
- protected void gwtSetUp() throws Exception
- {
- super.gwtSetUp();
-
- if(null==application)
- {
- application = new Application();
- application.onModuleLoad2();
- }
-
- }
-
- public void testAuthentication()
- {
- final MainView view = application.getConsoleView();
- assertNotNull("View not initialized", view);
-
- Timer timer = new Timer()
- {
- public void run()
- {
-
- String inRoleURL = view.getUrlBuilder().getUserInRoleURL(MainView.KNOWN_ROLES);
- final Authentication auth = new Authentication(inRoleURL);
- auth.setCallback(
- new Authentication.AuthCallback() {
-
- public void onLoginSuccess(Request request, Response response) {
- System.out.println("Assigned roles: " + auth.getRolesAssigned() );
- }
-
- public void onLoginFailed(Request request, Throwable t) {
-
- throw new RuntimeException("Login failed", t);
- }
- }
- );
- auth.doLogin();
- finishTest();
- }
-
-
- };
-
- timer.schedule(300);
- delayTestFinish(500);
- }
-
- public void testProcessDefList()
- {
- final MainView view = application.getConsoleView();
- assertNotNull("View not initialized", view);
-
- URLBuilder urlBuilder = new URLBuilder("http://localhost:8080", "gwt-console-server");
- final String url = urlBuilder.getProcessDefinitionByNameURL("simple");
-
- Timer verification = new Timer(){
-
- public void run()
- {
- System.out.println("Verify process definition list");
- ProcessDefinitionListEditor editor = (ProcessDefinitionListEditor)
- ComponentMgr.getComponent(ProcessDefinitionListEditor.ID);
-
- ProcessDefinitionList list = editor.getProcessDefinitionList();
-
- System.out.println("! Got " + list.getAvailableProcessDefinitions().size() + " definitions");
- assertTrue("No process definitions loaded",
- list.getAvailableProcessDefinitions().size() != 0
- );
-
- finishTest();
- }
- };
-
- Timer loading = new Timer(){
-
- public void run()
- {
- System.out.println("Fetch process definitions");
- ProcessDefinitionListEditor editor = (ProcessDefinitionListEditor)
- ComponentMgr.getComponent(ProcessDefinitionListEditor.ID);
-
- ProcessDefinitionList list = editor.getProcessDefinitionList();
- list.reloadStore();
- }
- };
-
- Timer authentication = new Timer()
- {
- public void run()
- {
- System.out.println("Do authentication");
- String inRoleURL = view.getUrlBuilder().getUserInRoleURL(MainView.KNOWN_ROLES);
- final Authentication auth = new Authentication(inRoleURL);
- auth.doLogin();
-
- }
- };
-
- authentication.schedule(500);
- loading.schedule(1000);
- verification.schedule(1500);
-
- delayTestFinish(2000);
- }
-}
Copied: projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestProcessManagement.java (from rev 3049, projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestApplication.java)
===================================================================
--- projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestProcessManagement.java (rev 0)
+++ projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestProcessManagement.java 2008-11-24 18:11:09 UTC (rev 3062)
@@ -0,0 +1,240 @@
+/*
+ * 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;
+
+import com.google.gwt.http.client.Request;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.junit.client.GWTTestCase;
+import com.google.gwt.user.client.Timer;
+import com.gwtext.client.widgets.ComponentMgr;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.process.ProcessDefinitionList;
+import org.jboss.bpm.console.client.process.ProcessDefinitionListEditor;
+import org.jboss.bpm.console.client.process.ProcessInstanceListEditor;
+import org.jboss.bpm.console.client.util.ConsoleLog;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class GwtTestProcessManagement extends GWTTestCase
+{
+ private static Application application = null;
+
+ public String getModuleName()
+ {
+ return "org.jboss.bpm.console.Application";
+ }
+
+ protected void gwtSetUp() throws Exception
+ {
+ super.gwtSetUp();
+
+ if(null==application)
+ {
+ System.out.println("=========");
+ System.out.println("Setup console application");
+ System.out.println("=========");
+
+ application = new Application();
+ application.onModuleLoad2();
+
+ }
+
+ }
+
+ public void testAuthentication()
+ {
+ final MainView view = application.getConsoleView();
+ assertNotNull("View not initialized", view);
+
+ Timer timer = new Timer()
+ {
+ public void run()
+ {
+
+ String inRoleURL = view.getUrlBuilder().getUserInRoleURL(MainView.KNOWN_ROLES);
+ final Authentication auth = new Authentication(inRoleURL);
+ auth.setCallback(
+ new Authentication.AuthCallback() {
+
+ public void onLoginSuccess(Request request, Response response) {
+ System.out.println("Assigned roles: " + auth.getRolesAssigned() );
+ }
+
+ public void onLoginFailed(Request request, Throwable t) {
+
+ throw new RuntimeException("Login failed", t);
+ }
+ }
+ );
+ auth.doLogin();
+ finishTest();
+ }
+
+
+ };
+
+ timer.schedule(300);
+ delayTestFinish(500);
+ }
+
+ public void testProcessDefEditor()
+ {
+ final MainView view = application.getConsoleView();
+ assertNotNull("View not initialized", view);
+
+ Timer verification = new Timer(){
+
+ public void run()
+ {
+ System.out.println("Verify process definition list");
+ ProcessDefinitionListEditor editor = (ProcessDefinitionListEditor)
+ ComponentMgr.getComponent(ProcessDefinitionListEditor.ID);
+
+ ProcessDefinitionList list = editor.getProcessDefinitionList();
+ assertTrue("No process definitions loaded",
+ list.getAvailableProcessDefinitions().size() != 0
+ );
+
+ finishTest();
+ }
+ };
+
+ Timer loading = new Timer(){
+
+ public void run()
+ {
+ System.out.println("Fetch process definitions");
+ ProcessDefinitionListEditor editor = (ProcessDefinitionListEditor)
+ ComponentMgr.getComponent(ProcessDefinitionListEditor.ID);
+
+ ProcessDefinitionList list = editor.getProcessDefinitionList();
+ list.reloadStore();
+ }
+ };
+
+ Timer authentication = new Timer()
+ {
+ public void run()
+ {
+ System.out.println("Do authentication");
+ String inRoleURL = view.getUrlBuilder().getUserInRoleURL(MainView.KNOWN_ROLES);
+ final Authentication auth = new Authentication(inRoleURL);
+ auth.doLogin();
+
+ }
+ };
+
+ authentication.schedule(500);
+ loading.schedule(1000);
+ verification.schedule(1500);
+
+ delayTestFinish(2000);
+ }
+
+ public void testProcessInstanceEditor()
+ {
+ final ProcessDefinitionListEditor editor = (ProcessDefinitionListEditor)
+ ComponentMgr.getComponent(ProcessDefinitionListEditor.ID);
+
+ Map<String, Object> context = new HashMap<String, Object>();
+ context.put("editor", editor);
+
+ LoadTestHarnessTimer loading = new LoadTestHarnessTimer(context);
+ InstanceEditorTimer instances = new InstanceEditorTimer(context);
+ context.put("secondTimer", instances);
+
+ loading.schedule(500);
+ delayTestFinish(1000);
+
+ }
+
+ class LoadTestHarnessTimer extends Timer
+ {
+
+ Map<String, Object> context;
+
+ public LoadTestHarnessTimer(Map<String, Object> context)
+ {
+ super();
+ this.context = context;
+ }
+
+ public void run()
+ {
+ ProcessDefinitionListEditor editor = (ProcessDefinitionListEditor) context.get("editor");
+ ProcessDefinitionList list = editor.getProcessDefinitionList();
+ list.reloadStore();
+
+ List<ProcessDefinitionRef> defs = list.getAvailableProcessDefinitions();
+ assertFalse(defs.isEmpty());
+
+ for(ProcessDefinitionRef pd : defs)
+ {
+ if(pd.getName().equals("GWT_Test_Harness"))
+ {
+ context.put("def", pd);
+ break;
+ }
+ }
+
+ Timer next = (Timer)context.get("secondTimer");
+ next.schedule(500);
+ delayTestFinish(1000);
+ }
+ }
+
+ class InstanceEditorTimer extends Timer
+ {
+ Map<String, Object> context;
+
+ public InstanceEditorTimer(Map<String, Object> context)
+ {
+ super();
+ this.context = context;
+ }
+
+ public void run()
+ {
+ ProcessDefinitionListEditor editor = (ProcessDefinitionListEditor)context.get("editor");
+ ProcessDefinitionRef def = (ProcessDefinitionRef)context.get("def");
+ ProcessDefinitionList list = editor.getProcessDefinitionList();
+ list.lauchEditor(def); // will create an instance editor
+
+ // lookup instance editor
+ String editorId = ProcessInstanceListEditor.createWidgetID(def);
+ ProcessInstanceListEditor instanceEditor = (ProcessInstanceListEditor)
+ ComponentMgr.getComponent(editorId);
+ assertNotNull("Failed to create instance editor for process", instanceEditor);
+
+ // todo: start new instance
+
+ // finish
+ finishTest();
+
+ }
+ }
+}
Property changes on: projects/gwt-console/trunk/war/src/test/java/org/jboss/bpm/console/client/GwtTestProcessManagement.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/gwt-console/trunk/war/src/test/resources/SampleProcess.par
===================================================================
(Binary files differ)
17 years, 5 months
JBoss JBPM SVN: r3061 - jbpm3/trunk/modules/integration/api/src/main/resources.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 11:34:29 -0500 (Mon, 24 Nov 2008)
New Revision: 3061
Modified:
jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml
Log:
XML format API integration config
Modified: jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml 2008-11-24 16:25:34 UTC (rev 3060)
+++ jbpm3/trunk/modules/integration/api/src/main/resources/jbpm-cfg-beans.xml 2008-11-24 16:34:29 UTC (rev 3061)
@@ -1,47 +1,48 @@
-<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd"
- xmlns="urn:jboss:bean-deployer:2.0">
-
- <!-- The KernelLocator -->
- <bean name="KernelLocator" class="org.jboss.kernel.plugins.util.KernelLocator" />
+<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
- <!-- The ProcessEngine -->
- <bean name="jBPMProcessEngine" class="org.jbpm.integration.client.ProcessEngineImpl">
- <property name="services">
- <set elementClass="org.jbpm.api.service.Service">
- <inject bean="jBPMDialectHandlerService" />
- <inject bean="jBPMProcessBuilderService" />
- <inject bean="jBPMProcessDefinitionService" />
- <inject bean="jBPMProcessService" />
- </set>
- </property>
- </bean>
+ <!-- Locate the single instance of the kernel -->
+ <bean name="WSKernelLocator" class="org.jbpm.api.client.internal.KernelLocator">
+ <property name="kernel"><inject bean="jboss.kernel:service=Kernel" /></property>
+ </bean>
- <!-- The PersistenceService -->
- <bean name="jBPMPersistenceService" class="org.jbpm.integration.service.NoopPersistenceServiceImpl"/>
+ <!-- The ProcessEngine -->
+ <bean name="jBPMProcessEngine" class="org.jbpm.integration.client.ProcessEngineImpl">
+ <property name="services">
+ <set elementClass="org.jbpm.api.service.Service">
+ <inject bean="jBPMDialectHandlerService"/>
+ <inject bean="jBPMProcessBuilderService"/>
+ <inject bean="jBPMProcessDefinitionService"/>
+ <inject bean="jBPMProcessService"/>
+ </set>
+ </property>
+ </bean>
- <!-- The ProcessService -->
- <bean name="jBPMProcessService" class="org.jbpm.integration.service.ProcessServiceImpl" >
- <property name="interceptors">
- <list elementClass="java.lang.String">
- <value>org.jbpm.integration.runtime.NodeExecuteInterceptor</value>
- </list>
- </property>
- </bean>
-
- <!-- The DialectHandlerService -->
- <bean name="jBPMDialectHandlerService" class="org.jbpm.integration.service.DialectHandlerServiceImpl" >
- <property name="dialectHandlers">
- <map keyClass="java.net.URI" valueClass="org.jbpm.api.service.DialectHandler">
- <entry><key>urn:jbpm.jboss:api-0.1</key><value><inject bean="jBPMDialectHandlerAPI10"/></value></entry>
- <entry><key>urn:jbpm.org:jpdl-3.2</key><value><inject bean="jBPMDialectHandlerJPDL32"/></value></entry>
- </map>
- </property>
- </bean>
- <bean name="jBPMDialectHandlerAPI10" class="org.jbpm.dialect.api10.DialectHandlerImpl"/>
- <bean name="jBPMDialectHandlerJPDL32" class="org.jbpm.integration.jpdl32.DialectHandlerImpl"/>
-
- <!-- Other Services -->
- <bean name="jBPMProcessBuilderService" class="org.jbpm.integration.service.ProcessBuilderServiceImpl" />
- <bean name="jBPMProcessDefinitionService" class="org.jbpm.integration.service.ProcessDefinitionServiceImpl" />
-
- </deployment>
+ <!-- The PersistenceService -->
+ <bean name="jBPMPersistenceService" class="org.jbpm.integration.service.NoopPersistenceServiceImpl" />
+
+ <!-- The ProcessService -->
+ <bean name="jBPMProcessService" class="org.jbpm.integration.service.ProcessServiceImpl">
+ <property name="interceptors">
+ <list elementClass="java.lang.String">
+ <value>org.jbpm.integration.runtime.NodeExecuteInterceptor</value>
+ </list>
+ </property>
+ </bean>
+
+ <!-- The DialectHandlerService -->
+ <bean name="jBPMDialectHandlerService" class="org.jbpm.integration.service.DialectHandlerServiceImpl">
+ <property name="dialectHandlers">
+ <map keyClass="java.net.URI" valueClass="org.jbpm.api.service.DialectHandler">
+ <entry><key>urn:jbpm.jboss:api-0.1</key><value><inject bean="jBPMDialectHandlerAPI10"/></value></entry>
+ <entry><key>urn:jbpm.org:jpdl-3.2</key><value><inject bean="jBPMDialectHandlerJPDL32"/></value></entry>
+ </map>
+ </property>
+ </bean>
+ <bean name="jBPMDialectHandlerAPI10" class="org.jbpm.dialect.api10.DialectHandlerImpl" />
+ <bean name="jBPMDialectHandlerJPDL32" class="org.jbpm.integration.jpdl32.DialectHandlerImpl" />
+
+ <!-- Other Services -->
+ <bean name="jBPMProcessBuilderService" class="org.jbpm.integration.service.ProcessBuilderServiceImpl" />
+ <bean name="jBPMProcessDefinitionService" class="org.jbpm.integration.service.ProcessDefinitionServiceImpl" />
+
+</deployment>
17 years, 5 months
JBoss JBPM SVN: r3060 - projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 11:25:34 -0500 (Mon, 24 Nov 2008)
New Revision: 3060
Modified:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java
Log:
Use internal KernelLocator
Modified: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java 2008-11-24 16:09:01 UTC (rev 3059)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/EmbeddedBeansDeployer.java 2008-11-24 16:25:34 UTC (rev 3060)
@@ -28,7 +28,6 @@
import org.jboss.kernel.Kernel;
import org.jboss.kernel.plugins.bootstrap.basic.BasicBootstrap;
import org.jboss.kernel.plugins.deployment.xml.BasicXMLDeployer;
-import org.jboss.kernel.plugins.util.KernelLocator;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
17 years, 5 months
JBoss JBPM SVN: r3059 - projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 11:09:01 -0500 (Mon, 24 Nov 2008)
New Revision: 3059
Added:
projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/KernelLocator.java
Log:
Add a KernelLocator
Added: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/KernelLocator.java
===================================================================
--- projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/KernelLocator.java (rev 0)
+++ projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/KernelLocator.java 2008-11-24 16:09:01 UTC (rev 3059)
@@ -0,0 +1,47 @@
+/*
+ * 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.api.client.internal;
+
+//$Id$
+
+import org.jboss.kernel.Kernel;
+
+/**
+ * Locate the single instance of the kernel
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 12-May-2006
+ */
+public class KernelLocator
+{
+ private static Kernel kernel;
+
+ public static Kernel getKernel()
+ {
+ return KernelLocator.kernel;
+ }
+
+ public void setKernel(Kernel kernel)
+ {
+ KernelLocator.kernel = kernel;
+ }
+}
\ No newline at end of file
Property changes on: projects/spec/trunk/modules/api/src/main/java/org/jbpm/api/client/internal/KernelLocator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 5 months
JBoss JBPM SVN: r3058 - in jbpm3/trunk/modules: distribution/src/main/resources/installer and 4 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 10:16:07 -0500 (Mon, 24 Nov 2008)
New Revision: 3058
Added:
jbpm3/trunk/modules/integration/jboss42/src/test/java/
jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/
jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java
Removed:
jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/jpdl/
Modified:
jbpm3/trunk/modules/distribution/pom.xml
jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
jbpm3/trunk/modules/integration/jboss42/.classpath
Log:
Add SimpleDeploymentTest
Modified: jbpm3/trunk/modules/distribution/pom.xml
===================================================================
--- jbpm3/trunk/modules/distribution/pom.xml 2008-11-24 14:46:27 UTC (rev 3057)
+++ jbpm3/trunk/modules/distribution/pom.xml 2008-11-24 15:16:07 UTC (rev 3058)
@@ -167,6 +167,14 @@
<artifactId>ant</artifactId>
</dependency>
<dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ </dependency>
+ <dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
</dependency>
Modified: jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-24 14:46:27 UTC (rev 3057)
+++ jbpm3/trunk/modules/distribution/src/main/resources/installer/install-definition.xml 2008-11-24 15:16:07 UTC (rev 3058)
@@ -159,6 +159,8 @@
<include name="hibernate.jar" />
<include name="hsqldb.jar" />
<include name="junit.jar" />
+ <include name="slf4j-api.jar" />
+ <include name="slf4j-log4j12.jar" />
<include name="log4j.jar" />
</fileset>
@@ -189,6 +191,8 @@
<include name="jbpm-integration-api.jar" />
<include name="jbpm-integration-jboss42.jar" />
<include name="jbpm-spec-api.jar" />
+ <include name="slf4j-api.jar" />
+ <include name="slf4j-log4j12.jar" />
</fileset>
<file src="@{deploy.artifacts.dir}/lib/jbpm-identity-service.zip" targetdir="${installPath}/server/${jbossTargetServer}/deploy/jbpm/jbpm-service.sar"
unpack="true" override="true" />
Modified: jbpm3/trunk/modules/integration/jboss42/.classpath
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/.classpath 2008-11-24 14:46:27 UTC (rev 3057)
+++ jbpm3/trunk/modules/integration/jboss42/.classpath 2008-11-24 15:16:07 UTC (rev 3058)
@@ -1,7 +1,7 @@
<?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="src" path="src/main/java"/>
+ <classpathentry kind="src" output="target/test-classes" path="src/test/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"/>
Copied: jbpm3/trunk/modules/integration/jboss42/src/test/java (from rev 3057, jbpm3/trunk/modules/integration/api/src/test/java)
Added: jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java (rev 0)
+++ jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java 2008-11-24 15:16:07 UTC (rev 3058)
@@ -0,0 +1,48 @@
+/*
+ * 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.test.integration.deployment;
+
+// $Id$
+
+import org.jbpm.api.test.IntegrationTestCase;
+
+/**
+ * Test simple jPDL process deployment
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 24-Nov-2008
+ */
+public class SimpleDeploymentTest extends IntegrationTestCase
+{
+ String PAR_ARCHIVE = "simple/simple-process.xml";
+
+ public void testSimpleDeploy() throws Exception
+ {
+ deploy(PAR_ARCHIVE);
+
+ }
+
+ public void testSimpleUndeploy() throws Exception
+ {
+ undeploy(PAR_ARCHIVE);
+ }
+}
Property changes on: jbpm3/trunk/modules/integration/jboss42/src/test/java/org/jbpm/test/integration/deployment/SimpleDeploymentTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 5 months
JBoss JBPM SVN: r3057 - in jbpm3/trunk/modules/integration/api/src: test and 9 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 09:46:27 -0500 (Mon, 24 Nov 2008)
New Revision: 3057
Added:
jbpm3/trunk/modules/integration/api/src/test/
jbpm3/trunk/modules/integration/api/src/test/java/
jbpm3/trunk/modules/integration/api/src/test/java/org/
jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/
jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/
jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/
jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/
jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java
jbpm3/trunk/modules/integration/api/src/test/resources/
jbpm3/trunk/modules/integration/api/src/test/resources/integration/
jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/
jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml
Modified:
jbpm3/trunk/modules/integration/api/src/
Log:
Add DialectHandlerTest
Property changes on: jbpm3/trunk/modules/integration/api/src
___________________________________________________________________
Name: svn:ignore
- test
cts
+ cts
Added: jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java
===================================================================
--- jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java (rev 0)
+++ jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java 2008-11-24 14:46:27 UTC (rev 3057)
@@ -0,0 +1,69 @@
+/*
+ * 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.test.integration.jpdl;
+
+// $Id$
+
+import java.net.URL;
+
+import org.jbpm.api.client.Configuration;
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.client.Token;
+import org.jbpm.api.model.Process;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.model.Process.ProcessStatus;
+import org.jbpm.api.service.ProcessDefinitionService;
+import org.jbpm.api.test.APITestCase;
+
+/**
+ * Test simple jPDL process deployment
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 24-Nov-2008
+ */
+public class DialectHandlerTest extends APITestCase
+{
+ public void testSimple() throws Exception
+ {
+ URL pdXML = getResourceURL("integration/jpdl/simple-process.xml");
+
+ ProcessEngine engine = Configuration.getProcessEngine();
+ ProcessDefinitionService pdService = engine.getService(ProcessDefinitionService.class);
+
+ ProcessDefinition procDef = pdService.parseProcessDefinition(pdXML);
+ assertNotNull("ProcDef not null", procDef);
+
+ Process proc = procDef.newInstance();
+ Token token = proc.startProcess();
+ assertEquals("Node name", "a", token.getCurrentNode().getName());
+
+ token.signal();
+ assertEquals("Node name", "b", token.getCurrentNode().getName());
+
+ token.signal();
+ assertEquals("Node name", "c", token.getCurrentNode().getName());
+
+ token.signal();
+ assertEquals("Node name", "end", token.getCurrentNode().getName());
+ assertEquals(ProcessStatus.Completed, proc.getProcessStatus());
+ }
+}
Property changes on: jbpm3/trunk/modules/integration/api/src/test/java/org/jbpm/test/integration/jpdl/DialectHandlerTest.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml (rev 0)
+++ jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml 2008-11-24 14:46:27 UTC (rev 3057)
@@ -0,0 +1,16 @@
+<process-definition name="simpleProcess" xmlns="urn:jbpm.org:jpdl-3.2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:jbpm.org:jpdl-3.2 http://jbpm.org/xsd/jpdl-3.2.xsd">
+ <start-state name='start'>
+ <transition to='a' />
+ </start-state>
+ <state name='a'>
+ <transition to='b' />
+ </state>
+ <state name='b'>
+ <transition to='c' />
+ </state>
+ <state name='c'>
+ <transition to='end' />
+ </state>
+ <end-state name='end' />
+</process-definition>
Property changes on: jbpm3/trunk/modules/integration/api/src/test/resources/integration/jpdl/simple-process.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
17 years, 5 months
JBoss JBPM SVN: r3056 - in jbpm3/trunk/modules/integration: jboss42/src/main/java/org/jbpm/integration/jboss42 and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-11-24 09:37:38 -0500 (Mon, 24 Nov 2008)
New Revision: 3056
Modified:
jbpm3/trunk/modules/integration/api/pom.xml
jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
Log:
Clean old CTS location
Modified: jbpm3/trunk/modules/integration/api/pom.xml
===================================================================
--- jbpm3/trunk/modules/integration/api/pom.xml 2008-11-24 14:27:07 UTC (rev 3055)
+++ jbpm3/trunk/modules/integration/api/pom.xml 2008-11-24 14:37:38 UTC (rev 3056)
@@ -108,6 +108,12 @@
<filesets>
<fileset>
<directory>src/cts</directory>
+ <directory>src/test</directory>
+ <includes>
+ <include>java/org/jbpm/test/cts/**</include>
+ <include>java/org/jbpm/test/incubator/**</include>
+ <include>java/org/jbpm/test/pattern/**</include>
+ </includes>
</fileset>
</filesets>
</configuration>
Modified: jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java
===================================================================
--- jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-24 14:27:07 UTC (rev 3055)
+++ jbpm3/trunk/modules/integration/jboss42/src/main/java/org/jbpm/integration/jboss42/PARSubDeployer.java 2008-11-24 14:37:38 UTC (rev 3056)
@@ -23,21 +23,17 @@
//$Id$
-import java.io.BufferedReader;
-import java.io.IOException;
-import java.io.InputStreamReader;
-import java.io.PrintWriter;
-import java.io.StringWriter;
import java.net.URL;
+import javax.management.ObjectName;
+
import org.jboss.deployment.DeploymentException;
import org.jboss.deployment.DeploymentInfo;
import org.jboss.deployment.SubDeployerSupport;
-import org.jbpm.JbpmConfiguration;
-import org.jbpm.JbpmContext;
-import org.jbpm.command.DeleteProcessDefinitionCommand;
-import org.jbpm.command.DeployProcessCommand;
-import org.jbpm.graph.def.ProcessDefinition;
+import org.jbpm.api.client.Configuration;
+import org.jbpm.api.client.ProcessEngine;
+import org.jbpm.api.model.ProcessDefinition;
+import org.jbpm.api.service.ProcessDefinitionService;
/**
* A deployer service that manages jBPM Process Archive Deployments
@@ -50,7 +46,7 @@
/** The suffixes we accept, along with their relative order */
private static final String[] DEFAULT_ENHANCED_SUFFIXES = new String[] { "900:-process.xml" };
- private JbpmConfiguration jbpmConfiguration;
+ private ProcessDefinitionService procDefService;
public PARSubDeployer()
{
@@ -62,8 +58,9 @@
{
super.startService();
- // Deployer works with the default configuration
- jbpmConfiguration = JbpmConfiguration.getInstance();
+ // Get get ProcessDefinitionService
+ ProcessEngine engine = Configuration.getProcessEngine();
+ procDefService = engine.getService(ProcessDefinitionService.class);
}
@Override
@@ -75,18 +72,14 @@
URL pdURL = getProcessDefinitionURL(di);
log.info("Deploy ProcessDefinition: " + pdURL);
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try
{
- // Get the process definition from the URL
- String pdXML = getProcessDefinition(pdURL);
-
- // Deploy through the DeployProcessCommand
- DeployProcessCommand command = new DeployProcessCommand(pdXML);
- ProcessDefinition procDef = (ProcessDefinition)command.execute(jbpmContext);
+ // Parese and register the procdef
+ ProcessDefinition procDef = procDefService.parseProcessDefinition(pdURL);
+ procDefService.registerProcessDefinition(procDef);
- // Remember the procDef ID
- di.context.put(ProcessDefinition.class.getName(), new Long(procDef.getId()));
+ // Remember the procDefID
+ di.context.put(ProcessDefinition.class.getName(), procDef.getKey());
}
catch (RuntimeException rte)
{
@@ -96,10 +89,6 @@
{
throw new DeploymentException("Cannot deploy: " + pdURL, ex);
}
- finally
- {
- jbpmContext.close();
- }
}
@Override
@@ -107,16 +96,13 @@
{
URL pdURL = getProcessDefinitionURL(di);
log.info("Undeploy ProcessDefinition: " + pdURL);
-
- Long procID = (Long)di.context.get(ProcessDefinition.class.getName());
- if (procID != null)
+
+ ObjectName procDefID = (ObjectName)di.context.get(ProcessDefinition.class.getName());
+ if (procDefID != null)
{
- JbpmContext jbpmContext = jbpmConfiguration.createJbpmContext();
try
{
- // Undeploy through the DeleteProcessDefinitionCommand
- DeleteProcessDefinitionCommand command = new DeleteProcessDefinitionCommand(procID);
- command.execute(jbpmContext);
+ procDefService.unregisterProcessDefinition(procDefID);
}
catch (RuntimeException rte)
{
@@ -126,10 +112,6 @@
{
throw new DeploymentException("Cannot deploy: " + pdURL, ex);
}
- finally
- {
- jbpmContext.close();
- }
}
super.destroy(di);
}
@@ -139,22 +121,7 @@
URL pdURL = di.localUrl != null ? di.localUrl : di.url;
if (pdURL == null)
throw new IllegalStateException("Cannot obtain process definition URL");
-
+
return pdURL;
}
-
- private String getProcessDefinition(URL pdURL) throws IOException
- {
- BufferedReader br = new BufferedReader(new InputStreamReader(pdURL.openStream()));
- StringWriter strwr = new StringWriter();
- PrintWriter pwr = new PrintWriter(strwr);
- String line = br.readLine();
- while (line != null)
- {
- pwr.println(line);
- line = br.readLine();
- }
- String pdXML = strwr.toString();
- return pdXML;
- }
}
\ No newline at end of file
17 years, 5 months