com.sun.caps.management.api.bpel
Interface BPELManagementService


public interface BPELManagementService

Defines operations for managing BPEL process instances

Author:
Sun Microsystems

Nested Class Summary
static class BPELManagementService.ActivityStatus
          Encapsulates the Activity status and runtime information
static class BPELManagementService.BPInstanceInfo
          Encapsulates BPEL instance runtime information
static class BPELManagementService.BPInstanceQueryResult
          The Query Result wrapper class containing the return list and data of the return batch
static class BPELManagementService.BPStatus
          Encapsulates the BPEL instance status
static class BPELManagementService.SortColumn
          An Enum class for valid sort parameter values
static class BPELManagementService.SortOrder
          An Enum class for valid order parameter values
static class BPELManagementService.VarInfo
          Encapsulates BPEL variable information
 
Method Summary
 boolean changeVariableValue(java.lang.String instanceId, long varId, java.lang.String partName, java.lang.String xpath, java.lang.String value, java.lang.String target)
          Change BPEL variable value, only the leaf node can be changed Only available when isMonitoringVariableEnabled returns true.
 java.util.List<BPELManagementService.ActivityStatus> getBPELInstanceActivityStatus(java.lang.String instanceId, java.lang.String target)
          Get the list of ActivityStatus of a BPEL instance
 java.lang.String getBPELInstanceFault(java.lang.String instanceId, java.lang.String target)
          Get the fault detail of a faulted bpel instance;
 BPELManagementService.BPInstanceQueryResult getBPELInstances(java.lang.String bpelQName, BPELManagementService.BPStatus status, java.lang.String instanceId, java.lang.Integer maxRecords, BPELManagementService.SortColumn sortColumn, BPELManagementService.SortOrder order, java.lang.String target)
          Get BPEL instances given optional BPEL process QName and/or an optional BPStatus or an optional instance id If instanceid is present, the BPEL process QName and BPStatus are ignored
 java.util.List<java.lang.String> getBPELProcessIds(java.lang.String suName, java.lang.String target)
          Get the list of BPEL process QName as String within an SU.
 java.util.List<BPELManagementService.BPInstanceInfo> getInvokeeInstance(java.lang.String instanceId, java.lang.Long invokeActivityId, java.lang.String target)
          Get the list of invokee (sub) bpel instance(s) that a specific bpel instance invoked.
 java.util.List<BPELManagementService.BPInstanceInfo> getInvokerInstance(java.lang.String instanceId, java.lang.Long receiveActivityId, java.lang.String target)
          Get the list of invoker (parent) bpel instance(s) that invoked a specific bpel instance.
 java.lang.String getVariableValue(java.lang.String instanceId, long varId, java.lang.String target)
          Get the BPEL variable value, the content of BPEL variable will be returned Only available when isMonitoringVariableEnabled returns true.
 boolean isMonitoringEnabled(java.lang.String target)
          Is Monitoring enabled
 boolean isMonitoringVariableEnabled(java.lang.String target)
          Is Monitoring Variable Enabled.
 boolean isPersistenceEnabled(java.lang.String target)
          Is persistence enabled
 java.util.List<BPELManagementService.VarInfo> listBPELVaraibles(java.lang.String instanceId, java.lang.String varName, java.lang.String target)
          Get the BPEL variable info for a bpel instance Only available when isMonitoringVariableEnabled returns true.
 java.util.List<java.lang.String> resumeAllInstance(java.lang.String processName, java.lang.String target)
          Resume all instances of a bpel process
 boolean resumeInstance(java.lang.String instanceId, java.lang.String target)
          Resume a suspended BPEL instance
 BPELManagementService.BPInstanceQueryResult searchBPELInstances(java.lang.String bpelQName, BPELManagementService.BPStatus status, java.lang.String searchString, java.lang.Integer maxRecords, BPELManagementService.SortColumn sortColumn, BPELManagementService.SortOrder order, java.lang.String target)
          Search for BPEL instances info given BPEL process QName and a SearchString and/or an optional BPStatus.
 java.util.List<java.lang.String> suspendAllInstance(java.lang.String processName, java.lang.String target)
          Suspend all instances of a bpel process
 boolean suspendInstance(java.lang.String instanceId, java.lang.String target)
          Suspend BPEL instance
 java.util.List<java.lang.String> terminateAllInstance(java.lang.String processName, java.lang.String target)
          Terminate all instances of a bpel process
 boolean terminateInstance(java.lang.String instanceId, java.lang.String target)
          Terminate a BPEL instance
 

Method Detail

isMonitoringEnabled

boolean isMonitoringEnabled(java.lang.String target)
                            throws com.sun.caps.management.common.ManagementRemoteException
Is Monitoring enabled

Parameters:
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
true if monitoring is enabled
Throws:
com.sun.caps.management.common.ManagementRemoteException

isMonitoringVariableEnabled

