mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
- Workflow Service
-- addition of get process definition history -- addition of get active timers (for a process definition) -- addition of fire custom workflow events -- addition of get process variables - Workflow Console -- addition of undeploy all versions of a process definition -- addition of list all versions of a process definition -- addition of list workflows for previous version of a process definition -- addition of query tasks -- addition of firing custom workflow event -- addition of list timers -- addition of show process variables git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5754 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -97,13 +97,21 @@ public interface WorkflowService
|
||||
public void undeployDefinition(String workflowDefinitionId);
|
||||
|
||||
/**
|
||||
* Gets all deployed Workflow Definitions
|
||||
* Gets latest deployed Workflow Definitions
|
||||
*
|
||||
* @return the deployed workflow definitions
|
||||
* @return the latest deployed workflow definitions
|
||||
*/
|
||||
@Auditable
|
||||
public List<WorkflowDefinition> getDefinitions();
|
||||
|
||||
/**
|
||||
* Gets all deployed Workflow Definitions (with all previous versions)
|
||||
*
|
||||
* @return the deployed (and previous) workflow definitions
|
||||
*/
|
||||
@Auditable
|
||||
public List<WorkflowDefinition> getAllDefinitions();
|
||||
|
||||
/**
|
||||
* Gets a Workflow Definition by unique Id
|
||||
*
|
||||
@@ -114,7 +122,7 @@ public interface WorkflowService
|
||||
public WorkflowDefinition getDefinitionById(String workflowDefinitionId);
|
||||
|
||||
/**
|
||||
* Gets a Workflow Definition by unique name
|
||||
* Gets the latest Workflow Definition by unique name
|
||||
*
|
||||
* @param workflowName workflow name e.g. jbpm://review
|
||||
* @return the deployed workflow definition (or null if not found)
|
||||
@@ -122,6 +130,15 @@ public interface WorkflowService
|
||||
@Auditable(parameters = {"workflowName"})
|
||||
public WorkflowDefinition getDefinitionByName(String workflowName);
|
||||
|
||||
/**
|
||||
* Gets all (including previous) Workflow Definitions for the given unique name
|
||||
*
|
||||
* @param workflowName workflow name e.g. jbpm://review
|
||||
* @return the deployed workflow definition (or null if not found)
|
||||
*/
|
||||
@Auditable(parameters = {"workflowName"})
|
||||
public List<WorkflowDefinition> getAllDefinitionsByName(String workflowName);
|
||||
|
||||
/**
|
||||
* Gets a graphical view of the Workflow Definition
|
||||
*
|
||||
@@ -184,6 +201,15 @@ public interface WorkflowService
|
||||
@Auditable(parameters = {"workflowId"})
|
||||
public List<WorkflowPath> getWorkflowPaths(String workflowId);
|
||||
|
||||
/**
|
||||
* Gets the properties associated with the specified path (and parent paths)
|
||||
*
|
||||
* @param pathId workflow path id
|
||||
* @return map of path properties
|
||||
*/
|
||||
@Auditable(parameters = {"pathId"})
|
||||
public Map<QName, Serializable> getPathProperties(String pathId);
|
||||
|
||||
/**
|
||||
* Cancel an "in-fligth" Workflow instance
|
||||
*
|
||||
@@ -215,6 +241,16 @@ public interface WorkflowService
|
||||
@Auditable(parameters = {"pathId", "transitionId"})
|
||||
public WorkflowPath signal(String pathId, String transitionId);
|
||||
|
||||
/**
|
||||
* Fire custom event against specified path
|
||||
*
|
||||
* @param pathId the workflow path to fire event on
|
||||
* @param event name of event
|
||||
* @return workflow path (it may have been updated as a result of firing the event
|
||||
*/
|
||||
@Auditable(parameters = {"pathId", "event"})
|
||||
public WorkflowPath fireEvent(String pathId, String event);
|
||||
|
||||
/**
|
||||
* Gets all Tasks associated with the specified path
|
||||
*
|
||||
@@ -223,8 +259,21 @@ public interface WorkflowService
|
||||
*/
|
||||
@Auditable(parameters = {"pathId"})
|
||||
public List<WorkflowTask> getTasksForWorkflowPath(String pathId);
|
||||
|
||||
|
||||
|
||||
//
|
||||
// Workflow Timer Management
|
||||
//
|
||||
|
||||
/**
|
||||
* Gets all active timers for the specified workflow
|
||||
*
|
||||
* @return the list of active timers
|
||||
*/
|
||||
@Auditable(parameters = {"workflowId"})
|
||||
public List<WorkflowTimer> getTimers(String workflowId);
|
||||
|
||||
|
||||
//
|
||||
// Task Management
|
||||
//
|
||||
@@ -263,7 +312,7 @@ public interface WorkflowService
|
||||
* @param query the filter by which tasks are queried
|
||||
* @return the list of tasks matching the specified query
|
||||
*/
|
||||
@Auditable(parameters = {"filter"})
|
||||
@Auditable(parameters = {"query"})
|
||||
public List<WorkflowTask> queryTasks(WorkflowTaskQuery query);
|
||||
|
||||
/**
|
||||
|
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* 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.service.cmr.workflow;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public class WorkflowTimer
|
||||
{
|
||||
/** Timer Id */
|
||||
public String id;
|
||||
|
||||
/** Transition Name */
|
||||
public String name;
|
||||
|
||||
/** Associated Workflow Path */
|
||||
public WorkflowPath path;
|
||||
|
||||
/** Associated Workflow Task (if any) */
|
||||
public WorkflowTask task;
|
||||
|
||||
/** Due Date */
|
||||
public Date dueDate;
|
||||
|
||||
/*
|
||||
* (non-Javadoc)
|
||||
*
|
||||
* @see java.lang.Object#toString()
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
return "WorkflowTimer[id=" + id + ",name=" + name + ",dueDate=" + dueDate + ",path=" + path + ",task=" + task + "]";
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user