JBoss JBPM SVN: r5096 - in jbpm4/trunk/modules: api/src/main/java/org/jbpm/api/client and 40 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-23 11:17:20 -0400 (Tue, 23 Jun 2009)
New Revision: 5096
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientExecution.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessDefinition.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessInstance.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/Command.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java
Removed:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientExecution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessDefinition.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessInstance.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/package.html
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/Command.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/CommandService.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/TaskHandler.java
Modified:
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Configuration.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java
jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/OpenTask.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandExecutorSLSB.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandReceiverMDB.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbLocalCommandService.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/ExecuteTimerCmd.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/LocalCommandExecutor.java
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/RemoteCommandExecutor.java
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/CommandReceiverTest.java
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/EjbTimerSessionTest.java
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java
jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AbstractCommand.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompositeCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateDeploymentQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ExecuteJobCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsByKeyCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetActivityCoordinates.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetOutcomes.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetSubTasksCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariableNamesCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/QueryCommand.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ResumeDeploymentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SendMessageCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceInLatestCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SuspendDeploymentCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/VariablesCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroupCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembershipCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUserCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroupCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteMembershipCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteUserCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUserCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUsersCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/CommandMessage.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AvgDurationPerActivityQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ChoiceDistributionQueryCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/RepositorySession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/CommandTransactionCallback.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AbstractServiceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandMessage.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationSession.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/EnvironmentInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/FindGroupIds.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/SerializeInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/test/JobTestHelper.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ExecutionServiceBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HistoryServiceBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/IdentityServiceBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobExecutorBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ManagementServiceBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/TaskServiceBinding.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CommandServiceDescriptor.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java
jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java
jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveMessagesTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveTestCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/JobExecutorTestCase.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java
jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java
jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/VariableTest.java
Log:
JBPM-2307 moved client and env packages from api to internal
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Configuration.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Configuration.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Configuration.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -40,10 +40,14 @@
Configuration impl;
+ /** default constructor */
public Configuration() {
this((String)null);
}
+ /** creates a configuration of a specific implementation type.
+ * no values are supported for type yet. only <code>null</code>.
+ */
public Configuration(String type) {
String implementationClassName = getImplementationClassName(type);
if (implementationClassName==null) {
@@ -52,6 +56,7 @@
impl = instantiate(implementationClassName);
}
+ /** empty constructor to be used by concrete implementations of Configuration */
protected Configuration(Configuration base){
}
@@ -90,36 +95,44 @@
return Thread.currentThread().getContextClassLoader();
}
+ /** provide an xml string as the configuration resource */
public Configuration setXmlString(String xmlString) {
impl.setXmlString(xmlString);
return impl;
}
+ /** provide an classpath resource as the configuration file */
public Configuration setResource(String resource) {
impl.setResource(resource);
return impl;
}
+ /** provide an input stream as the configuration resource */
public Configuration setInputStream(InputStream inputStream) {
impl.setInputStream(inputStream);
return impl;
}
+ /** provide a sax input source as the configuration resource */
public Configuration setInputSource(InputSource inputSource) {
impl.setInputSource(inputSource);
return impl;
}
+ /** point with a url to the configuration file */
public Configuration setUrl(URL url) {
impl.setUrl(url);
return impl;
}
+ /** provide a File as the configuration file */
public Configuration setFile(File file) {
impl.setFile(file);
return impl;
}
+ /** after specifying the configuration resources with the other methods, a
+ * process engine can be created. */
public ProcessEngine buildProcessEngine() {
return impl.buildProcessEngine();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Deployment.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,19 +21,31 @@
*/
package org.jbpm.api;
-/**
+/** represents a deployment in the repository.
+ *
* @author Tom Baeyens
*/
public interface Deployment {
+ /** normal deployments for which contained process definitions
+ * can be executed. */
String STATE_ACTIVE = "active";
+
+ /** invisible for all operations except delete or resume. This is
+ * to have a kind of undoable delete operation. */
String STATE_SUSPENDED = "suspended";
long getDbid();
+ /** typically correspond to the file name or url or some other
+ * form of identifying the source archive file for this deployment. */
String getName();
+ /** the timestamp can optionally be given and represents the last updated timestamp
+ * of the archive file that is being deployed.
+ * JBoss deployer makes use of this to remember if a file is already deployed or not.*/
long getTimestamp();
-
+
+ /** {@link #STATE_ACTIVE} or {@link #STATE_SUSPENDED} */
String getState();
}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/DeploymentQuery.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,7 +23,8 @@
import java.util.List;
-/**
+/** find deployments in the repository.
+ *
* @author Tom Baeyens
*/
public interface DeploymentQuery {
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/Execution.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,8 +26,6 @@
import java.util.Map;
import java.util.Set;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.model.ObservableElement;
/** a runtime path of execution.
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/NewDeployment.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,20 +26,44 @@
import java.net.URL;
import java.util.zip.ZipInputStream;
-/**
+/** extends a {@link Deployment} with method to create a new
+ * deployment.
+ *
+ * @see RepositoryService#createDeployment()
+ *
* @author Tom Baeyens
*/
public interface NewDeployment extends Deployment {
+
+ /** typically correspond to the file name or url or some other
+ * form of identifying the source archive file for this deployment. */
+ NewDeployment setName(String name);
- NewDeployment setName(String name);
+ /** the timestamp can optionally be given and represents the last updated timestamp
+ * of the archive file that is being deployed.
+ * JBoss deployer makes use of this to remember if a file is already deployed or not.*/
NewDeployment setTimestamp(long timestamp);
+
+ /** adds a resource as a string */
NewDeployment addResourceFromString(String resourceName, String string);
+
+ /** adds a resource as a string */
NewDeployment addResourceFromInputStream(String resourceName, InputStream inputStream);
+
+ /** adds a resource as a resource from the classpath */
NewDeployment addResourceFromClasspath(String resourceName);
+
+ /** adds a resource as a url */
NewDeployment addResourceFromUrl(URL url);
+
+ /** adds a resource as a zip stream */
NewDeployment addResourcesFromZipInputStream(ZipInputStream zipInputStream);
+
+ /** adds a resource from a file */
NewDeployment addResourceFromFile(File file);
- /** @return deploymentId */
+ /** after adding resources, this will perform the actual deployment.
+ * @return the generated deploymentId identification for this deployment
+ * in the {@link RepositoryService repository}. */
long deploy();
}
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientExecution.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientExecution.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientExecution.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -1,186 +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.api.client;
-
-import java.util.Map;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.JbpmException;
-import org.jbpm.api.activity.ActivityBehaviour;
-import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.model.OpenExecution;
-
-/** view upon an {@link Execution path of execution} exposed to
- * external clients.
- *
- * @author Tom Baeyens
- */
-public interface ClientExecution extends OpenExecution {
-
- // ending an execution //////////////////////////////////////////////////////
-
- /** ends this execution and all of its child executions.
- *
- * <p>All child executions will be ended and removed. This execution
- * will not be removed from its parent.</p>
- *
- * <p>This method should not be called in {@link ActivityBehaviour}s. It can be called from
- * outside the process execution and in {@link ExternalActivityBehaviour}s. </p> */
- void end();
-
- /** ends this execution and all it's child executions with a user defined
- * status. */
- void end(String state);
-
- // signal ///////////////////////////////////////////////////////////////////
-
- /** feeds a external trigger into this execution.
- *
- * <p>Typically a signal causes the execution to proceed, but that doesn't necessarily
- * has to be the case . The {@link ExternalActivityBehaviour} is responsible for interpreting
- * the signal and acting upon it.
- * </p>
- *
- * <p>A signal can optionally be given {@link #signal(String) a signal name},
- * {@link #signal(Map) a map of parameters} or {@link #signal(String, Map) both}.
- * </p>
- *
- * <p>Since it's an external trigger, this method requires that this execution is
- * waiting for an external trigger. So this method must be called as an external client
- * and can not be called while this execution is executing. In an {@link ActivityBehaviour} for
- * example you're not allowed to call the signal on the execution cause it is executing.
- * But you are allowed to invoke this method on any other execution (at least, if that
- * one is waiting for an external trigger).</p>
- *
- * <p>Typically a signal will cause the execution to start executing, but that is
- * not a must. What happens with this signal is defined in the
- * {@link ExternalActivityBehaviour#signal(Execution, String, Map)} of
- * the current activity. </p>
- *
- * @see #signal(String) */
- void signal();
-
- /** feeds a named {@link #signal() external trigger} into the execution.
- *
- * <p>In each state, a number of things can happen. The signal parameter specifies
- * which of these things is happening. It's somewhat similar to a method name in
- * the invocation of an object.
- * </p>
- *
- * @see #signal() See the unnamed signal for more information
- */
- void signal(String signalName);
-
- /** feeds {@link #signal() an external trigger} into the execution with parameters.
- *
- * @see #signal() See the unnamed signal for more information
- */
- void signal(Map<String, ?> parameters);
-
- /** feeds a named {@link #signal() external trigger} into the execution with parameters.
- *
- * <p>In each state, a number of things can happen. The signal parameter specifies
- * which of these things is happening. It's somewhat similar to a method name in
- * the invocation of an object.
- * </p>
- *
- * <p>The parameters parameter provide extra information to the signal.
- * Typically, the parameters are set as variables but
- * the process language can overwrite that behaviour in the current activity.
- * See {@link ExternalActivityBehaviour#signal(Execution, String, Map)} for more information.
- * </p>
- *
- * @see #signal() See the unnamed signal for more information
- */
- void signal(String signalName, Map<String, ?> parameters);
-
- /** feeds a external trigger into the given execution.
- *
- * <p>Typically a signal causes the execution to proceed, but that doesn't necessarily
- * has to be the case . The {@link ExternalActivityBehaviour} is responsible for interpreting
- * the signal and acting upon it.
- * </p>
- *
- * <p>A signal can optionally be given {@link #signal(String) a signal name},
- * {@link #signal(Map) a map of parameters} or {@link #signal(String, Map) both}.
- * </p>
- *
- * <p>Since it's an external trigger, this method requires that this execution is
- * waiting for an external trigger. So this method must be called as an external client
- * and can not be called while this execution is executing. In an {@link ActivityBehaviour} for
- * example you're not allowed to call the signal on the execution cause it is executing.
- * But you are allowed to invoke this method on any other execution (at least, if that
- * one is waiting for an external trigger).</p>
- *
- * <p>Typically a signal will cause the execution to start executing, but that is
- * not a must. What happens with this signal is defined in the
- * {@link ExternalActivityBehaviour#signal(Execution, String, Map)} of
- * the current activity. </p>
- *
- * @see #signal(String) */
- void signal(Execution execution);
-
- /** feeds a named {@link #signal() external trigger} into a given execution.
- *
- * <p>In each state, a number of things can happen. The signal parameter specifies
- * which of these things is happening. It's somewhat similar to a method name in
- * the invocation of an object.
- * </p>
- *
- * @see #signal() See the unnamed signal for more information
- */
- void signal(String signalName, Execution execution);
-
- /** feeds {@link #signal() an external trigger} into a given execution with parameters.
- *
- * @see #signal() See the unnamed signal for more information
- */
- void signal(Map<String, ?> parameters, Execution execution);
-
- /** feeds a named {@link #signal() external trigger} into a given execution with parameters.
- *
- * <p>In each state, a number of things can happen. The signal parameter specifies
- * which of these things is happening. It's somewhat similar to a method name in
- * the invocation of an object.
- * </p>
- *
- * <p>The parameters parameter provide extra information to the signal.
- * Typically, the parameters are set as variables but
- * the process language can overwrite that behaviour in the current activity.
- * See {@link ExternalActivityBehaviour#signal(Execution, String, Map)} for more information.
- * </p>
- *
- * @see #signal() See the unnamed signal for more information
- */
- void signal(String signalName, Map<String, ?> parameters, Execution execution);
-
-
- /** suspends this execution and all it's child executions. Human tasks
- * of a suspended execution shouldn't show up in people's task list and
- * timers of suspended executions shouldn't fire.
- * @throws JbpmException if this execution is already suspended. */
- void suspend();
-
- /** resumes an execution. Inverse of {@link #suspend()}.
- * @throws JbpmException if this execution is not suspended. */
- void resume();
-}
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessDefinition.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessDefinition.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessDefinition.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -1,68 +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.api.client;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.model.OpenExecution;
-import org.jbpm.api.model.OpenProcessDefinition;
-
-
-/** adds factory methods for creating and beginning new process instances.
- *
- * @author Tom Baeyens
- */
-public interface ClientProcessDefinition extends OpenProcessDefinition {
-
- /** creates a new process instances. The returned process instance
- * is not started yet. This way,
- * {@link OpenExecution#setVariable(String, Object) variables can be set}
- * before execution is started. Invoke {@link ClientProcessInstance#start()}
- * to start execution of the process. */
- ClientProcessInstance createProcessInstance();
-
- /** creates a new process instances with a given key. The returned process instance
- * is not started yet. This way,
- * {@link OpenExecution#setVariable(String, Object) variables can be set}
- * before execution is started. Invoke {@link ClientProcessInstance#start()}
- * to start execution of the process.
- * @param key is a user provided reference that uniquely identifies this
- * process instance in the scope of the process name. */
- ClientProcessInstance createProcessInstance(String key);
-
- /** creates a new process instances with a given key. The returned process instance
- * is not started yet. This way,
- * {@link OpenExecution#setVariable(String, Object) variables can be set}
- * before execution is started. Invoke {@link ClientProcessInstance#start()}
- * to start execution of the process.
- * @param key is a user provided reference that uniquely identifies this
- * process instance in the scope of the process name. key is allowed to be null.*/
- ClientProcessInstance createProcessInstance(String key, Execution superProcessExecution);
-
- /** creates the process instance and immediately start its execution. */
- ClientProcessInstance startProcessInstance();
-
- /** creates the process instance with the given key and immediately start its
- * execution.
- * @param key is a user provided reference that uniquely identifies this
- * process instance in the scope of the process name. */
- ClientExecution startProcessInstance(String key);
-}
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessInstance.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessInstance.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessInstance.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -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.api.client;
-
-import org.jbpm.api.model.OpenProcessInstance;
-
-
-/**
- * @author Tom Baeyens
- */
-public interface ClientProcessInstance extends ClientExecution, OpenProcessInstance {
-
- // start ////////////////////////////////////////////////////////////////////
-
- /** starts this process instance */
- void start();
-
-}
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/package.html
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/package.html 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/package.html 2009-06-23 15:17:20 UTC (rev 5096)
@@ -1,3 +0,0 @@
-<body>for clients that want direct programmatic access to the execution
-object like e.g. in unit tests.
-</body>
\ No newline at end of file
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/Command.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/Command.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/Command.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -1,10 +0,0 @@
-package org.jbpm.api.cmd;
-
-import java.io.Serializable;
-
-import org.jbpm.api.env.Environment;
-
-public interface Command<T> extends Serializable {
-
- T execute(Environment environment) throws Exception;
-}
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/CommandService.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/CommandService.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/CommandService.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -1,22 +0,0 @@
-package org.jbpm.api.cmd;
-
-import org.jbpm.api.JbpmException;
-
-/**
- * abstract extensible session facade. Developers can use this directly or
- * extend one of the implementations with custom methods.
- * Developers should be encouraged to use this interface as it will
- * be kept more stable then direct usage of the API (which is still
- * allowed).
- * All the method implementations should be based on commands.
- * Each of the method implementations will have a environment block.
- * Then the command is executed and the environment is passed into the
- * command.
- */
-public interface CommandService {
-
- /**
- * @throws JbpmException if command throws an exception.
- */
- <T> T execute(Command<T> command);
-}
Modified: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/OpenTask.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/OpenTask.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/OpenTask.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.api.task;
-import org.jbpm.api.client.ClientExecution;
+import org.jbpm.api.model.OpenExecution;
/**
@@ -29,7 +29,7 @@
*/
public interface OpenTask extends Task, Assignable {
- ClientExecution getExecution();
+ OpenExecution getExecution();
OpenTask createSubTask();
OpenTask createSubTask(String name);
Deleted: jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/TaskHandler.java
===================================================================
--- jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/TaskHandler.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/TaskHandler.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -1,78 +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.api.task;
-
-/** for advanced task customization.
- *
- * The default implementation can be found in {@link DefaultTaskHandler}.
- *
- * @author Tom Baeyens
- */
-public class TaskHandler {
-
- /** called after the task is created according
- * to the task definition. This method allows to
- * create subtasks.
- * @return indicates if the process execution should wait. */
- public boolean executionCreateTask(OpenTask task) {
- task.historyTaskStart();
- return true;
- }
-
- /** called when the related execution gets a
- * signal. this method must either
- * {@link OpenTask#setSignalling(boolean) remove signalling} from this task
- * or {@link OpenTask#cancel(String) cancel} it. */
- public void executionSignal(OpenTask task) {
- task.setSignalling(false);
- }
-
- /** called when the given task is assigned to an actor. */
- public void taskAssign(OpenTask task, String userId) {
- task.historyTaskAssign(userId);
- }
-
- /** called when the given task is cancelled. */
- public void taskCancel(OpenTask task, String reason) {
- task.historyTaskCancel(reason);
- }
-
- /** called when the given task completes. The default behaviour
- * will send a signal to the execution if this task is still signalling. */
- public void taskComplete(OpenTask task, String outcome) {
- task.historyTaskComplete(outcome);
-
- if (task.isSignalling()) {
- task.getExecution().signal(outcome);
- }
- }
-
- /** is called when a subtask completes. this can be used to
- * prematurely signal the execution. e.g. for "5 out of 7" scenarios.*/
- public void taskSubTaskComplete(OpenTask task, OpenTask subTask, String outcome) {
- }
-
- /** is called when a variable is updated. This can be used to
- * propagate the execution based on availability of variables. */
- public void taskVariableUpdate(OpenTask task, String key, Object value) {
- }
-}
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandExecutorSLSB.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandExecutorSLSB.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandExecutorSLSB.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -34,11 +34,11 @@
import org.jbpm.api.Configuration;
import org.jbpm.api.ProcessEngine;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.EnvironmentFactory;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
/**
* Stateless session command executor.
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandReceiverMDB.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandReceiverMDB.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/CommandReceiverMDB.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -40,9 +40,9 @@
import javax.naming.NameNotFoundException;
import javax.naming.NamingException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.job.Job;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.ExecuteJobCmd;
/**
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbLocalCommandService.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbLocalCommandService.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbLocalCommandService.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,8 +24,8 @@
import javax.ejb.CreateException;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
/**
* Local, stateless session bean implementation of the command service.
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/EjbRemoteCommandService.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -28,10 +28,10 @@
import javax.naming.InitialContext;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.enterprise.internal.wire.binding.EjbRemoteCommandServiceBinding;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
/**
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/ExecuteTimerCmd.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/ExecuteTimerCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/ExecuteTimerCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,9 +23,9 @@
import java.util.Date;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.TimerImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/LocalCommandExecutor.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/LocalCommandExecutor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/LocalCommandExecutor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.enterprise.internal.ejb;
-import org.jbpm.api.cmd.Command;
+import org.jbpm.pvm.internal.cmd.Command;
/**
* EJB2 local interface for the command executor.
Modified: jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/RemoteCommandExecutor.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/RemoteCommandExecutor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/ejb/RemoteCommandExecutor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,7 +23,7 @@
import java.rmi.RemoteException;
-import org.jbpm.api.cmd.Command;
+import org.jbpm.pvm.internal.cmd.Command;
/**
* EJB2 remote interface for the command executor.
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/InsertCommentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,8 +23,8 @@
import java.sql.SQLException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/custom/RemoveCommentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,8 +26,8 @@
import org.hibernate.Session;
import org.hibernate.criterion.Restrictions;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.model.CommentImpl;
/**
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/CommandReceiverTest.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/CommandReceiverTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/CommandReceiverTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -37,11 +37,11 @@
import org.apache.cactus.ServletTestCase;
-import org.jbpm.api.cmd.Command;
import org.jbpm.enterprise.internal.custom.InsertCommentCmd;
import org.jbpm.enterprise.internal.custom.RemoveCommentCmd;
import org.jbpm.enterprise.internal.ejb.CommandReceiverMDB;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.test.enterprise.IntegrationTestSetup;
/**
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/EjbTimerSessionTest.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/EjbTimerSessionTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/EjbTimerSessionTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -29,13 +29,13 @@
import org.jbpm.api.ExecutionService;
import org.jbpm.api.RepositoryService;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.enterprise.internal.custom.HappyListener;
import org.jbpm.enterprise.internal.custom.WaitState;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd;
import org.jbpm.pvm.internal.job.TimerImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/enterprise/internal/ejb/TimerTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -31,15 +31,15 @@
import org.jbpm.api.Execution;
import org.jbpm.api.ExecutionService;
import org.jbpm.api.RepositoryService;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.enterprise.internal.custom.HappyListener;
import org.jbpm.enterprise.internal.custom.NoisyListener;
import org.jbpm.enterprise.internal.custom.WaitState;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.TimerImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/SubProcessActivity.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,11 +25,11 @@
import java.util.Map;
import org.jbpm.api.activity.ActivityExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.env.Context;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Activity;
import org.jbpm.jpdl.internal.model.JpdlExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.env.ExecutionContext;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.script.ScriptManager;
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -29,12 +29,12 @@
import org.jbpm.api.model.Activity;
import org.jbpm.api.model.Transition;
import org.jbpm.api.task.Task;
-import org.jbpm.api.task.TaskHandler;
import org.jbpm.internal.log.Log;
import org.jbpm.jpdl.internal.model.JpdlExecution;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
+import org.jbpm.pvm.internal.task.TaskHandler;
import org.jbpm.pvm.internal.task.TaskImpl;
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/JpdlTestCase.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,9 +21,9 @@
*/
package org.jbpm.jpdl;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.internal.log.Log;
import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.xml.Parse;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/JpdlParseTestCase.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,8 +24,8 @@
import java.util.List;
import org.jbpm.api.Problem;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.jpdl.internal.xml.JpdlParser;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/ProcessParsingTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,7 +24,7 @@
import java.util.List;
import org.jbpm.api.Problem;
-import org.jbpm.api.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/jpdl/src/test/java/org/jbpm/jpdl/parsing/TransitionParsingTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,9 +24,9 @@
import java.util.List;
import org.jbpm.api.Problem;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.model.Activity;
import org.jbpm.api.model.Transition;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
/**
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientExecution.java (from rev 5092, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientExecution.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientExecution.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientExecution.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -0,0 +1,186 @@
+/*
+ * 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.client;
+
+import java.util.Map;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.JbpmException;
+import org.jbpm.api.activity.ActivityBehaviour;
+import org.jbpm.api.activity.ExternalActivityBehaviour;
+import org.jbpm.api.model.OpenExecution;
+
+/** view upon an {@link Execution path of execution} exposed to
+ * external clients.
+ *
+ * @author Tom Baeyens
+ */
+public interface ClientExecution extends OpenExecution {
+
+ // ending an execution //////////////////////////////////////////////////////
+
+ /** ends this execution and all of its child executions.
+ *
+ * <p>All child executions will be ended and removed. This execution
+ * will not be removed from its parent.</p>
+ *
+ * <p>This method should not be called in {@link ActivityBehaviour}s. It can be called from
+ * outside the process execution and in {@link ExternalActivityBehaviour}s. </p> */
+ void end();
+
+ /** ends this execution and all it's child executions with a user defined
+ * status. */
+ void end(String state);
+
+ // signal ///////////////////////////////////////////////////////////////////
+
+ /** feeds a external trigger into this execution.
+ *
+ * <p>Typically a signal causes the execution to proceed, but that doesn't necessarily
+ * has to be the case . The {@link ExternalActivityBehaviour} is responsible for interpreting
+ * the signal and acting upon it.
+ * </p>
+ *
+ * <p>A signal can optionally be given {@link #signal(String) a signal name},
+ * {@link #signal(Map) a map of parameters} or {@link #signal(String, Map) both}.
+ * </p>
+ *
+ * <p>Since it's an external trigger, this method requires that this execution is
+ * waiting for an external trigger. So this method must be called as an external client
+ * and can not be called while this execution is executing. In an {@link ActivityBehaviour} for
+ * example you're not allowed to call the signal on the execution cause it is executing.
+ * But you are allowed to invoke this method on any other execution (at least, if that
+ * one is waiting for an external trigger).</p>
+ *
+ * <p>Typically a signal will cause the execution to start executing, but that is
+ * not a must. What happens with this signal is defined in the
+ * {@link ExternalActivityBehaviour#signal(Execution, String, Map)} of
+ * the current activity. </p>
+ *
+ * @see #signal(String) */
+ void signal();
+
+ /** feeds a named {@link #signal() external trigger} into the execution.
+ *
+ * <p>In each state, a number of things can happen. The signal parameter specifies
+ * which of these things is happening. It's somewhat similar to a method name in
+ * the invocation of an object.
+ * </p>
+ *
+ * @see #signal() See the unnamed signal for more information
+ */
+ void signal(String signalName);
+
+ /** feeds {@link #signal() an external trigger} into the execution with parameters.
+ *
+ * @see #signal() See the unnamed signal for more information
+ */
+ void signal(Map<String, ?> parameters);
+
+ /** feeds a named {@link #signal() external trigger} into the execution with parameters.
+ *
+ * <p>In each state, a number of things can happen. The signal parameter specifies
+ * which of these things is happening. It's somewhat similar to a method name in
+ * the invocation of an object.
+ * </p>
+ *
+ * <p>The parameters parameter provide extra information to the signal.
+ * Typically, the parameters are set as variables but
+ * the process language can overwrite that behaviour in the current activity.
+ * See {@link ExternalActivityBehaviour#signal(Execution, String, Map)} for more information.
+ * </p>
+ *
+ * @see #signal() See the unnamed signal for more information
+ */
+ void signal(String signalName, Map<String, ?> parameters);
+
+ /** feeds a external trigger into the given execution.
+ *
+ * <p>Typically a signal causes the execution to proceed, but that doesn't necessarily
+ * has to be the case . The {@link ExternalActivityBehaviour} is responsible for interpreting
+ * the signal and acting upon it.
+ * </p>
+ *
+ * <p>A signal can optionally be given {@link #signal(String) a signal name},
+ * {@link #signal(Map) a map of parameters} or {@link #signal(String, Map) both}.
+ * </p>
+ *
+ * <p>Since it's an external trigger, this method requires that this execution is
+ * waiting for an external trigger. So this method must be called as an external client
+ * and can not be called while this execution is executing. In an {@link ActivityBehaviour} for
+ * example you're not allowed to call the signal on the execution cause it is executing.
+ * But you are allowed to invoke this method on any other execution (at least, if that
+ * one is waiting for an external trigger).</p>
+ *
+ * <p>Typically a signal will cause the execution to start executing, but that is
+ * not a must. What happens with this signal is defined in the
+ * {@link ExternalActivityBehaviour#signal(Execution, String, Map)} of
+ * the current activity. </p>
+ *
+ * @see #signal(String) */
+ void signal(Execution execution);
+
+ /** feeds a named {@link #signal() external trigger} into a given execution.
+ *
+ * <p>In each state, a number of things can happen. The signal parameter specifies
+ * which of these things is happening. It's somewhat similar to a method name in
+ * the invocation of an object.
+ * </p>
+ *
+ * @see #signal() See the unnamed signal for more information
+ */
+ void signal(String signalName, Execution execution);
+
+ /** feeds {@link #signal() an external trigger} into a given execution with parameters.
+ *
+ * @see #signal() See the unnamed signal for more information
+ */
+ void signal(Map<String, ?> parameters, Execution execution);
+
+ /** feeds a named {@link #signal() external trigger} into a given execution with parameters.
+ *
+ * <p>In each state, a number of things can happen. The signal parameter specifies
+ * which of these things is happening. It's somewhat similar to a method name in
+ * the invocation of an object.
+ * </p>
+ *
+ * <p>The parameters parameter provide extra information to the signal.
+ * Typically, the parameters are set as variables but
+ * the process language can overwrite that behaviour in the current activity.
+ * See {@link ExternalActivityBehaviour#signal(Execution, String, Map)} for more information.
+ * </p>
+ *
+ * @see #signal() See the unnamed signal for more information
+ */
+ void signal(String signalName, Map<String, ?> parameters, Execution execution);
+
+
+ /** suspends this execution and all it's child executions. Human tasks
+ * of a suspended execution shouldn't show up in people's task list and
+ * timers of suspended executions shouldn't fire.
+ * @throws JbpmException if this execution is already suspended. */
+ void suspend();
+
+ /** resumes an execution. Inverse of {@link #suspend()}.
+ * @throws JbpmException if this execution is not suspended. */
+ void resume();
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientExecution.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessDefinition.java (from rev 5092, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessDefinition.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessDefinition.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessDefinition.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -0,0 +1,68 @@
+/*
+ * 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.client;
+
+import org.jbpm.api.Execution;
+import org.jbpm.api.model.OpenExecution;
+import org.jbpm.api.model.OpenProcessDefinition;
+
+
+/** adds factory methods for creating and beginning new process instances.
+ *
+ * @author Tom Baeyens
+ */
+public interface ClientProcessDefinition extends OpenProcessDefinition {
+
+ /** creates a new process instances. The returned process instance
+ * is not started yet. This way,
+ * {@link OpenExecution#setVariable(String, Object) variables can be set}
+ * before execution is started. Invoke {@link ClientProcessInstance#start()}
+ * to start execution of the process. */
+ ClientProcessInstance createProcessInstance();
+
+ /** creates a new process instances with a given key. The returned process instance
+ * is not started yet. This way,
+ * {@link OpenExecution#setVariable(String, Object) variables can be set}
+ * before execution is started. Invoke {@link ClientProcessInstance#start()}
+ * to start execution of the process.
+ * @param key is a user provided reference that uniquely identifies this
+ * process instance in the scope of the process name. */
+ ClientProcessInstance createProcessInstance(String key);
+
+ /** creates a new process instances with a given key. The returned process instance
+ * is not started yet. This way,
+ * {@link OpenExecution#setVariable(String, Object) variables can be set}
+ * before execution is started. Invoke {@link ClientProcessInstance#start()}
+ * to start execution of the process.
+ * @param key is a user provided reference that uniquely identifies this
+ * process instance in the scope of the process name. key is allowed to be null.*/
+ ClientProcessInstance createProcessInstance(String key, Execution superProcessExecution);
+
+ /** creates the process instance and immediately start its execution. */
+ ClientProcessInstance startProcessInstance();
+
+ /** creates the process instance with the given key and immediately start its
+ * execution.
+ * @param key is a user provided reference that uniquely identifies this
+ * process instance in the scope of the process name. */
+ ClientExecution startProcessInstance(String key);
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessDefinition.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessInstance.java (from rev 5092, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/client/ClientProcessInstance.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessInstance.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessInstance.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -0,0 +1,37 @@
+/*
+ * 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.client;
+
+import org.jbpm.api.model.OpenProcessInstance;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public interface ClientProcessInstance extends ClientExecution, OpenProcessInstance {
+
+ // start ////////////////////////////////////////////////////////////////////
+
+ /** starts this process instance */
+ void start();
+
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/client/ClientProcessInstance.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AbstractCommand.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AbstractCommand.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AbstractCommand.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,7 +23,6 @@
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.WireObject;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddReplyCommentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,7 +22,6 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
import org.jbpm.pvm.internal.model.CommentImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/AddTaskCommentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CancelTaskCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,7 +22,6 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.task.Assignable;
import org.jbpm.pvm.internal.session.DbSession;
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/Command.java (from rev 5092, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/Command.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/Command.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/Command.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -0,0 +1,10 @@
+package org.jbpm.pvm.internal.cmd;
+
+import java.io.Serializable;
+
+import org.jbpm.api.env.Environment;
+
+public interface Command<T> extends Serializable {
+
+ T execute(Environment environment) throws Exception;
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/Command.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java (from rev 5092, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/cmd/CommandService.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -0,0 +1,22 @@
+package org.jbpm.pvm.internal.cmd;
+
+import org.jbpm.api.JbpmException;
+
+/**
+ * abstract extensible session facade. Developers can use this directly or
+ * extend one of the implementations with custom methods.
+ * Developers should be encouraged to use this interface as it will
+ * be kept more stable then direct usage of the API (which is still
+ * allowed).
+ * All the method implementations should be based on commands.
+ * Each of the method implementations will have a environment block.
+ * Then the command is executed and the environment is passed into the
+ * command.
+ */
+public interface CommandService {
+
+ /**
+ * @throws JbpmException if command throws an exception.
+ */
+ <T> T execute(Command<T> command);
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CommandService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompositeCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompositeCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CompositeCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,7 +24,6 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateDeploymentQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateDeploymentQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateDeploymentQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.query.DeploymentQueryImpl;
import org.jbpm.pvm.internal.query.JobQueryImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryActivityInstanceQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.query.HistoryActivityInstanceQueryImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateHistoryProcessInstanceQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.query.HistoryProcessInstanceQueryImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateJobQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.query.JobQueryImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessDefinitionQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl;
import org.jbpm.pvm.internal.session.RepositorySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateProcessInstanceQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/CreateTaskQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskQueryImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteCommentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,7 +22,6 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeleteDeploymentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,7 +27,6 @@
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessDefinition;
import org.jbpm.api.ProcessInstance;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/DeployCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
import org.jbpm.pvm.internal.session.RepositorySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ExecuteJobCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ExecuteJobCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ExecuteJobCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,7 +24,6 @@
import java.util.Date;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.Transaction;
import org.jbpm.api.job.Job;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsByKeyCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsByKeyCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindProcessDefinitionsByKeyCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,8 +23,8 @@
import java.util.List;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetActivityCoordinates.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetActivityCoordinates.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetActivityCoordinates.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,7 +22,6 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.ActivityCoordinates;
import org.jbpm.pvm.internal.model.ActivityImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetOutcomes.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetOutcomes.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetOutcomes.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,7 +26,6 @@
import java.util.Set;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Transition;
import org.jbpm.api.task.Task;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetSubTasksCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetSubTasksCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetSubTasksCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,7 +25,6 @@
import org.hibernate.Query;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.task.Task;
import org.jbpm.pvm.internal.task.TaskImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,7 +25,6 @@
import java.util.Collections;
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariableNamesCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariableNamesCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariableNamesCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,8 +24,8 @@
import java.util.Set;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.client.ClientExecution;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetVariablesCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,8 +26,8 @@
import java.util.Set;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.client.ClientExecution;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/QueryCommand.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/QueryCommand.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/QueryCommand.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
/** base class for commands that execute scalable queries.
*
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ResumeDeploymentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ResumeDeploymentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/ResumeDeploymentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,7 +22,6 @@
package org.jbpm.pvm.internal.cmd;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SendMessageCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SendMessageCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SendMessageCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,6 @@
*/
package org.jbpm.pvm.internal.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.job.Message;
import org.jbpm.pvm.internal.session.MessageSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SetVariablesCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.cmd;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.client.ClientExecution;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.task.TaskImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SignalCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,8 +25,8 @@
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessInstance;
-import org.jbpm.api.client.ClientExecution;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.session.DbSession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,9 +26,9 @@
import org.hibernate.Session;
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessInstance;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.pvm.internal.session.RepositorySession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceInLatestCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceInLatestCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/StartProcessInstanceInLatestCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,9 +26,9 @@
import org.hibernate.Session;
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessInstance;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.pvm.internal.session.RepositorySession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SuspendDeploymentCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SuspendDeploymentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/SuspendDeploymentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,7 +22,6 @@
package org.jbpm.pvm.internal.cmd;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.repository.DeploymentImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/VariablesCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/VariablesCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/VariablesCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,8 +25,8 @@
import java.util.Map;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.client.ClientExecution;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.session.DbSession;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -31,12 +31,12 @@
import org.jbpm.api.Execution;
import org.jbpm.api.JbpmException;
import org.jbpm.api.ProcessDefinition;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.env.Environment;
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.api.task.Task;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
import org.jbpm.pvm.internal.job.JobImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroupCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroupCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateGroupCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembershipCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembershipCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateMembershipCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUserCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUserCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/CreateUserCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroupCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroupCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteGroupCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteMembershipCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteMembershipCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteMembershipCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteUserCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteUserCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/DeleteUserCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,9 +21,9 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.identity.Group;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindGroupsCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,9 +23,9 @@
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.identity.Group;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUserCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUserCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUserCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,9 +21,9 @@
*/
package org.jbpm.pvm.internal.identity.cmd;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.identity.User;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUsersCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUsersCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/identity/cmd/FindUsersCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,9 +23,9 @@
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.identity.User;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.spi.IdentitySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/CommandMessage.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/CommandMessage.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/CommandMessage.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.job;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.session.DbSession;
import org.jbpm.pvm.internal.wire.Descriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/job/JobImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -8,8 +8,8 @@
import java.util.Date;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.job.Job;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.lob.Lob;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.wire.Descriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/AcquireJobsCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -28,9 +28,9 @@
import java.util.Date;
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/DispatcherThread.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,9 +24,9 @@
import java.util.Collection;
import java.util.Date;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
/** this thread is responsible for acquiring jobs in the job that need to be
* executed and then let the JobExecutor dispatch the acquired ids to one of the
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/GetNextDueDateCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,9 +23,9 @@
import java.util.Date;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExceptionHandler.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,11 +27,11 @@
import javax.transaction.Synchronization;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.Transaction;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -31,9 +31,9 @@
import java.util.concurrent.BlockingQueue;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
/** manager for job execution threads and their configuration.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/jobexecutor/JobExecutorThread.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,8 +24,8 @@
import java.util.Collection;
import java.util.concurrent.BlockingQueue;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.ExecuteJobCmd;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,12 +27,12 @@
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.Transaction;
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.model.OpenProcessDefinition;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.model.op.AtomicOperation;
import org.jbpm.pvm.internal.model.op.MoveToChildActivity;
import org.jbpm.pvm.internal.wire.Descriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExceptionHandlerSynchronization.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,11 +25,11 @@
import javax.transaction.Synchronization;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.EnvironmentFactory;
import org.jbpm.api.env.Transaction;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.session.DbSession;
public class ExceptionHandlerSynchronization implements Synchronization, Command<Object> {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ExecutionImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -38,8 +38,6 @@
import org.jbpm.api.Execution;
import org.jbpm.api.JbpmException;
import org.jbpm.api.activity.ActivityExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.env.Context;
import org.jbpm.api.env.Environment;
import org.jbpm.api.job.Job;
@@ -52,6 +50,8 @@
import org.jbpm.api.model.OpenExecution;
import org.jbpm.api.model.Transition;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.pvm.internal.env.ExecutionContext;
import org.jbpm.pvm.internal.history.HistoryEvent;
import org.jbpm.pvm.internal.history.HistorySession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/model/ProcessDefinitionImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,11 +26,11 @@
import java.util.Map;
import org.jbpm.api.Execution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.OpenProcessDefinition;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.pvm.internal.task.TaskDefinitionImpl;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AbstractQuery.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,9 +27,9 @@
import org.hibernate.Query;
import org.hibernate.Session;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AvgDurationPerActivityQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AvgDurationPerActivityQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/AvgDurationPerActivityQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,8 +27,8 @@
import org.hibernate.Query;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ChoiceDistributionQueryCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ChoiceDistributionQueryCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/ChoiceDistributionQueryCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,8 +27,8 @@
import org.hibernate.Query;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.history.model.HistoryActivityInstanceImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/query/HistoryProcessInstanceQueryImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,9 +24,9 @@
import java.util.List;
import org.hibernate.Query;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.api.history.HistoryProcessInstanceQuery;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.history.model.HistoryProcessInstanceImpl;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/DeploymentImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -38,8 +38,8 @@
import org.jbpm.api.Deployment;
import org.jbpm.api.NewDeployment;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.DeployCmd;
import org.jbpm.pvm.internal.lob.Lob;
import org.jbpm.pvm.internal.stream.ByteArrayStreamInput;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/repository/RepositoryServiceImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -28,8 +28,8 @@
import org.jbpm.api.NewDeployment;
import org.jbpm.api.ProcessDefinitionQuery;
import org.jbpm.api.RepositoryService;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.model.ActivityCoordinates;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.CreateDeploymentQueryCmd;
import org.jbpm.pvm.internal.cmd.CreateProcessDefinitionQueryCmd;
import org.jbpm.pvm.internal.cmd.DeleteDeploymentCmd;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,9 +24,9 @@
import java.util.List;
import org.jbpm.api.Execution;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.task.Task;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.query.DeploymentQueryImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/RepositorySession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/RepositorySession.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/RepositorySession.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,7 +22,7 @@
package org.jbpm.pvm.internal.session;
import org.jbpm.api.NewDeployment;
-import org.jbpm.api.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/CommandTransactionCallback.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/CommandTransactionCallback.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/spring/CommandTransactionCallback.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.spring;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.springframework.orm.hibernate3.HibernateTransactionManager;
import org.springframework.orm.hibernate3.SessionFactoryUtils;
import org.springframework.transaction.PlatformTransactionManager;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AbstractServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AbstractServiceImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AbstractServiceImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,9 +25,9 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.WireObject;
import org.jbpm.pvm.internal.cmd.AbstractCommand;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.env.ProvidedAuthentication;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandMessage.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandMessage.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandMessage.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,9 +22,9 @@
package org.jbpm.pvm.internal.svc;
import org.jbpm.api.Execution;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.MessageImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AsyncCommandService.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,9 +22,9 @@
package org.jbpm.pvm.internal.svc;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.session.MessageSession;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.svc;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
/** performs an authorization check before the command is executed.
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationSession.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/AuthorizationSession.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -1,7 +1,7 @@
package org.jbpm.pvm.internal.svc;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
public interface AuthorizationSession {
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/DefaultCommandService.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,10 +22,10 @@
package org.jbpm.pvm.internal.svc;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
/**
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/EnvironmentInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/EnvironmentInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/EnvironmentInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,11 +23,11 @@
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.EnvironmentFactory;
import org.jbpm.api.env.WireObject;
import org.jbpm.pvm.internal.cmd.AbstractCommand;
+import org.jbpm.pvm.internal.cmd.Command;
/** sets up an environment around the execution of the command.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/FindGroupIds.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/FindGroupIds.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/FindGroupIds.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -3,9 +3,9 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.identity.Group;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.identity.cmd.FindGroupsCmd;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/IdentityServiceImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,9 +24,9 @@
import java.util.List;
import org.jbpm.api.IdentityService;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.identity.Group;
import org.jbpm.api.identity.User;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.identity.cmd.CreateGroupCmd;
import org.jbpm.pvm.internal.identity.cmd.CreateMembershipCmd;
import org.jbpm.pvm.internal.identity.cmd.CreateUserCmd;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/Interceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.pvm.internal.svc;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.CommandService;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/RetryInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.internal.svc;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.hibernate.StaleStateException;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/SerializeInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/SerializeInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/svc/SerializeInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,8 +27,8 @@
import java.io.ObjectOutputStream;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
/**
Copied: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java (from rev 5092, jbpm4/trunk/modules/api/src/main/java/org/jbpm/api/task/TaskHandler.java)
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -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.task;
+
+import org.jbpm.api.model.OpenExecution;
+import org.jbpm.api.task.OpenTask;
+import org.jbpm.pvm.internal.client.ClientExecution;
+
+/** for advanced task customization.
+ *
+ * The default implementation can be found in {@link DefaultTaskHandler}.
+ *
+ * @author Tom Baeyens
+ */
+public class TaskHandler {
+
+ /** called after the task is created according
+ * to the task definition. This method allows to
+ * create subtasks.
+ * @return indicates if the process execution should wait. */
+ public boolean executionCreateTask(OpenTask task) {
+ task.historyTaskStart();
+ return true;
+ }
+
+ /** called when the related execution gets a
+ * signal. this method must either
+ * {@link OpenTask#setSignalling(boolean) remove signalling} from this task
+ * or {@link OpenTask#cancel(String) cancel} it. */
+ public void executionSignal(OpenTask task) {
+ task.setSignalling(false);
+ }
+
+ /** called when the given task is assigned to an actor. */
+ public void taskAssign(OpenTask task, String userId) {
+ task.historyTaskAssign(userId);
+ }
+
+ /** called when the given task is cancelled. */
+ public void taskCancel(OpenTask task, String reason) {
+ task.historyTaskCancel(reason);
+ }
+
+ /** called when the given task completes. The default behaviour
+ * will send a signal to the execution if this task is still signalling. */
+ public void taskComplete(OpenTask task, String outcome) {
+ task.historyTaskComplete(outcome);
+
+ if (task.isSignalling()) {
+ ClientExecution execution = (ClientExecution) task.getExecution();
+ execution.signal(outcome);
+ }
+ }
+
+ /** is called when a subtask completes. this can be used to
+ * prematurely signal the execution. e.g. for "5 out of 7" scenarios.*/
+ public void taskSubTaskComplete(OpenTask task, OpenTask subTask, String outcome) {
+ }
+
+ /** is called when a variable is updated. This can be used to
+ * propagate the execution based on availability of variables. */
+ public void taskVariableUpdate(OpenTask task, String key, Object value) {
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskHandler.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/task/TaskImpl.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -39,7 +39,6 @@
import org.jbpm.api.task.Participation;
import org.jbpm.api.task.Swimlane;
import org.jbpm.api.task.Task;
-import org.jbpm.api.task.TaskHandler;
import org.jbpm.pvm.internal.history.events.TaskAssign;
import org.jbpm.pvm.internal.history.events.TaskCancel;
import org.jbpm.pvm.internal.history.events.TaskComplete;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/test/JobTestHelper.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/test/JobTestHelper.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/test/JobTestHelper.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,10 +24,10 @@
import org.hibernate.Query;
import org.hibernate.Session;
import org.jbpm.api.Execution;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
import org.jbpm.api.job.Job;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.cmd.ExecuteJobCmd;
import org.jbpm.pvm.internal.job.MessageImpl;
import org.jbpm.pvm.internal.job.TimerImpl;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/SpringTransactionInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,9 +23,9 @@
import org.hibernate.Session;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.spring.CommandTransactionCallback;
import org.jbpm.pvm.internal.svc.Interceptor;
import org.springframework.transaction.PlatformTransactionManager;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/StandardTransactionInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,9 +22,9 @@
package org.jbpm.pvm.internal.tx;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.svc.Interceptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,9 +24,9 @@
import javax.transaction.Status;
import javax.transaction.UserTransaction;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.svc.RetryInterceptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,9 +27,9 @@
import javax.transaction.UserTransaction;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.svc.Interceptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/CommandServiceBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,7 +23,7 @@
import java.util.List;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.svc.AsyncCommandService;
import org.jbpm.pvm.internal.svc.DefaultCommandService;
import org.jbpm.pvm.internal.svc.SerializeInterceptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ExecutionServiceBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ExecutionServiceBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ExecutionServiceBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.svc.ExecutionServiceImpl;
import org.jbpm.pvm.internal.wire.descriptor.ContextTypeRefDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HistoryServiceBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HistoryServiceBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/HistoryServiceBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.svc.HistoryServiceImpl;
import org.jbpm.pvm.internal.wire.descriptor.ContextTypeRefDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/IdentityServiceBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/IdentityServiceBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/IdentityServiceBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.svc.IdentityServiceImpl;
import org.jbpm.pvm.internal.wire.descriptor.ContextTypeRefDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobExecutorBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobExecutorBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobExecutorBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.util.XmlUtil;
import org.jbpm.pvm.internal.wire.descriptor.ContextTypeRefDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/JobTestHelperBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.test.JobTestHelper;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
import org.jbpm.pvm.internal.xml.Parse;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ManagementServiceBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ManagementServiceBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/ManagementServiceBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.svc.ManagementServiceImpl;
import org.jbpm.pvm.internal.wire.descriptor.ContextTypeRefDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/TaskServiceBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/TaskServiceBinding.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/TaskServiceBinding.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,7 +21,7 @@
*/
package org.jbpm.pvm.internal.wire.binding;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.svc.TaskServiceImpl;
import org.jbpm.pvm.internal.wire.descriptor.ContextTypeRefDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CommandServiceDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CommandServiceDescriptor.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/CommandServiceDescriptor.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,7 +24,7 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.api.cmd.CommandService;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.svc.Interceptor;
import org.jbpm.pvm.internal.wire.Descriptor;
import org.jbpm.pvm.internal.wire.WireContext;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/builder/BuilderTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,9 +24,9 @@
import java.util.List;
import java.util.Map;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.model.Transition;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.model.ActivityImpl;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventListenerTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,14 +21,14 @@
*/
package org.jbpm.pvm.eventlistener;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.model.Event;
import org.jbpm.pvm.activities.AutomaticActivity;
import org.jbpm.pvm.activities.PrintLn;
import org.jbpm.pvm.activities.TestConsoleTestCase;
import org.jbpm.pvm.activities.WaitState;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
public class EventListenerTest extends TestConsoleTestCase {
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/eventlistener/EventPropagationTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,13 +24,13 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.model.Event;
import org.jbpm.pvm.activities.DisplaySource;
import org.jbpm.pvm.activities.TestConsole;
import org.jbpm.pvm.activities.WaitState;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/embedded/Loan.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,8 +22,8 @@
package org.jbpm.pvm.executionmode.embedded;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.model.ExecutionImpl;
/**
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/executionmode/object/ObjectExecutionModeTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -23,12 +23,12 @@
import junit.framework.TestCase;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.activities.AutomaticActivity;
import org.jbpm.pvm.activities.WaitState;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
public class ObjectExecutionModeTest extends TestCase {
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/GroovyExpressionTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,12 +21,12 @@
*/
package org.jbpm.pvm.internal.expr;
-import org.jbpm.api.client.ClientExecution;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.EnvironmentFactory;
import org.jbpm.pvm.activities.WaitState;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
import org.jbpm.pvm.internal.cfg.JbpmConfiguration;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.script.ScriptManager;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/internal/expr/JuelExpressionTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,12 +21,12 @@
*/
package org.jbpm.pvm.internal.expr;
-import org.jbpm.api.client.ClientExecution;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.EnvironmentFactory;
import org.jbpm.pvm.activities.WaitState;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
import org.jbpm.pvm.internal.cfg.JbpmConfiguration;
+import org.jbpm.pvm.internal.client.ClientExecution;
import org.jbpm.pvm.internal.env.ExecutionContext;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.script.ScriptManager;
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/println/PrintlnTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,10 +21,10 @@
*/
package org.jbpm.pvm.println;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.pvm.activities.PrintLnBuilder;
import org.jbpm.pvm.activities.TestConsoleTestCase;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
public class PrintlnTest extends TestConsoleTestCase {
Modified: jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/pvm/src/test/java/org/jbpm/pvm/tx/BasicTransactionTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,9 +27,10 @@
import org.hibernate.Session;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.env.Transaction;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.type.variable.StringVariable;
import org.jbpm.test.JbpmTestCase;
@@ -39,6 +40,13 @@
*/
public class BasicTransactionTest extends JbpmTestCase {
+ protected CommandService commandService;
+
+ public void setUp() throws Exception {
+ super.setUp();
+ commandService = processEngine.get(CommandService.class);
+ }
+
public void testCommit() {
commandService.execute(new Command<Object>() {
public Object execute(Environment environment) {
Modified: jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-base/src/main/java/org/jbpm/test/JbpmTestCase.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -36,7 +36,6 @@
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.RepositoryService;
import org.jbpm.api.TaskService;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.task.Task;
/** base class for persistent jBPM tests.
@@ -68,8 +67,6 @@
protected static HistoryService historyService;
protected static IdentityService identityService;
- protected static CommandService commandService;
-
/** registered deployments. registered deployments will be deleted automatically
* in the tearDown. This is a convenience function as each test is expected to clean up the DB. */
protected List<Long> registeredDeployments = new ArrayList<Long>();
@@ -100,7 +97,6 @@
managementService = processEngine.getManagementService();
taskService = processEngine.getTaskService();
identityService = processEngine.getIdentityService();
- commandService = processEngine.get(CommandService.class);
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskHandlerTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,7 +24,7 @@
import org.jbpm.api.Execution;
import org.jbpm.api.task.OpenTask;
import org.jbpm.api.task.Task;
-import org.jbpm.api.task.TaskHandler;
+import org.jbpm.pvm.internal.task.TaskHandler;
import org.jbpm.test.JbpmTestCase;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/LoadTestCase.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,9 +27,9 @@
import org.hibernate.Query;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.util.ReflectUtil;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ContinuationTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,10 +25,10 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.OpenProcessDefinition;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.cmd.Command;
/**
* @author Tom Baeyens
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveMessagesTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveMessagesTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveMessagesTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -29,9 +29,9 @@
import org.jbpm.api.Execution;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.StartProcessInstanceCmd;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveTestCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveTestCommand.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/ExclusiveTestCommand.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,9 +27,9 @@
import org.hibernate.Session;
import org.jbpm.api.Execution;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceMessageTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,10 +26,10 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.MessageSession;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailOnceTestCommand.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,10 +21,10 @@
*/
package org.jbpm.test.load.async;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.model.CommentImpl;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingMessageTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,9 +25,9 @@
import org.hibernate.Session;
import org.jbpm.api.JbpmException;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.job.Job;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.MessageSession;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/FailingTestCommand.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,9 +21,9 @@
*/
package org.jbpm.test.load.async;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.session.DbSession;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/GenerateExceptionTestCommand.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -21,8 +21,8 @@
*/
package org.jbpm.test.load.async;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor;
import org.jbpm.pvm.internal.wire.descriptor.ObjectDescriptor;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/JobExecutorTestCase.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/JobExecutorTestCase.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/JobExecutorTestCase.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,9 +27,9 @@
import org.hibernate.Query;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
-import org.jbpm.api.cmd.CommandService;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
+import org.jbpm.pvm.internal.cmd.CommandService;
import org.jbpm.pvm.internal.job.JobImpl;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.test.JbpmTestCase;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageCommand.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,8 +24,8 @@
import java.util.Random;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.model.CommentImpl;
import org.jbpm.pvm.internal.wire.descriptor.IntegerDescriptor;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/async/NormalMessageTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,9 +25,9 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.job.CommandMessage;
import org.jbpm.pvm.internal.jobexecutor.JobExecutor;
import org.jbpm.pvm.internal.model.CommentImpl;
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/AddCommentCmd.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -22,8 +22,8 @@
package org.jbpm.test.load.messages;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.model.CommentImpl;
/**
Modified: jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java
===================================================================
--- jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-load/src/test/java/org/jbpm/test/load/messages/MessageProcessingTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,10 +25,10 @@
import java.util.List;
import org.hibernate.Session;
-import org.jbpm.api.cmd.Command;
import org.jbpm.api.env.Environment;
import org.jbpm.api.model.Comment;
import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.cmd.Command;
import org.jbpm.pvm.internal.cmd.CompositeCmd;
import org.jbpm.pvm.internal.cmd.SendMessageCmd;
import org.jbpm.pvm.internal.job.CommandMessage;
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/AutomaticDecisionTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,9 +26,9 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/BasicExecutionFlowTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -28,10 +28,10 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
/** shows wait states and automatic activities in a simple
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/EventTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,14 +27,14 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;
import org.jbpm.api.model.Activity;
import org.jbpm.api.model.Event;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
/** shows how actions are listeners to following processDefinition events:
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExceptionHandlerTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,13 +25,13 @@
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;
import org.jbpm.api.model.Event;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
/**
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExecutionStateTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -28,9 +28,9 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
/** shows the basics of the state property on the execution.
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ExternalDecisionTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,10 +27,10 @@
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
/**
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/FunctionalActivityTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -28,13 +28,13 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;
import org.jbpm.api.model.Activity;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/LoopingTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -7,9 +7,9 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
public class LoopingTest extends BaseJbpmTestCase {
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeStateTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -27,9 +27,9 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
/**
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableDeclarationTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,11 +26,11 @@
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.model.Activity;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.pvm.internal.wire.descriptor.StringDescriptor;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/ScopeVariableTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -25,10 +25,10 @@
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
import org.jbpm.api.model.OpenExecution;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
import org.jbpm.test.BaseJbpmTestCase;
/**
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/SubProcessTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -26,10 +26,10 @@
import org.jbpm.api.activity.ActivityBehaviour;
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.test.BaseJbpmTestCase;
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/TransitionEventsTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -24,13 +24,13 @@
import java.util.ArrayList;
import java.util.List;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.api.listener.EventListener;
import org.jbpm.api.listener.EventListenerExecution;
import org.jbpm.api.model.Event;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
/**
Modified: jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/VariableTest.java
===================================================================
--- jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/VariableTest.java 2009-06-23 13:30:13 UTC (rev 5095)
+++ jbpm4/trunk/modules/test-pojo/src/main/java/org/jbpm/test/activities/VariableTest.java 2009-06-23 15:17:20 UTC (rev 5096)
@@ -28,10 +28,10 @@
import org.jbpm.api.activity.ActivityExecution;
import org.jbpm.api.activity.ExternalActivityBehaviour;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.client.ClientProcessDefinition;
-import org.jbpm.api.client.ClientProcessInstance;
import org.jbpm.pvm.internal.builder.ProcessDefinitionBuilder;
+import org.jbpm.pvm.internal.client.ClientExecution;
+import org.jbpm.pvm.internal.client.ClientProcessDefinition;
+import org.jbpm.pvm.internal.client.ClientProcessInstance;
import org.jbpm.test.BaseJbpmTestCase;
/**
16 years, 10 months
JBoss JBPM SVN: r5095 - jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-06-23 09:30:13 -0400 (Tue, 23 Jun 2009)
New Revision: 5095
Modified:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java
Log:
Intermediate commit for JBPM-2303
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java 2009-06-23 13:29:37 UTC (rev 5094)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/activities/ForkToTaskTest.java 2009-06-23 13:30:13 UTC (rev 5095)
@@ -21,6 +21,9 @@
*/
package org.jbpm.test.activities;
+import java.util.List;
+
+import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
@@ -57,4 +60,54 @@
executionService.startProcessInstanceByKey("ForkToTasks");
}
+
+ public void testFork() {
+ deployJpdlXmlString(
+ "<process name='forkTest'>" +
+ " <start g='0,252,48,48' name='start1'>" +
+ " <transition to='fork1'/>" +
+ " </start>" +
+ " <fork g='96,252,48,48' name='fork1'>" +
+ " <transition g='-53,-18' name='review1' to='review1'/>" +
+ " <transition g='-49,-18' name='review2' to='review2'/>" +
+ " <transition g='-53,-18' name='control1' to='control1'/>" +
+ " </fork>" +
+ " <task candidate-users='requester' g='300,372,193,52' name='review1'>" +
+ " <transition g='-41,-18' name='Approve' to='join1'/>" +
+ " <transition g='-54,-18' name='Reject' to='rejected1'/>" +
+ " </task>" +
+ " <task candidate-users='requester' g='300,132,193,52' name='review2'>" +
+ " <transition g='-41,-18' name='Approve' to='join1'/>" +
+ " <transition g='-54,-18' name='Reject' to='rejected2'/>" +
+ " </task>" +
+ " <task candidate-groups='control' g='300,252,193,52' name='control1' />" +
+ " <join g='756,252,48,48' name='join1'>" +
+ " <transition to='end1'/>" +
+ " </join>" +
+ " <end g='972,252,48,48' name='end1'/>" +
+ " <end-cancel g='600,132,48,48' name='rejected2'/>" +
+ " <end-cancel g='600,372,48,48' name='rejected1'/>" +
+ "</process>"
+ );
+
+ String processInstanceId = executionService.startProcessInstanceByKey("forkTest").getId();
+ List<Task> tasks = taskService.createTaskQuery().processInstanceId(processInstanceId).list();
+ assertEquals(3, tasks.size());
+
+ final String requester = "requester";
+ List<Task> tasksForRequester = taskService.findGroupTasks(requester);
+ assertEquals(2, tasksForRequester.size());;
+
+ // Uncomment these lines to make the test fail
+ /*
+ for (Task task : tasksForRequester) {
+ taskService.takeTask(task.getDbid(), requester);
+ taskService.completeTask(task.getDbid(), "Approve");
+ }
+ */
+
+ // Adding a state after joing and executing these lines works ...
+ //String id = executionService.findExecutionById(processInstanceId).findActiveExecutionIn("test").getId();
+ //executionService.signalExecutionById(id);
+ }
}
16 years, 10 months
JBoss JBPM SVN: r5094 - jbpm4/trunk/modules/test-db.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-23 09:29:37 -0400 (Tue, 23 Jun 2009)
New Revision: 5094
Modified:
jbpm4/trunk/modules/test-db/pom.xml
Log:
JBPM-2354 added comment about fixing excluded integration tests
Modified: jbpm4/trunk/modules/test-db/pom.xml
===================================================================
--- jbpm4/trunk/modules/test-db/pom.xml 2009-06-23 13:27:08 UTC (rev 5093)
+++ jbpm4/trunk/modules/test-db/pom.xml 2009-06-23 13:29:37 UTC (rev 5094)
@@ -195,9 +195,12 @@
<failIfNoTests>false</failIfNoTests>
<trimStackTrace>false</trimStackTrace>
<excludes>
+ <!-- JBPM-2354 following tests need to be fixed: -->
<exclude>org/jbpm/test/activities/ForkJoinInSameTransactionTest.java</exclude>
<exclude>org/jbpm/test/execution/ConcurrentEndTest.java</exclude>
<exclude>org/jbpm/test/async/AsyncEndCombinationTest.java</exclude>
+
+ <!-- i don't think the following test should be part of the integration test suite -->
<exclude>reporting/SQLStmtTest.java</exclude>
</excludes>
</configuration>
16 years, 10 months
JBoss JBPM SVN: r5093 - in jbpm4/trunk/modules: enterprise/src/test/java/org/jbpm/test/deployer and 6 other directories.
by do-not-reply@jboss.org
Author: tom.baeyens(a)jboss.com
Date: 2009-06-23 09:27:08 -0400 (Tue, 23 Jun 2009)
New Revision: 5093
Added:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java
Removed:
jbpm4/trunk/modules/enterprise/src/main/java/org/jbpm/enterprise/internal/jta/
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/RetryInterceptorDescriptor.java
Modified:
jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestServlet.java
jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java
jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransaction.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RetryInterceptorBinding.java
jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.jta.cfg.xml
Log:
JBPM-2339 JTA cleanup, creating jndi name constant for jboss global user transaction and adding retry interceptor properly to jta config
Modified: jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestServlet.java
===================================================================
--- jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestServlet.java 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/enterprise/src/test/java/org/jbpm/test/deployer/DeployerTestServlet.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -52,6 +52,7 @@
try
{
+ // TODO remove explicit transaction demarcation JBPM-2353
InitialContext ctx = new InitialContext();
tx = (UserTransaction)ctx.lookup("UserTransaction");
Modified: jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java
===================================================================
--- jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/integration/console/src/main/java/org/jbpm/integration/console/ServiceLocator.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -55,6 +55,7 @@
try
{
Context ctx = createContext();
+ // TODO remove explicit transaction demarcation JBPM-2353
tx = (UserTransaction) ctx.lookup("java:comp/UserTransaction");
}
catch (Exception e)
Modified: jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java
===================================================================
--- jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/integration/spi/src/main/java/org/jbpm/integration/spi/DeploymentAdaptor.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -50,6 +50,7 @@
try
{
InitialContext ctx = new InitialContext();
+ // TODO remove explicit transaction demarcation JBPM-2353
tx = (UserTransaction)ctx.lookup("UserTransaction");
tx.begin();
@@ -99,6 +100,7 @@
RepositoryService repositoryService = jbpmService.getProcessEngine().getRepositoryService();
InitialContext ctx = new InitialContext();
+ // TODO remove explicit transaction demarcation JBPM-2353
tx = (UserTransaction)ctx.lookup("UserTransaction");
tx.begin();
Added: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java (rev 0)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -0,0 +1,58 @@
+/*
+ * 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.jta;
+
+import javax.transaction.Status;
+import javax.transaction.UserTransaction;
+
+import org.jbpm.api.cmd.Command;
+import org.jbpm.api.env.Environment;
+import org.jbpm.internal.log.Log;
+import org.jbpm.pvm.internal.svc.RetryInterceptor;
+
+
+/**
+ * @author Tom Baeyens
+ */
+public class JtaRetryInterceptor extends RetryInterceptor {
+
+ private static Log log = Log.getLog(JtaRetryInterceptor.class.getName());
+
+ public <T> T execute(Command<T> command) {
+ JtaTransaction jtaTransaction = Environment.getFromCurrent(JtaTransaction.class);
+ UserTransaction userTransaction = jtaTransaction.lookupJeeUserTransaction();
+ int status = JtaTransaction.getUserTransactionStatus(userTransaction);
+ if (status == Status.STATUS_NO_TRANSACTION) {
+ return executeWithRetry(command);
+ }
+ log.trace("transaction in progress. skipping retry interceptor");
+ return executeWithoutRetry(command);
+ }
+
+ public <T> T executeWithRetry(Command<T> command) {
+ return super.execute(command);
+ }
+
+ public <T> T executeWithoutRetry(Command<T> command) {
+ return next.execute(command);
+ }
+}
Property changes on: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaRetryInterceptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransaction.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransaction.java 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransaction.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -30,16 +30,21 @@
import org.jbpm.api.JbpmException;
import org.jbpm.api.env.Transaction;
+import org.jbpm.internal.log.Log;
/**
* @author Tom Baeyens
*/
public class JtaTransaction implements Transaction {
+
+ private static Log log = Log.getLog(JtaTransaction.class.getName());
+
+ public static final String JNDINAME_USERTRANSACTION_JBOSS_GLOBAL = "UserTransaction";
+ public static final String JNDINAME_TRANSACTIONMANAGER_JBOSS_GLOBAL = "java:/TransactionManager";
- protected String jbossUserTransactionJndiName = "UserTransaction";
- protected String userTransactionJndiName = "java:comp/UserTransaction";
- protected String transactionManagerJndiName = "java:/TransactionManager";
+ protected String userTransactionJndiName = JNDINAME_USERTRANSACTION_JBOSS_GLOBAL;
+ protected String transactionManagerJndiName = JNDINAME_TRANSACTIONMANAGER_JBOSS_GLOBAL;
public boolean isRollbackOnly() {
try {
@@ -108,20 +113,7 @@
// lookups //////////////////////////////////////////////////////////////////
public UserTransaction lookupJeeUserTransaction() {
- Object tx;
-
- try
- {
- // non jee context, i.e. JBPMDeployer (jboss only)
- tx = lookupFromJndi(jbossUserTransactionJndiName);
- }
- catch (JbpmException e)
- {
- // jee components
- tx = lookupFromJndi(userTransactionJndiName);
- }
-
- return (UserTransaction) tx;
+ return (UserTransaction) lookupFromJndi(userTransactionJndiName);
}
public javax.transaction.Transaction lookupJeeTransaction() {
@@ -145,4 +137,15 @@
throw new JbpmException("couldn't lookup '"+jndiName+"' from jndi: "+e.getMessage()+": "+e.getMessage(), e);
}
}
+
+ public static int getUserTransactionStatus(UserTransaction userTransaction) {
+ int status = -1;
+ try {
+ status = userTransaction.getStatus();
+ } catch (SystemException e) {
+ throw new JbpmException("couldn't get transaction status: "+e.getMessage(), e);
+ }
+ log.trace("jta transaction status: "+JtaStatusHelper.toString(status));
+ return status;
+ }
}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/tx/jta/JtaTransactionInterceptor.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -45,13 +45,7 @@
UserTransaction userTransaction = jtaTransaction.lookupJeeUserTransaction();
- int status = -1;
- try {
- status = userTransaction.getStatus();
- } catch (SystemException e) {
- throw new JbpmException("couldn't get transaction status: "+e.getMessage(), e);
- }
- log.debug("jta transaction status: "+JtaStatusHelper.toString(status));
+ int status = JtaTransaction.getUserTransactionStatus(userTransaction);
if (status == Status.STATUS_ACTIVE) {
return executeInExistingTx(command);
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RetryInterceptorBinding.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RetryInterceptorBinding.java 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/binding/RetryInterceptorBinding.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -22,7 +22,9 @@
package org.jbpm.pvm.internal.wire.binding;
import org.jbpm.pvm.internal.svc.RetryInterceptor;
-import org.jbpm.pvm.internal.wire.descriptor.RetryInterceptorDescriptor;
+import org.jbpm.pvm.internal.tx.jta.JtaRetryInterceptor;
+import org.jbpm.pvm.internal.util.XmlUtil;
+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;
@@ -40,13 +42,21 @@
}
public Object parse(Element element, Parse parse, Parser parser) {
- RetryInterceptorDescriptor retryInterceptorDescriptor = new RetryInterceptorDescriptor();
+ RetryInterceptor retryInterceptor = null;
+ String type = XmlUtil.attribute(element, "type");
+ if ("jta".equals(type)) {
+ retryInterceptor = new JtaRetryInterceptor();
+ } else {
+ retryInterceptor = new RetryInterceptor();
+ }
+
+
if (element.hasAttribute("retries")) {
String retriesText = element.getAttribute("retries");
try {
int retries = Integer.parseInt(retriesText);
- retryInterceptorDescriptor.setRetries(retries);
+ retryInterceptor.setRetries(retries);
} catch (NumberFormatException e) {
parse.addProblem("couldn't parse retries "+retriesText, element);
}
@@ -56,7 +66,7 @@
String delayText = element.getAttribute("delay");
try {
long delay = Long.parseLong(delayText);
- retryInterceptorDescriptor.setDelay(delay);
+ retryInterceptor.setDelay(delay);
} catch (NumberFormatException e) {
parse.addProblem("couldn't parse delay "+delayText, element);
}
@@ -66,12 +76,12 @@
String delayFactorText = element.getAttribute("delay-factor");
try {
long delayFactor = Long.parseLong(delayFactorText);
- retryInterceptorDescriptor.setDelayFactor(delayFactor);
+ retryInterceptor.setDelayFactor(delayFactor);
} catch (NumberFormatException e) {
parse.addProblem("couldn't parse delay-factor "+delayFactorText, element);
}
}
- return retryInterceptorDescriptor;
+ return new ProvidedObjectDescriptor(retryInterceptor);
}
}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/RetryInterceptorDescriptor.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/RetryInterceptorDescriptor.java 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/wire/descriptor/RetryInterceptorDescriptor.java 2009-06-23 13:27:08 UTC (rev 5093)
@@ -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.internal.svc.RetryInterceptor;
-import org.jbpm.pvm.internal.wire.WireContext;
-
-/**
- * @author Tom Baeyens
- */
-public class RetryInterceptorDescriptor extends AbstractDescriptor {
-
- private static final long serialVersionUID = 1L;
-
- RetryInterceptor retryInterceptor = new RetryInterceptor();
-
- public Object construct(WireContext wireContext) {
- return retryInterceptor;
- }
-
- public void setRetries(int retries) {
- retryInterceptor.setRetries(retries);
- }
- public void setDelay(long delay) {
- retryInterceptor.setDelay(delay);
- }
- public void setDelayFactor(long delayFactor) {
- retryInterceptor.setDelayFactor(delayFactor);
- }
-
-
-}
Modified: jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.jta.cfg.xml
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.jta.cfg.xml 2009-06-23 11:52:47 UTC (rev 5092)
+++ jbpm4/trunk/modules/pvm/src/main/resources/jbpm.tx.jta.cfg.xml 2009-06-23 13:27:08 UTC (rev 5093)
@@ -5,6 +5,7 @@
<process-engine-context>
<command-service>
<environment-interceptor />
+ <retry-interceptor type="jta" />
<jta-transaction-interceptor />
</command-service>
</process-engine-context>
16 years, 10 months
JBoss JBPM SVN: r5092 - in jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal: hibernate and 1 other directories.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-06-23 07:52:47 -0400 (Tue, 23 Jun 2009)
New Revision: 5092
Removed:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionsCmd.java
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java
Log:
Cleanup up usage of findExecutionByKey, since it does not makes sense (only the root execution has a key). Operation was already removed from executionService, but not yet from dbSession and commands.
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2009-06-23 10:24:40 UTC (rev 5091)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionCmd.java 2009-06-23 11:52:47 UTC (rev 5092)
@@ -35,19 +35,6 @@
private static final long serialVersionUID = 1L;
protected String executionId;
- protected String processDefinitionName;
- protected String executionKey;
-
- public FindExecutionCmd(String processDefinitionName, String executionKey) {
- if (processDefinitionName==null) {
- throw new JbpmException("processDefinitionName is null");
- }
- this.processDefinitionName = processDefinitionName;
- if (executionKey==null) {
- throw new JbpmException("executionKey is null");
- }
- this.executionKey = executionKey;
- }
public FindExecutionCmd(String executionId) {
if (executionId==null) {
@@ -58,10 +45,7 @@
public Execution execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
- if (executionId!=null) {
- return dbSession.findExecutionById(executionId);
- }
- Execution execution = dbSession.findExecutionByKey(processDefinitionName, executionKey);
- return execution;
+ return dbSession.findExecutionById(executionId);
}
+
}
Deleted: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionsCmd.java 2009-06-23 10:24:40 UTC (rev 5091)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/FindExecutionsCmd.java 2009-06-23 11:52:47 UTC (rev 5092)
@@ -1,73 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jbpm.pvm.internal.cmd;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.List;
-
-import org.jbpm.api.Execution;
-import org.jbpm.api.JbpmException;
-import org.jbpm.api.client.ClientExecution;
-import org.jbpm.api.env.Environment;
-import org.jbpm.pvm.internal.session.DbSession;
-
-
-/**
- * @author Tom Baeyens
- */
-public class FindExecutionsCmd extends AbstractCommand<List<Execution>> {
-
- private static final long serialVersionUID = 1L;
-
- protected String executionId;
-
- public FindExecutionsCmd(String executionId) {
- if (executionId==null) {
- throw new JbpmException("executionId is null");
- }
- this.executionId = executionId;
- }
-
-
- public List<Execution> execute(Environment environment) throws Exception {
- List<Execution> executions = new ArrayList<Execution>();
-
- DbSession dbSession = environment.get(DbSession.class);
- ClientExecution execution = dbSession.findExecutionById(executionId);
- scanExecutions(execution, executions);
-
- return executions;
- }
-
- public void scanExecutions(Execution execution, List<Execution> executions) {
-
- executions.add(execution);
-
- Collection<? extends Execution> childExecutions = execution.getExecutions();
- if (childExecutions!=null) {
- for (Execution childExecution: childExecutions) {
- scanExecutions(childExecution, executions);
- }
- }
- }
-}
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-06-23 10:24:40 UTC (rev 5091)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/hibernate/DbSessionImpl.java 2009-06-23 11:52:47 UTC (rev 5092)
@@ -207,15 +207,6 @@
query.setMaxResults(1);
return (ClientExecution) query.uniqueResult();
}
-
- public ClientExecution findExecutionByKey(String processDefinitionName, String executionKey) {
- // query definition can be found at the bottom of resource jbpm.pvm.execution.hbm.xml
- Query query = session.getNamedQuery("findExecutionByKey");
- query.setString("processDefinitionName", processDefinitionName);
- query.setString("executionKey", executionKey);
- query.setMaxResults(1);
- return (ClientExecution) query.uniqueResult();
- }
public List<String> findProcessInstanceIds(String processDefinitionId) {
// query definition can be found at the bottom of resource jbpm.pvm.job.hbm.xml
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java 2009-06-23 10:24:40 UTC (rev 5091)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/session/DbSession.java 2009-06-23 11:52:47 UTC (rev 5092)
@@ -33,7 +33,6 @@
import org.jbpm.pvm.internal.query.HistoryActivityInstanceQueryImpl;
import org.jbpm.pvm.internal.query.HistoryProcessInstanceQueryImpl;
import org.jbpm.pvm.internal.query.JobQueryImpl;
-import org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl;
import org.jbpm.pvm.internal.query.ProcessInstanceQueryImpl;
import org.jbpm.pvm.internal.task.TaskQueryImpl;
@@ -90,10 +89,6 @@
/** the process instance uniquely identified by the given executionKey. */
ClientExecution findProcessInstanceById(String processInstanceId);
-
- /** the execution uniquely identified by the given processDefinition name
- * and the execution key. */
- ClientExecution findExecutionByKey(String processDefinitionName, String executionKey);
/* find ids for all process instances for a given process definition. */
List<String> findProcessInstanceIds(String processDefinitionId);
16 years, 10 months
JBoss JBPM SVN: r5091 - in jbpm4/trunk/modules: test-db/src/test/java/org/jbpm/test/task and 1 other directory.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-06-23 06:24:40 -0400 (Tue, 23 Jun 2009)
New Revision: 5091
Modified:
jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java
Log:
Fix for JBPM-2340
Modified: jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java
===================================================================
--- jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java 2009-06-23 10:15:15 UTC (rev 5090)
+++ jbpm4/trunk/modules/pvm/src/main/java/org/jbpm/pvm/internal/cmd/GetTaskCommentsCmd.java 2009-06-23 10:24:40 UTC (rev 5091)
@@ -22,6 +22,7 @@
package org.jbpm.pvm.internal.cmd;
import java.util.ArrayList;
+import java.util.Collections;
import java.util.List;
import org.jbpm.api.cmd.Command;
@@ -47,9 +48,14 @@
public List<Comment> execute(Environment environment) throws Exception {
DbSession dbSession = environment.get(DbSession.class);
TaskImpl task = dbSession.get(TaskImpl.class, taskDbid);
- List<Comment> comments = task.getComments();
- forceInitializationAndClean(comments);
- return comments;
+
+ if (task != null) {
+ List<Comment> comments = task.getComments();
+ forceInitializationAndClean(comments);
+ return comments;
+ } else {
+ return Collections.emptyList();
+ }
}
protected void forceInitializationAndClean(List<Comment> comments) {
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java 2009-06-23 10:15:15 UTC (rev 5090)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/task/TaskCommentsTest.java 2009-06-23 10:24:40 UTC (rev 5091)
@@ -69,4 +69,10 @@
// will show up as a fixme.
taskService.deleteTask(taskDbid);
}
+
+ public void testGetTaskCommentsWithUnexistingTaskId() {
+ List<Comment> comments = taskService.getTaskComments(-1234L);
+ assertTrue(comments.isEmpty());
+ }
+
}
16 years, 10 months
JBoss JBPM SVN: r5090 - in jbpm4/branches/jimma/modules/migration/src: main/java/org/jbpm/jpdl/internal/convert/action and 3 other directories.
by do-not-reply@jboss.org
Author: jim.ma
Date: 2009-06-23 06:15:15 -0400 (Tue, 23 Jun 2009)
New Revision: 5090
Added:
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/CreateTimerAction.java
Modified:
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReader.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/Script.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Fork.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Node.java
jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/StartState.java
jbpm4/branches/jimma/modules/migration/src/main/resources/action.converter.types.xml
jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java
Log:
Added timer conversion and node Async attribute conversion
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReader.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReader.java 2009-06-23 10:08:08 UTC (rev 5089)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReader.java 2009-06-23 10:15:15 UTC (rev 5090)
@@ -26,7 +26,6 @@
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
-import java.net.URISyntaxException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
@@ -40,6 +39,7 @@
import org.dom4j.DocumentHelper;
import org.dom4j.Element;
import org.jbpm.jpdl.internal.convert.action.Action;
+import org.jbpm.jpdl.internal.convert.action.CreateTimerAction;
import org.jbpm.jpdl.internal.convert.node.Node;
import org.jbpm.jpdl.internal.convert.node.StartState;
import org.jbpm.jpdl.internal.convert.node.TaskNode;
@@ -159,24 +159,25 @@
// read the process name
parseProcessDefinitionAttributes(root, jpdl4Document);
+ Element jpdl4Element = jpdl4Document.getRootElement();
// get the process description
String description = root.elementTextTrim("description");
if (description != null)
{
- jpdl4Document.getRootElement().addComment(description);
+ jpdl4Element.addComment(description);
}
// first pass: read most content
- readSwimlanes(root, jpdl4Document.getRootElement());
+ readSwimlanes(root, jpdl4Element);
readActions(root, null, null);
- readNodes(root, jpdl4Document.getRootElement());
+ readNodes(root, jpdl4Element);
- readEvents(root, jpdl4Document.getRootElement());
- /*
- readExceptionHandlers(root, jpdl4Document);
- */
- readTasks(root, jpdl4Document.getRootElement());
+ readEvents(root, jpdl4Element);
+
+ readExceptionHandlers(root, jpdl4Element);
+ readTasks(root, jpdl4Element);
+
// second pass processing
resolveTransitionDestinations();
resolveActionReferences();
@@ -204,7 +205,7 @@
return jpdl4Document;
}
- //DONE!
+
protected Element parseProcessDefinitionAttributes(Element root, Document doc)
{
@@ -355,62 +356,59 @@
}
// get the condition
- //TODO: Revisit it to see when the this will be invoked and how to
- /*String condition = taskElement.elementTextTrim("condition");
- if (condition != null)
- {
- task.setCondition(condition);
+
+ String condition = taskElement.elementTextTrim("condition");
+ if (condition == null) {
+ condition = taskElement.attributeValue("condition");
+ }
+ if (condition == null) {
+ //TODO: Unsupported condition
+ addWarning("Unsupported condition attribute converstion for task : " + taskElement.asXML());
}
- else
- {
- task.setCondition(taskElement.attributeValue("condition"));
- }*/
-
+
// parse common subelements
- //TODO: convert the task timer
- //readTaskTimers(taskElement, task);
+ readTaskTimers(taskElement, jpdlElement);
readEvents(taskElement, jpdlElement);
- //readExceptionHandlers(taskElement, task);
+ readExceptionHandlers(taskElement, jpdlElement);
- // TODO:duedate and priority
- /*String duedateText = taskElement.attributeValue("duedate");
+
+ String duedateText = taskElement.attributeValue("duedate");
if (duedateText == null)
{
duedateText = taskElement.attributeValue("dueDate");
}
- task.setDueDate(duedateText);
+
+ if (duedateText != null) {
+ //TODO: Unsupported duedateText
+ addWarning("Unsupported duedateText attribute converstion for task : " + taskElement.asXML());
+ }
+
+
String priorityText = taskElement.attributeValue("priority");
if (priorityText != null)
{
- task.setPriority(Task.parsePriority(priorityText));
+ //TODO: Unsupported priorityText
+ addWarning("Unsupported priorityText attribute converstion for task : " + taskElement.asXML());
+
}
- // if this task is in the context of a taskNode, associate them
- if (taskNode != null)
- {
- taskNode.addTask(task);
- }
-*/
- // TODO: blocking
- /* String blockingText = taskElement.attributeValue("blocking");
+
+ String blockingText = taskElement.attributeValue("blocking");
if (blockingText != null)
{
- if (("true".equalsIgnoreCase(blockingText)) || ("yes".equalsIgnoreCase(blockingText)) || ("on".equalsIgnoreCase(blockingText)))
- {
- task.setBlocking(true);
- }
- }*/
+ //TODO: Unsupported blockingText
+ addWarning("Unsupported blocking attribute converstion for task : " + taskElement.asXML());
- //TODO: signalling
- /*String signallingText = taskElement.attributeValue("signalling");
+ }
+
+ String signallingText = taskElement.attributeValue("signalling");
if (signallingText != null)
{
- if (("false".equalsIgnoreCase(signallingText)) || ("no".equalsIgnoreCase(signallingText)) || ("off".equalsIgnoreCase(signallingText)))
- {
- task.setSignalling(false);
- }
- }*/
+ //TODO: Unsupported signalling
+ addWarning("Unsupported signallingText attribute converstion for task : " + taskElement.asXML());
+ }
+
// assignment
String swimlaneName = taskElement.attributeValue("swimlane");
Element assignmentElement = taskElement.element("assignment");
@@ -457,31 +455,20 @@
log.info("process xml information: no swimlane or assignment specified for task '" + taskElement.asXML() + "'");
}
- //TODO:notify
- /*String notificationsText = taskElement.attributeValue("notify");
+ String notificationsText = taskElement.attributeValue("notify");
if (notificationsText != null
&& ("true".equalsIgnoreCase(notificationsText) || "on".equalsIgnoreCase(notificationsText) || "yes".equalsIgnoreCase(notificationsText)))
{
- String notificationEvent = Event.EVENTTYPE_TASK_ASSIGN;
- Event event = task.getEvent(notificationEvent);
- if (event == null)
- {
- event = new Event(notificationEvent);
- task.addEvent(event);
- }
- Delegation delegation = createMailDelegation(notificationEvent, null, null, null, null);
- Action action = new Action(delegation);
- action.setProcessDefinition(processDefinition);
- action.setName(task.getName());
- event.addAction(action);
- }*/
+ //TODO: Unsupported controller
+ addWarning("Unsupported notify converstion for task : " + taskElement.asXML());
+ }
- //TODO: task controller
-/* Element taskControllerElement = taskElement.element("controller");
+ Element taskControllerElement = taskElement.element("controller");
if (taskControllerElement != null)
{
- task.setTaskController(readTaskController(taskControllerElement));
- }*/
+ //TODO: Unsupported controller
+ addWarning("Unsupported controller converstion for task : " + taskElement.asXML());
+ }
return task4;
}
@@ -562,23 +549,22 @@
jpdl4Element.addComment(description);
}
- //TODO:Convert Async
-/* String asyncText = nodeElement.attributeValue("async");
+ String asyncText = nodeElement.attributeValue("async");
if ("true".equalsIgnoreCase(asyncText))
{
- node.setAsync(true);
+ jpdl4Element.addAttribute("asyn", "true");
}
else if ("exclusive".equalsIgnoreCase(asyncText))
{
- node.setAsync(true);
- node.setAsyncExclusive(true);
+ jpdl4Element.addAttribute("asyn", "exclusive");
}
-*/
+
// parse common subelements
+
readNodeTimers(nodeElement, jpdl4Element);
readEvents(nodeElement, jpdl4Element);
- //readExceptionHandlers(nodeElement, jpdl4Element);
+ readExceptionHandlers(nodeElement, jpdl4Element);
// save the transitions and parse them at the end
addUnresolvedTransitionDestination(nodeElement, jpdl4Element);
@@ -596,40 +582,117 @@
protected void readNodeTimer(Element timerElement, Element jpdl4Element)
{
- //TODO: convert node timer ...
+ String name = timerElement.attributeValue("name", timerElement.getName());
+ if (name == null)
+ name = generateTimerName();
+
+ CreateTimerAction createTimerAction = new CreateTimerAction();
+ Element onElement = jpdl4Element.addElement("on");
+ onElement.addAttribute("event", "timeout");
+ createTimerAction.createConvertedElement(timerElement, onElement);
+ createTimerAction.read(timerElement, this);
+
+ //TODO: investigate if there is equivalent cancel timer action in jpdl4...
+ /*CancelTimerAction cancelTimerAction = instantiateCancelTimerAction();
+ cancelTimerAction.setTimerName(name);
+ addAction(node, Event.EVENTTYPE_NODE_LEAVE, cancelTimerAction);*/
}
-
- //* instantiate {@link CreateTimerAction} object from configured class in action.types.xml (if configured). If not the default jbpm class is used.
-
-/* private CreateTimerAction instantiateCreateTimerAction()
- {
-
- }*/
-
-
- //instantiate {@link CancelTimerAction} object from configured class in action.types.xml (if configured). If not the default jbpm class is used.*/
-
- /* private CancelTimerAction instantiateCancelTimerAction()
- {
- }*/
-
private String generateTimerName()
{
return "timer-" + (timerNumber++);
}
-/*
- protected void readTaskTimers(Element taskElement, Task task)
+
+ protected void readTaskTimers(Element taskElement, Element jdpl4Element)
{
+ Iterator<?> iter = taskElement.elementIterator();
+ while (iter.hasNext())
+ {
+ Element element = (Element)iter.next();
+ if (("timer".equals(element.getName())) || ("reminder".equals(element.getName())))
+ {
+ readTaskTimer(element, jdpl4Element);
+ }
+ }
}
- protected void readTaskTimer(Element timerElement, Task task)
+ protected void readTaskTimer(Element timerElement, Element jpdl4Element)
{
+ if ("timer".equals(timerElement.getName()))
+ {
+ String name = timerElement.attributeValue("name", timerElement.getName());
+ if (name == null)
+ name = generateTimerName();
+ Element onEle = jpdl4Element.addElement("on");
+ onEle.addAttribute("event", "timeout");
+ Element timer = jpdl4Element.addElement("timer");
+
+ String dueDate = timerElement.attributeValue("duedate");
+ if (dueDate==null) {
+ addWarning("no duedate specified in create timer action '"+ timerElement.asXML()+"'");
+ } else {
+ timer.addAttribute("duedate", dueDate);
+ }
+ String repeat = timerElement.attributeValue("repeat");
+ if ( "true".equalsIgnoreCase(repeat)
+ || "yes".equalsIgnoreCase(repeat) ) {
+ repeat = dueDate;
+ }
+
+ timer.addAttribute("repeat", repeat);
+
+ String transitionName = timerElement.attributeValue("transition");
+
+ if ( (transitionName!=null)
+ && (repeat!=null)
+ ) {
+ repeat = null;
+ addProblem(new Problem(Problem.LEVEL_WARNING, "ignoring repeat on timer with transition "+ timerElement.asXML()));
+ }
+
+ timer.addAttribute("duedata", dueDate);
+ this.readSingleAction(timerElement, timer);
+ }
+ else
+ {
+ //TODO:Create mail node for <task-reminder> element
+
+ }
+
+ //TODO: handle createTimerAction and cancelTimerAction
+ /*createTimerAction.setTimerAction(action);
+ addAction(task, Event.EVENTTYPE_TASK_CREATE, createTimerAction);
+
+ // read the cancel-event types
+ Collection<String> cancelEventTypes = new ArrayList<String>();
+
+ String cancelEventTypeText = timerElement.attributeValue("cancel-event");
+ if (cancelEventTypeText != null)
+ {
+ // cancel-event is a comma separated list of events
+ StringTokenizer tokenizer = new StringTokenizer(cancelEventTypeText, ",");
+ while (tokenizer.hasMoreTokens())
+ {
+ cancelEventTypes.add(tokenizer.nextToken().trim());
+ }
+ }
+ else
+ {
+ // set the default
+ cancelEventTypes.add(Event.EVENTTYPE_TASK_END);
+ }
+
+ for (String cancelEventType : cancelEventTypes)
+ {
+ CancelTimerAction cancelTimerAction = instantiateCancelTimerAction();
+ cancelTimerAction.setTimerName(name);
+ addAction(task, cancelEventType, cancelTimerAction);
+ }*/
}
- */
+
public void readEvents(Element parentElement, Element jpdl4Element)
{
- Iterator<?> iter = parentElement.elementIterator("event");
+ Iterator<?> iter = parentElement.elementIterator("event");
while (iter.hasNext())
{
Element eventElement = (Element)iter.next();
@@ -655,30 +718,26 @@
if (ActionConverterTypes.hasActionName(actionName))
{
Element action4 = createAction(actionElement, jpdl4Element);
- /*if ((graphElement != null) && (eventType != null))
- {
- // add the action to the event
- addAction(graphElement, eventType, action);
- }*/
+
}
}
}
- /*
- protected void addAction(GraphElement graphElement, String eventType, Action action)
+
+ public Element readSingleAction(Element nodeElement, Element jpdl4Element)
{
- Event event = graphElement.getEvent(eventType);
- if (event == null)
+ Element jpdl4Action = null;
+ Iterator<?> iter = nodeElement.elementIterator();
+ while (iter.hasNext())
{
- event = new Event(eventType);
- graphElement.addEvent(event);
+ Element candidate = (Element)iter.next();
+ if (ActionConverterTypes.hasActionName(candidate.getName()))
+ {
+ // parse the action and assign it to this node
+ jpdl4Action = createAction(candidate, jpdl4Element);
+ }
}
- event.addAction(action);
- }*/
-
-
- public Element readSingleAction(Element nodeElement)
- {
- return null;
+ return jpdl4Action;
+
}
public Element createAction(Element actionElement, Element jpdl4Element)
@@ -696,20 +755,18 @@
log.error("couldn't instantiate action '" + actionName + "', of type '" + actionType.getName() + "'", e);
}
- // read the common node parts of the action
Element action4 = action.createConvertedElement(actionElement, jpdl4Element);
- //Remove readAction cause there is no need to read the common thing for jpdl4 script or java element
- //readAction(actionElement, action4, action);
action.read(actionElement, this);
return action4;
}
-/*
- protected void readExceptionHandlers(Element graphElementElement, GraphElement graphElement)
+
+ protected void readExceptionHandlers(Element graphElement, Element jpdl4Element)
{
- //
+ this.addWarning("Unsupported exception handler conversion for element : <" + graphElement.getName()
+ + "name=" + graphElement.attributeValue("name") + "/>" );
}
-
+/*
protected void readExceptionHandler(Element exceptionHandlerElement, GraphElement graphElement)
{
// create the exception handler
@@ -782,9 +839,7 @@
addWarning("node '" + transitionElement.getPath() + "' has a transition without a 'to'-attribute to specify its destinationNode");
}
else
- {
- //TODO: Add the function to check if the transistion node exists
-
+ {
Element to = this.findNode(toName);
if (to == null)
{
@@ -797,7 +852,7 @@
// read the actions
readActions(transitionElement, transition4, "");
- //readExceptionHandlers(transitionElement, transition);
+ readExceptionHandlers(transitionElement, transition4);
}
// action references are parsed in a second pass ////////////////////////////
Added: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/CreateTimerAction.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/CreateTimerAction.java (rev 0)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/CreateTimerAction.java 2009-06-23 10:15:15 UTC (rev 5090)
@@ -0,0 +1,68 @@
+/*
+ * 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.jpdl.internal.convert.action;
+
+import org.dom4j.Element;
+import org.jbpm.jpdl.internal.convert.Jpdl3ConverterReader;
+import org.jbpm.jpdl.internal.convert.Problem;
+
+public class CreateTimerAction extends Action {
+ @Override
+ public Element createConvertedElement(Element actionElement,
+ Element jpdl4Doc) {
+ this.convertedElement = jpdl4Doc.addElement("timer");
+ return convertedElement;
+ }
+
+ @Override
+ public void read(Element actionElement, Jpdl3ConverterReader jpdlReader) {
+
+ Element timerAction = jpdlReader.readSingleAction(actionElement, this.convertedElement);
+
+ String dueDate = actionElement.attributeValue("duedate");
+ if (dueDate == null) {
+ jpdlReader
+ .addWarning("no duedate specified in create timer action '"
+ + actionElement + "'");
+ } else {
+ convertedElement.addAttribute("duedate", dueDate);
+ }
+ String repeat = actionElement.attributeValue("repeat");
+ if ("true".equalsIgnoreCase(repeat) || "yes".equalsIgnoreCase(repeat)) {
+ repeat = dueDate;
+ }
+
+ if (repeat != null) {
+ convertedElement.addAttribute("repeat", repeat);
+ }
+
+ String transitionName = actionElement.attributeValue("transition");
+
+ if ((transitionName != null) && (repeat != null)) {
+ repeat = null;
+ jpdlReader.addProblem(new Problem(Problem.LEVEL_WARNING,
+ "ignoring repeat on timer with transition "
+ + actionElement.asXML()));
+ }
+ //TODO: Investigate how to convert transition attribute
+ }
+}
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/Script.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/Script.java 2009-06-23 10:08:08 UTC (rev 5089)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/action/Script.java 2009-06-23 10:15:15 UTC (rev 5090)
@@ -25,27 +25,6 @@
import org.jbpm.jpdl.internal.convert.Jpdl3ConverterReader;
public class Script extends Action {
- @Override
- public Element createConvertedElement(Element actionElement,
- Element jpdl4Doc) {
- convertedElement = jpdl4Doc.addElement("script");
- return convertedElement;
- }
+
- @Override
- public void read(Element actionElement, Jpdl3ConverterReader jpdlReader) {
- String expression = null;
- if (actionElement.isTextOnly()) {
- expression = actionElement.getText();
- } else {
- /*
- * this.variableAccesses = new HashSet<VariableAccess>(
- * jpdlReader.readVariableAccesses(scriptElement));
- */
- expression = actionElement.element("expression").getText();
- }
- Element txtElement = convertedElement.addElement("text");
- txtElement.addText(expression);
- }
-
}
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Fork.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Fork.java 2009-06-23 10:08:08 UTC (rev 5089)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Fork.java 2009-06-23 10:15:15 UTC (rev 5090)
@@ -32,12 +32,6 @@
}
public void read(Jpdl3ConverterReader reader) {
- /*Element startTaskElement = nodeElement.element("task");
- if (startTaskElement!=null) {
- reader.addWarning("Unsupported start task conversion");
- // delegate the parsing of the start-state task to the jpdlReader
- //reader.readStartStateTask(startTaskElement, this);
- }*/
}
}
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Node.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Node.java 2009-06-23 10:08:08 UTC (rev 5089)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/Node.java 2009-06-23 10:15:15 UTC (rev 5090)
@@ -36,7 +36,6 @@
}
public void read(Jpdl3ConverterReader reader) {
- //TODO:implement it
Element actionElement = nodeElement.element("action");
action.read(actionElement, reader);
Modified: jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/StartState.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/StartState.java 2009-06-23 10:08:08 UTC (rev 5089)
+++ jbpm4/branches/jimma/modules/migration/src/main/java/org/jbpm/jpdl/internal/convert/node/StartState.java 2009-06-23 10:15:15 UTC (rev 5090)
@@ -35,8 +35,6 @@
Element startTaskElement = nodeElement.element("task");
if (startTaskElement!=null) {
reader.addWarning("Unsupported start task conversion");
- // delegate the parsing of the start-state task to the jpdlReader
- //reader.readStartStateTask(startTaskElement, this);
}
}
Modified: jbpm4/branches/jimma/modules/migration/src/main/resources/action.converter.types.xml
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/main/resources/action.converter.types.xml 2009-06-23 10:08:08 UTC (rev 5089)
+++ jbpm4/branches/jimma/modules/migration/src/main/resources/action.converter.types.xml 2009-06-23 10:15:15 UTC (rev 5090)
@@ -1,6 +1,6 @@
<action-types>
<action-type element="action" class="org.jbpm.jpdl.internal.convert.action.Action" />
- <action-type element="create-timer" class="org.jbpm.scheduler.def.CreateTimerAction" />
+ <action-type element="create-timer" class="org.jbpm.jpdl.internal.convert.action.CreateTimerAction" />
<action-type element="cancel-timer" class="org.jbpm.scheduler.def.CancelTimerAction" />
<action-type element="script" class="org.jbpm.jpdl.internal.convert.action.Script" />
<action-type element="mail" class="org.jbpm.graph.action.MailAction" />
Modified: jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java
===================================================================
--- jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java 2009-06-23 10:08:08 UTC (rev 5089)
+++ jbpm4/branches/jimma/modules/migration/src/test/java/org/jbpm/jpdl/internal/convert/Jpdl3ConverterReaderTest.java 2009-06-23 10:15:15 UTC (rev 5090)
@@ -30,6 +30,7 @@
import org.jbpm.jpdl.internal.xml.JpdlParser;
import org.jbpm.pvm.internal.cfg.JbpmConfiguration;
import org.junit.Assert;
+import org.junit.Ignore;
import org.junit.Test;
import org.xml.sax.InputSource;
@@ -39,7 +40,7 @@
testConvert("simple.xml");
}
- @Test
+ @Ignore
public void testBusinessTrip() throws Exception {
testConvert("businesstrip.xml");
}
@@ -54,20 +55,41 @@
setUpScriptManager();
testConvert("process-event.xml");
}
+
+ @Test
+ public void testDescision() throws Exception {
+ testConvert("testDecision.xml");
+ }
+ @Test
+ public void testTimer() throws Exception {
+ String xml = convert("timer.xml");
+ List<Problem> problems = new JpdlParser().createParse().setString(xml).execute().getProblems();
+ Assert.assertEquals(2, problems.size());
+ Assert.assertTrue(problems.get(0).getMsg().startsWith("unrecognized event listener"));
+ Assert.assertTrue(problems.get(1).getMsg().startsWith("unrecognized event listener"));
+ }
private void testConvert(String resourcefile) throws Exception {
- InputStream inputStream = getClass().getClassLoader().getResourceAsStream(resourcefile);
+ String xml = convert(resourcefile);
+ List<Problem> problems = new JpdlParser().createParse().setString(xml).execute().getProblems();
+ Assert.assertEquals(problems.toString(), 0, problems.size());
+ }
+
+
+ private String convert(String resouceFile) throws Exception {
+ InputStream inputStream = getClass().getClassLoader().getResourceAsStream(resouceFile);
//Convert to process file to jpdl4
InputSource ins = new InputSource(inputStream);
Jpdl3ConverterReader converter = new Jpdl3ConverterReader(ins);
Document doc = converter.readAndConvert();
- //System.out.println(doc.asXML());
-
- List<Problem> problems = new JpdlParser().createParse().setString(doc.asXML()).execute().getProblems();
- Assert.assertEquals(problems.toString(), 0, problems.size());
+ return doc.asXML();
}
+
+ private String format(String test) {
+
+ }
private void setUpScriptManager() throws Exception {
EnvironmentFactory environmentFactory = JbpmConfiguration.parseXmlString("<jbpm-configuration>"
16 years, 10 months
JBoss JBPM SVN: r5089 - in projects/gwt-console/trunk: gui/war/src/main/java/org/jboss/bpm/console/client/deployment and 6 other directories.
by do-not-reply@jboss.org
Author: heiko.braun(a)jboss.com
Date: 2009-06-23 06:08:08 -0400 (Tue, 23 Jun 2009)
New Revision: 5089
Added:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditor.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditorNavigation.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentListView.java
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/UpdateDeploymentListAction.java
Modified:
projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java
projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/DeploymentRef.java
projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/DeploymentFacade.java
Log:
More work on DeploymenEditor
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditor.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditor.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditor.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -0,0 +1,133 @@
+/*
+ * 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.deployment;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.ui.SourcesTabEvents;
+import com.google.gwt.user.client.ui.TabListener;
+import com.mvc4g.client.Event;
+import org.gwt.mosaic.ui.client.DecoratedTabLayoutPanel;
+import org.gwt.mosaic.ui.client.TabLayoutPanel;
+import org.gwt.mosaic.ui.client.layout.BorderLayout;
+import org.gwt.mosaic.ui.client.layout.BorderLayoutData;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.Editor;
+import org.jboss.bpm.console.client.LazyPanel;
+import org.jboss.bpm.console.client.MenuSection;
+import org.jboss.bpm.console.client.common.AbstractView;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DeploymentEditor extends Editor
+{
+
+ public final static String ID = DeploymentEditor.class.getName();
+
+ private TabLayoutPanel tabPanel;
+
+ public DeploymentEditor(ApplicationContext appContext)
+ {
+ super(appContext);
+ }
+
+ public void initialize()
+ {
+ if(!isInitialized)
+ {
+
+ // create inner tab layout
+ tabPanel = new DecoratedTabLayoutPanel();
+ tabPanel.setPadding(5);
+
+ tabPanel.addTabListener(
+ new TabListener()
+ {
+ public boolean onBeforeTabSelected(SourcesTabEvents sourcesTabEvents, int i)
+ {
+ boolean showTab = true;
+ return showTab;
+ }
+
+ public void onTabSelected(SourcesTabEvents sourcesTabEvents, int i)
+ {
+ LazyPanel lazyPanel = (LazyPanel) tabPanel.getWidget(i);
+ if(!lazyPanel.isInitialized())
+ {
+ lazyPanel.initialize();
+ appContext.refreshView(); // TODO: hack around rendering problems
+ }
+ }
+ }
+ );
+
+ this.add(tabPanel, new BorderLayoutData(BorderLayout.Region.CENTER));
+
+ // create and register views
+ registerView(DeploymentListView.ID, new DeploymentListView());
+
+ // create and register actions
+ controller.addAction(UpdateDeploymentListAction.ID, new UpdateDeploymentListAction(appContext));
+
+ // display tab, needs to visible for correct rendering
+ tabPanel.selectTab(0);
+
+ // force loading
+ super.controller.handleEvent(
+ new Event(UpdateDeploymentListAction.ID, null)
+ );
+
+ isInitialized = true;
+ }
+ }
+
+ private void registerView(String id, AbstractView view)
+ {
+ // register view with controller
+ super.controller.addView(id, view);
+
+ // add to tab layout
+ this.tabPanel.add(view, view.getIconTitle(), true);
+ }
+
+ public String getEditorId()
+ {
+ return ID;
+ }
+
+ public String getTitle()
+ {
+ return "Deployments";
+ }
+
+ public MenuSection provideMenuSection()
+ {
+ ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
+
+ return new MenuSection(
+ "Deployments",
+ icons.deploymentIcon(),
+ new DeploymentEditorNavigation(appContext)
+ );
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditorNavigation.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditorNavigation.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentEditorNavigation.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -0,0 +1,62 @@
+/*
+ * 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.deployment;
+
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.TreeListener;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.Workspace;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DeploymentEditorNavigation extends Tree
+{
+
+ public DeploymentEditorNavigation(final ApplicationContext appContext)
+ {
+ super.setTitle("Deployments");
+
+ TreeItem root = addItem("Process Deployments");
+ TreeItem jbpmDeployments = root.addItem("Overview");
+
+ addTreeListener(
+ new TreeListener()
+ {
+ public void onTreeItemSelected(TreeItem treeItem)
+ {
+ if("Overview".equals(treeItem.getText()))
+ {
+ Workspace workspace = appContext.getWorkpace();
+ workspace.showEditor(DeploymentEditor.ID);
+ }
+ }
+
+ public void onTreeItemStateChanged(TreeItem treeItem)
+ {
+
+ }
+ }
+ );
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentListView.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentListView.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/DeploymentListView.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -0,0 +1,224 @@
+/*
+ * 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.deployment;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.user.client.ui.ChangeListener;
+import com.google.gwt.user.client.ui.ClickListener;
+import com.google.gwt.user.client.ui.Widget;
+import com.mvc4g.client.Controller;
+import com.mvc4g.client.Event;
+import org.gwt.mosaic.ui.client.ListBox;
+import org.gwt.mosaic.ui.client.MessageBox;
+import org.gwt.mosaic.ui.client.ToolBar;
+import org.gwt.mosaic.ui.client.ToolButton;
+import org.gwt.mosaic.ui.client.layout.*;
+import org.gwt.mosaic.ui.client.list.DefaultListModel;
+import org.jboss.bpm.console.client.common.AbstractView;
+import org.jboss.bpm.console.client.icons.ConsoleIconBundle;
+import org.jboss.bpm.console.client.model.DeploymentRef;
+import org.jboss.bpm.console.client.process.UpdateInstancesAction;
+import org.jboss.bpm.console.client.process.UpdateProcessDetailAction;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class DeploymentListView extends AbstractView
+{
+ public final static String ID = DeploymentListView.class.getName();
+
+ private Controller controller;
+
+ private boolean initialized;
+
+ private LayoutPanel deploymentList = null;
+
+ private ListBox<DeploymentRef> listBox;
+
+ private DeploymentRef selection = null;
+
+ public DeploymentListView()
+ {
+ super();
+ ConsoleIconBundle icons = GWT.create(ConsoleIconBundle.class);
+ setTitle("Deployment Overview");
+ setIcon(icons.deploymentIcon());
+
+ listBox = createListBox();
+ }
+
+ private ListBox createListBox()
+ {
+ final ListBox<DeploymentRef> listBox =
+ new ListBox<DeploymentRef>(
+ new String[] {
+ "ID", "Name", "Suspended"}
+ );
+
+
+ listBox.setCellRenderer(new ListBox.CellRenderer<DeploymentRef>() {
+ public void renderCell(ListBox<DeploymentRef> listBox, int row, int column,
+ DeploymentRef item) {
+ switch (column) {
+ case 0:
+ listBox.setText(row, column, item.getId());
+ break;
+ case 1:
+ listBox.setText(row, column, item.getName());
+ break;
+ case 2:
+ listBox.setText(row, column, String.valueOf(item.isSuspended()));
+ break;
+ default:
+ throw new RuntimeException("Unexpected column size");
+ }
+ }
+ });
+
+ listBox.addChangeListener(new ChangeListener()
+ {
+ public void onChange(Widget widget)
+ {
+ int index = listBox.getSelectedIndex();
+ if(index!=-1)
+ {
+ DeploymentRef item = listBox.getItem(index);
+
+ // TODO: update details
+ /*controller.handleEvent(
+ new Event(UpdateProcessDetailAction.ID, item)
+ );*/
+ }
+ }
+ });
+
+ return listBox;
+ }
+
+ public void setController(Controller controller)
+ {
+ this.controller = controller;
+ }
+
+ public boolean isInitialized()
+ {
+ return initialized;
+ }
+
+ public void initialize()
+ {
+ if(!initialized)
+ {
+ deploymentList = new LayoutPanel( new BoxLayout(BoxLayout.Orientation.VERTICAL));
+ deploymentList.setPadding(0);
+ deploymentList.setWidgetSpacing(0);
+
+ // toolbar
+
+ final LayoutPanel toolBox = new LayoutPanel();
+ toolBox.setPadding(0);
+ toolBox.setWidgetSpacing(5);
+ //toolBox.setLayout(new BoxLayout(BoxLayout.Orientation.VERTICAL));
+
+ final ToolBar toolBar = new ToolBar();
+ toolBar.add(
+ new ToolButton("Refresh", new ClickListener() {
+ public void onClick(Widget sender) {
+ // force loading
+ controller.handleEvent(
+ new Event(UpdateDeploymentListAction.ID, null)
+ );
+ }
+ }
+ )
+ );
+
+ toolBar.addSeparator();
+
+ toolBar.add(
+ new ToolButton("Delete", new ClickListener() {
+ public void onClick(Widget sender) {
+ // force loading
+ DeploymentRef deploymentRef = getSelection();
+ if(deploymentRef!=null)
+ {
+
+ }
+ else
+ {
+ MessageBox.alert("Missing selection", "Please select a deployment definition");
+ }
+ }
+ }
+ )
+ );
+
+ toolBox.add(toolBar, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+
+ this.deploymentList.add(toolBox, new BoxLayoutData(BoxLayoutData.FillStyle.HORIZONTAL));
+ this.deploymentList.add(listBox, new BoxLayoutData(BoxLayoutData.FillStyle.BOTH));
+
+ // layout
+ LayoutPanel layout = new LayoutPanel(new BorderLayout());
+ layout.add(deploymentList, new BorderLayoutData(BorderLayout.Region.CENTER));
+
+ // details
+ /*ProcessDetailView detailsView = new ProcessDetailView();
+ controller.addView(ProcessDetailView.ID, detailsView);
+ controller.addAction(UpdateProcessDetailAction.ID, new UpdateProcessDetailAction());
+ layout.add(detailsView, new BorderLayoutData(BorderLayout.Region.SOUTH, 10,200));
+ */
+
+ this.add(layout);
+
+ initialized = true;
+ }
+ }
+
+ public DeploymentRef getSelection()
+ {
+ DeploymentRef selection = null;
+ if(isInitialized() && listBox.getSelectedIndex()!=-1)
+ selection = listBox.getItem( listBox.getSelectedIndex());
+ return selection;
+ }
+
+ public void update(List<DeploymentRef> deployments)
+ {
+ final DefaultListModel<DeploymentRef> model =
+ (DefaultListModel<DeploymentRef>) listBox.getModel();
+
+ model.clear();
+
+ for(DeploymentRef dpl : deployments)
+ {
+ model.add(dpl);
+ }
+
+ // clear details
+ /*controller.handleEvent(
+ new Event(UpdateProcessDetailAction.ID, null)
+ );*/
+ }
+}
Added: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/UpdateDeploymentListAction.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/UpdateDeploymentListAction.java (rev 0)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/deployment/UpdateDeploymentListAction.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -0,0 +1,75 @@
+/*
+ * 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.deployment;
+
+import org.jboss.bpm.console.client.common.AbstractRESTAction;
+import org.jboss.bpm.console.client.ApplicationContext;
+import org.jboss.bpm.console.client.model.ProcessDefinitionRef;
+import org.jboss.bpm.console.client.model.DTOParser;
+import org.jboss.bpm.console.client.model.DeploymentRef;
+import com.google.gwt.http.client.RequestBuilder;
+import com.google.gwt.http.client.Response;
+import com.google.gwt.json.client.JSONValue;
+import com.google.gwt.json.client.JSONParser;
+import com.mvc4g.client.Controller;
+
+import java.util.List;
+
+/**
+ * @author Heiko.Braun <heiko.braun(a)jboss.com>
+ */
+public class UpdateDeploymentListAction extends AbstractRESTAction
+{
+
+ public final static String ID = UpdateDeploymentListAction.class.getName();
+
+
+ public UpdateDeploymentListAction(ApplicationContext appContext)
+ {
+ super(appContext);
+ }
+
+ public String getId()
+ {
+ return ID;
+ }
+
+ public String getUrl(Object event)
+ {
+ return appContext.getUrlBuilder().getDeploymentsUrl();
+ }
+
+ public RequestBuilder.Method getRequestMethod()
+ {
+ return RequestBuilder.GET;
+ }
+
+ public void handleSuccessfulResponse(
+ final Controller controller, final Object event, Response response)
+ {
+ JSONValue json = JSONParser.parse(response.getText());
+ List<DeploymentRef> deployments = DTOParser.parseDeploymentRefList(json);
+
+ DeploymentListView view = (DeploymentListView)controller.getView(DeploymentListView.ID);
+ view.update(deployments);
+ }
+}
Modified: projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java 2009-06-23 08:50:55 UTC (rev 5088)
+++ projects/gwt-console/trunk/gui/war/src/main/java/org/jboss/bpm/console/client/icons/ConsoleIconBundle.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -113,4 +113,9 @@
* @gwt.resource report.png
*/
AbstractImagePrototype reportIcon();
+
+ /**
+ * @gwt.resource deployment.png
+ */
+ AbstractImagePrototype deploymentIcon();
}
Modified: projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg
===================================================================
--- projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg 2009-06-23 08:50:55 UTC (rev 5088)
+++ projects/gwt-console/trunk/gui/war/src/main/resources/org/jboss/bpm/console/workspace-default.cfg 2009-06-23 10:08:08 UTC (rev 5089)
@@ -1,4 +1,5 @@
org.jboss.bpm.console.client.SettingsEditor
org.jboss.bpm.console.client.process.ProcessEditor
org.jboss.bpm.console.client.task.TaskEditor
-org.jboss.bpm.console.client.report.ReportEditor
\ No newline at end of file
+org.jboss.bpm.console.client.report.ReportEditor
+org.jboss.bpm.console.client.deployment.DeploymentEditor
\ No newline at end of file
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-06-23 08:50:55 UTC (rev 5088)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/URLBuilder.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -191,4 +191,9 @@
url += "&id=birt";
return url;
}
+
+ public String getDeploymentsUrl()
+ {
+ return config.getConsoleServerUrl() + "/rs/repository/deployments";
+ }
}
Modified: projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java
===================================================================
--- projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2009-06-23 08:50:55 UTC (rev 5088)
+++ projects/gwt-console/trunk/gui/workspace-api/src/main/java/org/jboss/bpm/console/client/model/DTOParser.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -39,11 +39,11 @@
public static List<ProcessDefinitionRef> parseProcessDefinitions(JSONValue jso)
{
List<ProcessDefinitionRef> results = new ArrayList<ProcessDefinitionRef>();
-
+
JSONArray arr = JSONWalk.on(jso).next("definitions").asArray();
for(int i=0; i<arr.size(); i++)
{
- results.add(parseProcessDefinition(arr.get(i)));
+ results.add(parseProcessDefinition(arr.get(i)));
}
return results;
}
@@ -51,7 +51,7 @@
public static ProcessDefinitionRef parseProcessDefinition(JSONValue root)
{
ConsoleLog.debug("parse " + root);
-
+
String id = JSONWalk.on(root).next("id").asString();
Long version = JSONWalk.on(root).next("version").asLong();
String name = JSONWalk.on(root).next("name").asString();
@@ -92,7 +92,7 @@
public static List<TaskRef> parseTaskReferenceList(String json)
{
- List<TaskRef> results = new ArrayList<TaskRef>();
+ List<TaskRef> results = new ArrayList<TaskRef>();
JSONValue root = JSONParser.parse(json);
JSONArray array = JSONWalk.on(root).next("tasks").asArray();
@@ -135,7 +135,7 @@
}
else
{
- ref.setUrl("");
+ ref.setUrl("");
}
// participant users
@@ -188,7 +188,7 @@
Date due = createDate.asDate();
ref.setDueDate(due);
}
-
+
return ref;
}
@@ -200,7 +200,7 @@
boolean isGroup = JSONWalk.on(jsonValue).next("isGroup").asBool();
p.setGroup(isGroup);
-
+
return p;
}
@@ -219,7 +219,7 @@
public static ProcessInstanceRef parseProcessInstance(JSONValue root)
{
ConsoleLog.debug("parse " + root);
-
+
String id = JSONWalk.on(root).next("id").asString();
String definitionId = JSONWalk.on(root).next("definitionId").asString();
Date start = JSONWalk.on(root).next("startDate").asDate();
@@ -247,7 +247,7 @@
public static TokenReference parseTokenReference(JSONObject jso)
{
ConsoleLog.debug("parse " + jso);
-
+
String rootTokenId = JSONWalk.on(jso).next("id").asString();
//String name = JSONWalk.on(jso).next("name").asString();
String nodeName = JSONWalk.on(jso).next("currentNodeName").asString();
@@ -308,11 +308,11 @@
public static ServerStatus parseStatus(JSONValue json)
{
ConsoleLog.debug("parse " + json);
-
+
ServerStatus status = new ServerStatus();
JSONArray jsonArray = JSONWalk.on(json).next("plugins").asArray();
- for (int i = 0; i < jsonArray.size(); i++)
+ for (int i = 0; i < jsonArray.size(); i++)
{
JSONValue item = jsonArray.get(i);
String type = JSONWalk.on(item).next("type").asString();
@@ -323,4 +323,29 @@
return status;
}
+ public static List<DeploymentRef> parseDeploymentRefList(JSONValue json)
+ {
+ List<DeploymentRef> result = new ArrayList<DeploymentRef>();
+
+ JSONArray jsonArray = JSONWalk.on(json).next("deployments").asArray();
+ for (int i = 0; i < jsonArray.size(); i++)
+ {
+ JSONValue item = jsonArray.get(i);
+ String id = JSONWalk.on(item).next("id").asString();
+ boolean suspended = JSONWalk.on(item).next("suspended").asBool();
+
+ String name = JSONWalk.on(item).next("name").asString();
+ long ts = JSONWalk.on(item).next("timestamp").asLong();
+
+ DeploymentRef ref = new DeploymentRef(id, suspended);
+ ref.setName(name);
+ ref.setTimestamp(ts);
+
+ // todo: parse definitions
+
+ result.add(ref);
+ }
+
+ return result;
+ }
}
Modified: projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/DeploymentRef.java
===================================================================
--- projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/DeploymentRef.java 2009-06-23 08:50:55 UTC (rev 5088)
+++ projects/gwt-console/trunk/rpc/src/main/java/org/jboss/bpm/console/client/model/DeploymentRef.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -33,6 +33,10 @@
private boolean suspended;
+ private String name;
+
+ private long timestamp;
+
private List<ProcessDefinitionRef> definitions = new ArrayList<ProcessDefinitionRef>();
public DeploymentRef()
@@ -69,4 +73,24 @@
{
return definitions;
}
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void setName(String name)
+ {
+ this.name = name;
+ }
+
+ public long getTimestamp()
+ {
+ return timestamp;
+ }
+
+ public void setTimestamp(long timestamp)
+ {
+ this.timestamp = timestamp;
+ }
}
Modified: projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/DeploymentFacade.java
===================================================================
--- projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/DeploymentFacade.java 2009-06-23 08:50:55 UTC (rev 5088)
+++ projects/gwt-console/trunk/server/server-core/src/main/java/org/jboss/bpm/console/server/DeploymentFacade.java 2009-06-23 10:08:08 UTC (rev 5089)
@@ -21,22 +21,17 @@
*/
package org.jboss.bpm.console.server;
+import com.google.gson.Gson;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jboss.bpm.console.client.model.DeploymentRef;
+import org.jboss.bpm.console.client.model.DeploymentRefWrapper;
import org.jboss.bpm.console.server.gson.GsonFactory;
import org.jboss.bpm.console.server.plugin.DeploymentPlugin;
import org.jboss.bpm.console.server.plugin.PluginMgr;
-import org.jboss.bpm.console.server.integration.ManagementFactory;
-import org.jboss.bpm.console.client.model.DeploymentRef;
-import org.jboss.bpm.console.client.model.DeploymentRefWrapper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import javax.ws.rs.Path;
-import javax.ws.rs.GET;
-import javax.ws.rs.Produces;
+import javax.ws.rs.*;
import javax.ws.rs.core.Response;
-
-import com.google.gson.Gson;
-
import java.util.List;
/**
@@ -83,6 +78,52 @@
}
+ @POST
+ @Path("deployments/{id}/suspend")
+ @Produces("application/json")
+ public Response suspendDeployment(
+ @PathParam("id")
+ String id
+ )
+ {
+
+ DeploymentPlugin dplPlugin = getDeploymentPlugin();
+ if(deploymentPlugin!=null)
+ {
+ deploymentPlugin.setSuspended(id, true);
+ return Response.ok().build();
+ }
+ else
+ {
+ log.error("DeploymentPlugin not available");
+ return Response.serverError().build();
+ }
+
+ }
+
+ @POST
+ @Path("deployments/{id}/delete")
+ @Produces("application/json")
+ public Response deleteDeployment(
+ @PathParam("id")
+ String id
+ )
+ {
+
+ DeploymentPlugin dplPlugin = getDeploymentPlugin();
+ if(deploymentPlugin!=null)
+ {
+ deploymentPlugin.deleteDeployment(id);
+ return Response.ok().build();
+ }
+ else
+ {
+ log.error("DeploymentPlugin not available");
+ return Response.serverError().build();
+ }
+
+ }
+
private Response createJsonResponse(Object wrapper)
{
Gson gson = GsonFactory.createInstance();
16 years, 10 months
JBoss JBPM SVN: r5088 - jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-06-23 04:50:55 -0400 (Tue, 23 Jun 2009)
New Revision: 5088
Modified:
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java
Log:
Added additional test case for JBPM-2319: state of HistoryProcessInstance of suspended process instance should be ACTIVE
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java 2009-06-23 07:43:34 UTC (rev 5087)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/ProcessInstanceHistoryTest.java 2009-06-23 08:50:55 UTC (rev 5088)
@@ -26,6 +26,7 @@
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.history.HistoryProcessInstance;
import org.jbpm.api.history.HistoryProcessInstanceQuery;
+import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
@@ -73,4 +74,33 @@
assertEquals(0, processInstances.size());
}
+
+ //Additonal test case for JBPM-2319
+ public void testProcessInstanceEndState() {
+ deployJpdlXmlString(
+ "<process name='testProcess'>" +
+ " <start name='start'>" +
+ " <transition to='task'/>" +
+ " </start>" +
+ " <task name='task' >" +
+ " <transition name='Reject (risk)' to='Rejected by risk' />" +
+ " <transition name='Reject (reporting)' to='Rejected by reporting' />" +
+ " </task>" +
+ " <end name='Rejected by risk' />" +
+ " <end name='Rejected by reporting' />" +
+ "</process>"
+ );
+
+ ProcessInstance pi = executionService.startProcessInstanceByKey("testProcess");
+ Task task = taskService.createTaskQuery()
+ .processInstanceId(pi.getId())
+ .uniqueResult();
+ taskService.completeTask(task.getDbid(), "TYPO");
+
+ HistoryProcessInstance historyPi = historyService.createHistoryProcessInstanceQuery()
+ .processInstanceId(pi.getId())
+ .uniqueResult();
+ assertEquals(HistoryProcessInstance.STATE_ACTIVE, historyPi.getState());
+ }
+
}
16 years, 10 months
JBoss JBPM SVN: r5087 - in jbpm4/trunk/modules: test-db/src/test/java/org/jbpm/test/history and 1 other directory.
by do-not-reply@jboss.org
Author: jbarrez
Date: 2009-06-23 03:43:34 -0400 (Tue, 23 Jun 2009)
New Revision: 5087
Modified:
jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java
Log:
Added Test for JBPM-2319 and added log message to case when task outcome is not known.
Modified: jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java
===================================================================
--- jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-06-23 06:53:18 UTC (rev 5086)
+++ jbpm4/trunk/modules/jpdl/src/main/java/org/jbpm/jpdl/internal/activity/TaskActivity.java 2009-06-23 07:43:34 UTC (rev 5087)
@@ -30,6 +30,7 @@
import org.jbpm.api.model.Transition;
import org.jbpm.api.task.Task;
import org.jbpm.api.task.TaskHandler;
+import org.jbpm.internal.log.Log;
import org.jbpm.jpdl.internal.model.JpdlExecution;
import org.jbpm.pvm.internal.model.ExecutionImpl;
import org.jbpm.pvm.internal.session.DbSession;
@@ -43,6 +44,8 @@
public class TaskActivity extends JpdlExternalActivity {
private static final long serialVersionUID = 1L;
+
+ private static final Log log = Log.getLog(TaskActivity.class.getName());
protected TaskDefinitionImpl taskDefinition;
@@ -90,6 +93,8 @@
// if a user specified outcome was provided and it doesn't
// match with an outgoing transition name, then the process
// instance is suspended. parked for admin intervention.
+ log.info("No outcome named '" + signalName + "' was found."
+ + "The process instance is now suspended.");
((ExecutionImpl)execution.getProcessInstance()).suspend();
}
}
Modified: jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java
===================================================================
--- jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java 2009-06-23 06:53:18 UTC (rev 5086)
+++ jbpm4/trunk/modules/test-db/src/test/java/org/jbpm/test/history/EndProcessInstanceTest.java 2009-06-23 07:43:34 UTC (rev 5087)
@@ -26,6 +26,7 @@
import org.jbpm.api.Execution;
import org.jbpm.api.ProcessInstance;
import org.jbpm.api.history.HistoryProcessInstance;
+import org.jbpm.api.task.Task;
import org.jbpm.test.JbpmTestCase;
@@ -64,4 +65,36 @@
assertNotNull(historyProcessInstance.getEndTime());
assertEquals("cancel", historyProcessInstance.getState());
}
+
+ // Test case for JBPM-2319
+ public void testProcessInstanceEndState() {
+ deployJpdlXmlString(
+ "<process name='test1'>" +
+ " <start g='4,289,48,48' name='start1'>" +
+ " <transition name='to task1' to='task1' g='-44,-18'/>" +
+ " </start>" +
+ " <task name='task1' g='152,277,92,52'>" +
+ " <transition name='Reject (risk)' to='Rejected by risk' g='-42,-18'/>" +
+ " <transition name='Reject (reporting)' to='Rejected by reporting' g='-42,-18'/>" +
+ " </task>" +
+ " <end name='Rejected by risk' g='328,232,48,48'/>" +
+ " <end name='Rejected by reporting' g='335,347,48,48'/>" +
+ "</process>"
+ );
+
+ // Start a process instance and complete the task which ends the process instance
+ ProcessInstance pi = executionService.startProcessInstanceByKey("test1");
+ Task task = taskService.createTaskQuery()
+ .processInstanceId(pi.getId())
+ .uniqueResult();
+ taskService.completeTask(task.getDbid(), "Reject (risk)");
+ assertProcessInstanceEnded(pi);
+
+ // Check the state of the process instance
+ HistoryProcessInstance historyPi = historyService.createHistoryProcessInstanceQuery()
+ .processInstanceId(pi.getId())
+ .uniqueResult();
+ assertEquals("ended", historyPi.getState());
+ }
+
}
16 years, 10 months