From 2d024b3f88dcd928a3b37b5ed85b34752b01840e Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Wed, 7 Jul 2010 22:15:03 +0000 Subject: [PATCH] Added temporary WorkflowFormProcessor. It's currently just an extension of the TypeFormProcessor, it will shortly accept the id of a workflow definition to generate a form for and start the workflow when the form is persisted. This will be re-factored to use the new FormProcessor infrastructure Nick is currently merging, this reason for adding now is unblock Erik and allow work to begin on the 'packageItems' transient property and UI support. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@20992 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- config/alfresco/form-services-context.xml | 18 ++++++++ .../workflow/WorkflowFormProcessor.java | 43 +++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessor.java diff --git a/config/alfresco/form-services-context.xml b/config/alfresco/form-services-context.xml index 84aa8c8c09..b73c228415 100644 --- a/config/alfresco/form-services-context.xml +++ b/config/alfresco/form-services-context.xml @@ -57,6 +57,9 @@ + + + + + + + + + + + + workflow + + + diff --git a/source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessor.java b/source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessor.java new file mode 100644 index 0000000000..1ace22484d --- /dev/null +++ b/source/java/org/alfresco/repo/forms/processor/workflow/WorkflowFormProcessor.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2005-2010 Alfresco Software Limited. + * + * This file is part of Alfresco + * + * Alfresco 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 3 of the License, or + * (at your option) any later version. + * + * Alfresco 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 Alfresco. If not, see . + */ +package org.alfresco.repo.forms.processor.workflow; + +import org.alfresco.repo.forms.processor.node.TypeFormProcessor; +import org.alfresco.service.cmr.workflow.WorkflowService; + +/** + * Temporary FormProcessor implementation that can generate and persist + * Form objects for workflow definitions. + * + * @author Gavin Cornwell + */ +public class WorkflowFormProcessor extends TypeFormProcessor +{ + protected WorkflowService workflowService; + + /** + * Sets the workflow service + * + * @param workflowService The WorkflowService instance + */ + public void setWorkflowService(WorkflowService workflowService) + { + this.workflowService = workflowService; + } +}