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.
  • Method Details

    • get

      GUIWorkflow get(String workflowName, Integer version) throws ServerException
      Loads a given workflow from the database
      Parameters:
      workflowName - name of the workflow
      version - 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 workflow
      version - 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(List<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
    • saveACL

      void saveACL(GUIWorkflow workflow) throws ServerException
      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

      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

      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 ServerException
      Deletes a workflow trigger
      Parameters:
      id - identifier of the trigger
      Throws:
      ServerException - an error happened in the server applications
    • applyTriggersToTree

      void applyTriggersToTree(long folderId) throws ServerException
      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 folder
      workflowId - identifier of the workflow
      templateId - 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 workflow
      workflowDescription - description of the workflow
      tag - a tak to mark this new execution
      color - a color to mark this new execution
      docIds - 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

      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, long 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 task
      userId - identifier of the user
      Returns:
      the workflow definition
      Throws:
      ServerException - an error happened in the server applications
    • reassignTask

      GUIWorkflow reassignTask(String taskId, long userId) throws ServerException
      The task is assigned to another user
      Parameters:
      taskId - identifier of the task
      userId - 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 task
      transitionName - 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, List<Long> docIds) throws ServerException
      Appends to the workflow of the given taskId the documents with the given doc ids
      Parameters:
      taskId - identifier of the task
      docIds - 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 task
      docId - identifier of the document to remove
      Throws:
      ServerException - an error happened in the server applications
    • addNote

      long addNote(String taskId, String transitionName, String note) throws ServerException
      Adds a new note on the workflow instance
      Parameters:
      taskId - identifier of the task
      transitionName - 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

      void deleteNote(long noteId) throws ServerException
      Deletes a note
      Parameters:
      noteId - identifier of the note
      Throws:
      ServerException - an error happened in the server applications