Class Process

  • All Implemented Interfaces:
    java.io.Serializable, IProcess

    public class Process
    extends java.lang.Object
    implements java.io.Serializable, IProcess
    A portal interactive process.
    Since:
    7.1.0
    Version:
    $Revision$ $Date$
    See Also:
    Serialized Form
    • Method Detail

      • tryToExecuteUntilTheEnd

        public boolean tryToExecuteUntilTheEnd()
                                        throws PortalException,
                                               java.lang.InterruptedException
        Description copied from interface: IProcess
        Tries to execute the process until the end. If an error occur an exception is raised.
        This method execute each step in a separate transaction.
        If this process has a callback handler, the process completed callback will be invoked.
        Specified by:
        tryToExecuteUntilTheEnd in interface IProcess
        Returns:
        Whether the process has ended or not. If the process hasn't ended, it means that some error has occurred.
        Throws:
        PortalException
        java.lang.InterruptedException
      • getLastExecutedStepDate

        public java.util.Date getLastExecutedStepDate()
        Returns the lastExecutedStepDate.
        Returns:
        the lastExecutedStepDate
        Since:
        7.1.0
      • getCreationDate

        public java.util.Date getCreationDate()
        Returns the creationDate.
        Returns:
        the creationDate
        Since:
        7.1.0
      • getTitle

        public java.lang.String getTitle()
        Description copied from interface: IProcess
        Returns the title of this process.
        Specified by:
        getTitle in interface IProcess
        Returns:
        the title of this process.
      • getId

        public java.lang.String getId()
        Returns the identifier of this process.
        Specified by:
        getId in interface IProcess
        Returns:
        the identifier of this process.
        Since:
        7.1.0
      • getNextStep

        public IStep getNextStep()
        Returns the next step to be executed. If there isn't any other step to be executed, null will be returned.
        Returns:
        the next step to be executed.
        Since:
        7.1.0
      • getOwnerUser

        public java.lang.String getOwnerUser()
        Description copied from interface: IProcess
        Returns the owner user identifier of this process.
        Specified by:
        getOwnerUser in interface IProcess
        Returns:
        the owner user identifier of this process.
      • getOwner

        public java.lang.String getOwner()
        Description copied from interface: IProcess
        Returns the owner of this process.
        Specified by:
        getOwner in interface IProcess
        Returns:
        the owner of this process.
      • getSteps

        public java.util.List<IStep> getSteps()
        Description copied from interface: IProcess
        Returns an unmodifiable list of the steps.
        Specified by:
        getSteps in interface IProcess
        Returns:
        an unmodifiable list of the steps.
      • getState

        public ProcessState getState()
        Description copied from interface: IProcess
        Returns the process state.
        Specified by:
        getState in interface IProcess
        Returns:
        the process state.
      • stop

        public void stop()
                  throws PortalException
        Description copied from interface: IProcess
        Stops the process. The process will stop running and it will be removed. Then, if this process has a callback handler, the process stopped callback will be invoked.

        It is possible that this process can not be stopped with proper cleanup and inconsistent states may happen. Do not use it unless you know what you are doing.

        Specified by:
        stop in interface IProcess
        Throws:
        ProcessNotOwnedException - if the process has been taken by other user.
        PortalException - if other error occur.
      • getProcessCallbackHandler

        public IProcessCallbackHandler getProcessCallbackHandler()
                                                          throws PortalException
        Converts the Process Callback Handler from bytes to object and returns it.
        Returns:
        Process Callback Handler object.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0