diff --git a/config/alfresco/workflow/submit_processdefinition.xml b/config/alfresco/workflow/submit_processdefinition.xml
index f32aaf9a9a..4e8c752b48 100644
--- a/config/alfresco/workflow/submit_processdefinition.xml
+++ b/config/alfresco/workflow/submit_processdefinition.xml
@@ -111,22 +111,59 @@
-
-
-
-
+
+ #{wcmwf_approveCnt == wcmwf_reviewerCnt}
-
+
+
+
+ #{wcmwf_launchDate != null}
+
+
+
+
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/config/alfresco/workflow/wcm-workflow-messages.properties b/config/alfresco/workflow/wcm-workflow-messages.properties
index d5de053868..54f07190ac 100644
--- a/config/alfresco/workflow/wcm-workflow-messages.properties
+++ b/config/alfresco/workflow/wcm-workflow-messages.properties
@@ -14,6 +14,10 @@ wcmwf_submit.node.parallelreview.transition.reject.title=Reject
wcmwf_submit.node.parallelreview.transition.reject.description=Reject
wcmwf_submit.node.parallelreview.transition.approve.title=Approve
wcmwf_submit.node.parallelreview.transition.approve.description=Approve
+wcmwf_submit.node.submitpending.transition.cancel.title=Abort Submission
+wcmwf_submit.node.submitpending.transition.cancel.description=Abort Submission
+wcmwf_submit.node.submitpending.transition.launch.title=Submit Now
+wcmwf_submit.node.submitpending.transition.launch.description=Submit Now
# Submit Task Definitions
@@ -25,6 +29,12 @@ wcmwf_workflowmodel.type.wcmwf_rejectedTask.title=Rejected
wcmwf_workflowmodel.type.wcmwf_rejectedTask.description=Rejected
wcmwf_workflowmodel.type.wcmwf_approvedTask.title=Approved
wcmwf_workflowmodel.type.wcmwf_approvedTask.description=Approved
+wcmwf_workflowmodel.type.wcmwf_submittedTask.title=Submitted
+wcmwf_workflowmodel.type.wcmwf_submittedTask.description=Submitted
+wcmwf_workflowmodel.type.wcmwf_submitpendingTask.title=Submission Pending
+wcmwf_workflowmodel.type.wcmwf_submitpendingTask.description=Submission Pending
+wcmwf_workflowmodel.type.wcmwf_submitcancelledTask.title=Submission Aborted
+wcmwf_workflowmodel.type.wcmwf_submitcancelledTask.description=Submission Aborted
wcmwf_workflowmodel.property.wcmwf_reviewType.title=Type of Review
wcmwf_workflowmodel.property.wcmwf_reviewType.description=Serial or parallel review
diff --git a/config/alfresco/workflow/wcmWorkflowModel.xml b/config/alfresco/workflow/wcmWorkflowModel.xml
index c3c7a232c8..d11b343552 100644
--- a/config/alfresco/workflow/wcmWorkflowModel.xml
+++ b/config/alfresco/workflow/wcmWorkflowModel.xml
@@ -96,7 +96,38 @@
-
+
+ wcmwf:workflowTask
+
+ bpm:assignees
+ wcmwf:reviewType
+ wcmwf:reviewInfo
+ wcmwf:submission
+
+
+
+
+ wcmwf:workflowTask
+
+ bpm:assignees
+ wcmwf:reviewType
+ wcmwf:reviewInfo
+ wcmwf:submission
+
+
+
+
+ wcmwf:workflowTask
+
+ bpm:assignees
+ wcmwf:reviewType
+ wcmwf:reviewInfo
+ wcmwf:submission
+
+
+
+
+ wcmwf:workflowTaskbpm:assignees
diff --git a/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJobExecutor.java b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJobExecutor.java
new file mode 100644
index 0000000000..4b28a82f60
--- /dev/null
+++ b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJobExecutor.java
@@ -0,0 +1,83 @@
+/*
+ * Copyright (C) 2005-2007 Alfresco Software Limited.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program 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 General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ * As a special exception to the terms and conditions of version 2.0 of
+ * the GPL, you may redistribute this Program in connection with Free/Libre
+ * and Open Source Software ("FLOSS") applications as described in Alfresco's
+ * FLOSS exception. You should have recieved a copy of the text describing
+ * the FLOSS exception, and it is also available here:
+ * http://www.alfresco.com/legal/licensing"
+ */
+package org.alfresco.repo.workflow.jbpm;
+
+import org.alfresco.service.ServiceRegistry;
+import org.alfresco.service.transaction.TransactionService;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
+import org.jbpm.job.executor.JobExecutor;
+import org.springframework.beans.factory.access.BeanFactoryLocator;
+import org.springframework.beans.factory.access.BeanFactoryReference;
+import org.springmodules.workflow.jbpm31.JbpmFactoryLocator;
+
+
+/**
+ * jBPM Job Executor
+ *
+ * @author davidc
+ */
+public class AlfrescoJobExecutor extends JobExecutor
+{
+ private static final long serialVersionUID = -4576396495395482111L;
+
+ private static Log log = LogFactory.getLog(JobExecutor.class);
+ private TransactionService transactionService;
+
+
+ /**
+ * Constructor
+ */
+ public AlfrescoJobExecutor()
+ {
+ BeanFactoryLocator factoryLocator = new JbpmFactoryLocator();
+ BeanFactoryReference factory = factoryLocator.useBeanFactory(null);
+ transactionService = (TransactionService)factory.getFactory().getBean(ServiceRegistry.TRANSACTION_SERVICE.getLocalName());
+ }
+
+ /**
+ * Gets Transaction Service
+ *
+ * @return transaction service
+ */
+ public TransactionService getTransactionService()
+ {
+ return transactionService;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jbpm.job.executor.JobExecutor#startThread()
+ */
+ @SuppressWarnings("unchecked")
+ protected synchronized void startThread()
+ {
+ String threadName = getNextThreadName();
+ Thread thread = new AlfrescoJobExecutorThread(threadName, this, getJbpmConfiguration(), getIdleInterval(), getMaxIdleInterval(), getMaxLockTime(), getHistoryMaxSize());
+ getThreads().put(threadName, thread);
+ log.debug("starting new job executor thread '" + threadName + "'");
+ thread.start();
+ }
+
+}
diff --git a/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJobExecutorThread.java b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJobExecutorThread.java
new file mode 100644
index 0000000000..0a680f7d6b
--- /dev/null
+++ b/source/java/org/alfresco/repo/workflow/jbpm/AlfrescoJobExecutorThread.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (C) 2005-2007 Alfresco Software Limited.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program 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 General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+ * As a special exception to the terms and conditions of version 2.0 of
+ * the GPL, you may redistribute this Program in connection with Free/Libre
+ * and Open Source Software ("FLOSS") applications as described in Alfresco's
+ * FLOSS exception. You should have recieved a copy of the text describing
+ * the FLOSS exception, and it is also available here:
+ * http://www.alfresco.com/legal/licensing"
+ */
+package org.alfresco.repo.workflow.jbpm;
+
+import org.alfresco.repo.transaction.TransactionUtil;
+import org.jbpm.JbpmConfiguration;
+import org.jbpm.job.Job;
+import org.jbpm.job.executor.JobExecutorThread;
+
+
+/**
+ * Alfresco Job Executor Thread
+ *
+ * @author davidc
+ */
+public class AlfrescoJobExecutorThread extends JobExecutorThread
+{
+ private AlfrescoJobExecutor alfrescoJobExecutor;
+
+ /**
+ * Constructor
+ *
+ * @param name
+ * @param jobExecutor
+ * @param jbpmConfiguration
+ * @param idleInterval
+ * @param maxIdleInterval
+ * @param maxLockTime
+ * @param maxHistory
+ */
+ public AlfrescoJobExecutorThread(String name, AlfrescoJobExecutor jobExecutor, JbpmConfiguration jbpmConfiguration, int idleInterval, int maxIdleInterval, long maxLockTime, int maxHistory)
+ {
+ super(name, jobExecutor, jbpmConfiguration, idleInterval, maxIdleInterval, maxLockTime, maxHistory);
+ this.alfrescoJobExecutor = jobExecutor;
+ }
+
+ /* (non-Javadoc)
+ * @see org.jbpm.job.executor.JobExecutorThread#executeJob(org.jbpm.job.Job)
+ */
+ @Override
+ protected void executeJob(Job job)
+ {
+ TransactionUtil.executeInUserTransaction(alfrescoJobExecutor.getTransactionService(), new TransactionJob(job));
+ }
+
+ /**
+ * Helper class for holding Job reference
+ *
+ * @author davidc
+ */
+ private class TransactionJob implements TransactionUtil.TransactionWork
+
+
+
+
+
+
+
+
+
\ No newline at end of file