public interface InstanceManagement
Modifier and Type | Method and Description |
---|---|
java.util.Collection<java.lang.Long> |
delete(java.lang.String filter)
Delete the process instances matching the given filter.
|
InstanceInfoDocument |
fault(java.lang.Long iid,
javax.xml.namespace.QName faultname,
org.w3c.dom.Element faultData)
Causes the process instance to complete unsuccessfully by throwing the specified
fault in the global scope.
|
java.util.List<java.lang.String> |
getEventTimeline(java.lang.String instanceFilter,
java.lang.String eventFilter)
Retrieve a timeline of BPEL events.
|
InstanceInfoDocument |
getInstanceInfo(java.lang.Long iid)
Get an instance by id.
|
ScopeInfoDocument |
getScopeInfo(java.lang.String siid)
Get info about a scope instance by id, not including activity info.
|
ScopeInfoDocument |
getScopeInfoWithActivity(java.lang.String siid,
boolean activityInfo)
Get info about a scope instance by id, optionally including activity info.
|
VariableInfoDocument |
getVariableInfo(java.lang.String scopeId,
java.lang.String varName)
Get info about a variable.
|
InstanceInfoListDocument |
listAllInstances()
Deprecated.
As of Ode 1.3, this method is deprecated in favor of
listInstancesSummary(filter, order, limit)
|
InstanceInfoListDocument |
listAllInstancesWithLimit(int limit)
Deprecated.
As of Ode 1.3, this method is deprecated in favor of
listInstancesSummary(filter, order, limit)
|
EventInfoListDocument |
listEvents(java.lang.String instanceFilter,
java.lang.String eventFilter,
int maxCount)
Retrieve BPEL events.
|
InstanceInfoListDocument |
listInstances(java.lang.String filter,
java.lang.String order,
int limit)
Retrieve and returns information about all, or some process instances.
|
InstanceInfoListDocument |
listInstancesSummary(java.lang.String filter,
java.lang.String order,
int limit)
List instances and only return summary information about the instance,
combined with all correlation properties.
|
InstanceInfoListDocument |
queryInstances(java.lang.String query)
Deprecated.
As of Ode 1.3, this method is deprecated in favor of
listInstances(filter, order, limit)
|
InstanceInfoDocument |
recoverActivity(java.lang.Long iid,
java.lang.Long aid,
java.lang.String action)
Performs an activity recovery action.
|
InstanceInfoDocument |
resume(java.lang.Long iid)
Resume the (previously suspended) instance.
|
InstanceInfoDocument |
suspend(java.lang.Long iid)
Changes the process state from active to suspended.
|
InstanceInfoDocument |
terminate(java.lang.Long iid)
Causes the process instance to terminate immediately, without a chance to
perform any fault handling or compensation.
|
InstanceInfoListDocument listInstances(java.lang.String filter, java.lang.String order, int limit)
Retrieve and returns information about all, or some process instances.
The request identifies the process instances using a filter that can
select instances with a given name, status, property values, etc.
Without a filter, the operation returns all process instances up to a
specified limit<.code>. The request also indicates which key fields
to use for ordering the results.
The filter element can be used to narrow down the list of process definitions by applying selection criteria. There are six filters that can be applied:
name -- Only process instances with this local name.
namespace -- Only process instances with this namespace URI.
status -- Only process instances with these status code(s).
started -- Only process instances started relative to this date/time.
last-active -- Only process instances last active relative to this date/time.
$property -- Only process instances with a correlation property equal to the specified value.
The name and namespace filters can do full or partial name matching. Partial matching occurs if either filter ends with an asterisk (*). These filters are not case sensitive, for example name=my* will match MyProcess and my-process. If unspecified, the default filter is name=* namespace=*.
The status filter can be used to filter all process definitions based on six status codes:
active -- All currently active process instances (excludes instances in any other state).
suspended -- All process instances that have not completed, but are currently suspended.
error -- All process instances that have not completed, but are currently indicate an error condition.
completed -- All successfully completed process instances (excludes instances in any other state).
terminated -- All process instances that were terminated.
faulted -- All process instances that encountered a fault (in the global scope).
The started filter can be used to filter all process instances started on or after a particular date or date/time instant. The value of this filter is either an ISO-8601 date or ISO-8601 date/time. For example, to find all process instances started on or after September 1, 2005, use started>=20050901. Similarly, the last-active filter can be used to filter all process instances based on their last active time. The last active time records when the process last completed performing work, and either completed or is now waiting to receive a message, a timeout or some other event.
Each process instance has one or more properties that are set its instantiation, that can be used to distinguish it from other process instances. In this version of the specification, we only support properties instantiated as part of correlation sets defined in the global scope of the process. For example, if a process instantiates a correlation set that uses the property order-id, it is possible to filter that process instance based on the value of that property.
The property name is identified by the prefix $. If the property name is an NCName, the filter will match all properties with that local name. If the property name is {namespace}local, the filter will match all properties with the specified namespace URI and local name. For example, to retrieve a list of all active process instances with a property order-id that has the value 456, use status=active $order-id=456.
By default the response returns process instances in no particular order. The order element can be used to order the results by specifying a space-separated list of keys. Each key can be prefixed with a plus sign '+' to specify ascending order, or a '-' minus sign to specify descending order. Without a sign the default behavior is to return process instances in ascending order. The currently supported odering keys are:
pid
name
namespace
version
status
started
last-active
filter
- filter stringorder
- order keyslimit
- maximum number of instances to returnInstanceInfoListDocument listInstancesSummary(java.lang.String filter, java.lang.String order, int limit)
filter
- See listInstances' filter argumentorder
- See listInstances' order argumentlimit
- maximum number of instances to returnInstanceInfoListDocument queryInstances(java.lang.String query)
InstanceInfoListDocument listAllInstances()
listInstances(String, String, int)
InstanceInfoListDocument listAllInstancesWithLimit(int limit)
limit
instances in the default (database) order.limit
- maximum number of instances to returnlistInstances(String, String, int)
InstanceInfoDocument getInstanceInfo(java.lang.Long iid) throws InstanceNotFoundException
iid
- InstanceNotFoundException
- TODOScopeInfoDocument getScopeInfo(java.lang.String siid)
siid
- scope instance identifiergetScopeInfoWithActivity(String, boolean)
ScopeInfoDocument getScopeInfoWithActivity(java.lang.String siid, boolean activityInfo)
siid
- scope instance identifieractivityInfo
- if true
, include activity infoVariableInfoDocument getVariableInfo(java.lang.String scopeId, java.lang.String varName)
scopeId
- scope identifiervarName
- variable nameEventInfoListDocument listEvents(java.lang.String instanceFilter, java.lang.String eventFilter, int maxCount)
listInstances(String, String, int)
method. The "event filter" employs
a similar syntax; the following properties may be filtered: instanceFilter
- instance filter (if set,return only events for matching instances)eventFilter
- event filter (event type and data range)java.util.List<java.lang.String> getEventTimeline(java.lang.String instanceFilter, java.lang.String eventFilter)
instanceFilter
- instance filter (if set,return only events for matching instances)eventFilter
- event filter (event type and data range)InstanceInfoDocument suspend(java.lang.Long iid)
iid
- instance idInstanceInfoDocument resume(java.lang.Long iid)
iid
- instance idInstanceInfoDocument terminate(java.lang.Long iid)
iid
- instance idInstanceInfoDocument fault(java.lang.Long iid, javax.xml.namespace.QName faultname, org.w3c.dom.Element faultData)
iid
- instance idfaultname
- name of the faultfaultData
- fault datajava.util.Collection<java.lang.Long> delete(java.lang.String filter)
filter
- instance filter (see listInstances(String, String, int)
).InstanceInfoDocument recoverActivity(java.lang.Long iid, java.lang.Long aid, java.lang.String action)
iid
- instance id (process)aiid
- instance id (activity)action
- recovery action (e.g. retry, fault)