public class InteractiveProcessManager extends Object implements IInteractiveProcessManager
IInteractiveProcessManager
implementation.Constructor and Description |
---|
InteractiveProcessManager() |
Modifier and Type | Method and Description |
---|---|
IProcess |
createProcess(String title,
List<Step> steps,
IProcessCallbackHandler callbackHandler)
Creates a
portal interactive process with the given
steps . |
Process |
getProcess(String processId,
String ownerId)
Returns the process of the given identifier.
The parameter processId is required. |
void |
recover(String processId)
Changes the process status to "Ready".
|
String |
submitProcess(IProcess process)
Submits a process created with
#createProcess(String, List) . |
String |
takeOwnership(String processId)
Takes the ownership of the process with the given identifier.
|
public IProcess createProcess(String title, List<Step> steps, IProcessCallbackHandler callbackHandler) throws PortalException
IInteractiveProcessManager
portal interactive process
with the given
steps
. 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.createProcess
in interface IInteractiveProcessManager
title
- The process title.steps
- The steps that compose the process.callbackHandler
- The callback handler for the created process. May be
null
.PortalException
public String submitProcess(IProcess process) throws PortalException
IInteractiveProcessManager
#createProcess(String, List)
.
After the process is added it is ready to be executed.submitProcess
in interface IInteractiveProcessManager
process
- the process object.PortalException
public Process getProcess(String processId, String ownerId) throws PortalException
IInteractiveProcessManager
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.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.
getProcess
in interface IInteractiveProcessManager
processId
- the process identifier.ownerId
- the owner identifier.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.public String takeOwnership(String processId) throws PortalException
IInteractiveProcessManager
session
as being the user that owns the process.takeOwnership
in interface IInteractiveProcessManager
processId
- the process identifier.PortalObjectNotFoundException
- if the given process does not exist.PortalException
- if some other error occur.public void recover(String processId) throws PortalException
IInteractiveProcessManager.takeOwnership(String)
.processId
- the process identifier.PortalException
- if any error occurs during the process.LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.