JBoss JBPM SVN: r1821 - jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-08-05 03:36:52 -0400 (Tue, 05 Aug 2008)
New Revision: 1821
Modified:
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java
Log:
added checked exception test
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java 2008-08-05 07:28:14 UTC (rev 1820)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java 2008-08-05 07:36:52 UTC (rev 1821)
@@ -24,6 +24,7 @@
import java.util.List;
import org.hibernate.Session;
+import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.model.CommentImpl;
@@ -54,20 +55,20 @@
}
- public static class MyOwnException extends RuntimeException {
+ public static class MyOwnRuntimeException extends RuntimeException {
}
- public void testRollback() {
+ public void testRollbackRuntimeException() {
try {
commandService.execute(new Command<Object>(){
public Object execute(Environment environment) {
Session session = environment.get(Session.class);
session.save(new CommentImpl("if i only had the time to write code"));
- throw new MyOwnException();
+ throw new MyOwnRuntimeException();
}
});
fail("expected exception");
- } catch (MyOwnException e) {
+ } catch (MyOwnRuntimeException e) {
// OK
}
@@ -80,4 +81,32 @@
}
});
}
+
+ public static class MyOwnCheckedException extends Exception {
+ }
+
+ public void testRollbackCheckedException() {
+ try {
+ commandService.execute(new Command<Object>(){
+ public Object execute(Environment environment) throws Exception {
+ Session session = environment.get(Session.class);
+ session.save(new CommentImpl("if i only had the time to write code"));
+ throw new MyOwnCheckedException();
+ }
+ });
+ fail("expected exception");
+ } catch (PvmException e) {
+ // OK
+ assertSame(MyOwnCheckedException.class, e.getCause().getClass());
+ }
+
+ commandService.execute(new Command<Object>(){
+ public Object execute(Environment environment) {
+ Session session = environment.get(Session.class);
+ List<CommentImpl> comments = session.createQuery("from "+CommentImpl.class.getName()).list();
+ assertEquals(0, comments.size());
+ return null;
+ }
+ });
+ }
}
17 years, 9 months
JBoss JBPM SVN: r1820 - in jbpm4/pvm/trunk/modules/core/src: main/java/org/jbpm/pvm/internal/env and 24 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2008-08-05 03:28:14 -0400 (Tue, 05 Aug 2008)
New Revision: 1820
Added:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionInterceptor.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransaction.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransactionInterceptor.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateSessionInterceptorBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionInterceptorBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/Db.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java
jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml
Removed:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateTransactionResource.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/EnterpriseTransaction.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/Resource.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/EnlistBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionInterceptorBinding.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnterpriseTransactionDescriptor.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/StandardTransactionDescriptor.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ConfigurationHelper.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ServiceTestCase.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/tx/
Modified:
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Context.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Transaction.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java
jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentTestCase.java
jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/CommentDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/SessionFactoryDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java
jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java
Log:
refactored transaction support, started simplifying test suite configurations
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Context.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Context.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Context.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -30,6 +30,12 @@
*/
public interface Context {
+ /** key of the environment-factory context in the environment */
+ String CONTEXTNAME_ENVIRONMENT_FACTORY = "environment-factory";
+
+ /** key of the block context in the environment */
+ String CONTEXTNAME_ENVIRONMENT = "environment";
+
String getName();
Object get(String key);
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/PvmEnvironmentFactory.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -26,7 +26,7 @@
import java.net.URL;
import java.util.Set;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
+import org.jbpm.pvm.internal.env.PvmEnvironment;
import org.jbpm.pvm.internal.env.PvmEnvironmentFactoryParser;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.stream.FileStreamSource;
@@ -109,7 +109,7 @@
}
public Environment openEnvironment() {
- DefaultEnvironment environment = new DefaultEnvironment(this);
+ PvmEnvironment environment = new PvmEnvironment(this);
log.debug("opening "+environment);
@@ -123,7 +123,7 @@
environment.addContext(applicationWireContext);
// add the environment block context
- WireContext blockContext = new WireContext(blockWireDefinition, DefaultEnvironment.CONTEXTNAME_ENVIRONMENT, environment, true);
+ WireContext blockContext = new WireContext(blockWireDefinition, Context.CONTEXTNAME_ENVIRONMENT, environment, true);
// add the environment block context to the environment
environment.addContext(blockContext);
@@ -136,7 +136,7 @@
blockContext.create();
// fire an open environment event
- applicationWireContext.fire(DefaultEnvironment.EVENT_OPENENVIRONMENT, environment);
+ applicationWireContext.fire(PvmEnvironment.EVENT_OPENENVIRONMENT, environment);
} catch (RuntimeException e) {
// On exception, pop environment
@@ -151,10 +151,10 @@
applicationWireContext.fire(WireContext.EVENT_CLOSE, null);
}
- public void handleException(DefaultEnvironment defaultEnvironment, Throwable exception) {
+ public void handleException(PvmEnvironment pvmEnvironment, Throwable exception) {
log.error("exception in environment block:"+exception.getMessage(), exception);
- WireContext wireContext = (WireContext) defaultEnvironment.getEnvironmentContext();
- wireContext.fire(DefaultEnvironment.EVENT_EXCEPTION, this);
+ WireContext wireContext = (WireContext) pvmEnvironment.getEnvironmentContext();
+ wireContext.fire(PvmEnvironment.EVENT_EXCEPTION, this);
}
// environment-factory context delegation methods ///////////////////////////////////
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Transaction.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Transaction.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/env/Transaction.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -21,40 +21,23 @@
*/
package org.jbpm.pvm.env;
-import org.jbpm.pvm.util.Listener;
-import org.jbpm.pvm.util.Observable;
+import javax.transaction.Synchronization;
-/**
+
+/** provides access to the transaction in the environment.
+ *
* @author Tom Baeyens
*/
-public interface Transaction extends Listener, Observable {
+public interface Transaction {
- /**
- * is fired when the wiring environment is being flushed. No event info provided.
- */
- String EVENT_FLUSH = "flush";
-
- /**
- * is fired when the wiring environment is being committed. No event info provided.
- * It is the Transaction that will listen to the close of this wiring environment.
- * Upon close, the transaction will fire a commit or rollback event depending on
- * the state of the isRollback property in the transaction.
- */
- String EVENT_BEFORECOMPLETION = "before-completion";
-
- /**
- * is fired when the wiring environment is being rolled back. No event info provided.
- * It is the Transaction that will listen to the close of this wiring environment.
- * Upon close, the transaction will fire a commit or rollback event depending on
- * the state of the isRollback property in the transaction.
- */
- String EVENT_AFTERCOMPLETION = "after-completion";
-
/** marks a transaction for rollback only.
* The transaction will be rolled back upon closing the environment. */
void setRollbackOnly();
- boolean isRolledBack();
- boolean isCommitted();
+ /** is this transaction marked for rollback only ? */
boolean isRollbackOnly();
+
+ /** register a transaction listener. This method will have no
+ * effect if the transactionListener is null. */
+ void registerSynchronization(Synchronization synchronization);
}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,245 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.env;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Map;
-import org.jbpm.pvm.PvmException;
-import org.jbpm.pvm.env.Context;
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.env.EnvironmentFactory;
-import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.util.Closable;
-
-
-/**
- * @author Tom Baeyens
- */
-public class DefaultEnvironment extends Environment {
-
- private static final long serialVersionUID = 1L;
-
- private static final Log log = Log.getLog(DefaultEnvironment.class.getName());
-
- /** key of the environment-factory context in the environment */
- public static final String CONTEXTNAME_ENVIRONMENT_FACTORY = "environment-factory";
-
- /** key of the block context in the environment */
- public static final String CONTEXTNAME_ENVIRONMENT = "environment";
-
- /** is fired for each exception reported in an environment block with
- * {@link Environment#setException(Throwable)}. */
- public static final String EVENT_EXCEPTION = "exception";
-
- /** is fired when a environment created by this factory is being closed. The
- * info object is the environment that was just opened. */
- public static final String EVENT_CLOSEENVIRONMENT = "close-environment";
-
- /** is fired when a new environment is being opened with this environment factory. The
- * info object is the environment that was just opened. */
- public static final String EVENT_OPENENVIRONMENT = "open-environment";
-
-
- protected String userId;
- protected PvmEnvironmentFactory pvmEnvironmentFactory;
- protected Map<String, Context> contexts;
- protected ArrayList<String> defaultSearchOrderList;
- protected String[] defaultSearchOrder;
- protected transient ClassLoader classLoader;
- protected Throwable exception;
-
- public DefaultEnvironment(PvmEnvironmentFactory pvmEnvironmentFactory) {
- this.pvmEnvironmentFactory = pvmEnvironmentFactory;
- contexts = new HashMap<String, Context>();
- defaultSearchOrderList = new ArrayList<String>();
- defaultSearchOrder = null;
- }
-
- // context methods ////////////////////////////////////////////////////////////
-
- public Context getContext(String contextName) {
- return contexts.get(contextName);
- }
-
- public void addContext(Context context) {
- String key = context.getName();
- contexts.put(key, context);
- defaultSearchOrderList.add(key);
- defaultSearchOrder = null;
- }
-
- public void removeContext(Context context) {
- String contextName = context.getName();
- Context removedContext = contexts.remove(contextName);
- if (removedContext!=null) {
- defaultSearchOrderList.remove(contextName);
- defaultSearchOrder = null;
- }
- }
-
- public Context getEnvironmentFactoryContext() {
- return getContext(CONTEXTNAME_ENVIRONMENT_FACTORY);
- }
-
- public Context getEnvironmentContext() {
- return getContext(CONTEXTNAME_ENVIRONMENT);
- }
-
- public EnvironmentFactory getEnvironmentFactory() {
- return pvmEnvironmentFactory;
- }
-
- // userId methods ///////////////////////////////////////////////////////////
-
- public String getUserId() {
- // if the authenticated user was explicitely set
- if (userId!=null) {
- // return that one
- return userId;
- }
-
- // if an Authentication was specified
- Authentication authentication = get(Authentication.class);
- if (authentication!=null) {
- // let the authentication do the work
- return authentication.getUserId();
- }
-
- return null;
- }
-
- public void setUserId(String userId) {
- this.userId = userId;
- }
-
- // classloader methods //////////////////////////////////////////////////////
-
- public ClassLoader getClassLoader() {
- return classLoader;
- }
- public void setClassLoader(ClassLoader classLoader) {
- this.classLoader = classLoader;
- }
-
- // search methods ///////////////////////////////////////////////////////////
-
- public Object get(String name) {
- return get(name, null);
- }
-
- public Object get(String name, String[] searchOrder) {
- if (searchOrder==null) {
- searchOrder = getDefaultSearchOrder();
- }
- for (int i=0; i<searchOrder.length; i++){
- Context context = contexts.get(searchOrder[i]);
- if (context.has(name)) {
- return context.get(name);
- }
- }
- return null;
- }
-
- public <T> T get(Class<T> type) {
- return find(type, null);
- }
-
- public <T> T find(Class<T> type, String[] searchOrder) {
- if (searchOrder==null) {
- searchOrder = getDefaultSearchOrder();
- }
- for (int i=0; i<searchOrder.length; i++){
- Context context = contexts.get(searchOrder[i]);
- T o = context.get(type);
- if (o!=null) {
- return o;
- }
- }
- return null;
- }
-
- // exception ////////////////////////////////////////////////////////////////
-
- public void setException(Throwable exception) {
- this.exception = exception;
- pvmEnvironmentFactory.handleException(this, exception);
-
- // if an exception was thrown
- if (exception!=null) {
- rethrow(exception);
- }
- }
-
- public Throwable getException() {
- return exception;
- }
-
- // close ////////////////////////////////////////////////////////////////////
-
- public void close() {
- log.debug("closing "+this+"...");
-
- pvmEnvironmentFactory.getApplicationWireContext().fire(DefaultEnvironment.EVENT_CLOSEENVIRONMENT, this);
-
- Environment popped = Environment.popEnvironment();
- if (this!=popped) {
- throw new PvmException("environment nesting problem");
- }
-
- Context context = getEnvironmentContext();
- if (context instanceof Closable) {
- ((Closable)context).close();
- }
- log.debug("closed "+this);
- }
-
- public String toString() {
- return "Environment["+System.identityHashCode(this)+"]";
- }
-
- protected static void rethrow(Throwable exception) throws Error {
- if (exception instanceof Error) {
- throw (Error) exception;
- }
- if (exception instanceof RuntimeException) {
- throw (RuntimeException) exception;
- }
- throw new PvmException(exception);
- }
-
- // private methods //////////////////////////////////////////////////////////
-
- private String[] getDefaultSearchOrder() {
- if (defaultSearchOrder==null) {
- int size = defaultSearchOrderList.size();
- defaultSearchOrder = (String[]) new String[size];
- for (int i=0; i<size; i++) {
- defaultSearchOrder[i] = defaultSearchOrderList.get(size-1-i);
- }
- }
- return defaultSearchOrder;
- }
-
-}
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java (from rev 1788, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/DefaultEnvironment.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,239 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.env;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jbpm.pvm.PvmException;
+import org.jbpm.pvm.env.Context;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.util.Closable;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class PvmEnvironment extends Environment {
+
+ private static final long serialVersionUID = 1L;
+
+ private static final Log log = Log.getLog(PvmEnvironment.class.getName());
+
+ /** is fired for each exception reported in an environment block with
+ * {@link Environment#setException(Throwable)}. */
+ public static final String EVENT_EXCEPTION = "exception";
+
+ /** is fired when a environment created by this factory is being closed. The
+ * info object is the environment that was just opened. */
+ public static final String EVENT_CLOSEENVIRONMENT = "close-environment";
+
+ /** is fired when a new environment is being opened with this environment factory. The
+ * info object is the environment that was just opened. */
+ public static final String EVENT_OPENENVIRONMENT = "open-environment";
+
+
+ protected String userId;
+ protected PvmEnvironmentFactory pvmEnvironmentFactory;
+ protected Map<String, Context> contexts;
+ protected ArrayList<String> defaultSearchOrderList;
+ protected String[] defaultSearchOrder;
+ protected transient ClassLoader classLoader;
+ protected Throwable exception;
+
+ public PvmEnvironment(PvmEnvironmentFactory pvmEnvironmentFactory) {
+ this.pvmEnvironmentFactory = pvmEnvironmentFactory;
+ contexts = new HashMap<String, Context>();
+ defaultSearchOrderList = new ArrayList<String>();
+ defaultSearchOrder = null;
+ }
+
+ // context methods ////////////////////////////////////////////////////////////
+
+ public Context getContext(String contextName) {
+ return contexts.get(contextName);
+ }
+
+ public void addContext(Context context) {
+ String key = context.getName();
+ contexts.put(key, context);
+ defaultSearchOrderList.add(key);
+ defaultSearchOrder = null;
+ }
+
+ public void removeContext(Context context) {
+ String contextName = context.getName();
+ Context removedContext = contexts.remove(contextName);
+ if (removedContext!=null) {
+ defaultSearchOrderList.remove(contextName);
+ defaultSearchOrder = null;
+ }
+ }
+
+ public Context getEnvironmentFactoryContext() {
+ return getContext(Context.CONTEXTNAME_ENVIRONMENT_FACTORY);
+ }
+
+ public Context getEnvironmentContext() {
+ return getContext(Context.CONTEXTNAME_ENVIRONMENT);
+ }
+
+ public EnvironmentFactory getEnvironmentFactory() {
+ return pvmEnvironmentFactory;
+ }
+
+ // userId methods ///////////////////////////////////////////////////////////
+
+ public String getUserId() {
+ // if the authenticated user was explicitely set
+ if (userId!=null) {
+ // return that one
+ return userId;
+ }
+
+ // if an Authentication was specified
+ Authentication authentication = get(Authentication.class);
+ if (authentication!=null) {
+ // let the authentication do the work
+ return authentication.getUserId();
+ }
+
+ return null;
+ }
+
+ public void setUserId(String userId) {
+ this.userId = userId;
+ }
+
+ // classloader methods //////////////////////////////////////////////////////
+
+ public ClassLoader getClassLoader() {
+ return classLoader;
+ }
+ public void setClassLoader(ClassLoader classLoader) {
+ this.classLoader = classLoader;
+ }
+
+ // search methods ///////////////////////////////////////////////////////////
+
+ public Object get(String name) {
+ return get(name, null);
+ }
+
+ public Object get(String name, String[] searchOrder) {
+ if (searchOrder==null) {
+ searchOrder = getDefaultSearchOrder();
+ }
+ for (int i=0; i<searchOrder.length; i++){
+ Context context = contexts.get(searchOrder[i]);
+ if (context.has(name)) {
+ return context.get(name);
+ }
+ }
+ return null;
+ }
+
+ public <T> T get(Class<T> type) {
+ return find(type, null);
+ }
+
+ public <T> T find(Class<T> type, String[] searchOrder) {
+ if (searchOrder==null) {
+ searchOrder = getDefaultSearchOrder();
+ }
+ for (int i=0; i<searchOrder.length; i++){
+ Context context = contexts.get(searchOrder[i]);
+ T o = context.get(type);
+ if (o!=null) {
+ return o;
+ }
+ }
+ return null;
+ }
+
+ // exception ////////////////////////////////////////////////////////////////
+
+ public void setException(Throwable exception) {
+ this.exception = exception;
+ pvmEnvironmentFactory.handleException(this, exception);
+
+ // if an exception was thrown
+ if (exception!=null) {
+ rethrow(exception);
+ }
+ }
+
+ public Throwable getException() {
+ return exception;
+ }
+
+ // close ////////////////////////////////////////////////////////////////////
+
+ public void close() {
+ log.debug("closing "+this+"...");
+
+ pvmEnvironmentFactory.getApplicationWireContext().fire(PvmEnvironment.EVENT_CLOSEENVIRONMENT, this);
+
+ Environment popped = Environment.popEnvironment();
+ if (this!=popped) {
+ throw new PvmException("environment nesting problem");
+ }
+
+ Context context = getEnvironmentContext();
+ if (context instanceof Closable) {
+ ((Closable)context).close();
+ }
+ log.debug("closed "+this);
+ }
+
+ public String toString() {
+ return "Environment["+System.identityHashCode(this)+"]";
+ }
+
+ protected static void rethrow(Throwable exception) throws Error {
+ if (exception instanceof Error) {
+ throw (Error) exception;
+ }
+ if (exception instanceof RuntimeException) {
+ throw (RuntimeException) exception;
+ }
+ throw new PvmException(exception);
+ }
+
+ // private methods //////////////////////////////////////////////////////////
+
+ private String[] getDefaultSearchOrder() {
+ if (defaultSearchOrder==null) {
+ int size = defaultSearchOrderList.size();
+ defaultSearchOrder = (String[]) new String[size];
+ for (int i=0; i<size; i++) {
+ defaultSearchOrder[i] = defaultSearchOrderList.get(size-1-i);
+ }
+ }
+ return defaultSearchOrder;
+ }
+
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/env/PvmEnvironmentFactoryParser.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -21,6 +21,7 @@
*/
package org.jbpm.pvm.internal.env;
+import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
import org.jbpm.pvm.internal.stream.StreamSource;
@@ -79,7 +80,7 @@
WireDefinition environmentWireDefinition = getBlockWireDefinition(documentElement, parse);
// create the application wire context from the definition
- WireContext environmentFactoryWireContext = new WireContext(environmentFactoryWireDefinition, DefaultEnvironment.CONTEXTNAME_ENVIRONMENT_FACTORY, pvmEnvironmentFactory);
+ WireContext environmentFactoryWireContext = new WireContext(environmentFactoryWireDefinition, Context.CONTEXTNAME_ENVIRONMENT_FACTORY, pvmEnvironmentFactory);
// propagate the parser classloader to the application context
environmentFactoryWireContext.setClassLoader(classLoader);
@@ -93,7 +94,7 @@
}
WireDefinition getApplicationWireDefinition(Element documentElement, Parse parse) {
- Element applicationElement = XmlUtil.element(documentElement, DefaultEnvironment.CONTEXTNAME_ENVIRONMENT_FACTORY);
+ Element applicationElement = XmlUtil.element(documentElement, Context.CONTEXTNAME_ENVIRONMENT_FACTORY);
if (applicationElement != null) {
return (WireDefinition) environmentFactoryXmlParser.parseDocumentElement(applicationElement, parse);
}
@@ -101,7 +102,7 @@
}
WireDefinition getBlockWireDefinition(Element documentElement, Parse parse) {
- Element blockElement = XmlUtil.element(documentElement, DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ Element blockElement = XmlUtil.element(documentElement, Context.CONTEXTNAME_ENVIRONMENT);
if (blockElement != null) {
return (WireDefinition) environmentXmlParser.parseDocumentElement(blockElement, parse);
}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateTransactionResource.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateTransactionResource.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/hibernate/HibernateTransactionResource.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.hibernate;
-
-import org.hibernate.Session;
-import org.hibernate.Transaction;
-import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.tx.Resource;
-
-/**
- * @author Tom Baeyens
- */
-public class HibernateTransactionResource implements Resource {
-
- private static final Log log = Log.getLog(HibernateTransactionResource.class.getName());
-
- Session session;
- Transaction transaction;
-
- public HibernateTransactionResource(Transaction transaction, Session session) {
- this.transaction = transaction;
- this.session = session;
- }
-
- public void flush() {
- log.debug("flushing hibernate session");
- session.flush();
- }
-
- public void prepare() {
- log.debug("flushing hibernate session");
- session.flush();
- }
-
- public void commit() {
- log.debug("committing hibernate session");
- transaction.commit();
- }
-
- public void rollback() {
- log.debug("rolling back hibernate session");
- transaction.rollback();
- }
-
- public String toString() {
- return "HibernateTransactionResource";
- }
-}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/job/TimerImpl.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -37,7 +37,6 @@
import org.jbpm.pvm.job.Timer;
import org.jbpm.pvm.model.ObservableElement;
import org.jbpm.pvm.session.DbSession;
-import org.jbpm.pvm.util.Listener;
/** a runtime timer instance.
*
@@ -147,8 +146,8 @@
if (transaction==null) {
throw new PvmException("no transaction in environment");
}
- Listener jobNotificator = new JobAddedNotification(jobExecutor);
- transaction.addListener(jobNotificator);
+ JobAddedNotification jobNotificator = new JobAddedNotification(jobExecutor);
+ transaction.registerSynchronization(jobNotificator);
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/ExecuteJobCmd.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -39,6 +39,7 @@
* @author Tom Baeyens
*/
public class ExecuteJobCmd implements Command<Job> {
+
private static final long serialVersionUID = 1L;
private static final Log log = Log.getLog(ExecuteJobCmd.class.getName());
@@ -96,6 +97,6 @@
CommandService commandService = (CommandService) environment.get(CommandService.class);
JobExceptionHandler jobExceptionHandler = new JobExceptionHandler(job.getDbid(), exception, commandService);
- transaction.addListener(jobExceptionHandler, Transaction.EVENT_AFTERCOMPLETION);
+ transaction.registerSynchronization(jobExceptionHandler);
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobAddedNotification.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -21,10 +21,9 @@
*/
package org.jbpm.pvm.internal.jobexecutor;
-import org.jbpm.pvm.env.Transaction;
+import javax.transaction.Synchronization;
+
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.tx.StandardTransaction;
-import org.jbpm.pvm.util.Listener;
/** listener that can be registered as a listener to the transaction
* to notify the jobImpl executor of added jobs so that the dispatcher
@@ -32,7 +31,7 @@
*
* @author Tom Baeyens
*/
-public class JobAddedNotification implements Listener {
+public class JobAddedNotification implements Synchronization {
private static final Log log = Log.getLog(JobAddedNotification.class.getName());
@@ -42,12 +41,11 @@
this.jobExecutor = jobExecutor;
}
- public void event(Object source, String eventName, Object info) {
- if ( (Transaction.EVENT_AFTERCOMPLETION.equals(eventName))
- && (StandardTransaction.STATE_COMMITTED.equals(info))
- ) {
- log.trace("notifying jobImpl executor of added message");
- jobExecutor.jobWasAdded();
- }
+ public void afterCompletion(int arg0) {
+ log.trace("notifying jobImpl executor of added message");
+ jobExecutor.jobWasAdded();
}
+
+ public void beforeCompletion() {
+ }
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -24,6 +24,8 @@
import java.io.PrintWriter;
import java.io.StringWriter;
+import javax.transaction.Synchronization;
+
import org.hibernate.Session;
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
@@ -32,12 +34,11 @@
import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.util.Listener;
-/**
+/**
* @author Tom Baeyens
*/
-public class JobExceptionHandler implements Listener, Command<Object> {
+public class JobExceptionHandler implements Synchronization, Command<Object> {
private static final Log log = Log.getLog(JobExceptionHandler.class.getName());
private static final long serialVersionUID = 1L;
@@ -52,7 +53,15 @@
this.exception = exception;
}
- public void event(Object source, String eventName, Object info) {
+
+ public void beforeCompletion() {
+ }
+
+ public void afterCompletion(int status) {
+ // after the transaction rolled back,
+ // execute this job exception handler object as a command with
+ // the command service so that this gets done in a separate
+ // transaction
commandService.execute(this);
}
@@ -85,10 +94,9 @@
&& (jobExecutor!=null)
) {
log.trace("registering job executor notifier with "+transaction);
- transaction.addListener(new JobAddedNotification(jobExecutor));
+ transaction.registerSynchronization(new JobAddedNotification(jobExecutor));
}
}
return null;
}
-
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorMessageSession.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -59,7 +59,7 @@
if (jobExecutor==null) {
throw new PvmException("no job executor configured to execute "+message);
}
- transaction.addListener(new JobAddedNotification(jobExecutor));
+ transaction.registerSynchronization(new JobAddedNotification(jobExecutor));
}
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSession.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -48,7 +48,7 @@
jobDbSession.save(timer);
if (!jobExecutorNotificationScheduled) {
jobExecutorNotificationScheduled = true;
- transaction.addListener(new JobAddedNotification(jobExecutor));
+ transaction.registerSynchronization(new JobAddedNotification(jobExecutor));
}
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -25,6 +25,9 @@
import java.util.ArrayList;
import java.util.List;
+import javax.transaction.Status;
+import javax.transaction.Synchronization;
+
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
@@ -37,7 +40,6 @@
import org.jbpm.pvm.listener.EventListener;
import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.session.DbSession;
-import org.jbpm.pvm.util.Listener;
/**
* @author Tom Baeyens
@@ -130,7 +132,7 @@
exception,
environment.getEnvironmentFactory()
);
- transaction.addListener(afterTxCompletionListener, Transaction.EVENT_AFTERCOMPLETION);
+ transaction.registerSynchronization(afterTxCompletionListener);
log.trace("registering exception handler to "+transaction);
throw new PvmException("transaction exception handler registered handler after transaction completed. make sure this transaction is rolled back", exception);
} else {
@@ -214,7 +216,7 @@
}
}
- private class AfterTxCompletionListener implements Listener, Command<Object> {
+ private class AfterTxCompletionListener implements Synchronization, Command<Object> {
private static final long serialVersionUID = 1L;
@@ -228,9 +230,8 @@
this.environmentFactory = environmentFactory;
}
- public void event(Object source, String eventName, Object info) {
- Transaction transaction = (Transaction) source;
- if (! transaction.isRolledBack()) {
+ public void afterCompletion(int status) {
+ if (status!=Status.STATUS_ROLLEDBACK) {
log.info("WARNING: no rollback after transactional exception handler. did you forget to rollback the transaction ?");
}
CommandService commandService = environmentFactory.get(CommandService.class);
@@ -239,6 +240,7 @@
}
commandService.execute(this);
}
+
public Object execute(Environment environment) {
// reload the execution
DbSession dbSession = environment.get(DbSession.class);
@@ -249,6 +251,9 @@
executeHandler(execution, exception);
return null;
}
+
+ public void beforeCompletion() {
+ }
}
public static void rethrow(Exception exception, String prefixMessage) {
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/model/VariableDefinitionImpl.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -25,7 +25,7 @@
import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
+import org.jbpm.pvm.internal.env.PvmEnvironment;
import org.jbpm.pvm.internal.type.Type;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -37,11 +37,14 @@
public <T> T execute(Command<T> command) {
Environment environment = Environment.getCurrent();
+
try {
return command.execute(environment);
+
} catch (RuntimeException e) {
log.error("exception while executing command "+command, e);
throw e;
+
} catch (Exception e) {
log.error("exception while executing command "+command, e);
throw new PvmException("exception while executing command "+command, e);
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.svc;
-
-import org.jbpm.pvm.PvmException;
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.cmd.Command;
-
-
-/** calls setRollbackOnly on the transaction in the environment
- * in case an exception occurs during execution of the command.
- *
- * @author Tom Baeyens
- */
-public class TransactionInterceptor extends Interceptor {
-
- public <T> T execute(Command<T> command) {
- Environment environment = Environment.getCurrent();
- if (environment==null) {
- throw new PvmException("no environment for verifying authorization");
- }
- Transaction transaction = environment.get(Transaction.class);
- if (transaction==null) {
- throw new PvmException("no transaction in environment");
- }
- try {
- return next.execute(command);
- } catch (RuntimeException e) {
- transaction.setRollbackOnly();
- throw e;
- }
- }
-
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/EnterpriseTransaction.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/EnterpriseTransaction.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/EnterpriseTransaction.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,165 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.tx;
-
-import javax.naming.Context;
-import javax.naming.InitialContext;
-import javax.naming.NamingException;
-import javax.transaction.HeuristicMixedException;
-import javax.transaction.HeuristicRollbackException;
-import javax.transaction.NotSupportedException;
-import javax.transaction.RollbackException;
-import javax.transaction.Status;
-import javax.transaction.SystemException;
-import javax.transaction.UserTransaction;
-
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
-import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.wire.WireContext;
-import org.jbpm.pvm.util.DefaultObservable;
-
-/**
- * @author Alejandro Guizar
- */
-public class EnterpriseTransaction extends DefaultObservable implements Transaction {
-
- private String jndiName;
- private boolean manage;
-
- private UserTransaction transaction;
- private Environment environment;
-
- private static final Log log = Log.getLog(EnterpriseTransaction.class.getName());
-
- public EnterpriseTransaction(String jndiName, boolean manage, Environment environment) {
- this.jndiName = jndiName;
- this.manage = manage;
- if (manage) {
- try {
- getTransaction().begin();
- } catch (NotSupportedException e) {
- throw new TransactionException("transaction already in course", e);
- } catch (SystemException e) {
- throw new TransactionException("begin transaction failed", e);
- }
- }
-
- this.environment = environment;
- }
-
- public void setRollbackOnly() {
- try {
- getTransaction().setRollbackOnly();
- } catch (SystemException e) {
- throw new TransactionException("failed to mark transaction for rollback", e);
- }
- }
-
- public boolean isCommitted() {
- return getStatus() == Status.STATUS_COMMITTED;
- }
-
- public boolean isRollbackOnly() {
- return getStatus() == Status.STATUS_MARKED_ROLLBACK;
- }
-
- public boolean isRolledBack() {
- return getStatus() == Status.STATUS_ROLLEDBACK;
- }
-
- private int getStatus() {
- try {
- return getTransaction().getStatus();
- } catch (SystemException e) {
- throw new TransactionException("failed to retrieve transaction status", e);
- }
- }
-
- public void event(Object source, String eventName, Object info) {
- if (WireContext.EVENT_CLOSE.equals(eventName) && manage) {
- if (getStatus() == Status.STATUS_ACTIVE) {
- commit();
- } else {
- rollback();
- }
- } else if (DefaultEnvironment.EVENT_EXCEPTION.equals(eventName)) {
- setRollbackOnly();
- }
- }
-
- public void commit() {
- fire(EVENT_BEFORECOMPLETION, Status.STATUS_COMMITTING);
- try {
- getTransaction().commit();
- fire(EVENT_AFTERCOMPLETION, Status.STATUS_COMMITTED);
- } catch (RollbackException e) {
- log.error("transaction was rolled back", e);
- environment.setException(e);
- fire(EVENT_AFTERCOMPLETION, Status.STATUS_ROLLEDBACK);
- } catch (HeuristicRollbackException e) {
- log.error("transaction was rolled back", e);
- environment.setException(e);
- fire(EVENT_AFTERCOMPLETION, Status.STATUS_ROLLEDBACK);
- } catch (HeuristicMixedException e) {
- // TODO this should go to a special log for sys admin recovery
- log.error("transaction was partially committed", e);
- environment.setException(e);
- fire(EVENT_AFTERCOMPLETION, Status.STATUS_UNKNOWN);
- } catch (SystemException e) {
- log.error("commit failed", e);
- // TODO rollback() instead?
- environment.setException(e);
- fire(EVENT_AFTERCOMPLETION, Status.STATUS_UNKNOWN);
- }
- }
-
- public void rollback() {
- fire(EVENT_BEFORECOMPLETION, Status.STATUS_ROLLING_BACK);
- try {
- getTransaction().rollback();
- fire(EVENT_AFTERCOMPLETION, Status.STATUS_ROLLEDBACK);
- } catch (SystemException e) {
- log.debug("rollback failed", e);
- environment.setException(e);
- fire(EVENT_AFTERCOMPLETION, Status.STATUS_UNKNOWN);
- }
- }
-
- public String toString() {
- return "EnterpriseTransaction[" + System.identityHashCode(this) + "]";
- }
-
- private UserTransaction getTransaction() {
- if (transaction == null) {
- try {
- Context initial = new InitialContext();
- transaction = (UserTransaction) initial.lookup(jndiName);
- initial.close();
- } catch (NamingException e) {
- throw new TransactionException("failed to retrieve user transaction", e);
- }
- }
- return transaction;
- }
-}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionInterceptor.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionInterceptor.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateSessionInterceptor.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.tx;
+
+import org.hibernate.Session;
+import org.jbpm.pvm.PvmException;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.svc.Interceptor;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class HibernateSessionInterceptor extends Interceptor {
+
+ private static final Log log = Log.getLog(HibernateSessionInterceptor.class.getName());
+
+ public <T> T execute(Command<T> command) {
+ Environment environment = Environment.getCurrent();
+ if (environment==null) {
+ throw new PvmException("no environment for managing the hibernate session");
+ }
+
+ log.debug("getting session from environment");
+ Session session = environment.get(Session.class);
+ if (session==null) {
+ throw new PvmException("no session in environment");
+ }
+
+ try {
+ return next.execute(command);
+
+ } finally {
+ log.debug("closing hibernate session");
+ session.close();
+ }
+ }
+}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransaction.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransaction.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransaction.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,86 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.tx;
+
+import javax.transaction.Synchronization;
+
+import org.hibernate.Session;
+import org.jbpm.pvm.env.Transaction;
+import org.jbpm.pvm.internal.log.Log;
+
+/**
+ * @author Tom Baeyens
+ */
+public class HibernateTransaction implements Transaction {
+
+ private static final Log log = Log.getLog(HibernateTransaction.class.getName());
+
+ /* injected */
+ protected Session session;
+
+ /* created */
+ protected org.hibernate.Transaction transaction;
+
+ protected boolean isRollbackOnly;
+
+ public void begin() {
+ log.debug("beginning "+this);
+ transaction = session.beginTransaction();
+ }
+
+ public void complete() {
+ log.trace("completing "+this);
+
+ if (isRollbackOnly) {
+ rollback();
+ } else {
+ commit();
+ }
+ }
+
+ public void commit() {
+ log.debug("committing "+this);
+ transaction.commit();
+ }
+
+ public void rollback() {
+ log.debug("rolling back "+this);
+ transaction.rollback();
+ }
+
+ public void registerSynchronization(Synchronization synchronization) {
+ log.debug("registering synchronization "+synchronization);
+ transaction.registerSynchronization(synchronization);
+ }
+
+ public void setRollbackOnly() {
+ isRollbackOnly = true;
+ }
+
+ public boolean isRollbackOnly() {
+ return isRollbackOnly;
+ }
+
+ public String toString() {
+ return "HibernateTransaction["+System.identityHashCode(this)+"]";
+ }
+}
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransactionInterceptor.java (from rev 1788, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/svc/TransactionInterceptor.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransactionInterceptor.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransactionInterceptor.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,66 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.tx;
+
+import org.hibernate.Session;
+import org.hibernate.Transaction;
+import org.jbpm.pvm.PvmException;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.log.Log;
+import org.jbpm.pvm.internal.svc.Interceptor;
+
+
+/** calls setRollbackOnly on the transaction in the environment
+ * in case an exception occurs during execution of the command.
+ *
+ * @author Tom Baeyens
+ */
+public class HibernateTransactionInterceptor extends Interceptor {
+
+ private static final Log log = Log.getLog(HibernateTransactionInterceptor.class.getName());
+
+ public <T> T execute(Command<T> command) {
+ Environment environment = Environment.getCurrent();
+ if (environment==null) {
+ throw new PvmException("no environment for managing hibernate transaction");
+ }
+
+ HibernateTransaction hibernateTransaction = environment.get(HibernateTransaction.class);
+ if (hibernateTransaction==null) {
+ throw new PvmException("no hibernate transaction in environment");
+ }
+
+ hibernateTransaction.begin();
+
+ try {
+ return next.execute(command);
+
+ } catch (RuntimeException e) {
+ hibernateTransaction.setRollbackOnly();
+ throw e;
+
+ } finally {
+ hibernateTransaction.complete();
+ }
+ }
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/HibernateTransactionInterceptor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/Resource.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/Resource.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/Resource.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,32 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.tx;
-
-/**
- * @author Tom Baeyens
- */
-public interface Resource {
-
- void prepare();
- void commit();
- void rollback();
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/tx/StandardTransaction.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,225 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.tx;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
-import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.wire.WireContext;
-import org.jbpm.pvm.util.DefaultObservable;
-import org.jbpm.pvm.util.Listener;
-
-
-/** simple 2 phase commit transaction.
- * no logging or recovery.
- * non thread safe (which is ok).
- * @author Tom Baeyens
- */
-public class StandardTransaction extends DefaultObservable implements Transaction, Serializable, Listener {
-
- private static final long serialVersionUID = 1L;
- private static Log log = Log.getLog(StandardTransaction.class.getName());
-
- public static final String STATE_ACTIVE = "active";
- public static final String STATE_COMMITTING = "committing";
- public static final String STATE_COMMITTED = "committed";
- public static final String STATE_MARKED_ROLLBACK = "marked-rollback";
- public static final String STATE_ROLLING_BACK = "rolling-back";
- public static final String STATE_ROLLEDBACK = "rolled-back";
-
- // events ///////////////////////////////////////////////////////////////////
-
- protected Environment environment;
- protected List<Resource> resources;
- protected String state = STATE_ACTIVE;
-
- public StandardTransaction() {
- log.debug("starting "+this);
- }
-
- public void setRollbackOnly() {
- if (state==STATE_COMMITTED) {
- throw new TransactionException("transaction was already committed");
- }
- if (state==STATE_ACTIVE) {
- state = STATE_MARKED_ROLLBACK;
- }
- }
-
- public boolean isRollbackOnly() {
- return ( (state==STATE_MARKED_ROLLBACK)
- || (state==STATE_ROLLEDBACK)
- );
- }
-
- public boolean isCommitted() {
- return (state==STATE_COMMITTED);
- }
-
- public boolean isRolledBack() {
- return (state==STATE_ROLLEDBACK);
- }
-
- public void enlistResource(Resource resource) {
- if (resources==null) {
- resources = new ArrayList<Resource>();
- }
- log.trace("enlisting resource "+resource+" to standard transaction");
- resources.add(resource);
- }
-
- /** This transaction will always listen to the close of the block context.
- * If the transaction is still active at that time, it will be committed.
- * If it is marked for rollback it will be rolled back.
- */
- public void event(Object source, String eventName, Object info) {
- if (WireContext.EVENT_CLOSE.equals(eventName)) {
- if (state==STATE_ACTIVE) {
- commit();
- } else {
- rollback();
- }
-
- } else if (DefaultEnvironment.EVENT_EXCEPTION.equals(eventName)) {
- setRollbackOnly();
- }
- }
-
- /** implements simplest two phase commit. */
- public void commit() {
- log.trace("committing");
- event(this, EVENT_BEFORECOMPLETION, STATE_COMMITTING);
-
- if (resources!=null) {
-
- try {
- // prepare //////////////////////////////////////////////////////////////
-
- // the prepare loop will be skipped at the first exception
- for (Resource resource: resources) {
- log.trace("preparing resource "+resource);
- resource.prepare();
- }
-
- // for any exception in the prepare phase, we'll rollback
- } catch (Throwable exception) {
- try {
- log.trace("resource threw exception in prepare. rolling back.");
- rollback();
- } catch (Exception rollbackException) {
- log.error("rollback failed as well", rollbackException);
- }
- environment.setException(exception);
- return;
- }
-
- // commit ///////////////////////////////////////////////////////////////
-
- // The commit loop will try to send the commit to every resource,
- // No matter what it takes. If exceptions come out of resource.commit's
- // they will be suppressed and the first exception will be rethrown after
- // all the resources are commited
- Throwable commitException = null;
- for (Resource resource: resources) {
- try {
- log.trace("committing resource "+resource);
- resource.commit();
-
- // Exceptions in the commit phase will not lead to rollback, since some resources
- // might have committed and can't go back.
- } catch (Throwable t) {
- // TODO this should go to a special log for sys admin recovery
- log.error("commit failed for resource "+resource, t);
- if (commitException==null) {
- commitException = t;
- }
- }
- }
-
- if (commitException!=null) {
- environment.setException(commitException);
- }
- }
-
- state = STATE_COMMITTED;
- log.debug("committed "+this);
- fire(EVENT_AFTERCOMPLETION, STATE_COMMITTED);
- }
-
- public void rollback() {
- rollback(true);
- }
-
- public void rollback(boolean fireBeforeCompletionEvent) {
- log.trace("rolling back");
- if (fireBeforeCompletionEvent) {
- event(this, EVENT_BEFORECOMPLETION, STATE_ROLLING_BACK);
- }
-
- if (state==STATE_COMMITTED) {
- throw new TransactionException("transaction is already committed");
- }
-
- if (state!=STATE_ROLLEDBACK) {
- state = STATE_MARKED_ROLLBACK;
-
- if (resources!=null) {
- for (Resource resource: resources) {
- try {
- log.trace("rolling back resource "+resource);
- resource.rollback();
- } catch (Exception e) {
- log.error("rollback failed for resource "+resource);
- }
- }
- }
-
- state = STATE_ROLLEDBACK;
- log.debug("rolled back");
- fire(EVENT_AFTERCOMPLETION, STATE_ROLLEDBACK);
-
- } else {
- log.trace("transaction is already rolled back. ignoring rollback.");
- }
- }
-
- List<Resource> getResources() {
- return resources;
- }
-
- String getState() {
- return state;
- }
-
- public void setEnvironment(Environment environment) {
- this.environment = environment;
- }
-
- public String toString() {
- return "StandardTransaction["+System.identityHashCode(this)+"]";
- }
-}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/WireContext.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -34,14 +34,11 @@
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.env.Transaction;
import org.jbpm.pvm.internal.log.Log;
import org.jbpm.pvm.internal.model.ProcessElementImpl;
-import org.jbpm.pvm.internal.tx.Resource;
import org.jbpm.pvm.internal.util.Closable;
import org.jbpm.pvm.internal.wire.descriptor.AbstractDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
-import org.jbpm.pvm.internal.wire.operation.EnlistOperation;
import org.jbpm.pvm.internal.wire.operation.FieldOperation;
import org.jbpm.pvm.internal.wire.operation.InvokeOperation;
import org.jbpm.pvm.internal.wire.operation.Operation;
@@ -137,7 +134,6 @@
* <li><b>{@link PropertyOperation}</b>: injects another object with a setter method.</li>
* <li><b>{@link InvokeOperation}</b>: invokes a method.</li>
* <li><b>{@link SubscribeOperation}</b>: subscribes to an {@link Observable observable}.</li>
- * <li><b>{@link EnlistOperation}</b>: enlists this {@link Resource} with the current {@link Transaction}.</li>
* </ul>
*
* <h3>Environment</h3>
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/EnlistBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/EnlistBinding.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/EnlistBinding.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.binding;
-
-import org.jbpm.pvm.internal.wire.operation.EnlistOperation;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-/** parses a descriptor for creating an {@link EnlistOperation enlist operation}.
- *
- * See schema docs for more details.
- *
- * @author Tom Baeyens
- * @author Guillaume Porcher (documentation)
- */
-public class EnlistBinding extends WireOperationBinding {
-
- public EnlistBinding() {
- super("enlist");
- }
-
- public Object parse(Element element, Parse parse, Parser parser) {
- EnlistOperation enlistOperation = new EnlistOperation();
- if (element.hasAttribute("transaction")) {
- enlistOperation.setTransactionName(element.getAttribute("transaction"));
- }
- return enlistOperation;
- }
-
-}
\ No newline at end of file
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateSessionInterceptorBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateSessionInterceptorBinding.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateSessionInterceptorBinding.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,45 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.tx.HibernateSessionInterceptor;
+import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class HibernateSessionInterceptorBinding extends WireInterceptorBinding {
+
+ public HibernateSessionInterceptorBinding() {
+ super("hibernate-session-interceptor");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ HibernateSessionInterceptor hibernateSessionInterceptor = new HibernateSessionInterceptor();
+ return new ProvidedObjectDescriptor(hibernateSessionInterceptor);
+ }
+
+}
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionBinding.java (from rev 1788, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionBinding.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionBinding.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionBinding.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.binding;
+
+import org.hibernate.Session;
+import org.jbpm.pvm.env.Transaction;
+import org.jbpm.pvm.internal.tx.HibernateTransaction;
+import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+/** parses a descriptor for creating a {@link Transaction}.
+ *
+ * See schema docs for more details.
+ *
+ * @author Tom Baeyens
+ */
+public class HibernateTransactionBinding extends WireDescriptorBinding {
+
+ public HibernateTransactionBinding() {
+ super("hibernate-transaction");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ ObjectDescriptor descriptor = new ObjectDescriptor(HibernateTransaction.class);
+ descriptor.addTypedInjection("session", Session.class);
+ return descriptor;
+ }
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionInterceptorBinding.java (from rev 1788, jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionInterceptorBinding.java)
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionInterceptorBinding.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionInterceptorBinding.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,46 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.wire.binding;
+
+import org.jbpm.pvm.internal.tx.HibernateTransactionInterceptor;
+import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
+import org.jbpm.pvm.internal.xml.Parse;
+import org.jbpm.pvm.internal.xml.Parser;
+import org.w3c.dom.Element;
+
+/** parses a descriptor for creating a {@link HibernateTransactionInterceptor}.
+ *
+ * See schema docs for more details.
+ *
+ * @author Tom Baeyens
+ */
+public class HibernateTransactionInterceptorBinding extends WireInterceptorBinding {
+
+ public HibernateTransactionInterceptorBinding() {
+ super("hibernate-transaction-interceptor");
+ }
+
+ public Object parse(Element element, Parse parse, Parser parser) {
+ HibernateTransactionInterceptor hibernateTransactionInterceptor = new HibernateTransactionInterceptor();
+ return new ProvidedObjectDescriptor(hibernateTransactionInterceptor);
+ }
+}
Property changes on: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/HibernateTransactionInterceptorBinding.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionBinding.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionBinding.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,83 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.binding;
-
-import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.util.XmlUtil;
-import org.jbpm.pvm.internal.wire.Descriptor;
-import org.jbpm.pvm.internal.wire.descriptor.EnterpriseTransactionDescriptor;
-import org.jbpm.pvm.internal.wire.descriptor.StandardTransactionDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-/** parses a descriptor for creating a {@link Transaction}.
- *
- * See schema docs for more details.
- *
- * @author Tom Baeyens
- */
-public class TransactionBinding extends WireDescriptorBinding {
-
- public TransactionBinding() {
- super("transaction");
- }
-
- public Object parse(Element element, Parse parse, Parser parser) {
- String target = "standard";
-
- if (element.hasAttribute("target")) {
- target = element.getAttribute("target");
- }
-
- Descriptor descriptor = null;
- if ("standard".equalsIgnoreCase(target)) {
- descriptor = new StandardTransactionDescriptor();
-
- } else if ("enterprise".equalsIgnoreCase(target)) {
- EnterpriseTransactionDescriptor enterpriseTransactionDescriptor = new EnterpriseTransactionDescriptor();
-
- if (element.hasAttribute("jndi")) {
- enterpriseTransactionDescriptor.setJndiName(element.getAttribute("jndi"));
- }
-
- Boolean manage = XmlUtil.attributeBoolean(element, "manage", false, parse);
- if (manage!=null) {
- enterpriseTransactionDescriptor.setManage(manage.booleanValue());
- }
-
- descriptor = enterpriseTransactionDescriptor;
-
- } else if ("seam".equalsIgnoreCase(target)) {
- parse.addProblem("seam transaction support is not yet implemented");
-
- } else if ("spring".equalsIgnoreCase(target)) {
- parse.addProblem("spring transaction support is not yet implemented");
-
- } else {
- parse.addProblem("couldn't parse transaction target '"+target+"': must be in {standard, enterprise, seam, spring}. standard is the default.");
-
- }
-
- return descriptor;
- }
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionInterceptorBinding.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionInterceptorBinding.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/binding/TransactionInterceptorBinding.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,46 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.binding;
-
-import org.jbpm.pvm.internal.svc.TransactionInterceptor;
-import org.jbpm.pvm.internal.wire.descriptor.ProvidedObjectDescriptor;
-import org.jbpm.pvm.internal.xml.Parse;
-import org.jbpm.pvm.internal.xml.Parser;
-import org.w3c.dom.Element;
-
-/** parses a descriptor for creating a {@link TransactionInterceptor}.
- *
- * See schema docs for more details.
- *
- * @author Tom Baeyens
- */
-public class TransactionInterceptorBinding extends WireInterceptorBinding {
-
- public TransactionInterceptorBinding() {
- super("transaction-interceptor");
- }
-
- public Object parse(Element element, Parse parse, Parser parser) {
- TransactionInterceptor transactionInterceptor = new TransactionInterceptor();
- return new ProvidedObjectDescriptor(transactionInterceptor);
- }
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnterpriseTransactionDescriptor.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnterpriseTransactionDescriptor.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/EnterpriseTransactionDescriptor.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.descriptor;
-
-
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.tx.EnterpriseTransaction;
-import org.jbpm.pvm.internal.wire.WireContext;
-import org.jbpm.pvm.internal.wire.WireDefinition;
-import org.jbpm.pvm.internal.wire.WireException;
-
-/**
- * @author Tom Baeyens
- */
-public class EnterpriseTransactionDescriptor extends AbstractDescriptor {
-
- private static final long serialVersionUID = 1L;
-
- String jndiName = "java:comp/UserTransaction";
- boolean manage;
-
- public Object construct(WireContext wireContext) {
- Environment environment = Environment.getCurrent();
- if (environment==null) {
- throw new WireException("enterprise transaction requires environment");
- }
- EnterpriseTransaction enterpriseTransaction = new EnterpriseTransaction(jndiName, manage, environment);
- wireContext.addListener(enterpriseTransaction);
- return enterpriseTransaction;
- }
-
- public Class<?> getType(WireDefinition wireDefinition) {
- return EnterpriseTransaction.class;
- }
-
- public void setJndiName(String jndiName) {
- this.jndiName = jndiName;
- }
- public void setManage(boolean manage) {
- this.manage = manage;
- }
-}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/HibernateSessionDescriptor.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -22,18 +22,15 @@
package org.jbpm.pvm.internal.wire.descriptor;
import java.sql.Connection;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.hibernate.HibernateTransactionResource;
import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.tx.StandardTransaction;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireDefinition;
import org.jbpm.pvm.internal.wire.WireException;
-import org.jbpm.pvm.util.Listener;
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-
/**
* @author Tom Baeyens
*/
@@ -84,54 +81,11 @@
return session;
}
-
- public void initialize(Object object, WireContext wireContext) {
- Session session = (Session) object;
-
- // if transactions are enabled
- if (tx) {
- log.debug("beginning hibernate transaction");
- org.hibernate.Transaction hibernateTransaction = session.beginTransaction();
-
- // get the standard-transaction
- StandardTransaction standardTransaction = null;
- if (standardTransactionName!=null) {
- standardTransaction = (StandardTransaction) wireContext.get(standardTransactionName);
- } else {
- standardTransaction = wireContext.get(StandardTransaction.class);
- }
- if (standardTransaction==null) {
- throw new WireException("couldn't find standard-transaction "+(standardTransactionName!=null ? "'"+standardTransactionName+"'" : "by type ")+"to enlist the hibernate transaction");
- }
-
- // enlist the hibernate transaction to the global transaction
- HibernateTransactionResource resource = new HibernateTransactionResource(hibernateTransaction, session);
- standardTransaction.enlistResource(resource);
- }
-
- if (close) {
- // make sure that the session is closed when the context closes.
- wireContext.addListener(new SessionCloser(session));
- }
- }
public Class<?> getType(WireDefinition wireDefinition) {
return Session.class;
}
- public static class SessionCloser implements Listener {
- Session session;
- public SessionCloser(Session session) {
- this.session = session;
- }
- public void event(Object source, String eventName, Object info) {
- if (WireContext.EVENT_CLOSE.equals(eventName)) {
- log.debug("closing hibernate session");
- session.close();
- }
- }
- }
-
public void setFactoryName(String factoryName) {
this.factoryName = factoryName;
}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/StandardTransactionDescriptor.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/StandardTransactionDescriptor.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/descriptor/StandardTransactionDescriptor.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,51 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.wire.descriptor;
-
-import org.jbpm.pvm.env.Environment;
-import org.jbpm.pvm.internal.tx.StandardTransaction;
-import org.jbpm.pvm.internal.wire.WireContext;
-import org.jbpm.pvm.internal.wire.WireDefinition;
-import org.jbpm.pvm.internal.wire.WireException;
-
-/**
- * @author Tom Baeyens
- */
-public class StandardTransactionDescriptor extends AbstractDescriptor {
-
- private static final long serialVersionUID = 1L;
-
- public Object construct(WireContext wireContext) {
- StandardTransaction standardTransaction = new StandardTransaction();
- Environment environment = Environment.getCurrent();
- if (environment==null) {
- throw new WireException("standard transaction requires environment");
- }
- standardTransaction.setEnvironment(environment);
- wireContext.addListener(standardTransaction);
- return standardTransaction;
- }
-
- public Class< ? > getType(WireDefinition wireDefinition) {
- return StandardTransaction.class;
- }
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/internal/wire/operation/EnlistOperation.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,74 +0,0 @@
-package org.jbpm.pvm.internal.wire.operation;
-
-import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.log.Log;
-import org.jbpm.pvm.internal.tx.Resource;
-import org.jbpm.pvm.internal.tx.StandardTransaction;
-import org.jbpm.pvm.internal.wire.WireContext;
-import org.jbpm.pvm.internal.wire.WireException;
-
-
-/**
- * enlists this {@link Resource} with the current {@link Transaction}.
- *
- * <p>This {@link Operation} specifies that the object on which this operation is applied
- * should be added as a {@link Resource} to the specified {@link Transaction}.
- * </p>
- *
- * <p>property transactionName refers to the objectName of the {@link Transaction}
- * and it may not be null.
- * </p>
- *
- * @author Tom Baeyens
- * @author Guillaume Porcher (documentation)
- */
-public class EnlistOperation implements Operation {
-
- private static final long serialVersionUID = 1L;
- private static Log log = Log.getLog(EnlistOperation.class.getName());
-
- String transactionName = null;
-
- /**
- * @throws WireException if this operation is applied on an object which is not a resource
- * or if the specified transaction cannot be found.
- */
- public void apply(Object target, WireContext wireContext) {
- if (! (target instanceof Resource)) {
- throw new WireException("operation enlist can only be applied on objects that implement "+Resource.class.getName()+": "+target+(target!=null ? " ("+target.getClass().getName()+")" : ""));
- }
-
- Object object = null;
- if (transactionName!=null) {
- object = wireContext.get(transactionName);
- } else {
- object = wireContext.get(Transaction.class);
- }
-
- if ( (object==null)
- || (! (object instanceof StandardTransaction))
- ) {
- throw new WireException("couldn't find "+StandardTransaction.class.getName()+" "+(transactionName!=null ? "'"+transactionName+"'" : "by type")+" to enlist resource "+target);
- }
-
- StandardTransaction standardTransaction = (StandardTransaction) object;
-
- log.trace("enlisting resource "+target+" with transaction");
- standardTransaction.enlistResource((Resource)target);
- }
-
- /**
- * Gets the name of the transaction to which the object should be added.
- */
- public String getTransactionName() {
- return transactionName;
- }
-
- /**
- * Sets the name of the transaction to which the object should be added.
- * @param transactionName
- */
- public void setTransactionName(String transactionName) {
- this.transactionName = transactionName;
- }
-}
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ConfigurationHelper.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ConfigurationHelper.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ConfigurationHelper.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,84 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.test.base;
-
-import java.util.HashMap;
-import java.util.Map;
-
-import org.jbpm.pvm.PvmException;
-import org.jbpm.pvm.env.EnvironmentFactory;
-import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.log.Log;
-
-
-/** utility to help tests with managing configuration resources.
- *
- * @author Tom Baeyens
- */
-public class ConfigurationHelper {
-
- private static final Log log = Log.getLog(ConfigurationHelper.class.getName());
-
- static Map<String, EnvironmentFactory> environmentFactories = new HashMap<String, EnvironmentFactory>();
-
- public EnvironmentFactory getEnvironmentFactory() {
- return getEnvironmentFactory(getClass().getPackage());
- }
-
- static EnvironmentFactory getEnvironmentFactory(Package testPackage) {
- String packageName = testPackage.getName();
- if (! environmentFactories.containsKey(packageName)) {
- createEnvironmentFactory(testPackage);
- }
- return environmentFactories.get(packageName);
- }
-
- static EnvironmentFactory createEnvironmentFactory(Package testPackage) {
- String packageName = testPackage.getName();
- try {
- String resourceName = getConfigurationResourceName(packageName);
- log.debug("creating environment factory for package ["+packageName+"]");
- EnvironmentFactory environmentFactory = new PvmEnvironmentFactory(resourceName);
- environmentFactories.put(packageName, environmentFactory);
- return environmentFactory;
- } catch (Exception e) {
- throw new PvmException("Exception during creation of environment factory for package "+packageName, e);
- }
- }
-
- static String getConfigurationResourceName(String packageName) {
- return packageName.replace('.','/')+"/environment.cfg.xml";
- }
-
- static void setUpPackage(Package testPackage) {
- createEnvironmentFactory(testPackage);
- }
-
- static void tearDownPackage(Package testPackage) {
- String packageName = testPackage.getName();
- EnvironmentFactory environmentFactory = environmentFactories.remove(packageName);
- if (environmentFactory!=null) {
- log.debug("closing environment factory for package ["+packageName+"]");
- environmentFactory.close();
- }
- }
-}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/Db.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/Db.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/Db.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,127 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.test.base;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.hibernate.Session;
+import org.hibernate.SessionFactory;
+import org.hibernate.cfg.Configuration;
+import org.hibernate.dialect.Dialect;
+import org.hibernate.dialect.MySQLDialect;
+import org.hibernate.engine.SessionFactoryImplementor;
+import org.hibernate.mapping.ForeignKey;
+import org.hibernate.mapping.Table;
+import org.jbpm.pvm.env.Context;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.env.EnvironmentFactory;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class Db {
+
+ private static final String CLEAN_SQL_KEY = "cleanSql";
+
+ public static void clean(EnvironmentFactory environmentFactory) {
+ Environment environment = environmentFactory.openEnvironment();
+ try {
+ SessionFactory sessionFactory = environment.get(SessionFactory.class);
+ String[] cleanSql = (String[]) environment.getContext(Context.CONTEXTNAME_ENVIRONMENT_FACTORY).get(CLEAN_SQL_KEY);
+
+ if (cleanSql == null) {
+ Configuration configuration = environment.get(Configuration.class);
+
+ SessionFactoryImplementor sessionFactoryImplementor = (SessionFactoryImplementor) sessionFactory;
+ Dialect dialect = sessionFactoryImplementor.getDialect();
+
+ // loop over all foreign key constraints
+ List<String> dropForeignKeysSql = new ArrayList<String>();
+ List<String> createForeignKeysSql = new ArrayList<String>();
+ Iterator<Table> iter = configuration.getTableMappings();
+ while (iter.hasNext()) {
+ Table table = (Table) iter.next();
+ if (table.isPhysicalTable()) {
+ String catalog = table.getCatalog();
+ String schema = table.getSchema();
+ Iterator<ForeignKey> subIter = table.getForeignKeyIterator();
+ while (subIter.hasNext()) {
+ ForeignKey fk = (ForeignKey) subIter.next();
+ if (fk.isPhysicalConstraint()) {
+ // collect the drop foreign key constraint sql
+ dropForeignKeysSql.add(fk.sqlDropString(dialect, catalog, schema));
+ // MySQLDialect creates an index for each foreign key.
+ // see
+ // http://opensource.atlassian.com/projects/hibernate/browse/HHH-2155
+ // This index should be dropped or an error will be thrown during
+ // the creation phase
+ if (dialect instanceof MySQLDialect) {
+ dropForeignKeysSql.add("alter table " + table.getName() + " drop key " + fk.getName());
+ }
+ // and collect the create foreign key constraint sql
+ createForeignKeysSql.add(fk.sqlCreateString(dialect, sessionFactoryImplementor, catalog, schema));
+ }
+ }
+ }
+ }
+
+ List<String> deleteSql = new ArrayList<String>();
+ iter = configuration.getTableMappings();
+ while (iter.hasNext()) {
+ Table table = (Table) iter.next();
+ if (table.isPhysicalTable()) {
+ deleteSql.add("delete from " + table.getName());
+ }
+ }
+
+ // glue
+ // - drop foreign key constraints
+ // - delete contents of all tables
+ // - create foreign key constraints
+ // together to form the clean script
+ List<String> cleanSqlList = new ArrayList<String>();
+ cleanSqlList.addAll(dropForeignKeysSql);
+ cleanSqlList.addAll(deleteSql);
+ cleanSqlList.addAll(createForeignKeysSql);
+
+ cleanSql = (String[]) cleanSqlList.toArray(new String[cleanSqlList.size()]);
+
+ environment.getContext(Context.CONTEXTNAME_ENVIRONMENT_FACTORY).set(CLEAN_SQL_KEY, cleanSql);
+ }
+
+ Session session = sessionFactory.openSession();
+ try {
+ for (String query : cleanSql) {
+ session.createSQLQuery(query).executeUpdate();
+ }
+ } finally {
+ session.close();
+ }
+ } finally {
+ environment.close();
+ }
+ }
+
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/DbTestCase.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -21,193 +21,44 @@
*/
package org.jbpm.pvm.test.base;
-import java.lang.reflect.Field;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.hibernate.Session;
-import org.hibernate.SessionFactory;
-import org.hibernate.cfg.Configuration;
-import org.hibernate.dialect.Dialect;
-import org.hibernate.dialect.MySQLDialect;
-import org.hibernate.engine.SessionFactoryImplementor;
-import org.hibernate.mapping.ForeignKey;
-import org.hibernate.mapping.Table;
-import org.jbpm.pvm.test.base.EnvironmentTestCase;
-import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.ExecutionService;
+import org.jbpm.pvm.ManagementService;
+import org.jbpm.pvm.ProcessService;
import org.jbpm.pvm.env.EnvironmentFactory;
-import org.jbpm.pvm.env.Transaction;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
-import org.jbpm.pvm.internal.model.ExecutionImpl;
-import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
-import org.jbpm.pvm.internal.util.ReflectUtil;
-import org.jbpm.pvm.model.ProcessDefinition;
-import org.jbpm.pvm.session.DbSession;
-import org.jbpm.pvm.session.PvmDbSession;
+import org.jbpm.pvm.internal.cmd.CommandService;
-/**
+
+/** for tests that use persistence through a command service.
+ *
+ * The DB is cleaned inbetween tests. No environment is created.
+ *
* @author Tom Baeyens
*/
-public abstract class DbTestCase extends EnvironmentTestCase
-{
-
- private static final String CLEAN_SQL_KEY = "cleanSql";
-
- @Override
- public void setUp() throws Exception {
- if (isSamePackage()) {
- cleanDb(getEnvironmentFactory());
- }
- super.setUp();
- }
+public abstract class DbTestCase extends EnvironmentFactoryTestCase {
- public DbSession getDbSession() {
- return environment.get(DbSession.class);
- }
-
- public void rollbackAndBeginNewTransaction() {
- Transaction transaction = environment.get(Transaction.class);
- transaction.setRollbackOnly();
- environment.close();
- environment = null;
- }
-
- public void newTransaction() {
- try {
- environment.close();
- } finally {
- log.debug("### new transaction ###################################################");
- environment = getEnvironmentFactory().openEnvironment();
- }
- }
-
- public void beginCacheTest() {
- SessionFactory sessionFactory = environment.get(SessionFactory.class);
- if (sessionFactory != null) {
- log.debug("=================================================================");
- log.debug("Beginning of the cache test, no more sql query should be performed before the end of the test");
- log.debug("=================================================================");
+ protected CommandService commandService;
+ protected ProcessService processService;
+ protected ExecutionService executionService;
+ protected ManagementService managementService;
- sessionFactory.getStatistics().clear();
- sessionFactory.getStatistics().setStatisticsEnabled(true);
- }
+ public DbTestCase() {
+ super();
}
- public void endCacheTest() {
- SessionFactory sessionFactory = environment.get(SessionFactory.class);
- if (sessionFactory != null) {
- assertEquals(0, sessionFactory.getStatistics().getEntityLoadCount());
- assertEquals(0, sessionFactory.getStatistics().getCollectionLoadCount());
- }
+ public DbTestCase(String configResource) {
+ super(configResource);
}
- public ProcessDefinitionImpl reload(ProcessDefinition processDefinition) {
- environment.get(PvmDbSession.class).save(processDefinition);
- newTransaction();
- return environment.get(PvmDbSession.class).get(ProcessDefinitionImpl.class, processDefinition.getDbid());
- }
+ public void setUp() throws Exception {
+ super.setUp();
- public <T> T reload(T object, Class<T> persistentClass) {
- environment.get(DbSession.class).save(object);
- newTransaction();
-
- Long dbid = null;
- try {
- Field dbidField = ReflectUtil.getField(persistentClass, "dbid");
- dbidField.setAccessible(true);
- dbid = (Long) dbidField.get(object);
- } catch (Exception e) {
- e.printStackTrace();
+ if (isEnvironmentFactoryCached()) {
+ Db.clean(getEnvironmentFactory());
}
-
- return environment.get(DbSession.class).get(persistentClass, dbid);
- }
- public ExecutionImpl reload(Execution execution) {
- environment.get(PvmDbSession.class).save(execution);
- newTransaction();
- return environment.get(PvmDbSession.class).get(ExecutionImpl.class, execution.getDbid());
+ commandService = getEnvironmentFactory().get(CommandService.class);
+ processService = getEnvironmentFactory().get(ProcessService.class);
+ executionService = getEnvironmentFactory().get(ExecutionService.class);
+ managementService = getEnvironmentFactory().get(ManagementService.class);
}
-
- public static void cleanDb(EnvironmentFactory environmentFactory) {
-
- Environment environment = environmentFactory.openEnvironment();
- try {
- SessionFactory sessionFactory = environment.get(SessionFactory.class);
- String[] cleanSql = (String[]) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT_FACTORY).get(CLEAN_SQL_KEY);
-
- if (cleanSql == null) {
- Configuration configuration = environment.get(Configuration.class);
-
- SessionFactoryImplementor sessionFactoryImplementor = (SessionFactoryImplementor) sessionFactory;
- Dialect dialect = sessionFactoryImplementor.getDialect();
-
- // loop over all foreign key constraints
- List<String> dropForeignKeysSql = new ArrayList<String>();
- List<String> createForeignKeysSql = new ArrayList<String>();
- Iterator<Table> iter = configuration.getTableMappings();
- while (iter.hasNext()) {
- Table table = (Table) iter.next();
- if (table.isPhysicalTable()) {
- String catalog = table.getCatalog();
- String schema = table.getSchema();
- Iterator<ForeignKey> subIter = table.getForeignKeyIterator();
- while (subIter.hasNext()) {
- ForeignKey fk = (ForeignKey) subIter.next();
- if (fk.isPhysicalConstraint()) {
- // collect the drop foreign key constraint sql
- dropForeignKeysSql.add(fk.sqlDropString(dialect, catalog, schema));
- // MySQLDialect creates an index for each foreign key.
- // see
- // http://opensource.atlassian.com/projects/hibernate/browse/HHH-2155
- // This index should be dropped or an error will be thrown during
- // the creation phase
- if (dialect instanceof MySQLDialect) {
- dropForeignKeysSql.add("alter table " + table.getName() + " drop key " + fk.getName());
- }
- // and collect the create foreign key constraint sql
- createForeignKeysSql.add(fk.sqlCreateString(dialect, sessionFactoryImplementor, catalog, schema));
- }
- }
- }
- }
-
- List<String> deleteSql = new ArrayList<String>();
- iter = configuration.getTableMappings();
- while (iter.hasNext()) {
- Table table = (Table) iter.next();
- if (table.isPhysicalTable()) {
- deleteSql.add("delete from " + table.getName());
- }
- }
-
- // glue
- // - drop foreign key constraints
- // - delete contents of all tables
- // - create foreign key constraints
- // together to form the clean script
- List<String> cleanSqlList = new ArrayList<String>();
- cleanSqlList.addAll(dropForeignKeysSql);
- cleanSqlList.addAll(deleteSql);
- cleanSqlList.addAll(createForeignKeysSql);
-
- cleanSql = (String[]) cleanSqlList.toArray(new String[cleanSqlList.size()]);
-
- environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT_FACTORY).set(CLEAN_SQL_KEY, cleanSql);
- }
-
- Session session = sessionFactory.openSession();
- try {
- for (String query : cleanSql) {
- session.createSQLQuery(query).executeUpdate();
- }
- } finally {
- session.close();
- }
- } finally {
- environment.close();
- }
- }
}
Added: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentDbTestCase.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,122 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.test.base;
+
+import java.lang.reflect.Field;
+
+import org.hibernate.SessionFactory;
+import org.jbpm.pvm.Execution;
+import org.jbpm.pvm.env.Transaction;
+import org.jbpm.pvm.internal.model.ExecutionImpl;
+import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
+import org.jbpm.pvm.internal.util.ReflectUtil;
+import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.session.DbSession;
+import org.jbpm.pvm.session.PvmDbSession;
+
+
+/** for tests that use persistence inside environment blocks.
+ *
+ * An environment is opened in the setUp and closed in the tearDown.
+ * DB is cleaned inbetween tests. Extra convenience methods for usage
+ * inside an environment block are provided.
+ *
+ * @author Tom Baeyens
+ */
+public class EnvironmentDbTestCase extends EnvironmentTestCase {
+
+ public void setUp() throws Exception {
+ if (isEnvironmentFactoryCached()) {
+ Db.clean(getEnvironmentFactory());
+ }
+ super.setUp();
+ }
+
+ public DbSession getDbSession() {
+ return environment.get(DbSession.class);
+ }
+
+ public void rollbackAndBeginNewTransaction() {
+ Transaction transaction = environment.get(Transaction.class);
+ transaction.setRollbackOnly();
+ environment.close();
+ environment = null;
+ }
+
+ public void newTransaction() {
+ try {
+ environment.close();
+ } finally {
+ log.debug("### new transaction ###################################################");
+ environment = getEnvironmentFactory().openEnvironment();
+ }
+ }
+
+ public void beginCacheTest() {
+ SessionFactory sessionFactory = environment.get(SessionFactory.class);
+ if (sessionFactory != null) {
+ log.debug("=================================================================");
+ log.debug("Beginning of the cache test, no more sql query should be performed before the end of the test");
+ log.debug("=================================================================");
+
+ sessionFactory.getStatistics().clear();
+ sessionFactory.getStatistics().setStatisticsEnabled(true);
+ }
+ }
+
+ public void endCacheTest() {
+ SessionFactory sessionFactory = environment.get(SessionFactory.class);
+ if (sessionFactory != null) {
+ assertEquals(0, sessionFactory.getStatistics().getEntityLoadCount());
+ assertEquals(0, sessionFactory.getStatistics().getCollectionLoadCount());
+ }
+ }
+
+ public ProcessDefinitionImpl reload(ProcessDefinition processDefinition) {
+ environment.get(PvmDbSession.class).save(processDefinition);
+ newTransaction();
+ return environment.get(PvmDbSession.class).get(ProcessDefinitionImpl.class, processDefinition.getDbid());
+ }
+
+ public <T> T reload(T object, Class<T> persistentClass) {
+ environment.get(DbSession.class).save(object);
+ newTransaction();
+
+ Long dbid = null;
+ try {
+ Field dbidField = ReflectUtil.getField(persistentClass, "dbid");
+ dbidField.setAccessible(true);
+ dbid = (Long) dbidField.get(object);
+ } catch (Exception e) {
+ e.printStackTrace();
+ }
+
+ return environment.get(DbSession.class).get(persistentClass, dbid);
+ }
+
+ public ExecutionImpl reload(Execution execution) {
+ environment.get(PvmDbSession.class).save(execution);
+ newTransaction();
+ return environment.get(PvmDbSession.class).get(ExecutionImpl.class, execution.getDbid());
+ }
+
+}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentFactoryTestCase.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -21,7 +21,12 @@
*/
package org.jbpm.pvm.test.base;
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.EnvironmentFactory;
+import org.jbpm.pvm.env.PvmEnvironmentFactory;
/**
@@ -29,19 +34,57 @@
*/
public abstract class EnvironmentFactoryTestCase extends JbpmTestCase {
- static Package lastPackage = null;
+ String configResource;
+
+ static Map<String, EnvironmentFactory> environmentFactories = new HashMap<String, EnvironmentFactory>();
+ public EnvironmentFactoryTestCase() {
+ this("environment.cfg.xml");
+ }
+
+ public EnvironmentFactoryTestCase(String configResource) {
+ this.configResource = configResource;
+ }
+
public EnvironmentFactory getEnvironmentFactory() {
- Package testPackage = this.getClass().getPackage();
- if (lastPackage != null && lastPackage != testPackage) {
- ConfigurationHelper.tearDownPackage(lastPackage);
+ if (isEnvironmentFactoryCached()) {
+ return environmentFactories.get(configResource);
}
- lastPackage = testPackage;
- return ConfigurationHelper.getEnvironmentFactory(testPackage);
+ return createEnvironmentFactory();
}
+
+ boolean isEnvironmentFactoryCached() {
+ return environmentFactories.containsKey(configResource);
+ }
+
+ EnvironmentFactory createEnvironmentFactory() {
+ try {
+ log.debug("creating environment factory for ["+configResource+"]");
+ EnvironmentFactory newEnvironmentFactory = new PvmEnvironmentFactory(configResource);
+ environmentFactories.put(configResource, newEnvironmentFactory);
+ return newEnvironmentFactory;
+ } catch (Exception e) {
+ throw new PvmException("Exception during creation of environment factory for "+configResource, e);
+ }
+ }
+
+ /*
+ static String getConfigResource(Package p) {
+ return p.getName().replace('.','/')+"/environment.cfg.xml";
+ }
- public boolean isSamePackage() {
- Package testPackage = this.getClass().getPackage();
- return lastPackage == testPackage;
+ static void setUpPackage(Package testPackage) {
+ String packageName = testPackage.getName();
+ createEnvironmentFactory(testPackage);
}
+
+ static void tearDownPackage(Package testPackage) {
+ String packageName = testPackage.getName();
+ EnvironmentFactory environmentFactory = environmentFactories.remove(packageName);
+ if (environmentFactory!=null) {
+ log.debug("closing environment factory for package ["+packageName+"]");
+ environmentFactory.close();
+ }
+ }
+ */
}
Modified: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentTestCase.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/EnvironmentTestCase.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -30,6 +30,13 @@
protected Environment environment;
+ public EnvironmentTestCase() {
+ }
+
+ public EnvironmentTestCase(String configResource) {
+ super(configResource);
+ }
+
public void setUp() throws Exception {
super.setUp();
environment = getEnvironmentFactory().openEnvironment();
Deleted: jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ServiceTestCase.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ServiceTestCase.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/java/org/jbpm/pvm/test/base/ServiceTestCase.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.test.base;
-
-import org.jbpm.pvm.test.base.EnvironmentFactoryTestCase;
-
-
-/**
- * @author Tom Baeyens
- */
-public abstract class ServiceTestCase extends EnvironmentFactoryTestCase
-{
-
- public void tearDown() throws Exception {
- super.tearDown();
- DbTestCase.cleanDb(getEnvironmentFactory());
- }
-}
Modified: jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/main/resources/org/jbpm/pvm/pvm.wire.bindings.xml 2008-08-05 07:28:14 UTC (rev 1820)
@@ -31,7 +31,7 @@
<binding class="org.jbpm.pvm.internal.wire.binding.ContextRefBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.TransactionRefBinding" />
<!-- various specials -->
- <binding class="org.jbpm.pvm.internal.wire.binding.TransactionBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateTransactionBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.JobExecutorBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.JobTestHelperBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.ScriptManagerBinding" />
@@ -67,7 +67,8 @@
<binding class="org.jbpm.pvm.internal.wire.binding.EnvironmentInterceptorBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.AuthorizationInterceptorBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.RetryInterceptorBinding" />
- <binding class="org.jbpm.pvm.internal.wire.binding.TransactionInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateTransactionInterceptorBinding" />
+ <binding class="org.jbpm.pvm.internal.wire.binding.HibernateSessionInterceptorBinding" />
<!-- ########################## -->
<!-- ### Operation bindings ### -->
@@ -76,6 +77,5 @@
<binding class="org.jbpm.pvm.internal.wire.binding.FieldBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.InvokeBinding" />
<binding class="org.jbpm.pvm.internal.wire.binding.SubscribeBinding" />
- <binding class="org.jbpm.pvm.internal.wire.binding.EnlistBinding" />
</wire-bindings>
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ExecutionServiceTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -26,19 +26,19 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.pvm.test.base.ServiceTestCase;
+import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.Execution;
-import org.jbpm.pvm.Deployment;
import org.jbpm.pvm.ExecutionService;
import org.jbpm.pvm.ProcessService;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
/**
* @author Tom Baeyens
*/
-public class ExecutionServiceTest extends ServiceTestCase {
+public class ExecutionServiceTest extends EnvironmentDbTestCase {
public void testStartExecutionByName() {
ProcessService processService = getEnvironmentFactory().get(ProcessService.class);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ManagementServiceTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -21,15 +21,14 @@
*/
package org.jbpm.pvm.api.db.svc;
-import org.jbpm.pvm.test.base.ServiceTestCase;
import org.jbpm.pvm.ManagementService;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
/**
* @author Tom Baeyens
*/
-public class ManagementServiceTest extends ServiceTestCase
-{
+public class ManagementServiceTest extends EnvironmentDbTestCase {
public void testGetJobs() {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/db/svc/ProcessServiceTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -24,17 +24,17 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.test.base.ServiceTestCase;
import org.jbpm.pvm.Deployment;
+import org.jbpm.pvm.ProcessService;
import org.jbpm.pvm.PvmException;
-import org.jbpm.pvm.ProcessService;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.model.ProcessDefinition;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
/**
* @author Tom Baeyens
*/
-public class ProcessServiceTest extends ServiceTestCase {
+public class ProcessServiceTest extends EnvironmentDbTestCase {
public void testDuplicateDeployment() {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/env/BasicEnvironmentTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -26,7 +26,6 @@
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
/**
* @author Tom Baeyens
@@ -138,9 +137,9 @@
Environment environment = environmentFactory.openEnvironment();
try {
- Context environmentFactoryCtxt = environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT_FACTORY);
+ Context environmentFactoryCtxt = environment.getContext(Context.CONTEXTNAME_ENVIRONMENT_FACTORY);
assertNotNull(environmentFactoryCtxt);
- Context environmentCtxt = environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ Context environmentCtxt = environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
assertNotNull(environmentCtxt);
} finally {
@@ -160,9 +159,9 @@
Environment environment = environmentFactory.openEnvironment();
try {
assertNotNull(environment);
- Context environmentFactoryCtxt = environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT_FACTORY);
+ Context environmentFactoryCtxt = environment.getContext(Context.CONTEXTNAME_ENVIRONMENT_FACTORY);
assertNotNull(environmentFactoryCtxt);
- Context environmentCtxt = environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ Context environmentCtxt = environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
assertNotNull(environmentCtxt);
} finally {
@@ -180,9 +179,9 @@
Environment environment = environmentFactory.openEnvironment();
try {
assertNotNull(environment);
- Context environmentFactoryCtxt = environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT_FACTORY);
+ Context environmentFactoryCtxt = environment.getContext(Context.CONTEXTNAME_ENVIRONMENT_FACTORY);
assertNotNull(environmentFactoryCtxt);
- Context environmentCtxt = environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ Context environmentCtxt = environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
assertNotNull(environmentCtxt);
} finally {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/api/timer/TimerIntegrationTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -35,12 +35,12 @@
import org.jbpm.pvm.samples.activities.AutomaticActivity;
import org.jbpm.pvm.session.DbSession;
import org.jbpm.pvm.session.PvmDbSession;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
/**
* @author Pascal Verdage
*/
-public class TimerIntegrationTest extends DbTestCase {
+public class TimerIntegrationTest extends EnvironmentDbTestCase {
public static class WaitState implements ExternalActivity {
private static final long serialVersionUID = 1L;
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/langext/LanguageExtensionsDbTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -24,7 +24,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.Execution;
import org.jbpm.pvm.model.ProcessDefinition;
import org.jbpm.pvm.model.ProcessFactory;
@@ -35,7 +35,7 @@
/**
* @author Tom Baeyens
*/
-public class LanguageExtensionsDbTest extends DbTestCase
+public class LanguageExtensionsDbTest extends EnvironmentDbTestCase
{
/**
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/CommentDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/CommentDbTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/CommentDbTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -24,7 +24,7 @@
import java.util.Date;
import java.util.List;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.model.Comment;
import org.jbpm.pvm.session.DbSession;
@@ -32,7 +32,7 @@
/**
* @author Tom Baeyens
*/
-public class CommentDbTest extends DbTestCase {
+public class CommentDbTest extends EnvironmentDbTestCase {
public void testComment() {
Date now = new Date();
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessCacheDbTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -16,7 +16,7 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.model.NodeImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
@@ -31,7 +31,7 @@
* @author Guillaume Porcher
*
*/
-public class ProcessCacheDbTest extends DbTestCase
+public class ProcessCacheDbTest extends EnvironmentDbTestCase
{
/**
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessDefinitionDbTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -16,7 +16,7 @@
import java.util.Date;
import java.util.List;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.internal.model.EventImpl;
import org.jbpm.pvm.internal.model.EventListenerReference;
import org.jbpm.pvm.internal.model.ExceptionHandlerImpl;
@@ -32,7 +32,7 @@
* @author Charles Souillard
* @author Guillaume Porcher
*/
-public class ProcessDefinitionDbTest extends DbTestCase
+public class ProcessDefinitionDbTest extends EnvironmentDbTestCase
{
public void testProcessDefinitionBasicProperties() {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/ProcessExecutionDbTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -13,7 +13,7 @@
**/
package org.jbpm.pvm.internal.db.model;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.model.ProcessDefinition;
@@ -22,7 +22,7 @@
* @author Guillaume Porcher
*
*/
-public class ProcessExecutionDbTest extends DbTestCase {
+public class ProcessExecutionDbTest extends EnvironmentDbTestCase {
public void testExecutionProperties() {
ProcessDefinition processDefinition = new ProcessDefinitionImpl();
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/SessionFactoryDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/SessionFactoryDbTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/SessionFactoryDbTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -22,13 +22,13 @@
package org.jbpm.pvm.internal.db.model;
import org.hibernate.SessionFactory;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
/**
* @author Tom Baeyens
*/
-public class SessionFactoryDbTest extends DbTestCase
+public class SessionFactoryDbTest extends EnvironmentDbTestCase
{
public void testSessionFactory() {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireDbTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -21,7 +21,7 @@
import java.util.TreeMap;
import java.util.TreeSet;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.internal.model.EventImpl;
import org.jbpm.pvm.internal.model.ProcessDefinitionImpl;
import org.jbpm.pvm.internal.model.VariableDefinitionImpl;
@@ -58,7 +58,7 @@
*
* This class uses process annotations to test wire descriptors persistence
*/
-public class WireDbTest extends DbTestCase {
+public class WireDbTest extends EnvironmentDbTestCase {
public void testCharacterDescriptor() {
DbSession dbSession = environment.get(DbSession.class);
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/model/WireTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -22,7 +22,7 @@
package org.jbpm.pvm.internal.db.model;
import org.hibernate.Session;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.internal.wire.descriptor.ArgDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
@@ -32,7 +32,7 @@
/**
* @author Tom Baeyens
*/
-public class WireTest extends DbTestCase {
+public class WireTest extends EnvironmentDbTestCase {
public void testObjectDescriptor() {
DbSession persistenceSession = (DbSession) environment.get(DbSession.class);
Added: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/db/tx/BasicTransactionTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jbpm.pvm.internal.db.tx;
+
+import java.util.List;
+
+import org.hibernate.Session;
+import org.jbpm.pvm.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.model.CommentImpl;
+import org.jbpm.pvm.test.base.DbTestCase;
+
+/**
+ * @author Tom Baeyens
+ */
+public class BasicTransactionTest extends DbTestCase {
+
+ public void testCommit() {
+ commandService.execute(new Command<Object>(){
+ public Object execute(Environment environment) {
+ Session session = environment.get(Session.class);
+ session.save(new CommentImpl("if i only had the time to write code"));
+ return null;
+ }
+ });
+
+ commandService.execute(new Command<Object>(){
+ public Object execute(Environment environment) {
+ Session session = environment.get(Session.class);
+ List<CommentImpl> comments = session.createQuery("from "+CommentImpl.class.getName()).list();
+ assertEquals("if i only had the time to write code", comments.get(0).getMessage());
+ return null;
+ }
+ });
+ }
+
+
+ public static class MyOwnException extends RuntimeException {
+ }
+
+ public void testRollback() {
+ try {
+ commandService.execute(new Command<Object>(){
+ public Object execute(Environment environment) {
+ Session session = environment.get(Session.class);
+ session.save(new CommentImpl("if i only had the time to write code"));
+ throw new MyOwnException();
+ }
+ });
+ fail("expected exception");
+ } catch (MyOwnException e) {
+ // OK
+ }
+
+ commandService.execute(new Command<Object>(){
+ public Object execute(Environment environment) {
+ Session session = environment.get(Session.class);
+ List<CommentImpl> comments = session.createQuery("from "+CommentImpl.class.getName()).list();
+ assertEquals(0, comments.size());
+ return null;
+ }
+ });
+ }
+}
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -49,6 +49,10 @@
public class JobExecutorTest extends EnvironmentFactoryTestCase {
private static final Log log = Log.getLog(JobExecutorTest.class.getName());
+
+ public JobExecutorTest() {
+ super("org/jbpm/pvm/internal/jobexecutor/environment.cfg.xml");
+ }
/**
* test the case where the jobExecutor is start and shortly after stopped.
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorTimerSessionTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -18,7 +18,7 @@
import java.util.Map;
import java.util.Map.Entry;
-import org.jbpm.pvm.test.base.DbTestCase;
+import org.jbpm.pvm.test.base.EnvironmentDbTestCase;
import org.jbpm.pvm.PvmException;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.internal.job.JobImpl;
@@ -34,7 +34,7 @@
/**
* @author Pascal Verdage
*/
-public class JobExecutorTimerSessionTest extends DbTestCase
+public class JobExecutorTimerSessionTest extends EnvironmentDbTestCase
{
public void setUp() throws Exception {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/type/VariableAutoTypeResolutionTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -45,8 +45,12 @@
/**
* @author Tom Baeyens
*/
-public class VariableAutoTypeResolutionTest extends EnvironmentTestCase
-{
+public class VariableAutoTypeResolutionTest extends EnvironmentTestCase {
+
+ public VariableAutoTypeResolutionTest() {
+ super("org/jbpm/pvm/internal/type/environment.cfg.xml");
+ }
+
public static class WaitState implements ExternalActivity {
private static final long serialVersionUID = 1L;
public void execute(ActivityExecution execution) {
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/ContextBlockSubscriptionTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -22,10 +22,10 @@
package org.jbpm.pvm.internal.wire;
+import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
import org.jbpm.pvm.internal.wire.WireDefinition;
@@ -89,7 +89,7 @@
Environment environment = environmentFactory.openEnvironment();
try {
- WireContext contextBlockContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ WireContext contextBlockContext = (WireContext) environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
assertNotNull(environment.get("recorder"));
// The recorder object will be subscribed to the environment WireScope
@@ -216,7 +216,7 @@
try {
assertEquals(events.toString(), 0, events.size());
- WireContext contextBlockContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ WireContext contextBlockContext = (WireContext) environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
contextBlockContext.fire("interestingevent", null);
assertEquals(events.toString(), 1, events.size());
@@ -250,7 +250,7 @@
Environment environment = environmentFactory.openEnvironment();
try {
- WireContext contextBlockContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ WireContext contextBlockContext = (WireContext) environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
assertEquals(events.toString(), 2, events.size());
int index=0;
@@ -461,7 +461,7 @@
Environment environment = environmentFactory.openEnvironment();
try {
- WireContext contextBlockContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ WireContext contextBlockContext = (WireContext) environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
assertNotNull(environment.get("a"));
// The recorder object will be subscribed to the environment WireContext
@@ -524,7 +524,7 @@
Environment environment = environmentFactory.openEnvironment();
try {
- WireContext contextBlockContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ WireContext contextBlockContext = (WireContext) environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
assertNotNull(environment.get("a"));
// The recorder object will be subscribed to the environment WireContext
Modified: jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java 2008-08-04 13:08:47 UTC (rev 1819)
+++ jbpm4/pvm/trunk/modules/core/src/test/java/org/jbpm/pvm/internal/wire/WireObservableTest.java 2008-08-05 07:28:14 UTC (rev 1820)
@@ -25,10 +25,10 @@
import org.jbpm.pvm.test.base.JbpmTestCase;
import org.jbpm.pvm.util.Listener;
+import org.jbpm.pvm.env.Context;
import org.jbpm.pvm.env.Environment;
import org.jbpm.pvm.env.EnvironmentFactory;
import org.jbpm.pvm.env.PvmEnvironmentFactory;
-import org.jbpm.pvm.internal.env.DefaultEnvironment;
import org.jbpm.pvm.internal.wire.WireContext;
/**
@@ -59,7 +59,7 @@
Environment environment = environmentFactory.openEnvironment();
try {
- WireContext environmentContext = (WireContext) environment.getContext(DefaultEnvironment.CONTEXTNAME_ENVIRONMENT);
+ WireContext environmentContext = (WireContext) environment.getContext(Context.CONTEXTNAME_ENVIRONMENT);
// this test also checks non-eager-initialized subscription
// subscription should only be done when the object is created the first time
Added: jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml
===================================================================
--- jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml (rev 0)
+++ jbpm4/pvm/trunk/modules/core/src/test/resources/environment.cfg.xml 2008-08-05 07:28:14 UTC (rev 1820)
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<contexts xmlns="http://jbpm.org/pvm/1.0/wire">
+
+ <environment-factory>
+
+ <deployer-manager resource="pvm.language.deployers.xml">
+ <language name="api">
+ <verify-version />
+ <save-process />
+ </language>
+ </deployer-manager>
+
+ <process-service />
+ <execution-service />
+ <management-service />
+
+ <command-service>
+ <retry-interceptor />
+ <environment-interceptor />
+ <hibernate-session-interceptor />
+ <hibernate-transaction-interceptor />
+ </command-service>
+
+ <hibernate-configuration>
+ <properties resource="hibernate.properties" />
+ <mappings resource="org/jbpm/pvm/pvm.hibernate.mappings.xml" />
+ <cache-configuration resource="org/jbpm/pvm/pvm.cache.xml" usage="nonstrict-read-write" />
+ </hibernate-configuration>
+
+ <hibernate-session-factory />
+
+ <variable-types resource="org/jbpm/pvm/pvm.types.xml" />
+
+ </environment-factory>
+
+ <environment>
+ <hibernate-session />
+ <hibernate-transaction />
+ <pvm-db-session />
+ </environment>
+
+</contexts>
17 years, 9 months
JBoss JBPM SVN: r1819 - in jbpm3/trunk/modules/gwt-console/war/src/main: java/org/jboss/bpm/console/client/process and 2 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-08-04 09:08:47 -0400 (Mon, 04 Aug 2008)
New Revision: 1819
Added:
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
Modified:
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java
jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css
Log:
ProcessINstanceView, first cut
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -67,7 +67,7 @@
mainMenu = new MainMenu(this);
BorderLayoutData menuData = new BorderLayoutData(RegionPosition.WEST);
- menuData.setSplit(true);
+ menuData.setSplit(false);
menuData.setMinSize(175);
menuData.setMaxSize(400);
menuData.setMargins(new Margins(0, 5, 0, 0));
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -88,7 +88,7 @@
{
ProcessDefinition proc = (ProcessDefinition)row2ProcessMap.get(row);
ProcessInstanceList list = new ProcessInstanceList(
- proc, "Process Instances: " + proc.getId(), view
+ proc, "Process Instances", view
);
view.addEditorView( new ProcessInstanceEditor( list ));
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -21,6 +21,7 @@
*/
package org.jboss.bpm.console.client.process;
+import org.jboss.bpm.console.client.model.ProcessDefinition;
import org.jboss.bpm.console.client.widgets.EditorView;
/**
@@ -30,12 +31,14 @@
{
public final static String ID = "org.jboss.bpm.process.ProcessInstanceList";
- private String title;
- public ProcessInstanceEditor(ProcessInstanceList instances)
+
+ private ProcessDefinition parent;
+
+ public ProcessInstanceEditor(ProcessInstanceList instanceList)
{
super();
- this.title = instances.getProcessDefinition().getName() + " Instances";
- this.add(instances);
+ parent = instanceList.getProcessDefinition();
+ this.add( instanceList );
}
@@ -46,6 +49,6 @@
public String getTitle()
{
- return title;
+ return parent.getName();
}
}
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -52,6 +52,6 @@
public String getTitle()
{
- return "Process Definitions";
+ return "Processes";
}
}
Added: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java (rev 0)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java 2008-08-04 13:08:47 UTC (rev 1819)
@@ -0,0 +1,132 @@
+/*
+ * 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.widgets;
+
+import com.gwtext.client.core.EventObject;
+import com.gwtext.client.widgets.*;
+import com.gwtext.client.widgets.event.ButtonListenerAdapter;
+import com.gwtext.client.widgets.grid.GridPanel;
+import com.gwtext.client.widgets.grid.event.GridCellListener;
+import org.jboss.bpm.console.client.ConsoleView;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public abstract class ListView extends Panel
+{
+ protected ConsoleView view;
+ protected GridPanel grid;
+
+ private Integer selectedRowIndex = null;
+
+ public ListView(String titleName, ConsoleView view)
+ {
+ super();
+ this.setId(getId());
+ this.view = view;
+
+ // ----------------------------------
+
+ this.setPaddings(15);
+ this.setHeader(false);
+ this.setBorder(false);
+
+ // ----------------------------------
+
+ this.grid = new GridPanel();
+
+ grid.addGridCellListener(new GridCellListener()
+ {
+ public void onCellClick(GridPanel grid, int rowIndex, int colindex, EventObject e)
+ {
+ selectedRowIndex = new Integer(rowIndex);
+ }
+
+ public void onCellContextMenu(GridPanel gridPanel, int i, int i1, EventObject eventObject)
+ {
+
+ }
+
+ public void onCellDblClick(GridPanel gridPanel, int i, int i1, EventObject eventObject)
+ {
+
+ }
+ }
+ );
+
+ // ----------------------------------------
+
+ Toolbar bottomToolbar = new Toolbar();
+ bottomToolbar.addFill();
+ bottomToolbar.addButton(
+ new ToolbarButton("Examine", new ButtonListenerAdapter() {
+ public void onClick(Button button, EventObject e)
+ {
+ if(null== selectedRowIndex)
+ MessageBox.alert("Please select a process.");
+ else
+ onExamine(selectedRowIndex);
+ }
+ })
+ );
+
+ bottomToolbar.addButton(
+ new ToolbarButton("Delete", new ButtonListenerAdapter()
+ {
+ public void onClick(Button button, EventObject e)
+ {
+ if(null== selectedRowIndex)
+ {
+ MessageBox.alert("Please select a process.");
+ }
+ else
+ {
+ onDelete(selectedRowIndex);
+ }
+ }
+ })
+ );
+
+ grid.setBottomToolbar(bottomToolbar);
+
+ // ----------------------------------------
+
+ grid.setFrame(true);
+ grid.setStripeRows(true);
+ grid.setTitle(titleName);
+
+ grid.setWidth(350);
+
+ grid.setEnableHdMenu(false);
+ grid.setEnableColumnMove(false);
+
+ // ----------------------------------------
+
+ this.add(grid);
+
+ }
+
+ protected abstract void onExamine(final Integer row);
+
+ protected abstract void onDelete(final Integer row);
+
+}
Property changes on: jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css
===================================================================
--- jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-08-04 11:52:34 UTC (rev 1818)
+++ jbpm3/trunk/modules/gwt-console/war/src/main/resources/org/jboss/bpm/console/public/console.css 2008-08-04 13:08:47 UTC (rev 1819)
@@ -30,4 +30,8 @@
.bpm-FieldValue {
+}
+
+.bpm-EditorHeader {
+
}
\ No newline at end of file
17 years, 9 months
JBoss JBPM SVN: r1818 - jbpm3 and 1 other directory.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-04 07:52:34 -0400 (Mon, 04 Aug 2008)
New Revision: 1818
Added:
jbpm3/trunk/
Removed:
jbossbpm/impl/jbpm3/trunk/
Log:
Restore jbpm3/trunk
Copied: jbpm3/trunk (from rev 1817, jbossbpm/impl/jbpm3/trunk)
17 years, 9 months
JBoss JBPM SVN: r1817 - jbpm3.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-04 07:52:04 -0400 (Mon, 04 Aug 2008)
New Revision: 1817
Removed:
jbpm3/trunk/
Log:
Restore jbpm3/trunk
17 years, 9 months
JBoss JBPM SVN: r1816 - in jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client: model and 2 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2008-08-04 06:34:26 -0400 (Mon, 04 Aug 2008)
New Revision: 1816
Added:
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefinitionDAO.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessInstanceDAO.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java
Removed:
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessListView.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessWorkspace.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/TaskWorkspace.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Workspace.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/WorkspaceManager.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefDAO.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ObjectFactory.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefDAO.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/LoadingPanel.java
Modified:
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java
jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java
Log:
Switch to tab based layout and main menu
Modified: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ConsoleView.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -24,12 +24,15 @@
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HTML;
import com.gwtext.client.core.RegionPosition;
+import com.gwtext.client.core.Margins;
import com.gwtext.client.widgets.Panel;
import com.gwtext.client.widgets.Viewport;
import com.gwtext.client.widgets.layout.BorderLayout;
import com.gwtext.client.widgets.layout.BorderLayoutData;
import com.gwtext.client.widgets.layout.FitLayout;
-import org.jboss.bpm.console.client.model.ObjectFactory;
+import org.jboss.bpm.console.client.model.DAOFactory;
+import org.jboss.bpm.console.client.process.ProcessListEditor;
+import org.jboss.bpm.console.client.widgets.EditorView;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -39,10 +42,11 @@
private Panel mainPanel = new Panel();
private Panel borderPanel = new Panel();
- private HTML status = new HTML();
- private ObjectFactory objectFactory = new ObjectFactory();
+ private HTML status = new HTML();
- private WorkspaceManager workspaceManager;
+ private HeaderPanel header;
+ private MainMenu mainMenu;
+ private EditorPanel editorPanel;
public ConsoleView()
{
@@ -56,14 +60,25 @@
// ------------------------------------------
- HeaderPanel header = new HeaderPanel(this);
+ header = new HeaderPanel(this);
borderPanel.add(header, new BorderLayoutData(RegionPosition.NORTH));
-
+
// ------------------------------------------
- workspaceManager = new WorkspaceManager();
- borderPanel.add(workspaceManager, new BorderLayoutData(RegionPosition.CENTER));
- setupWorkspaces();
+ mainMenu = new MainMenu(this);
+ BorderLayoutData menuData = new BorderLayoutData(RegionPosition.WEST);
+ menuData.setSplit(true);
+ menuData.setMinSize(175);
+ menuData.setMaxSize(400);
+ menuData.setMargins(new Margins(0, 5, 0, 0));
+ borderPanel.add(mainMenu, menuData);
+
+ // ------------------------------------------
+
+ editorPanel = new EditorPanel();
+ borderPanel.add(editorPanel, new BorderLayoutData(RegionPosition.CENTER));
+
+ setupEditors();
// ------------------------------------------
@@ -71,15 +86,14 @@
Viewport viewport = new Viewport(mainPanel);
}
- private void setupWorkspaces()
+ private void setupEditors()
{
- workspaceManager.addWorkspace( new ProcessWorkspace("Process workspace", this) );
- workspaceManager.addWorkspace( new TaskWorkspace("Task workspace", this) );
+ editorPanel.addEditor( new ProcessListEditor(this), false );
}
- public ObjectFactory getObjectFactory()
+ public void addEditorView(EditorView editorView)
{
- return objectFactory;
+ editorPanel.addEditor(editorView, true);
}
public void setError(String error)
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,66 @@
+/*
+ * 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.gwtext.client.widgets.Panel;
+import com.gwtext.client.widgets.TabPanel;
+import com.gwtext.client.widgets.layout.FitLayout;
+
+import org.jboss.bpm.console.client.widgets.EditorView;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class EditorPanel extends TabPanel
+{
+ protected ConsoleView view;
+
+ public EditorPanel()
+ {
+ super();
+
+ this.setResizeTabs(true);
+ this.setMinTabWidth(115);
+ this.setTabWidth(135);
+ this.setEnableTabScroll(true);
+ this.setWidth("100%");
+ this.setHeight("100%");
+ this.setActiveTab(0);
+ }
+
+ private Panel addTab(String title, boolean closeable) {
+ Panel tab = new Panel();
+ tab.setAutoScroll(true);
+ tab.setTitle(title);
+ tab.setClosable(closeable);
+ tab.setLayout(new FitLayout());
+ this.add(tab);
+ return tab;
+ }
+
+ public void addEditor(EditorView editorView, boolean closeable)
+ {
+ Panel tab = addTab(editorView.getTitle(), closeable);
+ tab.add(editorView);
+ this.setActiveTab(tab.getId());
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/EditorPanel.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/HeaderPanel.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -48,8 +48,8 @@
VerticalLayout verticalLayout = new VerticalLayout();
this.setLayout(verticalLayout);
- this.setHeight(80);
- this.setBodyStyle("background-color:FFFF88");
+ this.setHeight(50);
+ this.setBodyStyle("background-color:FFFFFF");
this.add( new Label("GWT Console"));
//this.add(new MainMenu(view));
Modified: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/MainMenu.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -21,11 +21,8 @@
*/
package org.jboss.bpm.console.client;
-import com.gwtext.client.core.EventObject;
-import com.gwtext.client.widgets.Button;
import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.event.ButtonListenerAdapter;
-import com.gwtext.client.widgets.layout.HorizontalLayout;
+import com.gwtext.client.widgets.layout.AccordionLayout;
/**
* @author Heiko.Braun <heiko.braun(a)jboss.com>
@@ -33,69 +30,32 @@
public class MainMenu extends Panel
{
private final ConsoleView view;
- private Panel mainPanel = new Panel();
public MainMenu(final ConsoleView view)
{
super();
this.view = view;
- // menu
- this.setBorder(false);
- this.setPaddings(15);
- this.setLayout(new HorizontalLayout(15));
- this.setBodyStyle("background-color:FFFF88");
+ final AccordionLayout accordion = new AccordionLayout(true);
- // --------------------------------
-
- Button processButton = new Button(
- "Processes",
- new ButtonListenerAdapter() {
- public void onClick(Button button, EventObject e)
- {
- //view.toogleWorkspace(ProcessWorkspace.ID);
- }
- }
- );
+ this.setTitle("");
+ this.setCollapsible(true);
+ this.setWidth(200);
+ this.setLayout(accordion);
- Button taskButton = new Button(
- "Tasks",
- new ButtonListenerAdapter() {
- public void onClick(Button button, EventObject e)
- {
- //view.toogleWorkspace(TaskWorkspace.ID);
- }
- }
- );
+ Panel navPanel = new Panel();
+ navPanel.setHtml("<p>Hi. I'm the west panel.</p>");
+ navPanel.setTitle("Navigation");
+ navPanel.setBorder(false);
+ navPanel.setIconCls("forlder-icon");
+ this.add(navPanel);
- Button jobsButton = new Button(
- "Jobs",
- new ButtonListenerAdapter() {
- public void onClick(Button button, EventObject e)
- {
-
- }
- }
- );
-
- Button userButton = new Button(
- "User",
- new ButtonListenerAdapter() {
- public void onClick(Button button, EventObject e)
- {
-
- }
- }
- );
-
- userButton.setDisabled(true);
-
- // --------------------------------
-
- this.add(processButton);
- this.add(taskButton);
- this.add(jobsButton);
- this.add(userButton);
+ Panel settingsPanel = new Panel();
+ settingsPanel.setHtml("<p>Some settings in here.</p>");
+ settingsPanel.setTitle("Settings");
+ settingsPanel.setBorder(false);
+ settingsPanel.setIconCls("settings-icon");
+ this.add(settingsPanel);
}
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessListView.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessListView.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessListView.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,43 +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 org.jboss.bpm.console.client.widgets.ListView;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class ProcessListView extends ListView
-{
-
- public ProcessListView(String titleName, ConsoleView view)
- {
- super(titleName, view);
- addComlumn("Process ID");
- addComlumn("Process Name");
- addComlumn("Version");
- addComlumn("Actions");
-
- }
-
-
-}
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessWorkspace.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessWorkspace.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/ProcessWorkspace.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,49 +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.gwtext.client.core.Margins;
-import com.gwtext.client.core.RegionPosition;
-import com.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.layout.BorderLayoutData;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class ProcessWorkspace extends Workspace
-{
- public final static String ID = "org.jboss.bpm.ProcessWorkspace";
-
- public ProcessWorkspace(String title, ConsoleView view)
- {
- super(title, view);
-
- // contents
- getNavigationPanel().setHtml("<p>Process Definitions</p>");
- getEditorPanel().setHtml("<p>List view</p>");
- }
-
- protected String getWorkspaceID()
- {
- return ID;
- }
-}
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/TaskWorkspace.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/TaskWorkspace.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/TaskWorkspace.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,45 +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;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class TaskWorkspace extends Workspace
-{
-
- public final static String ID = "org.jboss.bpm.TaskWorkspace";
-
- public TaskWorkspace(String title, ConsoleView view)
- {
- super(title, view);
-
- // contents
- getNavigationPanel().setHtml("<p>Job navigation</p>");
- getEditorPanel().setHtml("<p>Something editor pane</p>");
- }
-
- protected String getWorkspaceID()
- {
- return ID;
- }
-}
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Workspace.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Workspace.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/Workspace.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,116 +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.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.layout.FitLayout;
-import com.gwtext.client.widgets.layout.BorderLayout;
-import com.gwtext.client.widgets.layout.BorderLayoutData;
-import com.gwtext.client.core.RegionPosition;
-import com.gwtext.client.core.Margins;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public abstract class Workspace extends Panel
-{
- protected ConsoleView view;
- protected Panel borderPanel = new Panel();
- protected String title;
-
- private Panel navigationPanel;
- private Panel editorPanel;
-
- private boolean dirty;
-
- public Workspace(String title, ConsoleView view)
- {
- super();
- setId( getWorkspaceID() );
-
- this.view = view;
- this.title = title;
-
- this.setBorder(false);
- this.setPaddings(0);
- this.setLayout(new FitLayout());
-
- borderPanel.setLayout(new BorderLayout());
-
- // -----------------------------------------------
-
- //add west panel
- navigationPanel = new Panel();
- navigationPanel.setTitle(title);
- navigationPanel.setBodyStyle("background-color:EEEEEE");
- navigationPanel.setCollapsible(true);
- navigationPanel.setWidth(200);
-
- BorderLayoutData navigationLayoutData = new BorderLayoutData(RegionPosition.WEST);
- navigationLayoutData.setSplit(true);
- navigationLayoutData.setMinSize(175);
- navigationLayoutData.setMaxSize(400);
- navigationLayoutData.setMargins(new Margins(0, 5, 0, 0));
-
- borderPanel.add(navigationPanel, navigationLayoutData);
-
- // -----------------------------------------------
-
- // center panel
- editorPanel = new Panel();
- editorPanel.setHeader(false);
- editorPanel.setBodyStyle("background-color:EEEEEE");
-
- BorderLayoutData editorLayoutData = new BorderLayoutData(RegionPosition.CENTER);
- borderPanel.add(editorPanel, editorLayoutData);
-
- this.add(borderPanel);
-
- }
-
- protected abstract String getWorkspaceID();
-
- public String getTitle()
- {
- return title;
- }
-
- public boolean isDirty()
- {
- return dirty;
- }
-
- protected void setDirty(boolean dirty)
- {
- this.dirty = dirty;
- }
-
- protected Panel getNavigationPanel()
- {
- return navigationPanel;
- }
-
- protected Panel getEditorPanel()
- {
- return editorPanel;
- }
-}
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/WorkspaceManager.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/WorkspaceManager.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/WorkspaceManager.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,67 +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.gwtext.client.widgets.Panel;
-import com.gwtext.client.widgets.TabPanel;
-import com.gwtext.client.widgets.layout.FitLayout;
-
-import java.util.HashMap;
-import java.util.Map;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class WorkspaceManager extends TabPanel
-{
- private Map workspaces = new HashMap();
-
- public WorkspaceManager()
- {
- super();
-
- this.setResizeTabs(true);
- this.setMinTabWidth(115);
- this.setTabWidth(135);
- this.setEnableTabScroll(true);
- this.setWidth("100%");
- this.setHeight("100%");
- this.setActiveTab(0);
- }
-
- private Panel addTab(String title) {
- Panel tab = new Panel();
- tab.setAutoScroll(true);
- tab.setTitle(title);
- tab.setClosable(false);
- tab.setLayout(new FitLayout());
- this.add(tab);
- return tab;
- }
-
- public void addWorkspace(Workspace workspace)
- {
- workspaces.put(workspace.getWorkspaceID(), workspace);
- Panel tab = addTab(workspace.getTitle());
- tab.add(workspace);
- }
-}
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,38 @@
+/*
+ * 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.model;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DAOFactory
+{
+ public static ProcessDefinitionDAO createProcessDefinitionDAO()
+ {
+ return new MockProcessDefinitionDAO();
+ }
+
+ public static ProcessInstanceDAO createProcessInstanceDAO()
+ {
+ return new MockProcessInstanceDAO();
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/DAOFactory.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefDAO.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefDAO.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefDAO.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,36 +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.model;
-
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class MockProcessDefDAO implements ProcessDefDAO
-{
-
- public List getAllProcessDefinitions()
- {
- return null;
- }
-}
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefinitionDAO.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefinitionDAO.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefinitionDAO.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,45 @@
+/*
+ * 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.model;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class MockProcessDefinitionDAO implements ProcessDefinitionDAO
+{
+ final static List defs = new ArrayList();
+ 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", "1"));
+ }
+
+ public List getAllProcessDefinitions()
+ {
+ return defs;
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessDefinitionDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessInstanceDAO.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessInstanceDAO.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessInstanceDAO.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,50 @@
+/*
+ * 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.model;
+
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class MockProcessInstanceDAO implements ProcessInstanceDAO
+{
+
+ 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(), null));
+ instances.add( new ProcessInstance(4, -1, "Ended", new Date(System.currentTimeMillis()-(1000*60*60)), null));
+ instances.add( new ProcessInstance(5, -1, "Suspended", new Date(System.currentTimeMillis()-(1000*60*90)), null));
+ instances.add( new ProcessInstance(6, -1, "Running", new Date(), null));
+ instances.add( new ProcessInstance(7, -1, "Running", new Date(), null));
+ }
+
+
+ public List getInstanceByProcessDefinitionId(long id)
+ {
+ return instances;
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/MockProcessInstanceDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ObjectFactory.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ObjectFactory.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ObjectFactory.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,33 +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.model;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class ObjectFactory
-{
- public ProcessDefDAO createProcessDefDAO()
- {
- return new MockProcessDefDAO();
- }
-}
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefDAO.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefDAO.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefDAO.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,32 +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.model;
-
-import java.util.List;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public interface ProcessDefDAO
-{
- List getAllProcessDefinitions();
-}
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,80 @@
+/*
+ * 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.model;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessDefinition
+{
+ private long Id;
+ private String name;
+ private String version;
+
+
+ public ProcessDefinition()
+ {
+ }
+
+ public ProcessDefinition(long id, String name, String version)
+ {
+ this.Id = id;
+ this.name = name;
+ this.version = version;
+ }
+
+ public long getId()
+ {
+ return Id;
+ }
+
+ public void setId(long id)
+ {
+ Id = id;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public String getVersion()
+ {
+ return version;
+ }
+
+ public void setVersion(String version)
+ {
+ this.version = version;
+ }
+
+
+ public String toString()
+ {
+ return "ProcessDefinition{id="+this.Id+", name="+this.name+"}";
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,32 @@
+/*
+ * 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.model;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface ProcessDefinitionDAO
+{
+ List getAllProcessDefinitions();
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessDefinitionDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,111 @@
+/*
+ * 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.model;
+
+import java.util.Date;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessInstance
+{
+ private long Id;
+ private long parentId;
+
+ private String key;
+ private String status;
+ private Date startDate;
+ private Date endDate;
+
+ public ProcessInstance()
+ {
+ }
+
+ public ProcessInstance(long id, long parentId, String status, Date startDate, Date endDate)
+ {
+ this.Id = id;
+ this.parentId = parentId;
+ this.status = status;
+ this.startDate = startDate;
+ this.endDate = endDate;
+ }
+
+ public long getId()
+ {
+ return Id;
+ }
+
+ public void setId(long id)
+ {
+ Id = id;
+ }
+
+ public long getParentId()
+ {
+ return parentId;
+ }
+
+ public void setParentId(long parentId)
+ {
+ this.parentId = parentId;
+ }
+
+ public String getKey()
+ {
+ return key !=null ? key : "";
+ }
+
+ public void setKey(String key)
+ {
+ this.key = key;
+ }
+
+ public String getStatus()
+ {
+ return status;
+ }
+
+ public void setStatus(String status)
+ {
+ this.status = status;
+ }
+
+ public Date getStartDate()
+ {
+ return startDate;
+ }
+
+ public void setStartDate(Date startDate)
+ {
+ this.startDate = startDate;
+ }
+
+ public Date getEndDate()
+ {
+ return endDate;
+ }
+
+ public void setEndDate(Date endDate)
+ {
+ this.endDate = endDate;
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstance.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,32 @@
+/*
+ * 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.model;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public interface ProcessInstanceDAO
+{
+ List getInstanceByProcessDefinitionId(long id);
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/model/ProcessInstanceDAO.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,152 @@
+/*
+ * 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.process;
+
+import com.gwtext.client.data.*;
+import com.gwtext.client.widgets.MessageBox;
+import com.gwtext.client.widgets.MessageBoxConfig;
+import com.gwtext.client.widgets.grid.ColumnConfig;
+import com.gwtext.client.widgets.grid.ColumnModel;
+import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.model.DAOFactory;
+import org.jboss.bpm.console.client.model.ProcessDefinitionDAO;
+import org.jboss.bpm.console.client.model.ProcessDefinition;
+import org.jboss.bpm.console.client.widgets.ListView;
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessDefinitionList extends ListView
+{
+
+ private Map row2ProcessMap = new HashMap();
+
+ public ProcessDefinitionList(String titleName, ConsoleView view)
+ {
+ super(titleName, view);
+
+ // ----------------------------------------
+
+ final RecordDef recordDef = new RecordDef(
+ new FieldDef[]{
+ new IntegerFieldDef("processId"),
+ new StringFieldDef("name"),
+ new StringFieldDef("version")
+ }
+ );
+
+ // ----------------------------------------
+
+ final ColumnModel columnModel = new ColumnModel(
+ new ColumnConfig[]
+ {
+ new ColumnConfig("Process ID", "processId", 75, true),
+ new ColumnConfig("Name", "name", 200, true, null, "name"),
+ new ColumnConfig("Version", "version", 75, true)
+ }
+ );
+
+ grid.setColumnModel(columnModel);
+
+ // ----------------------------------------
+
+ Store store = createStore(recordDef);
+ store.load();
+ grid.setStore(store);
+
+
+ grid.setAutoExpandColumn("name");
+ grid.setAutoExpandMin(200);
+
+ }
+
+ protected void onExamine(final Integer row)
+ {
+ ProcessDefinition proc = (ProcessDefinition)row2ProcessMap.get(row);
+ ProcessInstanceList list = new ProcessInstanceList(
+ proc, "Process Instances: " + proc.getId(), view
+ );
+
+ view.addEditorView( new ProcessInstanceEditor( list ));
+ }
+
+ protected void onDelete(final Integer row)
+ {
+ System.out.println("Delete " + row);
+ MessageBox.show(new MessageBoxConfig() {
+ {
+ setTitle("Delete process?");
+ setMsg("Deleting the process will remove all instances as well. " +
+ "Would you like to delete this process?");
+ setButtons(MessageBox.YESNOCANCEL);
+ setCallback(new MessageBox.PromptCallback() {
+ public void execute(String btnID, String text)
+ {
+ // TODO: add delete operation
+ ProcessDefinition proc = (ProcessDefinition)row2ProcessMap.get(row);
+ System.out.println("Delete "+ proc +"? " + btnID);
+ }
+ });
+ }
+ });
+ }
+
+ protected final Store createStore(RecordDef recordDef)
+ {
+ MemoryProxy proxy = new MemoryProxy( getData() );
+ ArrayReader reader = new ArrayReader(recordDef);
+ Store store = new Store(proxy, reader);
+ return store;
+ }
+
+ protected Object[][] getData()
+ {
+ ProcessDefinitionDAO dao = DAOFactory.createProcessDefinitionDAO();
+ List processDefs = dao.getAllProcessDefinitions();
+
+ Object[][] records = new Object[processDefs.size()][];
+
+ Iterator it = processDefs.iterator();
+ int row = 0;
+ while(it.hasNext())
+ {
+ ProcessDefinition pd = (ProcessDefinition)it.next();
+ records[row] = new Object[3];
+ records[row][0] = new Long(pd.getId());
+ records[row][1] = pd.getName();
+ records[row][2] = pd.getVersion();
+
+ row2ProcessMap.put(new Integer(row), pd);
+
+ row++;
+ }
+
+ return records;
+ }
+
+
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessDefinitionList.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,51 @@
+/*
+ * 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.process;
+
+import org.jboss.bpm.console.client.widgets.EditorView;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessInstanceEditor extends EditorView
+{
+
+ public final static String ID = "org.jboss.bpm.process.ProcessInstanceList";
+ private String title;
+ public ProcessInstanceEditor(ProcessInstanceList instances)
+ {
+ super();
+ this.title = instances.getProcessDefinition().getName() + " Instances";
+ this.add(instances);
+ }
+
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getTitle()
+ {
+ return title;
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceEditor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,141 @@
+/*
+ * 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.process;
+
+import org.jboss.bpm.console.client.widgets.ListView;
+import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.model.*;
+import com.gwtext.client.data.*;
+import com.gwtext.client.widgets.grid.ColumnModel;
+import com.gwtext.client.widgets.grid.ColumnConfig;
+
+import java.util.List;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.HashMap;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessInstanceList extends ListView
+{
+
+ private Map row2InstanceMap = new HashMap();
+ private ProcessDefinition parent;
+
+ public ProcessInstanceList(ProcessDefinition procDef, String titleName, ConsoleView view)
+ {
+ super(titleName, view);
+ this.parent = procDef;
+
+ // ----------------------------------------
+
+ final RecordDef recordDef = new RecordDef(
+ new FieldDef[]{
+ new IntegerFieldDef("instanceId"),
+ new StringFieldDef("key"),
+ new StringFieldDef("status"),
+ new DateFieldDef("start"),
+ new DateFieldDef("end")
+ }
+ );
+
+ // ----------------------------------------
+
+ final ColumnModel columnModel = new ColumnModel(
+ new ColumnConfig[]
+ {
+ new ColumnConfig("Instance ID", "instanceId", 50, true),
+ new ColumnConfig("key", "key", 50, true),
+ new ColumnConfig("Status", "status", 100, true, null, "status"),
+ new ColumnConfig("Start Date", "start", 75, true),
+ new ColumnConfig("End Date", "end", 75, true)
+ }
+ );
+
+ grid.setColumnModel(columnModel);
+
+ // ----------------------------------------
+
+ Store store = createStore(recordDef);
+ store.load();
+ grid.setStore(store);
+
+
+ grid.setAutoExpandColumn("status");
+ grid.setAutoExpandMin(100);
+ }
+
+ ProcessDefinition getProcessDefinition()
+ {
+ return parent;
+ }
+
+ protected final Store createStore(RecordDef recordDef)
+ {
+ MemoryProxy proxy = new MemoryProxy( getData() );
+ ArrayReader reader = new ArrayReader(recordDef);
+ Store store = new Store(proxy, reader);
+ return store;
+ }
+
+ protected Object[][] getData()
+ {
+ ProcessInstanceDAO dao = DAOFactory.createProcessInstanceDAO();
+ List processDefs = dao.getInstanceByProcessDefinitionId(parent.getId());
+
+ Object[][] records = new Object[processDefs.size()][];
+
+ Iterator it = processDefs.iterator();
+ int row = 0;
+ while(it.hasNext())
+ {
+ ProcessInstance pd = (ProcessInstance)it.next();
+ records[row] = new Object[5];
+ records[row][0] = new Long(pd.getId());
+ records[row][1] = pd.getKey();
+ records[row][2] = pd.getStatus();
+ records[row][3] = pd.getStartDate();
+ records[row][4] = pd.getEndDate();
+
+ row2InstanceMap.put(new Integer(row), pd);
+
+ row++;
+ }
+
+ return records;
+ }
+
+
+
+
+
+ protected void onExamine(final Integer row)
+ {
+
+ }
+
+ protected void onDelete(final Integer row)
+ {
+
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessInstanceList.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,57 @@
+/*
+ * 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.process;
+
+import org.jboss.bpm.console.client.ConsoleView;
+import org.jboss.bpm.console.client.widgets.EditorView;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class ProcessListEditor extends EditorView
+{
+ public final static String ID = "org.jboss.bpm.process.ProcessList";
+
+ private ProcessDefinitionList processDefinitions;
+
+ private ConsoleView view;
+
+ public ProcessListEditor(ConsoleView view)
+ {
+ super();
+ this.view = view;
+
+ processDefinitions = new ProcessDefinitionList("Process Definitions", view);
+ this.add(processDefinitions);
+ }
+
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getTitle()
+ {
+ return "Process Definitions";
+ }
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/process/ProcessListEditor.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java (rev 0)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -0,0 +1,33 @@
+/*
+ * 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.widgets;
+
+import com.gwtext.client.widgets.Panel;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public abstract class EditorView extends Panel
+{
+ public abstract String getId();
+ public abstract String getTitle();
+}
Property changes on: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/EditorView.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/ListView.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,80 +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.widgets;
-
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.FlexTable;
-import com.google.gwt.user.client.ui.VerticalPanel;
-import com.google.gwt.user.client.ui.Composite;
-import org.jboss.bpm.console.client.ConsoleView;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public class ListView extends Composite
-{
- private ConsoleView view;
- private Label title;
- private FlexTable rows = new FlexTable();
-
- public ListView(String titleName, ConsoleView view)
- {
- this.view = view;
- this.title = new Label(titleName);
-
- VerticalPanel mainPanel = new VerticalPanel();
- initWidget(mainPanel);
- mainPanel.setWidth("100%");
-
- rows.setWidth("100%");
- mainPanel.add(title);
- mainPanel.add(rows);
- rows.getRowFormatter().setStyleName(0, "bpm-ListHeaderRow");
-
- }
-
- protected void addComlumn(String name)
- {
- int column = rows.getRowCount() > 0 ? rows.getCellCount(0) : 0;
- rows.setWidget(0, column, new Label(name));
- }
-
- protected void addField(int row, String value)
- {
- row = row+1;
- int column = 0;
- if(rows.getRowCount()==row)
- {
- if(row%2==0)
- rows.getRowFormatter().setStyleName(row, "bpm-EvenRow");
- }
- else
- {
- column = rows.getCellCount(row);
- }
-
- Label fieldValue = new Label(value);
- fieldValue.setStyleName("bpm-FieldValue");
- rows.setWidget(row, column, fieldValue);
- }
-
-}
Deleted: jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/LoadingPanel.java
===================================================================
--- jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/LoadingPanel.java 2008-08-04 09:45:46 UTC (rev 1815)
+++ jbossbpm/impl/jbpm3/trunk/modules/gwt-console/war/src/main/java/org/jboss/bpm/console/client/widgets/LoadingPanel.java 2008-08-04 10:34:26 UTC (rev 1816)
@@ -1,39 +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.widgets;
-
-import com.google.gwt.user.client.ui.Composite;
-import com.google.gwt.user.client.ui.Label;
-
-/**
- * @author Heiko.Braun <heiko.braun(a)jboss.com>
- */
-public final class LoadingPanel extends Composite
-{
- private Label label;
-
- public LoadingPanel(Label label)
- {
- this.label = label;
- initWidget(label);
- }
-}
17 years, 9 months
JBoss JBPM SVN: r1815 - jbossbpm/spec/trunk/docs/VioletUML.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-04 05:45:46 -0400 (Mon, 04 Aug 2008)
New Revision: 1815
Added:
jbossbpm/spec/trunk/docs/VioletUML/APIGateway.png
jbossbpm/spec/trunk/docs/VioletUML/APISupportingElement.class.violet
jbossbpm/spec/trunk/docs/VioletUML/APISupportingElement.png
Modified:
jbossbpm/spec/trunk/docs/VioletUML/APIActivity.class.violet
jbossbpm/spec/trunk/docs/VioletUML/APIClient.class.violet
jbossbpm/spec/trunk/docs/VioletUML/APIClient.png
jbossbpm/spec/trunk/docs/VioletUML/APIEvent.class.violet
jbossbpm/spec/trunk/docs/VioletUML/APIEvent.png
jbossbpm/spec/trunk/docs/VioletUML/APIGateway.class.violet
jbossbpm/spec/trunk/docs/VioletUML/APIModel.class.violet
jbossbpm/spec/trunk/docs/VioletUML/APIModel.png
Log:
Sync UML diagrams
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIActivity.class.violet
===================================================================
--- jbossbpm/spec/trunk/docs/VioletUML/APIActivity.class.violet 2008-08-04 09:12:39 UTC (rev 1814)
+++ jbossbpm/spec/trunk/docs/VioletUML/APIActivity.class.violet 2008-08-04 09:45:46 UTC (rev 1815)
@@ -16,8 +16,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>334.0</double>
- <double>20.0</double>
+ <double>512.0</double>
+ <double>21.0</double>
</void>
</object>
</void>
@@ -45,8 +45,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>507.0</double>
- <double>18.0</double>
+ <double>496.0</double>
+ <double>138.0</double>
</void>
</object>
</void>
@@ -65,8 +65,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>26.0</double>
- <double>24.0</double>
+ <double>134.0</double>
+ <double>23.0</double>
</void>
</object>
</void>
@@ -80,8 +80,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>182.0</double>
- <double>17.0</double>
+ <double>327.0</double>
+ <double>15.0</double>
</void>
</object>
</void>
@@ -110,8 +110,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>529.0</double>
- <double>256.0</double>
+ <double>518.0</double>
+ <double>376.0</double>
</void>
</object>
</void>
@@ -284,8 +284,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>443.0</double>
- <double>348.0</double>
+ <double>432.0</double>
+ <double>468.0</double>
</void>
</object>
</void>
@@ -305,8 +305,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>443.0</double>
- <double>464.0</double>
+ <double>432.0</double>
+ <double>584.0</double>
</void>
</object>
</void>
@@ -327,8 +327,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>619.0</double>
- <double>342.0</double>
+ <double>608.0</double>
+ <double>462.0</double>
</void>
</object>
</void>
@@ -350,8 +350,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>618.0</double>
- <double>436.0</double>
+ <double>607.0</double>
+ <double>556.0</double>
</void>
</object>
</void>
@@ -373,15 +373,15 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>615.0</double>
- <double>563.0</double>
+ <double>604.0</double>
+ <double>683.0</double>
</void>
</object>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ <object class="com.horstmann.violet.BentStyle" field="HVH"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIClient.class.violet
===================================================================
--- jbossbpm/spec/trunk/docs/VioletUML/APIClient.class.violet 2008-08-04 09:12:39 UTC (rev 1814)
+++ jbossbpm/spec/trunk/docs/VioletUML/APIClient.class.violet 2008-08-04 09:45:46 UTC (rev 1815)
@@ -17,8 +17,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>462.0</double>
- <double>48.0</double>
+ <double>662.0</double>
+ <double>157.0</double>
</void>
</object>
</void>
@@ -38,8 +38,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>12.0</double>
- <double>161.0</double>
+ <double>307.0</double>
+ <double>23.0</double>
</void>
</object>
</void>
@@ -60,8 +60,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>251.0</double>
- <double>30.0</double>
+ <double>465.0</double>
+ <double>187.0</double>
</void>
</object>
</void>
@@ -75,8 +75,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>622.0</double>
- <double>54.0</double>
+ <double>828.0</double>
+ <double>164.0</double>
</void>
</object>
</void>
@@ -97,8 +97,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>253.0</double>
- <double>260.0</double>
+ <double>170.0</double>
+ <double>370.0</double>
</void>
</object>
</void>
@@ -117,8 +117,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>248.0</double>
- <double>404.0</double>
+ <double>9.0</double>
+ <double>389.0</double>
</void>
</object>
</void>
@@ -126,9 +126,9 @@
<object id="ClassNode6" class="com.horstmann.violet.ClassNode">
<void property="attributes">
<void property="text">
- <string>flowObject
+ <string>type
message
-type
+fromRef
</string>
</void>
</void>
@@ -140,8 +140,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>404.0</double>
- <double>264.0</double>
+ <double>8.0</double>
+ <double>495.0</double>
</void>
</object>
</void>
@@ -161,15 +161,102 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>247.0</double>
- <double>169.0</double>
+ <double>157.0</double>
+ <double>155.0</double>
</void>
</object>
</void>
+ <void method="addNode">
+ <object id="ClassNode8" class="com.horstmann.violet.ClassNode">
+ <void property="methods">
+ <void property="text">
+ <string>addListener
+removeListener
+sendMessage</string>
+ </void>
+ </void>
+ <void property="name">
+ <void property="text">
+ <string>MessageManager</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>468.0</double>
+ <double>368.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode9" class="com.horstmann.violet.ClassNode">
+ <void property="methods">
+ <void property="text">
+ <string>getListenerID
+catchMessage</string>
+ </void>
+ </void>
+ <void property="name">
+ <void property="text">
+ <string>MessageListener</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>664.0</double>
+ <double>382.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode10" class="com.horstmann.violet.ClassNode">
+ <void property="attributes">
+ <void property="text">
+ <string>name
+fromRef
+toRef</string>
+ </void>
+ </void>
+ <void property="name">
+ <void property="text">
+ <string>Message</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>672.0</double>
+ <double>494.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode11" class="com.horstmann.violet.ClassNode">
+ <void property="attributes">
+ <void property="text">
+ <string>namespaceURI
+createProcess
+marshallProcess</string>
+ </void>
+ </void>
+ <void property="name">
+ <void property="text">
+ <string>DialectHandler</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>661.0</double>
+ <double>246.0</double>
+ </void>
+ </object>
+ </void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ <object class="com.horstmann.violet.BentStyle" field="VH"/>
</void>
<void property="startArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/>
@@ -211,7 +298,7 @@
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ <object class="com.horstmann.violet.BentStyle" field="VH"/>
</void>
<void property="startArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/>
@@ -238,29 +325,80 @@
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ <object class="com.horstmann.violet.BentStyle" field="VH"/>
</void>
+ <void property="startArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/>
+ </void>
+ </object>
+ <object idref="ClassNode1"/>
+ <object idref="ClassNode7"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ </void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="V"/>
</void>
- <void property="lineStyle">
- <object class="com.horstmann.violet.LineStyle" field="DOTTED"/>
+ <void property="endLabel">
+ <string>0..*</string>
</void>
</object>
- <object idref="ClassNode4"/>
- <object idref="ClassNode6"/>
+ <object idref="ClassNode8"/>
+ <object idref="ClassNode9"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ <object class="com.horstmann.violet.BentStyle" field="VH"/>
</void>
<void property="startArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="DIAMOND"/>
</void>
</object>
<object idref="ClassNode1"/>
- <object idref="ClassNode7"/>
+ <object idref="ClassNode8"/>
</void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="V"/>
+ </void>
+ <void property="endLabel">
+ <string>1..*</string>
+ </void>
+ </object>
+ <object idref="ClassNode2"/>
+ <object idref="ClassNode11"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="V"/>
+ </void>
+ </object>
+ <object idref="ClassNode9"/>
+ <object idref="ClassNode10"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="V"/>
+ </void>
+ </object>
+ <object idref="ClassNode5"/>
+ <object idref="ClassNode6"/>
+ </void>
</object>
</java>
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIClient.png
===================================================================
(Binary files differ)
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIEvent.class.violet
===================================================================
--- jbossbpm/spec/trunk/docs/VioletUML/APIEvent.class.violet 2008-08-04 09:12:39 UTC (rev 1814)
+++ jbossbpm/spec/trunk/docs/VioletUML/APIEvent.class.violet 2008-08-04 09:45:46 UTC (rev 1815)
@@ -16,8 +16,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>331.0</double>
- <double>19.0</double>
+ <double>490.0</double>
+ <double>26.0</double>
</void>
</object>
</void>
@@ -31,8 +31,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>507.0</double>
- <double>18.0</double>
+ <double>492.0</double>
+ <double>205.0</double>
</void>
</object>
</void>
@@ -51,8 +51,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>24.0</double>
- <double>19.0</double>
+ <double>96.0</double>
+ <double>33.0</double>
</void>
</object>
</void>
@@ -66,8 +66,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>182.0</double>
- <double>17.0</double>
+ <double>306.0</double>
+ <double>33.0</double>
</void>
</object>
</void>
@@ -102,8 +102,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>355.0</double>
- <double>147.0</double>
+ <double>340.0</double>
+ <double>334.0</double>
</void>
</object>
</void>
@@ -125,8 +125,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>492.0</double>
- <double>145.0</double>
+ <double>477.0</double>
+ <double>332.0</double>
</void>
</object>
</void>
@@ -146,8 +146,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>664.0</double>
- <double>148.0</double>
+ <double>649.0</double>
+ <double>335.0</double>
</void>
</object>
</void>
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIEvent.png
===================================================================
(Binary files differ)
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIGateway.class.violet
===================================================================
--- jbossbpm/spec/trunk/docs/VioletUML/APIGateway.class.violet 2008-08-04 09:12:39 UTC (rev 1814)
+++ jbossbpm/spec/trunk/docs/VioletUML/APIGateway.class.violet 2008-08-04 09:45:46 UTC (rev 1815)
@@ -11,140 +11,16 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>374.0</double>
- <double>186.0</double>
+ <double>469.0</double>
+ <double>31.0</double>
</void>
</object>
</void>
<void method="addNode">
<object id="ClassNode1" class="com.horstmann.violet.ClassNode">
- <void property="methods">
- <void property="text">
- <string>startProcess</string>
- </void>
- </void>
- <void property="name">
- <void property="text">
- <string>Process
-</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>290.0</double>
- <double>417.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode2" class="com.horstmann.violet.ClassNode">
- <void property="methods">
- <void property="text">
- <string>execute</string>
- </void>
- </void>
- <void property="name">
- <void property="text">
- <string>Event</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>218.0</double>
- <double>294.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode3" class="com.horstmann.violet.ClassNode">
<void property="attributes">
<void property="text">
- <string>outFlow</string>
- </void>
- </void>
- <void property="name">
- <void property="text">
- <string>StartEvent</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>55.0</double>
- <double>390.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode4" class="com.horstmann.violet.ClassNode">
- <void property="attributes">
- <void property="text">
<string>name
-inFlow
-outFlow</string>
- </void>
- </void>
- <void property="name">
- <void property="text">
- <string>IntermediateEvent</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>12.0</double>
- <double>101.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode5" class="com.horstmann.violet.ClassNode">
- <void property="attributes">
- <void property="text">
- <string>name
-inFlow</string>
- </void>
- </void>
- <void property="name">
- <void property="text">
- <string>EndEvent</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>49.0</double>
- <double>483.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode6" class="com.horstmann.violet.ClassNode">
- <void property="attributes">
- <void property="text">
- <string>name</string>
- </void>
- </void>
- <void property="name">
- <void property="text">
- <string>Activity</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>373.0</double>
- <double>296.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode7" class="com.horstmann.violet.ClassNode">
- <void property="attributes">
- <void property="text">
- <string>name
inFlows
outFlows</string>
</void>
@@ -163,82 +39,28 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>519.0</double>
- <double>299.0</double>
+ <double>466.0</double>
+ <double>160.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode8" class="com.horstmann.violet.ClassNode">
- <void property="attributes">
- <void property="text">
- <string>parent
-inFlow
-outFlow</string>
- </void>
- </void>
- <void property="methods">
- <void property="text">
- <string>execute</string>
- </void>
- </void>
+ <object id="ClassNode2" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
- <string>SubProcess
-</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>294.0</double>
- <double>522.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode9" class="com.horstmann.violet.ClassNode">
- <void property="attributes">
- <void property="text">
- <string>inFlow
-outFlow</string>
- </void>
- </void>
- <void property="methods">
- <void property="text">
- <string>execute</string>
- </void>
- </void>
- <void property="name">
- <void property="text">
- <string>Task</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>446.0</double>
- <double>415.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode10" class="com.horstmann.violet.ClassNode">
- <void property="name">
- <void property="text">
<string>ExclusiveGateway</string>
</void>
</void>
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>666.0</double>
- <double>403.0</double>
+ <double>338.0</double>
+ <double>326.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode11" class="com.horstmann.violet.ClassNode">
+ <object id="ClassNode3" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
<string>InclusiveGateway</string>
@@ -247,13 +69,13 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>659.0</double>
- <double>472.0</double>
+ <double>570.0</double>
+ <double>334.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode12" class="com.horstmann.violet.ClassNode">
+ <object id="ClassNode4" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
<string>ComplexGateway</string>
@@ -262,13 +84,13 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>659.0</double>
- <double>542.0</double>
+ <double>341.0</double>
+ <double>433.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode13" class="com.horstmann.violet.ClassNode">
+ <object id="ClassNode5" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
<string>ParallelGateway</string>
@@ -277,43 +99,13 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>662.0</double>
- <double>612.0</double>
+ <double>574.0</double>
+ <double>434.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode14" class="com.horstmann.violet.ClassNode">
- <void property="name">
- <void property="text">
- <string>Result</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>48.0</double>
- <double>587.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode15" class="com.horstmann.violet.ClassNode">
- <void property="name">
- <void property="text">
- <string>Attachments</string>
- </void>
- </void>
- </object>
- <object class="java.awt.geom.Point2D$Double">
- <void method="setLocation">
- <double>56.0</double>
- <double>661.0</double>
- </void>
- </object>
- </void>
- <void method="addNode">
- <object id="ClassNode16" class="com.horstmann.violet.ClassNode">
+ <object id="ClassNode6" class="com.horstmann.violet.ClassNode">
<void property="attributes">
<void property="text">
<string>ID</string>
@@ -327,13 +119,13 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>362.0</double>
- <double>6.0</double>
+ <double>145.0</double>
+ <double>31.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode17" class="com.horstmann.violet.ClassNode">
+ <object id="ClassNode7" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
<string>GraphElement</string>
@@ -342,13 +134,13 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>252.0</double>
- <double>90.0</double>
+ <double>323.0</double>
+ <double>28.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode18" class="com.horstmann.violet.ClassNode">
+ <object id="ClassNode8" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
<string>SupportElement</string>
@@ -357,13 +149,13 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>425.0</double>
- <double>88.0</double>
+ <double>137.0</double>
+ <double>226.0</double>
</void>
</object>
</void>
<void method="addNode">
- <object id="ClassNode19" class="com.horstmann.violet.ClassNode">
+ <object id="ClassNode9" class="com.horstmann.violet.ClassNode">
<void property="attributes">
<void property="text">
<string>name
@@ -387,93 +179,69 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>623.0</double>
- <double>67.0</double>
+ <double>146.0</double>
+ <double>385.0</double>
</void>
</object>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
- <object idref="ClassNode3"/>
- <object idref="ClassNode2"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
<object class="com.horstmann.violet.BentStyle" field="VHV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode2"/>
+ <object idref="ClassNode1"/>
<object idref="ClassNode0"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode4"/>
<object idref="ClassNode2"/>
+ <object idref="ClassNode1"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode5"/>
- <object idref="ClassNode2"/>
+ <object idref="ClassNode3"/>
+ <object idref="ClassNode1"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="VHV"/>
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode7"/>
- <object idref="ClassNode0"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="VHV"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
+ <object idref="ClassNode4"/>
<object idref="ClassNode1"/>
- <object idref="ClassNode6"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="VHV"/>
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode8"/>
+ <object idref="ClassNode5"/>
<object idref="ClassNode1"/>
</void>
<void method="connect">
@@ -485,92 +253,20 @@
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode9"/>
+ <object idref="ClassNode7"/>
<object idref="ClassNode6"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
<void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
- <object idref="ClassNode10"/>
- <object idref="ClassNode7"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
- <object idref="ClassNode11"/>
- <object idref="ClassNode7"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
- <object idref="ClassNode12"/>
- <object idref="ClassNode7"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
- <object idref="ClassNode13"/>
- <object idref="ClassNode7"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="V"/>
- </void>
- </object>
- <object idref="ClassNode5"/>
- <object idref="ClassNode14"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="HVH"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="V"/>
- </void>
- </object>
- <object idref="ClassNode14"/>
- <object idref="ClassNode15"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
<object class="com.horstmann.violet.BentStyle" field="VHV"/>
</void>
<void property="endArrowHead">
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
+ <object idref="ClassNode8"/>
<object idref="ClassNode6"/>
- <object idref="ClassNode0"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
@@ -581,32 +277,8 @@
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode17"/>
- <object idref="ClassNode16"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="VHV"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
- <object idref="ClassNode18"/>
- <object idref="ClassNode16"/>
- </void>
- <void method="connect">
- <object class="com.horstmann.violet.ClassRelationshipEdge">
- <void property="bentStyle">
- <object class="com.horstmann.violet.BentStyle" field="VHV"/>
- </void>
- <void property="endArrowHead">
- <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
- </void>
- </object>
<object idref="ClassNode0"/>
- <object idref="ClassNode17"/>
+ <object idref="ClassNode7"/>
</void>
<void method="connect">
<object class="com.horstmann.violet.ClassRelationshipEdge">
@@ -617,8 +289,8 @@
<object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
</void>
</object>
- <object idref="ClassNode19"/>
- <object idref="ClassNode18"/>
+ <object idref="ClassNode9"/>
+ <object idref="ClassNode8"/>
</void>
</object>
</java>
Added: jbossbpm/spec/trunk/docs/VioletUML/APIGateway.png
===================================================================
(Binary files differ)
Property changes on: jbossbpm/spec/trunk/docs/VioletUML/APIGateway.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIModel.class.violet
===================================================================
--- jbossbpm/spec/trunk/docs/VioletUML/APIModel.class.violet 2008-08-04 09:12:39 UTC (rev 1814)
+++ jbossbpm/spec/trunk/docs/VioletUML/APIModel.class.violet 2008-08-04 09:45:46 UTC (rev 1815)
@@ -91,7 +91,7 @@
<object id="ClassNode5" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
- <string>GraphElement</string>
+ <string>GraphicalElement</string>
</void>
</void>
</object>
@@ -106,7 +106,7 @@
<object id="ClassNode6" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
- <string>SupportElement</string>
+ <string>SupportingElement</string>
</void>
</void>
</object>
@@ -119,15 +119,6 @@
</void>
<void method="addNode">
<object id="ClassNode7" class="com.horstmann.violet.ClassNode">
- <void property="attributes">
- <void property="text">
- <string>name
-status
-properties
-InputSets
-OutputSets</string>
- </void>
- </void>
<void property="name">
<void property="text">
<string>Process
@@ -137,8 +128,8 @@
</object>
<object class="java.awt.geom.Point2D$Double">
<void method="setLocation">
- <double>65.0</double>
- <double>81.0</double>
+ <double>74.0</double>
+ <double>106.0</double>
</void>
</object>
</void>
@@ -146,7 +137,7 @@
<object id="ClassNode8" class="com.horstmann.violet.ClassNode">
<void property="name">
<void property="text">
- <string>Flow</string>
+ <string>ConnectingObject</string>
</void>
</void>
</object>
Modified: jbossbpm/spec/trunk/docs/VioletUML/APIModel.png
===================================================================
(Binary files differ)
Added: jbossbpm/spec/trunk/docs/VioletUML/APISupportingElement.class.violet
===================================================================
--- jbossbpm/spec/trunk/docs/VioletUML/APISupportingElement.class.violet (rev 0)
+++ jbossbpm/spec/trunk/docs/VioletUML/APISupportingElement.class.violet 2008-08-04 09:45:46 UTC (rev 1815)
@@ -0,0 +1,374 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<java version="1.6.0_06" class="java.beans.XMLDecoder">
+ <object class="com.horstmann.violet.ClassDiagramGraph">
+ <void method="addNode">
+ <object id="ClassNode0" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>SupportingElement</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>160.0</double>
+ <double>9.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode1" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Process
+</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>336.0</double>
+ <double>488.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode2" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Assignment</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>12.0</double>
+ <double>89.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode3" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Condition</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>8.0</double>
+ <double>166.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode4" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Entity</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>14.0</double>
+ <double>247.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode5" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>EventDetail
+</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>14.0</double>
+ <double>334.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode6" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Expression</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>8.0</double>
+ <double>409.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode7" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Gate</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>11.0</double>
+ <double>486.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode8" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>InputSet
+</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>339.0</double>
+ <double>92.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode9" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>OutputSet</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>343.0</double>
+ <double>247.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode10" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Message</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>335.0</double>
+ <double>167.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode11" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Participant</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>343.0</double>
+ <double>332.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode12" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Property</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>338.0</double>
+ <double>409.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="addNode">
+ <object id="ClassNode13" class="com.horstmann.violet.ClassNode">
+ <void property="name">
+ <void property="text">
+ <string>Role</string>
+ </void>
+ </void>
+ </object>
+ <object class="java.awt.geom.Point2D$Double">
+ <void method="setLocation">
+ <double>335.0</double>
+ <double>567.0</double>
+ </void>
+ </object>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode1"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode2"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode4"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode3"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode5"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode6"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode7"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode8"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode9"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode10"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode11"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode12"/>
+ <object idref="ClassNode0"/>
+ </void>
+ <void method="connect">
+ <object class="com.horstmann.violet.ClassRelationshipEdge">
+ <void property="bentStyle">
+ <object class="com.horstmann.violet.BentStyle" field="HV"/>
+ </void>
+ <void property="endArrowHead">
+ <object class="com.horstmann.violet.ArrowHead" field="TRIANGLE"/>
+ </void>
+ </object>
+ <object idref="ClassNode13"/>
+ <object idref="ClassNode0"/>
+ </void>
+ </object>
+</java>
Added: jbossbpm/spec/trunk/docs/VioletUML/APISupportingElement.png
===================================================================
(Binary files differ)
Property changes on: jbossbpm/spec/trunk/docs/VioletUML/APISupportingElement.png
___________________________________________________________________
Name: svn:mime-type
+ application/octet-stream
17 years, 9 months
JBoss JBPM SVN: r1814 - jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-04 05:12:39 -0400 (Mon, 04 Aug 2008)
New Revision: 1814
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
Log:
javadoc
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-08-04 08:15:02 UTC (rev 1813)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-08-04 09:12:39 UTC (rev 1814)
@@ -33,6 +33,7 @@
import org.jboss.bpm.model.Event;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Message;
+import org.jboss.bpm.model.Participant;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Task;
@@ -40,7 +41,7 @@
* The ProcessEngine sends mesages through the MessageManager.
* <p/>
* A {@link Message} has an ID and is targeted to a
- * specific {@limk Participant}. A component can register a {@link MessageListener} with the MessageManager.
+ * specific {@link Participant}. A component can register a {@link MessageListener} with the MessageManager.
*
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
17 years, 9 months
JBoss JBPM SVN: r1813 - in jbossbpm/spec/trunk: modules/api/src/main/java/org/jboss/bpm/client and 8 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-04 04:15:02 -0400 (Mon, 04 Aug 2008)
New Revision: 1813
Added:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConnectingObject.java
Removed:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
Modified:
jbossbpm/spec/trunk/.project
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
jbossbpm/spec/trunk/modules/dialects/.classpath
jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessMarshaller.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowSchedulerImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleInFlowSetterSupport.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleOutFlowSetterSupport.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleInFlowSetterSupport.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleOutFlowSetterSupport.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java
jbossbpm/spec/trunk/modules/samples/airticket/.classpath
Log:
Flow -> ConnectingObject
Modified: jbossbpm/spec/trunk/.project
===================================================================
--- jbossbpm/spec/trunk/.project 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/.project 2008-08-04 08:15:02 UTC (rev 1813)
@@ -11,12 +11,12 @@
</arguments>
</buildCommand>
<buildCommand>
- <name>org.maven.ide.eclipse.maven2Builder</name>
+ <name>org.eclipse.stp.bpmn.validation.BatchValidationBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
- <name>org.eclipse.stp.bpmn.validation.BatchValidationBuilder</name>
+ <name>org.maven.ide.eclipse.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -30,6 +30,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.model.Event;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Message;
import org.jboss.bpm.model.Process;
Copied: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConnectingObject.java (from rev 1811, jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java)
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConnectingObject.java (rev 0)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ConnectingObject.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.bpm.model;
+
+//$Id$
+
+/**
+ * There are two ways of Connecting Objects in BPMN: a Flow, either sequence or message, and an Association. Sequence
+ * Flow and Message Flow, to a certain extent, represent orthogonal aspects of the business processes depicted in a model,
+ * although they both affect the performance of activities within a Process.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 08-Jul-2008
+ */
+public interface ConnectingObject extends GraphicalElement
+{
+ /**
+ * Name is an optional attribute that is text description of the Connecting Object.
+ */
+ String getName();
+
+ /**
+ * SourceRef is an attribute that identifies which Graphical Element the Connecting
+ * Object is connected from. Note: there are restrictions as to what objects Sequence
+ * Flow and Message Flow can connect.
+ */
+ GraphicalElement getSourceRef();
+
+ /**
+ * TargetRef is an attribute that identifies which Graphical Element the Connecting
+ * Object is connected to. Note: there are restrictions as to what objects Sequence
+ * Flow and Message Flow can connect.
+ */
+ GraphicalElement getTargetRef();
+
+ /**
+ * Get the required target name
+ */
+ String getTargetName();
+}
\ No newline at end of file
Deleted: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Flow.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -1,59 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.bpm.model;
-
-//$Id$
-
-/**
- * There are two ways of Connecting Objects in BPMN: a Flow, either sequence or message, and an Association. Sequence
- * Flow and Message Flow, to a certain extent, represent orthogonal aspects of the business processes depicted in a model,
- * although they both affect the performance of activities within a Process.
- *
- * @author thomas.diesler(a)jboss.com
- * @since 08-Jul-2008
- */
-public interface Flow extends GraphicalElement
-{
- /**
- * Name is an optional attribute that is text description of the Connecting Object.
- */
- String getName();
-
- /**
- * SourceRef is an attribute that identifies which Graphical Element the Connecting
- * Object is connected from. Note: there are restrictions as to what objects Sequence
- * Flow and Message Flow can connect.
- */
- GraphicalElement getSourceRef();
-
- /**
- * TargetRef is an attribute that identifies which Graphical Element the Connecting
- * Object is connected to. Note: there are restrictions as to what objects Sequence
- * Flow and Message Flow can connect.
- */
- GraphicalElement getTargetRef();
-
- /**
- * Get the required target name
- */
- String getTargetName();
-}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/IntermediateEvent.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -26,7 +26,7 @@
/**
* An Intermediate Event is an {@link Event} that occurs after a {@link Process} has been started.
* <p/>
- * It will affect the {@link Flow} of the {@link Process}, but will not start or (directly) terminate
+ * It will affect the {@link ConnectingObject} of the {@link Process}, but will not start or (directly) terminate
* the {@link Process}. An Intermediate Event will show where messages or delays are expected within the {@link Process},
* disrupt the Normal Flow through exception handling, or show the extra flow required for compensating a transaction.
*
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MessageFlow.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -33,7 +33,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public interface MessageFlow extends Flow
+public interface MessageFlow extends ConnectingObject
{
/**
* MessageRef is an optional attribute that identifies the Message that is being sent.
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleInFlowSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -26,7 +26,7 @@
//$Id$
/**
- * Implementing {@link FlowObject}s support multiple incomming {@link Flow}s.
+ * Implementing {@link FlowObject}s support multiple incomming {@link ConnectingObject}s.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -36,5 +36,5 @@
/**
* Get the list of in flows
*/
- List<Flow> getInFlows();
+ List<ConnectingObject> getInFlows();
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/MultipleOutFlowSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -26,7 +26,7 @@
//$Id$
/**
- * Implementing {@link FlowObject} support multiple outgoing {@link Flow}.
+ * Implementing {@link FlowObject} support multiple outgoing {@link ConnectingObject}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -36,5 +36,5 @@
/**
* Get the list of out flows
*/
- List<Flow> getOutFlows();
+ List<ConnectingObject> getOutFlows();
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -24,9 +24,10 @@
//$Id$
/**
- * A Participant, which is used in the definition of attributes for a {@link Pool}, {@link Message}, and {@link
- * WebService}
+ * A Participant, which is used in the definition of attributes for a Pool, {@link Message}, and WebService
*
+ * TODO: Add javadoc links for Pool, WebService
+ *
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
*/
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SequenceFlow.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -33,7 +33,7 @@
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
*/
-public interface SequenceFlow extends Flow
+public interface SequenceFlow extends ConnectingObject
{
/**
* The ConditionType
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleInFlowSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -24,7 +24,7 @@
//$Id$
/**
- * Implementing {@link FlowObject} support a single incomming {@link Flow}.
+ * Implementing {@link FlowObject} support a single incomming {@link ConnectingObject}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -34,5 +34,5 @@
/**
* Get the out flow
*/
- Flow getInFlow();
+ ConnectingObject getInFlow();
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/SingleOutFlowSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -25,7 +25,7 @@
//$Id$
/**
- * Implementing {@link FlowObject}s support a single outgoing {@link Flow}s.
+ * Implementing {@link FlowObject}s support a single outgoing {@link ConnectingObject}s.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -35,5 +35,5 @@
/**
* Get the out flow
*/
- Flow getOutFlow();
+ ConnectingObject getOutFlow();
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -21,6 +21,8 @@
*/
package org.jboss.bpm.runtime;
+import org.jboss.bpm.model.FlowObject;
+
//$Id$
/**
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -24,6 +24,7 @@
//$Id$
import org.jboss.bpm.client.ProcessEngine;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
/**
@@ -38,8 +39,8 @@
/**
* Execute the the FlowHandler.
* <p/>
- * The FlowHandler will add the active outgoing {@link Flow}s to
- * some {@link Flow} queue for the {@link ProcessEngine} to execute.
+ * The FlowHandler will add the active outgoing {@link ConnectingObject}s to
+ * some {@link ConnectingObject} queue for the {@link ProcessEngine} to execute.
*/
void execute(FlowScheduler scheduler, Token token);
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowScheduler.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -23,11 +23,11 @@
//$Id$
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
/**
* The {@link FlowHandler} invokes the FlowScheduler to schedule
- * {@link Flow} objects together with their associated {@link Token}.
+ * {@link ConnectingObject} objects together with their associated {@link Token}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -35,8 +35,8 @@
public interface FlowScheduler
{
/**
- * Schedule the given {@link Flow} and {@link Token}
+ * Schedule the given {@link ConnectingObject} and {@link Token}
* @param flow TODO
*/
- void scheduleTuple(Flow flow, Token token);
+ void scheduleTuple(ConnectingObject flow, Token token);
}
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -23,8 +23,9 @@
//$Id$
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.Process;
+import org.jboss.bpm.model.SequenceFlow;
/**
* A Token is a descriptive construct used to describe how the flow of a Process will proceed at runtime.
@@ -58,7 +59,7 @@
/**
* Get the current {@link SequenceFlow}
*/
- Flow getFlow();
+ ConnectingObject getFlow();
/**
* Create a schallow copy of this Token.
Modified: jbossbpm/spec/trunk/modules/dialects/.classpath
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/.classpath 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/dialects/.classpath 2008-08-04 08:15:02 UTC (rev 1813)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <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>
Modified: jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessMarshaller.java
===================================================================
--- jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessMarshaller.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/dialects/api10/src/main/java/org/jboss/bpm/dialect/api10/ProcessMarshaller.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -59,7 +59,7 @@
import org.jboss.bpm.model.Event;
import org.jboss.bpm.model.ExclusiveGateway;
import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
@@ -308,7 +308,7 @@
return parName;
}
- private JAXBFlow getJAXBFlow(Flow flow)
+ private JAXBFlow getJAXBFlow(ConnectingObject flow)
{
JAXBFlow jaxb;
if (flow instanceof SequenceFlow)
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/client/internal/ExecutionManagerImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -27,7 +27,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.client.ExecutionManager;
import org.jboss.bpm.client.SignalManager;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.model.Signal;
@@ -86,7 +86,7 @@
{
// Peek the head flow
Token token = flowScheduler.peekHeadTuple();
- Flow flow = token.getFlow();
+ ConnectingObject flow = token.getFlow();
// Get the target and its handlers
FlowObject target = (FlowObject)flow.getTargetRef();
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ActivityImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -31,7 +31,7 @@
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.Activity;
import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Process;
@@ -59,8 +59,8 @@
private List<OutputSet> outputSets = new ArrayList<OutputSet>();
private List<Expression> ioRules = new ArrayList<Expression>();
private List<Property> props = new ArrayList<Property>();
- private Flow inFlow;
- private Flow outFlow;
+ private ConnectingObject inFlow;
+ private ConnectingObject outFlow;
public ActivityImpl(String name)
{
@@ -163,22 +163,22 @@
props.add(prop);
}
- public Flow getInFlow()
+ public ConnectingObject getInFlow()
{
return inFlow;
}
- public void setInFlow(Flow inFlow)
+ public void setInFlow(ConnectingObject inFlow)
{
this.inFlow = inFlow;
}
- public Flow getOutFlow()
+ public ConnectingObject getOutFlow()
{
return outFlow;
}
- public void setOutFlow(Flow flow)
+ public void setOutFlow(ConnectingObject flow)
{
this.outFlow = flow;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/BPMNElementImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -28,7 +28,7 @@
import org.jboss.bpm.client.ObjectNameFactory;
import org.jboss.bpm.model.BPMNElement;
import org.jboss.bpm.model.Event;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.Gateway;
import org.jboss.bpm.model.NameSupport;
import org.jboss.bpm.model.Process;
@@ -77,7 +77,7 @@
{
str.append("type=Gateway");
}
- else if (this instanceof Flow)
+ else if (this instanceof ConnectingObject)
{
str.append("type=Flow");
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/EndEventImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -26,7 +26,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.model.EndEvent;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.Result;
import org.jboss.bpm.model.Signal;
import org.jboss.bpm.runtime.FlowHandler;
@@ -51,7 +51,7 @@
private String name;
private Result result;
- private Flow inFlow;
+ private ConnectingObject inFlow;
public EndEventImpl(String name)
{
@@ -63,7 +63,7 @@
return name;
}
- public Flow getInFlow()
+ public ConnectingObject getInFlow()
{
return inFlow;
}
@@ -71,7 +71,7 @@
/**
* Set the in flow
*/
- public void setInFlow(Flow inFlow)
+ public void setInFlow(ConnectingObject inFlow)
{
this.inFlow = inFlow;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/ExclusiveGatewayImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -29,7 +29,7 @@
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.ExclusiveGateway;
import org.jboss.bpm.model.Expression;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
import org.jboss.bpm.model.SequenceFlow;
@@ -63,7 +63,7 @@
}
@Override
- public void addInFlow(Flow inFlow)
+ public void addInFlow(ConnectingObject inFlow)
{
if (getInFlows().size() > 0)
throw new NotImplementedException("ExclusiveGateway with multiple inFlows");
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.GraphicalElement;
/**
@@ -34,7 +34,7 @@
* @since 08-Jul-2008
*/
@SuppressWarnings("serial")
-public abstract class FlowImpl extends SupportingElementImpl implements Flow
+public abstract class FlowImpl extends SupportingElementImpl implements ConnectingObject
{
private String name;
private String targetName;
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowObjectImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -23,7 +23,7 @@
import org.jboss.bpm.InvalidProcessException;
import org.jboss.bpm.NameNotUniqueException;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
@@ -121,7 +121,7 @@
}
// Initialize in/out flows
- Flow outFlow = null;
+ ConnectingObject outFlow = null;
if (this instanceof SingleOutFlowSupport)
{
SingleOutFlowSupport sof = (SingleOutFlowSupport)this;
@@ -131,7 +131,7 @@
else if (this instanceof MultipleOutFlowSupport)
{
MultipleOutFlowSupport mof = (MultipleOutFlowSupport)this;
- for (Flow flow : mof.getOutFlows())
+ for (ConnectingObject flow : mof.getOutFlows())
{
outFlow = flow;
initFlow(proc, (FlowImpl)outFlow);
@@ -147,7 +147,7 @@
}
}
- Flow inFlow = null;
+ ConnectingObject inFlow = null;
if (this instanceof SingleInFlowSupport)
{
SingleInFlowSupport sif = (SingleInFlowSupport)this;
@@ -156,7 +156,7 @@
else if (this instanceof MultipleInFlowSupport)
{
MultipleInFlowSupport mif = (MultipleInFlowSupport)this;
- for (Flow flow : mif.getInFlows())
+ for (ConnectingObject flow : mif.getInFlows())
{
inFlow = flow;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowSchedulerImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowSchedulerImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/FlowSchedulerImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -26,7 +26,7 @@
import java.util.Queue;
import java.util.concurrent.ConcurrentLinkedQueue;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.runtime.FlowHandler;
import org.jboss.bpm.runtime.MutableFlowScheduler;
import org.jboss.bpm.runtime.Token;
@@ -34,7 +34,7 @@
/**
* The {@link FlowHandler} invokes the FlowScheduler to schedule
- * {@link Flow} objects together with their associated {@link Token}.
+ * {@link ConnectingObject} objects together with their associated {@link Token}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -43,7 +43,7 @@
{
private Queue<Token> flowQueue = new ConcurrentLinkedQueue<Token>();
- public void scheduleTuple(Flow flow, Token token)
+ public void scheduleTuple(ConnectingObject flow, Token token)
{
TokenImpl tokenImpl = (TokenImpl)token;
tokenImpl.setFlow(flow);
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/GatewayImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -33,7 +33,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.Gate;
import org.jboss.bpm.model.Gateway;
import org.jboss.bpm.model.GraphicalElement;
@@ -64,11 +64,11 @@
private static final Log log = LogFactory.getLog(GatewayImpl.class);
private String name;
- protected List<Flow> inFlows = new ArrayList<Flow>();
+ protected List<ConnectingObject> inFlows = new ArrayList<ConnectingObject>();
private Map<String, Gate> gates = new LinkedHashMap<String, Gate>();
// Sync management
- private Set<Flow> outstandingFlows;
+ private Set<ConnectingObject> outstandingFlows;
private Set<Token> mergeTokens;
public GatewayImpl(String name)
@@ -92,12 +92,12 @@
gates.put(targetName, gate);
}
- public List<Flow> getInFlows()
+ public List<ConnectingObject> getInFlows()
{
return Collections.unmodifiableList(inFlows);
}
- public void addInFlow(Flow inFlow)
+ public void addInFlow(ConnectingObject inFlow)
{
this.inFlows.add(inFlow);
}
@@ -131,11 +131,11 @@
{
if (outstandingFlows == null)
{
- outstandingFlows = new HashSet<Flow>(inFlows);
+ outstandingFlows = new HashSet<ConnectingObject>(inFlows);
mergeTokens = new HashSet<Token>();
}
- Flow flow = token.getFlow();
+ ConnectingObject flow = token.getFlow();
outstandingFlows.remove(flow);
if (outstandingFlows.size() > 0)
@@ -190,7 +190,7 @@
{
// Log the list of outstanding flows
Set<String> sourceNames = new HashSet<String>();
- for (Flow flow : outstandingFlows)
+ for (ConnectingObject flow : outstandingFlows)
{
GraphicalElement sourceRef = flow.getSourceRef();
if (sourceRef instanceof NameSupport)
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/IntermediateEventImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -25,7 +25,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.IntermediateEvent;
import org.jboss.bpm.model.OutputSet;
@@ -51,8 +51,8 @@
private static final Log log = LogFactory.getLog(IntermediateEventImpl.class);
private String name;
- private Flow inFlow;
- private Flow outFlow;
+ private ConnectingObject inFlow;
+ private ConnectingObject outFlow;
public IntermediateEventImpl(String name)
{
@@ -64,22 +64,22 @@
return name;
}
- public Flow getInFlow()
+ public ConnectingObject getInFlow()
{
return inFlow;
}
- public void setInFlow(Flow inFlow)
+ public void setInFlow(ConnectingObject inFlow)
{
this.inFlow = inFlow;
}
- public Flow getOutFlow()
+ public ConnectingObject getOutFlow()
{
return outFlow;
}
- public void setOutFlow(Flow flow)
+ public void setOutFlow(ConnectingObject flow)
{
this.outFlow = flow;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleInFlowSetterSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleInFlowSetterSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleInFlowSetterSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.model.internal;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.MultipleInFlowSupport;
@@ -29,7 +29,7 @@
//$Id$
/**
- * Implementing {@link FlowObject} support multiple incomming {@link Flow}.
+ * Implementing {@link FlowObject} support multiple incomming {@link ConnectingObject}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -39,5 +39,5 @@
/**
* Add an incomming Flow
*/
- void addInFlow(Flow flow);
+ void addInFlow(ConnectingObject flow);
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleOutFlowSetterSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleOutFlowSetterSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/MultipleOutFlowSetterSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -21,14 +21,14 @@
*/
package org.jboss.bpm.model.internal;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.MultipleOutFlowSupport;
//$Id$
/**
- * Implementing {@link FlowObject} support multiple outgoing {@link Flow}.
+ * Implementing {@link FlowObject} support multiple outgoing {@link ConnectingObject}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -38,6 +38,6 @@
/**
* Add an outgoing Flow
*/
- void addOutFlow(Flow flow);
+ void addOutFlow(ConnectingObject flow);
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleInFlowSetterSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleInFlowSetterSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleInFlowSetterSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.model.internal;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.SingleInFlowSupport;
@@ -29,7 +29,7 @@
//$Id$
/**
- * Implementing {@link FlowObject} support a single incomming {@link Flow}.
+ * Implementing {@link FlowObject} support a single incomming {@link ConnectingObject}.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -39,5 +39,5 @@
/**
* Set the incomming Flow
*/
- void setInFlow(Flow flow);
+ void setInFlow(ConnectingObject flow);
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleOutFlowSetterSupport.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleOutFlowSetterSupport.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/SingleOutFlowSetterSupport.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -21,7 +21,7 @@
*/
package org.jboss.bpm.model.internal;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.FlowObject;
import org.jboss.bpm.model.SingleOutFlowSupport;
@@ -29,7 +29,7 @@
//$Id$
/**
- * Implementing {@link FlowObject}s support a single outgoing {@link Flow}s.
+ * Implementing {@link FlowObject}s support a single outgoing {@link ConnectingObject}s.
*
* @author thomas.diesler(a)jboss.com
* @since 08-Jul-2008
@@ -39,5 +39,5 @@
/**
* Set the outgoing Flow
*/
- void setOutFlow(Flow flow);
+ void setOutFlow(ConnectingObject flow);
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/model/internal/StartEventImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -29,7 +29,7 @@
import org.apache.commons.logging.LogFactory;
import org.jboss.bpm.NotImplementedException;
import org.jboss.bpm.model.EventDetail;
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.InputSet;
import org.jboss.bpm.model.OutputSet;
import org.jboss.bpm.model.Signal;
@@ -54,19 +54,19 @@
// provide logging
private static final Log log = LogFactory.getLog(StartEventImpl.class);
- private Flow outFlow;
+ private ConnectingObject outFlow;
public List<EventDetail> getTrigger()
{
throw new NotImplementedException();
}
- public Flow getOutFlow()
+ public ConnectingObject getOutFlow()
{
return outFlow;
}
- public void setOutFlow(Flow flow)
+ public void setOutFlow(ConnectingObject flow)
{
this.outFlow = flow;
}
Modified: jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java
===================================================================
--- jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/ri/src/main/java/org/jboss/bpm/runtime/internal/TokenImpl.java 2008-08-04 08:15:02 UTC (rev 1813)
@@ -23,7 +23,7 @@
//$Id$
-import org.jboss.bpm.model.Flow;
+import org.jboss.bpm.model.ConnectingObject;
import org.jboss.bpm.model.Process;
import org.jboss.bpm.runtime.Attachments;
import org.jboss.bpm.runtime.BasicAttachments;
@@ -48,7 +48,7 @@
{
private String id;
private Process proc;
- private Flow flow;
+ private ConnectingObject flow;
private ExecutionContext context;
/**
@@ -76,12 +76,12 @@
return context;
}
- public Flow getFlow()
+ public ConnectingObject getFlow()
{
return flow;
}
- public void setFlow(Flow flow)
+ public void setFlow(ConnectingObject flow)
{
this.flow = flow;
}
Modified: jbossbpm/spec/trunk/modules/samples/airticket/.classpath
===================================================================
--- jbossbpm/spec/trunk/modules/samples/airticket/.classpath 2008-08-04 07:53:38 UTC (rev 1812)
+++ jbossbpm/spec/trunk/modules/samples/airticket/.classpath 2008-08-04 08:15:02 UTC (rev 1813)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
- <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <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>
17 years, 9 months
JBoss JBPM SVN: r1812 - in jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm: model and 1 other directories.
by do-not-reply@jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2008-08-04 03:53:38 -0400 (Mon, 04 Aug 2008)
New Revision: 1812
Modified:
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ActivityBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java
jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
Log:
Fix javadoc
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/MessageManager.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -38,8 +38,8 @@
/**
* The ProcessEngine sends mesages through the MessageManager.
* <p/>
- * A @{link Message} has an ID and is targeted to a
- * specific @{limk Participant}. A component can register a @{link MessageListener} with the MessageManager.
+ * A {@link Message} has an ID and is targeted to a
+ * specific {@limk Participant}. A component can register a {@link MessageListener} with the MessageManager.
*
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
@@ -88,7 +88,7 @@
}
/**
- * Send a message to a given {@link Task} or @{link Event}
+ * Send a message to a given {@link Task} or {@link Event}
*/
public void sendMessage(ObjectName procID, String targetName, Message msg)
{
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/client/SignalManager.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -35,8 +35,8 @@
/**
* The ProcessEngine sends signals through the SignalManager
* <p/>
- * A @{link Signal} is like an undirected flare shot up into the air.
- * A component can register a @{link SignalListener} with the SignalManager.
+ * A {@link Signal} is like an undirected flare shot up into the air.
+ * A component can register a {@link SignalListener} with the SignalManager.
*
* @author thomas.diesler(a)jboss.com
* @since 18-Jun-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ActivityBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ActivityBuilder.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ActivityBuilder.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -54,7 +54,7 @@
ActivityBuilder addPropertyOutput(String name, String value);
/**
- * Add an IORule @{link Expression}
+ * Add an IORule {@link Expression}
*/
ActivityBuilder addIORule(String body, ExpressionLanguage lang);
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactInput.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -25,7 +25,7 @@
/**
- * An ArtifactInput, which is used in the definition of attributes for @{link InputSet}
+ * An ArtifactInput, which is used in the definition of attributes for {@link InputSet}
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ArtifactOutput.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -25,7 +25,7 @@
/**
- * An ArtifactOutput, which is used in the definition of attributes for @{link OutputSet}
+ * An ArtifactOutput, which is used in the definition of attributes for {@link OutputSet}
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Entity.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -24,7 +24,7 @@
//$Id$
/**
- * An Entity, which is used in the definition of attributes for a @{link Participant}
+ * An Entity, which is used in the definition of attributes for a {@link Participant}
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Expression.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -24,8 +24,8 @@
//$Id$
/**
- * An Expression, which is used in the definition of attributes for @{link StartEvent},
- * @{link IntermediateEvent}, @{link Activity}, @{link ComplexGateway}, and @{link SequenceFlow}
+ * An Expression, which is used in the definition of attributes for {@link StartEvent},
+ * {@link IntermediateEvent}, {@link Activity}, {@link ComplexGateway}, and {@link SequenceFlow}
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Message.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -26,8 +26,8 @@
//$Id$
/**
- * A Message, which is used in the definition of attributes for a @{link StartEvent},
- * @{EndEvent}, @{IntermediateEvent}, @{Task}, and @{MessageFlow}
+ * A Message, which is used in the definition of attributes for a {@link StartEvent},
+ * {@link EndEvent}, {@link IntermediateEvent}, {@link Task}, and {@link MessageFlow}
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/OutputSet.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -38,8 +38,8 @@
/**
* Zero or more ArtifactOutputs MAY be defined for each OutputSet. For the
* combination of ArtifactOutputs and PropertyOutputs, there MUST be at least one
- * item defined for the OutputSet. An ArtifactOutput is an @{link Artifact},
- * usually a @{link DataObject}.
+ * item defined for the OutputSet. An ArtifactOutput is an {@link Artifact},
+ * usually a {@link DataObject}.
*/
List<ArtifactOutput> getArtifactOutputs();
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Participant.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -24,7 +24,7 @@
//$Id$
/**
- * A Participant, which is used in the definition of attributes for a @{link Pool}, @{link Message}, and @{link
+ * A Participant, which is used in the definition of attributes for a {@link Pool}, {@link Message}, and {@link
* WebService}
*
* @author thomas.diesler(a)jboss.com
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/ProcessBuilder.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -98,7 +98,7 @@
GatewayBuilder addGateway(String name, GatewayType type);
/**
- * Add a @{link Message} with a given name.
+ * Add a {@link Message} with a given name.
*/
MessageBuilder addMessage(String name);
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/Role.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -24,7 +24,7 @@
//$Id$
/**
- * A Role, which is used in the definition of attributes for a @{link Participant}
+ * A Role, which is used in the definition of attributes for a {@link Participant}
*
* @author thomas.diesler(a)jboss.com
* @since 21-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/model/TimeDateExpression.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -26,7 +26,7 @@
/**
* The TimeDateExpression supporting element is a sub-type of the Expression Element (Expression on page 273) and uses all
- * the attributes of the @{link Expression} Element.
+ * the attributes of the {@link Expression} Element.
*
* @author Thomas.Diesler(a)jboss.com
* @since 21-Jul-2008
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Executable.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -32,7 +32,7 @@
public interface Executable
{
/**
- * Engine calls this to execute the @{link FlowObject}
+ * Engine calls this to execute the {@link FlowObject}
*/
void execute(Token token);
}
\ No newline at end of file
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/FlowHandler.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -38,8 +38,8 @@
/**
* Execute the the FlowHandler.
* <p/>
- * The FlowHandler will add the active outgoing @{link Flow}s to
- * some @{link Flow} queue for the {@link ProcessEngine} to execute.
+ * The FlowHandler will add the active outgoing {@link Flow}s to
+ * some {@link Flow} queue for the {@link ProcessEngine} to execute.
*/
void execute(FlowScheduler scheduler, Token token);
Modified: jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java
===================================================================
--- jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java 2008-08-04 00:31:52 UTC (rev 1811)
+++ jbossbpm/spec/trunk/modules/api/src/main/java/org/jboss/bpm/runtime/Token.java 2008-08-04 07:53:38 UTC (rev 1812)
@@ -56,7 +56,7 @@
ExecutionContext getExecutionContext();
/**
- * Get the current @{link SequenceFlow}
+ * Get the current {@link SequenceFlow}
*/
Flow getFlow();
17 years, 9 months