Interface IInteractiveProcessManager

    • Method Detail

      • submitProcess

        String submitProcess​(IProcess process)
                      throws PortalException
        Submits a process created with #createProcess(String, List). After the process is added it is ready to be executed.
        Parameters:
        process - the process object.
        Returns:
        the added process identifier.
        Throws:
        PortalException
        Since:
        7.1.0
      • getProcess

        IProcess getProcess​(String processId,
                            String owner)
                     throws PortalException
        Returns the process of the given identifier.
        The parameter processId is required. It represents the identifier of the process that is requested to be obtained. When it is not provided (if it is null or empty) an IllegalArgumentException is raised. If there's no process with the given identifier a PortalObjectNotFoundException will be raised.
        The parameter owner may not be null. It represents the identifier of the owner of the process. When it is not provided (if it is null or empty) an IllegalArgumentException is raised.

        If the requested process already has an owner and it is the same as the one provided, the process is returned.
        If the requested process already has an owner and it is not the same as the one provided or if the process has no owner, a ProcessNotOwnedException is raised.

        Parameters:
        processId - the process identifier.
        owner - the owner identifier.
        Returns:
        the process.
        Throws:
        IllegalArgumentException - if the parameter owner is null.
        IllegalArgumentException - if the parameter processId is null.
        PortalObjectNotFoundException - if the requested process does not exists.
        ProcessNotOwnedException - if the given process does not belong to the given owner or if the process has no owner.
        PortalException - if other error occur.
        Since:
        7.1.0
      • takeOwnership

        String takeOwnership​(String processId)
                      throws PortalException
        Takes the ownership of the process with the given identifier. This method will generate a new random string that will be the new owner of the given process. This method will store, also, the user of the current session as being the user that owns the process.
        Parameters:
        processId - the process identifier.
        Returns:
        a random string that is the new process owner.
        Throws:
        IllegalArgumentException - if the processId is null or empty.
        PortalObjectNotFoundException - if the given process does not exist.
        IllegalStateException - if there's no current user session.
        PortalException - if some other error occur.
        Since:
        7.1.0