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 Detail

      • get

        GUIWorkflow get​(String workflowName)
                 throws ServerException
        Loads a given workflow from the database
        Parameters:
        workflowName - name 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,
                                         String processInstanceId)
                                  throws ServerException
        Loads a given workflow to display a completion diagram
        Parameters:
        workflowName - name of the workflow
        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
      • 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
      • deploy

        void deploy​(GUIWorkflow workflow)
             throws ServerException
        Deploys a given workflow
        Parameters:
        workflow - the workflow to deploy
        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
      • 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,
                         int startAtCheckin)
                  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)
        startAtCheckin - 1 if the trigger must be invoked even at checkin time
        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 workflow
        workflowDescription - description of the workflow
        tag - a tak to mark this new execution
        docIds - 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 task
        userId - 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 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,
                             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 note)
              throws ServerException
        Adds a new note on the workflow instance
        Parameters:
        taskId - identifier of the task
        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