Interface WorkflowService
-
- All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
@RemoteServiceRelativePath("workflow") public interface WorkflowService extends com.google.gwt.user.client.rpc.RemoteServiceThe client side stub for the Workflow Service. This service gives all needed methods to handle workflows.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classWorkflowService.Instance
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longaddNote(String taskId, String note)Adds a new note on the workflow instancevoidappendDocuments(String taskId, Long[] docIds)Appends to the workflow of the given taskId the documents with the given doc idsvoidapplyTriggersToTree(long folderId)Applies the triggers on a root folder to all the subtreeGUIWorkflowclaimTask(String taskId, String userId)The given user take the ownership of the task.intcountAssignedTasks(String username)Counts all the tasks assigned to the given uservoiddelete(String workflowName)Deletes a given workflowvoiddeleteInstance(String id)Deletes a given workflow instancevoiddeleteInstances(String[] ids)Deletes a given workflow instancesvoiddeleteNote(long noteId)Deletes a notevoiddeleteTrigger(long id)Deletes a workflow triggerGUIWorkflowdeploy(GUIWorkflow workflow)Deploys a given workflowvoidendTask(String taskId, String transitionName)Ends a task invoking the transitionGUIWorkflowget(String workflowName, Integer version)Loads a given workflow from the databaseGUIWorkflowgetCompletionDiagram(String workflowName, Integer version, String processInstanceId)Loads a given workflow to display a completion diagramGUIWorkflowgetWorkflowDetailsByTask(String taskId)Retrieves all the info of the workflow of the given taskGUIWorkflowimportSchema()Imports a new workflow schema already uploadedGUIWorkflow[]list()Lists all the workflows on the databaseGUIWorkflowreassignTask(String taskId, String userId)The task is assigned to another uservoidremoveDocument(String taskId, long docId)Detaches a document from a workflowGUIWorkflowsave(GUIWorkflow workflow)Creates or updates a workflowvoidsaveTrigger(String folderId, String workflowId, String templateId, String events)Save a new workflow trigger on the given folder with the given workflowId and templateIdvoidstartWorkflow(String workflowName, String workflowDescription, String tag, long[] docIds)Start a workflow with the given name and associated to the documents with the given doc idsvoidturnBackTaskToPool(String taskId)The task is reassigned to the pooled usersvoidundeploy(String workflowName)Undeploys a given workflow
-
-
-
Method Detail
-
get
GUIWorkflow get(String workflowName, Integer version) throws ServerException
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
void delete(String workflowName) throws ServerException
Deletes a given workflow- Parameters:
workflowName- name of the workflow to delete- Throws:
ServerException- an error happened in the server application
-
deleteInstance
void deleteInstance(String id) throws ServerException
Deletes a given workflow instance- Parameters:
id- identifier of the workflow instance- Throws:
ServerException- an error happened in the server application
-
deleteInstances
void deleteInstances(String[] ids) throws ServerException
Deletes a given workflow instances- Parameters:
ids- identifiers of the workflow instances- Throws:
ServerException- an error happened in the server application
-
importSchema
GUIWorkflow importSchema() throws ServerException
Imports a new workflow schema already uploaded- Returns:
- the new workflow representation
- Throws:
ServerException- an error happened in the server application
-
save
GUIWorkflow save(GUIWorkflow workflow) throws ServerException
Creates or updates a workflow- Parameters:
workflow- the workflow to save- Returns:
- the saved workflow
- Throws:
ServerException- an error happened in the server application
-
deploy
GUIWorkflow deploy(GUIWorkflow workflow) throws ServerException
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
void undeploy(String workflowName) throws ServerException
Undeploys a given workflow- Parameters:
workflowName- name of the workflow- Throws:
ServerException- an error happened in the server application
-
list
GUIWorkflow[] list() throws ServerException
Lists all the workflows on the database- Returns:
- all the available workflows
- Throws:
ServerException- an error happened in the server applications
-
deleteTrigger
void deleteTrigger(long id) throws ServerExceptionDeletes a workflow trigger- Parameters:
id- identifier of the trigger- Throws:
ServerException- an error happened in the server applications
-
applyTriggersToTree
void applyTriggersToTree(long folderId) throws ServerExceptionApplies 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
void startWorkflow(String workflowName, String workflowDescription, String tag, 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 executiondocIds- identifiers of the documents appended to the new workflow instance- Throws:
ServerException- an error happened in the server applications
-
getWorkflowDetailsByTask
GUIWorkflow getWorkflowDetailsByTask(String taskId) throws ServerException
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
GUIWorkflow claimTask(String taskId, String userId) throws ServerException
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
GUIWorkflow reassignTask(String taskId, String userId) throws ServerException
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
void turnBackTaskToPool(String taskId) throws ServerException
The task is reassigned to the pooled users- Parameters:
taskId- identifier of the task- Throws:
ServerException- an error happened in the server applications
-
endTask
void endTask(String taskId, String transitionName) throws ServerException
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
int countAssignedTasks(String username) throws ServerException
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
void appendDocuments(String taskId, Long[] docIds) throws ServerException
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
void removeDocument(String taskId, long docId) throws ServerException
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
long addNote(String taskId, String note) throws ServerException
Adds a new note on the workflow instance- Parameters:
taskId- identifier of the tasknote- the new note- Returns:
- identifier of the new note
- Throws:
ServerException- an error happened in the server applications
-
deleteNote
void deleteNote(long noteId) throws ServerExceptionDeletes a note- Parameters:
noteId- identifier of the note- Throws:
ServerException- an error happened in the server applications
-
-