Package lumis.portal.interactiveprocess
Interface IProcess
-
- All Superinterfaces:
java.io.Serializable
- All Known Implementing Classes:
Process
@StableMinor(version="17.0", sinceVersion="10.3") public interface IProcess extends java.io.Serializable
Interactive process that can be executed in LumisXP.- Since:
- 7.1.0
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IStepOutcome
executeNextStep()
Executes the next step of this process and returns the outcome.java.lang.String
getId()
Returns the identifier of this process.java.lang.Integer
getLastExecutedStep()
Returns the last executed step.java.lang.String
getOwner()
Returns the owner of this process.java.lang.String
getOwnerUser()
Returns the owner user identifier of this process.ProcessState
getState()
Returns the process state.java.util.List<IStep>
getSteps()
Returns an unmodifiable list of the steps.java.lang.String
getTitle()
Returns the title of this process.IStepOutcome
ignoreNextStep()
Ignores the next step of this process.void
stop()
Stops the process.boolean
tryToExecuteUntilTheEnd()
Tries to execute the process until the end.
-
-
-
Method Detail
-
getId
java.lang.String getId()
Returns the identifier of this process.- Returns:
- the identifier of this process.
- Since:
- 7.1.0
-
getTitle
java.lang.String getTitle()
Returns the title of this process.- Returns:
- the title of this process.
- Since:
- 7.1.0
-
getOwner
java.lang.String getOwner()
Returns the owner of this process.- Returns:
- the owner of this process.
- Since:
- 7.1.0
-
getOwnerUser
java.lang.String getOwnerUser()
Returns the owner user identifier of this process.- Returns:
- the owner user identifier of this process.
- Since:
- 7.1.0
-
ignoreNextStep
IStepOutcome ignoreNextStep() throws PortalException
Ignores the next step of this process. If the next step is the last one this process (and all of it's steps) will be removed.
This method creates and uses its own transaction.
If the next step is the last one and this process has acallback handler
, theprocess completed callback
will be invoked.- Throws:
MandatoryStepIgnoredException
- if the next step is a mandatory one.ProcessNotOwnedException
- if the process has been taken by other user.PortalException
- if other error occur.- Since:
- 7.1.0
-
executeNextStep
IStepOutcome executeNextStep() throws PortalException
Executes the next step of this process and returns the outcome. If the next step is the last one and the outcome isStepOutcomeStatus.SUCCESS
this process (and all of it's steps) will be removed.
This method creates and uses its own transaction.
If the next step is the last one and this process has acallback handler
, theprocess completed callback
will be invoked.- Returns:
- the outcome of the next step.
- Throws:
ProcessNotOwnedException
- if the process has been taken by other user.PortalException
- if other error occur.- Since:
- 7.1.0
-
stop
void stop() throws PortalException
Stops the process. The process will stop running and it will be removed. Then, if this process has acallback handler
, theprocess 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.
- Throws:
ProcessNotOwnedException
- if the process has been taken by other user.PortalException
- if other error occur.- Since:
- 7.1.0
-
tryToExecuteUntilTheEnd
boolean tryToExecuteUntilTheEnd() throws PortalException, java.lang.InterruptedException
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 acallback handler
, theprocess completed callback
will be invoked.- 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
- Since:
- 10.3.0
-
getSteps
java.util.List<IStep> getSteps() throws PortalException
Returns an unmodifiable list of the steps.- Returns:
- an unmodifiable list of the steps.
- Throws:
PortalException
- Since:
- 7.1.0
-
getLastExecutedStep
java.lang.Integer getLastExecutedStep() throws PortalException
Returns the last executed step.- Returns:
- the last executed step
- Throws:
PortalException
- Since:
- 7.1.0
-
getState
ProcessState getState()
Returns the process state.- Returns:
- the process state.
- Since:
- 7.1.0
-
-