boolean isMonitoringVariableEnabled(java.lang.String target)
                                    throws com.sun.caps.management.common.ManagementRemoteException
Is Monitoring Variable Enabled.

Parameters:
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
true if monitoring is enabled
Throws:
com.sun.caps.management.common.ManagementRemoteException

isPersistenceEnabled

boolean isPersistenceEnabled(java.lang.String target)
                             throws com.sun.caps.management.common.ManagementRemoteException
Is persistence enabled

Parameters:
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
true if persistence is enabled
Throws:
com.sun.caps.management.common.ManagementRemoteException

getBPELProcessIds

java.util.List<java.lang.String> getBPELProcessIds(java.lang.String suName,
                                                   java.lang.String target)
                                                   throws com.sun.caps.management.common.ManagementRemoteException
Get the list of BPEL process QName as String within an SU.

Parameters:
suName - The name of the SU.
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
The list of BPELProcesses Ids, empty list will be returned
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

getBPELInstanceActivityStatus

java.util.List<BPELManagementService.ActivityStatus> getBPELInstanceActivityStatus(java.lang.String instanceId,
                                                                                   java.lang.String target)
                                                                                   throws com.sun.caps.management.common.ManagementRemoteException
Get the list of ActivityStatus of a BPEL instance

Parameters:
instanceId -
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

getBPELInstances

BPELManagementService.BPInstanceQueryResult getBPELInstances(java.lang.String bpelQName,
                                                             BPELManagementService.BPStatus status,
                                                             java.lang.String instanceId,
                                                             java.lang.Integer maxRecords,
                                                             BPELManagementService.SortColumn sortColumn,
                                                             BPELManagementService.SortOrder order,
                                                             java.lang.String target)
                                                             throws com.sun.caps.management.common.ManagementRemoteException
Get BPEL instances given optional BPEL process QName and/or an optional BPStatus or an optional instance id If instanceid is present, the BPEL process QName and BPStatus are ignored

Without max specified, the maximum instances to return is 1000, user specifies a number for maxRecords to limit the number of the instances returned.

If the BPInstanceQueryResult.overflow is true, it indicates the number of qualifying instances is larger than 1000, no instances are returned in the result list, user should specify a maxRecords and sortColumn and order

Parameters:
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
bpelQName - BPEL process QName as String, not used if instanceId is present
status - Optional, if present, only the instances of the specific status are returned, not used if instanceId is present
instanceId - Optional, if present only the specific instance is returned
maxRecords - Optional
sortColumn - Optional
SortOrder - Optional
Returns:
A list of BPEL instance ids
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

searchBPELInstances

BPELManagementService.BPInstanceQueryResult searchBPELInstances(java.lang.String bpelQName,
                                                                BPELManagementService.BPStatus status,
                                                                java.lang.String searchString,
                                                                java.lang.Integer maxRecords,
                                                                BPELManagementService.SortColumn sortColumn,
                                                                BPELManagementService.SortOrder order,
                                                                java.lang.String target)
                                                                throws com.sun.caps.management.common.ManagementRemoteException
Search for BPEL instances info given BPEL process QName and a SearchString and/or an optional BPStatus. Without max specified, the maximum instances to return is 1000, user specifies a number for maxRecords to limit the number of the instances returned.

If the BPInstanceQueryResult.overflow is true, it indicates the number of qualifying instances is larger than 1000, no instances are returned in the result list, user should specify a maxRecords and sortColumn and order

Parameters:
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
bpelQName - BPEL process QName as String, not used if instanceId is present
status - Optional, if present, only the instances of the specific status are returned.
searchString - The searchString
maxRecords - Optional
sortColumn - Optional
SortOrder - Optional
Returns:
A list of BPEL instance ids
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

getBPELInstanceFault

java.lang.String getBPELInstanceFault(java.lang.String instanceId,
                                      java.lang.String target)
                                      throws com.sun.caps.management.common.ManagementRemoteException
Get the fault detail of a faulted bpel instance;

Parameters:
instanceId - the faulted bpel instance id
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
conn - database connection, when the result is obtained, the conn is closed.
Throws:
com.sun.caps.management.common.ManagementRemoteException

getInvokerInstance

java.util.List<BPELManagementService.BPInstanceInfo> getInvokerInstance(java.lang.String instanceId,
                                                                        java.lang.Long receiveActivityId,
                                                                        java.lang.String target)
                                                                        throws com.sun.caps.management.common.ManagementRemoteException
Get the list of invoker (parent) bpel instance(s) that invoked a specific bpel instance. For example: bp1 (invoke) --> bp2 (receive), given bp2's instance id, returns the info for bp1.

Only available when isMonitoringVariableEnabled returns true. If isMonitoringVariableEnabled return false, exception will be thrown

Parameters:
instanceId - The invoked bpel instance id
receiveActivityId - Optional receive activity id of the invoked bpel instance, if present, returns only one invoker bpel instance that sends msg to the specific receive
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
The list of invoker instances
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

