Package lumis.portal.interactiveprocess
Interface IInteractiveProcessManager
-
- All Known Implementing Classes:
InteractiveProcessManager
@StableMinor(version="16.0", sinceVersion="7.1") public interface IInteractiveProcessManager
Manager responsible for handlingportal interactive processes
.- Since:
- 7.1.0
- Version:
- $Revision: 25808 $ $Date: 2023-07-04 15:20:55 -0300 (Tue, 04 Jul 2023) $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IProcess
createProcess(java.lang.String title, java.util.List<Step> steps, IProcessCallbackHandler callbackHandler)
Creates aportal interactive process
with the givensteps
.IProcess
getProcess(java.lang.String processId, java.lang.String owner)
Returns the process of the given identifier.
The parameterprocessId
is required.java.lang.String
submitProcess(IProcess process)
Submits a process created with#createProcess(String, List)
.java.lang.String
takeOwnership(java.lang.String processId)
Takes the ownership of the process with the given identifier.
-
-
-
Method Detail
-
createProcess
IProcess createProcess(java.lang.String title, java.util.List<Step> steps, IProcessCallbackHandler callbackHandler) throws PortalException
Creates aportal interactive process
with the givensteps
. The steps order will be kept unchanged of the one existent in the given list. The created process is not yet ready to be executed. Indeed, it is not persisted yet. After the process object is created, it must be passed to#submitProcess(Process)
in order to be used. Returns the created process object.- Parameters:
title
- The process title.steps
- The steps that compose the process.callbackHandler
- The callback handler for the created process. May benull
.- Returns:
- the recently created process' identifier.
- Throws:
java.lang.IllegalArgumentException
- if the title isnull
.java.lang.IllegalArgumentException
- if the title is empty.java.lang.IllegalArgumentException
- if the step list isnull
.java.lang.IllegalArgumentException
- if the step list is empty.java.lang.IllegalArgumentException
- if the step list has one or more steps without anexecutable
.PortalException
- Since:
- 7.1.0
-
submitProcess
java.lang.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(java.lang.String processId, java.lang.String owner) throws PortalException
Returns the process of the given identifier.
The parameterprocessId
is required. It represents the identifier of the process that is requested to be obtained. When it is not provided (if it isnull
or empty) anIllegalArgumentException
is raised. If there's no process with the given identifier aPortalObjectNotFoundException
will be raised.
The parameterowner
may not benull
. It represents the identifier of the owner of the process. When it is not provided (if it isnull
or empty) anIllegalArgumentException
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, aProcessNotOwnedException
is raised.- Parameters:
processId
- the process identifier.owner
- the owner identifier.- Returns:
- the process.
- Throws:
java.lang.IllegalArgumentException
- if the parameterowner
isnull
.java.lang.IllegalArgumentException
- if the parameterprocessId
isnull
.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
java.lang.String takeOwnership(java.lang.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 currentsession
as being the user that owns the process.- Parameters:
processId
- the process identifier.- Returns:
- a random string that is the new process owner.
- Throws:
java.lang.IllegalArgumentException
- if the processId isnull
or empty.PortalObjectNotFoundException
- if the given process does not exist.java.lang.IllegalStateException
- if there's no current user session.PortalException
- if some other error occur.- Since:
- 7.1.0
-
-