Interface WorkflowService
- All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
@RemoteServiceRelativePath("workflow")
public interface WorkflowService
extends com.google.gwt.user.client.rpc.RemoteService
The client side stub for the Workflow Service. This service gives all needed
methods to handle workflows.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionlong
Adds a new note on the workflow instancevoid
appendDocuments
(String taskId, List<Long> docIds) Appends to the workflow of the given taskId the documents with the given doc idsvoid
applyTriggersToTree
(long folderId) Applies the triggers on a root folder to all the subtreeThe given user take the ownership of the task.int
countAssignedTasks
(String username) Counts all the tasks assigned to the given uservoid
Deletes a given workflowvoid
deleteInstance
(String id) Deletes a given workflow instancevoid
deleteInstances
(List<String> ids) Deletes a given workflow instancesvoid
deleteNote
(long noteId) Deletes a notevoid
deleteTrigger
(long id) Deletes a workflow triggerdeploy
(GUIWorkflow workflow) Deploys a given workflowvoid
Ends a task invoking the transitionLoads a given workflow from the databasegetCompletionDiagram
(String workflowName, Integer version, String processInstanceId) Loads a given workflow to display a completion diagramgetWorkflowDetailsByTask
(String taskId) Retrieves all the info of the workflow of the given taskImports a new workflow schema already uploadedlist()
Lists all the workflows on the databasereassignTask
(String taskId, long userId) The task is assigned to another uservoid
removeDocument
(String taskId, long docId) Detaches a document from a workflowsave
(GUIWorkflow workflow) Creates or updates a workflowvoid
saveACL
(GUIWorkflow workflow) Saves just the ACL of a workflowvoid
saveTrigger
(String folderId, String workflowId, String templateId, String events) Save a new workflow trigger on the given folder with the given workflowId and templateIdstartWorkflow
(String workflowName, String workflowDescription, String tag, String color, List<Long> docIds) Start a workflow with the given name and associated to the documents with the given doc idsvoid
turnBackTaskToPool
(String taskId) The task is reassigned to the pooled usersvoid
Undeploys a given workflow
-
Method Details
-
get
Loads a given workflow from the database- Parameters:
workflowName
- name of the workflowversion
- version of the workflow- Returns:
- the workflow retrieved by the server application
- Throws:
ServerException
- an error happened in the server application
-
getCompletionDiagram
GUIWorkflow getCompletionDiagram(String workflowName, Integer version, String processInstanceId) throws ServerException Loads a given workflow to display a completion diagram- Parameters:
workflowName
- name of the workflowversion
- version of the workflow template(optional)processInstanceId
- identifier of the workflow instance- Returns:
- the completion diagram retrieved by the server application
- Throws:
ServerException
- an error happened in the server application
-
delete
Deletes a given workflow- Parameters:
workflowName
- name of the workflow to delete- Throws:
ServerException
- an error happened in the server application
-
deleteInstance
Deletes a given workflow instance- Parameters:
id
- identifier of the workflow instance- Throws:
ServerException
- an error happened in the server application
-
deleteInstances
Deletes a given workflow instances- Parameters:
ids
- identifiers of the workflow instances- Throws:
ServerException
- an error happened in the server application
-
importSchema
Imports a new workflow schema already uploaded- Returns:
- the new workflow representation
- Throws:
ServerException
- an error happened in the server application
-
save
Creates or updates a workflow- Parameters:
workflow
- the workflow to save- Returns:
- the saved workflow
- Throws:
ServerException
- an error happened in the server application
-
saveACL
Saves just the ACL of a workflow- Parameters:
workflow
- the workflow to save the ACL- Throws:
ServerException
- an error happened in the server application
-
deploy
Deploys a given workflow- Parameters:
workflow
- the workflow to deploy- Returns:
- the next version of the workflow
- Throws:
ServerException
- an error happened in the server application
-
undeploy
Undeploys a given workflow- Parameters:
workflowName
- name of the workflow- Throws:
ServerException
- an error happened in the server application
-
list
Lists all the workflows on the database- Returns:
- all the available workflows
- Throws:
ServerException
- an error happened in the server applications
-
deleteTrigger
Deletes a workflow trigger- Parameters:
id
- identifier of the trigger- Throws:
ServerException
- an error happened in the server applications
-
applyTriggersToTree
Applies the triggers on a root folder to all the subtree- Parameters:
folderId
- identifier of the folder root of the tree- Throws:
ServerException
- an error happened in the server applications
-
saveTrigger
void saveTrigger(String folderId, String workflowId, String templateId, String events) throws ServerException Save a new workflow trigger on the given folder with the given workflowId and templateId- Parameters:
folderId
- identifier of the folderworkflowId
- identifier of the workflowtemplateId
- identifier of the template(optional)events
- the comma separated list of events(null for all the events)- Throws:
ServerException
- an error happened in the server applications
-
startWorkflow
String startWorkflow(String workflowName, String workflowDescription, String tag, String color, List<Long> docIds) throws ServerException Start a workflow with the given name and associated to the documents with the given doc ids- Parameters:
workflowName
- name of the workflowworkflowDescription
- description of the workflowtag
- a tak to mark this new executioncolor
- a color to mark this new executiondocIds
- identifiers of the documents appended to the new workflow instance- Returns:
- the new instance's identifier
- Throws:
ServerException
- an error happened in the server applications
-
getWorkflowDetailsByTask
Retrieves all the info of the workflow of the given task- Parameters:
taskId
- identifier of the task- Returns:
- the workflow retrieved by the server application
- Throws:
ServerException
- an error happened in the server applications
-
claimTask
The given user take the ownership of the task. If the task is already claimed you cannot claim again- Parameters:
taskId
- identifier of the taskuserId
- identifier of the user- Returns:
- the workflow definition
- Throws:
ServerException
- an error happened in the server applications
-
reassignTask
The task is assigned to another user- Parameters:
taskId
- identifier of the taskuserId
- identifier of the user- Returns:
- the workflow definition
- Throws:
ServerException
- an error happened in the server applications
-
turnBackTaskToPool
The task is reassigned to the pooled users- Parameters:
taskId
- identifier of the task- Throws:
ServerException
- an error happened in the server applications
-
endTask
Ends a task invoking the transition- Parameters:
taskId
- identifier of the tasktransitionName
- name of the transition- Throws:
ServerException
- an error happened in the server applications
-
countAssignedTasks
Counts all the tasks assigned to the given user- Parameters:
username
- the username- Returns:
- number of tasks assigned to
username
- Throws:
ServerException
- an error happened in the server applications
-
appendDocuments
Appends to the workflow of the given taskId the documents with the given doc ids- Parameters:
taskId
- identifier of the taskdocIds
- identifiers of the documents to append- Throws:
ServerException
- an error happened in the server applications
-
removeDocument
Detaches a document from a workflow- Parameters:
taskId
- identifier of the taskdocId
- identifier of the document to remove- Throws:
ServerException
- an error happened in the server applications
-
addNote
Adds a new note on the workflow instance- Parameters:
taskId
- identifier of the tasktransitionName
- name of the transitions (optional)note
- the new note- Returns:
- identifier of the new note
- Throws:
ServerException
- an error happened in the server applications
-
deleteNote
Deletes a note- Parameters:
noteId
- identifier of the note- Throws:
ServerException
- an error happened in the server applications
-