public class MemoryWorkflowInstanceRepository extends AbstractPaginatibleInstanceRepository
A simple WorkflowInstanceRepository
that does not require the use of
a database to track the status of the Workflow executions it manages.
pageSize
X_POINT_ID
Constructor and Description |
---|
MemoryWorkflowInstanceRepository(int pageSize)
Default Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addWorkflowInstance(WorkflowInstance wInst)
Persists the specified
WorkflowInstance to the instance
repository. |
int |
getNumWorkflowInstances()
Gets the number of
WorkflowInstances with any status
being managed by this WorkflowInstanceRepository. |
int |
getNumWorkflowInstancesByStatus(String status)
Gets the number of
WorkflowInstances with the given
status being managed by this WorkflowInstanceRepository. |
WorkflowInstance |
getWorkflowInstanceById(String workflowInstId)
Returns the
WorkflowInstance s with the specified
workflowInstId . |
List |
getWorkflowInstances() |
List |
getWorkflowInstancesByStatus(String status)
|
protected List |
paginateWorkflows(int pageNum,
String status) |
void |
removeWorkflowInstance(WorkflowInstance wInst)
Removes the specified
WorkflowInstance from the instance
repository. |
void |
updateWorkflowInstance(WorkflowInstance wInst)
Updates and persists the specified
WorkflowInstance to the
instance repository. |
getFirstPage, getLastPage, getNextPage, getPagedWorkflows, getPagedWorkflows, getPrevPage, paginateWorkflows
public MemoryWorkflowInstanceRepository(int pageSize)
Default Constructor
public void addWorkflowInstance(WorkflowInstance wInst) throws InstanceRepositoryException
WorkflowInstanceRepository
WorkflowInstance
to the instance
repository.wInst
- The workflow instance to persist.InstanceRepositoryException
- If any error occurs.public void removeWorkflowInstance(WorkflowInstance wInst) throws InstanceRepositoryException
WorkflowInstanceRepository
WorkflowInstance
from the instance
repository.wInst
- The workflow instance to remove.InstanceRepositoryException
- If any error occurs.public void updateWorkflowInstance(WorkflowInstance wInst) throws InstanceRepositoryException
WorkflowInstanceRepository
WorkflowInstance
to the
instance repository.wInst
- The workflow instance to update and persist.InstanceRepositoryException
- If any error occurs.public WorkflowInstance getWorkflowInstanceById(String workflowInstId) throws InstanceRepositoryException
WorkflowInstanceRepository
Returns the WorkflowInstance
s with the specified
workflowInstId
.
workflowInstId
- The ID of the WorkflowInstance
to return.WorkflowInstance
.InstanceRepositoryException
- If any error occurs.public List getWorkflowInstances() throws InstanceRepositoryException
List
of WorkflowInstance
s that this
WorkflowEngine
is managing.InstanceRepositoryException
- If any error occurs.public List getWorkflowInstancesByStatus(String status) throws InstanceRepositoryException
WorkflowInstanceRepository
Returns a List
of WorkflowInstance
s, with the specified
status
String.
status
- A string representation of the status of the
WorkflowInstance
.List
of WorkflowInstance
s, with the specified
status
String.InstanceRepositoryException
- If there is any error that occurs.protected List paginateWorkflows(int pageNum, String status) throws InstanceRepositoryException
paginateWorkflows
in class AbstractPaginatibleInstanceRepository
InstanceRepositoryException
public int getNumWorkflowInstances() throws InstanceRepositoryException
WorkflowInstanceRepository
WorkflowInstances
with any status
being managed by this WorkflowInstanceRepository.WorkflowInstances
associated with any
status
being managed by this
WorkflowInstanceRepository.InstanceRepositoryException
public int getNumWorkflowInstancesByStatus(String status) throws InstanceRepositoryException
WorkflowInstanceRepository
WorkflowInstances
with the given
status
being managed by this WorkflowInstanceRepository.status
- The status to obtain the number of WorkflowInstance
s
for.WorkflowInstance
s with the given
status
.InstanceRepositoryException
- If there is any error that occurs.Copyright © 1999-2014 Apache OODT. All Rights Reserved.