public interface ProcessManager
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string
|
static int |
DISABLED
DISABLED status
|
static int |
RUNNING
RUNNING status
|
static int |
UNREGISTERED
UNREGISTERED status
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
getAllProcessNames()
Returns the names of all processes known to this process manager,
null if no processes are registered.
|
java.lang.String[] |
getAllProcessNames(int pStatus)
Returns the names of all processes with the given status (RUNNING
or DISABLED) known to this process manager, null if no processes
with the given status are registered.
|
java.lang.String |
getProcessAuthor(java.lang.String pProcessName)
Returns the author of the given process.
|
long |
getProcessCreationTime(java.lang.String pProcessName)
Returns the creation time of the given process.
|
java.util.Collection |
getProcessInstanceInfos(boolean pIndividualInstances,
boolean pCollectiveInstances)
Returns all the existing process instances, as a Collection of
ProcessInstanceInfo objects.
|
java.util.Collection |
getProcessInstanceInfos(ProcessWaitState[] pWaitStates,
boolean pIndividualInstances,
boolean pCollectiveInstances)
Returns all the process instances which are waiting at any of the
given wait states, as a Collection of ProcessInstanceInfo
objects.
|
java.util.Collection |
getProcessInstanceInfos(java.lang.String pSubjectId)
Returns all the individual process instances associated with a
given subject, as a Collection of ProcessInstanceInfo objects.
|
java.util.Collection |
getProcessInstanceInfos(java.lang.String pSubjectId,
ProcessWaitState[] pWaitStates)
Returns all the individual process instances associated with the
given subject which are waiting at any of the given wait states,
as a Collection of ProcessInstanceInfo objects.
|
java.util.Collection |
getProcessInstanceInfos(java.lang.String pProcessName,
java.lang.String pSegmentName,
boolean pIndividualInstances,
boolean pCollectiveInstances)
Returns all the process instances for the given process segment,
as a Collection of ProcessInstanceInfo objects.
|
java.util.Collection |
getProcessInstanceInfos(java.lang.String pSubjectId,
java.lang.String pProcessName,
java.lang.String pSegmentName)
Returns all the individual process instances associated with the
given subject and the given process segment, as a Collection of
ProcessInstanceInfo objects.
|
java.lang.String |
getProcessLastModifiedBy(java.lang.String pProcessName)
Returns the user who last modified the given process.
|
long |
getProcessModificationTime(java.lang.String pProcessName)
Returns the modification time of the given process.
|
int |
getProcessStatus(java.lang.String pProcessName)
Returns the status of the given process, to the best of this
process manager's knowledge.
|
boolean |
isEditOnlyMode()
Returns true if this server is in editOnly mode, false
otherwise.
|
boolean |
isProcessEditorServer()
Returns true if this server is the process editor server, false
otherwise.
|
void |
updateAllProcesses()
Updates all processes.
|
boolean |
updateProcess(java.lang.String pProcessName)
Updates the given process, based on the information from a
trusted source.
|
static final java.lang.String CLASS_VERSION
static final int UNREGISTERED
static final int DISABLED
static final int RUNNING
boolean isEditOnlyMode()
ProcessManager
instance, and is
not considered a traditional ProcessManager
type
such as global, individual or process editor serversboolean isProcessEditorServer()
java.lang.String[] getAllProcessNames()
java.lang.String[] getAllProcessNames(int pStatus)
int getProcessStatus(java.lang.String pProcessName)
long getProcessModificationTime(java.lang.String pProcessName)
long getProcessCreationTime(java.lang.String pProcessName)
java.lang.String getProcessAuthor(java.lang.String pProcessName)
java.lang.String getProcessLastModifiedBy(java.lang.String pProcessName)
boolean updateProcess(java.lang.String pProcessName) throws ProcessException
If the process no longer exists, makes sure it is stopped and unregistered with the process manager.
If the process is new, registers it. If the new process is enabled, starts it running.
If the definition of the process has changed, unregisters the process, and registers it again using the new definition. If both the old and the new versions of the process are enabled, then any migratable process segments are migrated; the rest are stopped and restarted.
It's ok to call this method even if the process is already up to date; in that case, no actual work is done.
ProcessException
- if there is a problem updating the
processvoid updateAllProcesses() throws ProcessException
Attempts to update all the processes, even if some of the updates result in errors. All the errors are logged. At the end, if any errors were encountered during any of the updates, an exception is thrown as well.
It's ok to call this method even if all of the processes are already up to date; in that case, no actual work is done.
ProcessException
- if any of the processes could not be
updatedjava.util.Collection getProcessInstanceInfos(boolean pIndividualInstances, boolean pCollectiveInstances) throws ProcessException
Warning: this is a potentially expensive operation. The result set could be very large, depending on the number of process instances created for this type of process.
pIndividualInstances
- a boolean indicating whether
individual instances should be included in the result setpCollectiveInstances
- a boolean indicating whether
collective instances should be included in the result setProcessException
- if the process instance information
cannot be obtainedProcessInstanceInfo
java.util.Collection getProcessInstanceInfos(java.lang.String pProcessName, java.lang.String pSegmentName, boolean pIndividualInstances, boolean pCollectiveInstances) throws ProcessException
Warning: this is a potentially expensive operation. The result set could be very large, depending on the number of process instances created for the given process segment.
pProcessName
- name of the process for which process
instances should be returnedpSegmentName
- name of the process segment for which process
instances should be returned; if null, instances for all segments
in the given process will be returnedpIndividualInstances
- a boolean indicating whether
individual instances should be included in the result setpCollectiveInstances
- a boolean indicating whether
collective instances should be included in the result setProcessException
- if the process instance information
cannot be obtainedProcessInstanceInfo
java.util.Collection getProcessInstanceInfos(ProcessWaitState[] pWaitStates, boolean pIndividualInstances, boolean pCollectiveInstances) throws ProcessException
Warning: this is a potentially expensive operation. The result set could be very large, depending on the number of process instances created for this type of process.
pWaitStates
- an array of ProcessWaitStates, each describing
a location in the process where process instances may be waitingpIndividualInstances
- a boolean indicating whether
individual instances should be included in the result setpCollectiveInstances
- a boolean indicating whether
collective instances should be included in the result setProcessException
- if the process instance information
cannot be obtainedProcessInstanceInfo
java.util.Collection getProcessInstanceInfos(java.lang.String pSubjectId) throws ProcessException
pSubjectId
- repository id of the process subjectProcessException
- if the process instance information
cannot be obtainedProcessInstanceInfo
java.util.Collection getProcessInstanceInfos(java.lang.String pSubjectId, java.lang.String pProcessName, java.lang.String pSegmentName) throws ProcessException
pSubjectId
- repository id of the process subjectpProcessName
- name of the process for which process
instances should be returnedpSegmentName
- name of the process segment for which process
instances should be returned; if null, instances for all segments
in the given process will be returnedProcessException
- if the process instance information
cannot be obtainedProcessInstanceInfo
java.util.Collection getProcessInstanceInfos(java.lang.String pSubjectId, ProcessWaitState[] pWaitStates) throws ProcessException
pSubjectId
- repository id of the process subjectpWaitStates
- an array of ProcessWaitStates, each describing
a location in the process where process instances may be waitingProcessException
- if the process instance information
cannot be obtainedProcessInstanceInfo