getInvokeeInstance

java.util.List<BPELManagementService.BPInstanceInfo> getInvokeeInstance(java.lang.String instanceId,
                                                                        java.lang.Long invokeActivityId,
                                                                        java.lang.String target)
                                                                        throws com.sun.caps.management.common.ManagementRemoteException
Get the list of invokee (sub) bpel instance(s) that a specific bpel instance invoked. For example: bp1 (invoke) --> bp2(receive), given bp1's instance id, return the info for bp2.

Only available when isMonitoringVariableEnabled returns true. If isMonitoringVariableEnabled return false, exception will be thrown

Parameters:
instanceId - The invoked bpel instance id
invokeActivityId - Optional invoke activity id of the invoker bpel instance, if present, returns the only one invokee bpel instance that receives msg from the specific invoke
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
The list of invokee instances
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

suspendInstance

boolean suspendInstance(java.lang.String instanceId,
                        java.lang.String target)
                        throws com.sun.caps.management.common.ManagementRemoteException
Suspend BPEL instance

Parameters:
instanceId - The bpel instance to be suspended
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
true if the operation is successful, false if no instance of instanceId is found, either no such instance or the instance has completed or falted
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

suspendAllInstance

java.util.List<java.lang.String> suspendAllInstance(java.lang.String processName,
                                                    java.lang.String target)
                                                    throws com.sun.caps.management.common.ManagementRemoteException
Suspend all instances of a bpel process

Parameters:
processName - The process name (QName)
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
The list of suspended instance ids
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

resumeInstance

boolean resumeInstance(java.lang.String instanceId,
                       java.lang.String target)
                       throws com.sun.caps.management.common.ManagementRemoteException
Resume a suspended BPEL instance

Parameters:
instanceId - The bpel instance to be resumed
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
true if the operation is successful, false if no instance of instanceId is found, either no such instance or the instance is not suspended
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

resumeAllInstance

java.util.List<java.lang.String> resumeAllInstance(java.lang.String processName,
                                                   java.lang.String target)
                                                   throws com.sun.caps.management.common.ManagementRemoteException
Resume all instances of a bpel process

Parameters:
processName - The process name (QName)
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
The list of suspended instance ids
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

terminateInstance

boolean terminateInstance(java.lang.String instanceId,
                          java.lang.String target)
                          throws com.sun.caps.management.common.ManagementRemoteException
Terminate a BPEL instance

Parameters:
instanceId - The bpel instance to be terminated
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
true if the operation is successful, false if no instance of instanceId is found, either no such instance or the instance has completed or falted
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

terminateAllInstance

java.util.List<java.lang.String> terminateAllInstance(java.lang.String processName,
                                                      java.lang.String target)
                                                      throws com.sun.caps.management.common.ManagementRemoteException
Terminate all instances of a bpel process

Parameters:
processName - The process name (QName)
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
The list of suspended instance ids
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

changeVariableValue

boolean changeVariableValue(java.lang.String instanceId,
                            long varId,
                            java.lang.String partName,
                            java.lang.String xpath,
                            java.lang.String value,
                            java.lang.String target)
                            throws com.sun.caps.management.common.ManagementRemoteException
Change BPEL variable value, only the leaf node can be changed Only available when isMonitoringVariableEnabled returns true. If isMonitoringVariableEnabled return false, exception will be thrown

Parameters:
instanceId - The instance id of the instance on which the variable will be changed
varId - The variable Id, can not be null
partName - The part name of the variable, if null, the variable is not message type
xpath - The xpath leading to the leaf node to be changed, if null, the whole variable part (if message type) or variable (not message type) is to change
value - The new value to change
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

getVariableValue

java.lang.String getVariableValue(java.lang.String instanceId,
                                  long varId,
                                  java.lang.String target)
                                  throws com.sun.caps.management.common.ManagementRemoteException
Get the BPEL variable value, the content of BPEL variable will be returned Only available when isMonitoringVariableEnabled returns true. If isMonitoringVariableEnabled return false, exception will be thrown

Parameters:
instanceId - The instance id of the instance
varId - The variable Id, can not be null
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
The content of the BPEL variable
Throws:
java.lang.Exception
com.sun.caps.management.common.ManagementRemoteException

listBPELVaraibles

java.util.List<BPELManagementService.VarInfo> listBPELVaraibles(java.lang.String instanceId,
                                                                java.lang.String varName,
                                                                java.lang.String target)
                                                                throws com.sun.caps.management.common.ManagementRemoteException
Get the BPEL variable info for a bpel instance Only available when isMonitoringVariableEnabled returns true. If isMonitoringVariableEnabled return false, exception will be thrown

Parameters:
instanceId - The instance id of the instance
varName - Optional, if specified, only returns the info for the variable of this name
target - If null, it is not in a clustered, if not null, it is the target name of a cluster
Returns:
Throws:
com.sun.caps.management.common.ManagementRemoteException