org.enhydra.shark.api.client.wfservice
Interface ExecutionAdministration


public interface ExecutionAdministration

Interface used to perform some administrative operations that concern execution engine objects.

The first method to be called by client application is the first method of this interface - connect(), and only if user authentication is OK, other methods can be used (otherwise, every method throws NotConnected exception).

Author:
Sasa Bojanic, Vladimir Puskas

Method Summary
 void assignActivityInstanceAttributeForLocalContext(WMSessionHandle shandle, java.lang.String procInstId, java.lang.String actInstId, java.lang.String attrName, java.lang.Object attrValue)
          Sets the value of an activity instance attribute, but only inside activity context.
 void assignActivityInstanceProperty(WMSessionHandle shandle, java.lang.String procInstId, java.lang.String actInstId, java.lang.String propName, java.lang.Object propValue)
          Sets the value of an activity instance property.
 void assignProcessInstanceProperty(WMSessionHandle shandle, java.lang.String procInstId, java.lang.String propName, java.lang.Object propValue)
          Sets the specified process instance property value.
 WMActivityInstanceIterator checkDeadlinesForActivities(WMSessionHandle session, WMActivityInstance[] acts)
          When this operation is called, shark checks for deadlines of activities specified by given parameters, and takes appropriate action if deadlines are exceeded.
 WMActivityInstanceIterator checkDeadlinesForProcesses(WMSessionHandle shandle, java.lang.String[] procIds)
          When this operation is called, shark checks for deadlines of all active activities for the process instances with a given Ids, and takes appropriate action if deadlines are exceeded.
 WMActivityInstanceIterator checkDeadlinesWithFiltering(WMSessionHandle shandle, WMFilter procOrActFilter)
          When this operation is called, shark checks for deadlines of all active activities based on provided filter, and takes appropriate action if deadlines are exceeded.
 WMActivityInstanceIterator checkLimitsForActivities(WMSessionHandle sessionHandle, WMActivityInstance[] acts)
          When this operation is called, shark checks for limit of the activity specified by given parameters, and takes appropriate action if limit is exceeded.
 WMProcessInstanceIterator checkLimitsForProcesses(WMSessionHandle sessionHandle, java.lang.String[] procIds, boolean checkActivities)
          When this operation is called, shark checks for limits of the process specified by given parameter, and if checkActivities parameter is 'true' it also checks for the limits of all of the active activities for these processes, and takes appropriate action if limits are exceeded.
 WMActivityInstanceIterator checkLimitsWithActivityFiltering(WMSessionHandle sessionHandle, WMFilter actFilter)
          When this operation is called, shark checks for limits of all active activities and all active processes, and takes appropriate action if limits are exceeded.
 WMProcessInstanceIterator checkLimitsWithProcessFiltering(WMSessionHandle sessionHandle, WMFilter procFilter, boolean checkActivities)
          When this operation is called, shark checks for limits of all active processes, and if checkActivities parameter is 'true' it also checks for the limits of all of the activite activities for these processes, and takes appropriate action if limits are exceeded.
 void clearProcessCache(WMSessionHandle shandle)
          Clears process cache.
 void clearResourceCache(WMSessionHandle shandle)
          Clears resource cache.
 WMProcessInstanceIterator deleteProcesses(WMSessionHandle shandle, java.lang.String[] procIds)
          Deletes closed process instances from instance persistence repository.
 WMProcessInstanceIterator deleteProcessesWithFiltering(WMSessionHandle shandle, WMFilter procFilter)
          Deletes closed process instances from instance persistence repository.
 java.lang.String[] getDeadlineRichedProcessIds(WMSessionHandle shandle)
          Gets the process Ids of the processes where there is at least one activity which reached the deadline.
 void injectException(WMSessionHandle shandle, java.lang.String procId, java.lang.String actId, java.lang.Exception ex)
          Provides a way to inject exception to specified activity so process definition can continue with 'Exception' transition if any.
 WMActivityInstanceIterator reevaluateAssignmentsForActivities(WMSessionHandle shandle, WMActivityInstance[] acts, boolean returnChangedOnly)
          Reevaluates assignments for the active, non-accepted activities provided as a parameter.
 WMActivityInstanceIterator reevaluateAssignmentsForProcesses(WMSessionHandle shandle, java.lang.String[] procIds, boolean returnChangedOnly)
          Reevaluates assignments for all the active, non-accepted activities within the given process instances.
 WMActivityInstanceIterator reevaluateAssignmentsWithFiltering(WMSessionHandle shandle, WMFilter procOrActFilter, boolean returnChangedOnly)
          Reevaluates assignments for the active, non-accepted activities.
 void setProcessCacheSize(WMSessionHandle shandle, int size)
          Changes the size of process cache.
 void setResourceCacheSize(WMSessionHandle shandle, int size)
          Changes the size of resource cache.
 void startActivity(WMSessionHandle shandle, java.lang.String procId, java.lang.String blockActId, WMEntity actDef)
          Provides a way to jump-into the process instance, and manually start activity specified by XPDL definition.
 

Method Detail

startActivity

void startActivity(WMSessionHandle shandle,
                   java.lang.String procId,
                   java.lang.String blockActId,
                   WMEntity actDef)
                   throws java.lang.Exception
Provides a way to jump-into the process instance, and manually start activity specified by XPDL definition.

Parameters:
procId - Id of process instance.
blockActId - instance Id of block activity
actDef - XPDL activity definition for the activity we want to manually start.
Throws:
java.lang.Exception - If something unexpected happens.

reevaluateAssignmentsWithFiltering

WMActivityInstanceIterator reevaluateAssignmentsWithFiltering(WMSessionHandle shandle,
                                                              WMFilter procOrActFilter,
                                                              boolean returnChangedOnly)
                                                              throws java.lang.Exception
Reevaluates assignments for the active, non-accepted activities. Which activity's assignments will be re-evaluated depends on the provided process or activity filter.

Throws:
java.lang.Exception

reevaluateAssignmentsForProcesses

WMActivityInstanceIterator reevaluateAssignmentsForProcesses(WMSessionHandle shandle,
                                                             java.lang.String[] procIds,
                                                             boolean returnChangedOnly)
                                                             throws java.lang.Exception
Reevaluates assignments for all the active, non-accepted activities within the given process instances.

Throws:
java.lang.Exception

reevaluateAssignmentsForActivities

WMActivityInstanceIterator reevaluateAssignmentsForActivities(WMSessionHandle shandle,
                                                              WMActivityInstance[] acts,
                                                              boolean returnChangedOnly)
                                                              throws java.lang.Exception
Reevaluates assignments for the active, non-accepted activities provided as a parameter.

Throws:
java.lang.Exception

deleteProcessesWithFiltering

WMProcessInstanceIterator deleteProcessesWithFiltering(WMSessionHandle shandle,
                                                       WMFilter procFilter)
                                                       throws java.lang.Exception
Deletes closed process instances from instance persistence repository. Which processes will be deleted depends on the filter.

Throws:
java.lang.Exception

deleteProcesses

WMProcessInstanceIterator deleteProcesses(WMSessionHandle shandle,
                                          java.lang.String[] procIds)
                                          throws java.lang.Exception
Deletes closed process instances from instance persistence repository.

Throws:
java.lang.Exception

injectException

void injectException(WMSessionHandle shandle,
                     java.lang.String procId,
                     java.lang.String actId,
                     java.lang.Exception ex)
                     throws java.lang.Exception
Provides a way to inject exception to specified activity so process definition can continue with 'Exception' transition if any.

Throws:
java.lang.Exception

assignProcessInstanceProperty

void assignProcessInstanceProperty(WMSessionHandle shandle,
                                   java.lang.String procInstId,
                                   java.lang.String propName,
                                   java.lang.Object propValue)
                                   throws java.lang.Exception
Sets the specified process instance property value.

Parameters:
procInstId - The process instance id.
propName - The property name.
propValue - The property value.
Throws:
java.lang.Exception - Workflow client exception.

assignActivityInstanceProperty

void assignActivityInstanceProperty(WMSessionHandle shandle,
                                    java.lang.String procInstId,
                                    java.lang.String actInstId,
                                    java.lang.String propName,
                                    java.lang.Object propValue)
                                    throws java.lang.Exception
Sets the value of an activity instance property.

Parameters:
procInstId - The process instance id.
actInstId - The activity instance id.
propName - The property name.
propValue - The property value.
Throws:
java.lang.Exception - Workflow client exception.

assignActivityInstanceAttributeForLocalContext

void assignActivityInstanceAttributeForLocalContext(WMSessionHandle shandle,
                                                    java.lang.String procInstId,
                                                    java.lang.String actInstId,
                                                    java.lang.String attrName,
                                                    java.lang.Object attrValue)
                                                    throws java.lang.Exception
Sets the value of an activity instance attribute, but only inside activity context. Corresponds to OMG's WfActiviy.set_process_context() method instead of WfActiviy.set_result() method for which we have WAPI.assignActivityInstanceAttribute().

Parameters:
procInstId - The process instance id.
actInstId - The activity instance id.
attrName - The attribute name.
attrValue - The attribute value.
Throws:
java.lang.Exception - Workflow client exception.

setProcessCacheSize

void setProcessCacheSize(WMSessionHandle shandle,
                         int size)
                         throws java.lang.Exception
Changes the size of process cache.

Throws:
java.lang.Exception

clearProcessCache

void clearProcessCache(WMSessionHandle shandle)
                       throws java.lang.Exception
Clears process cache.

Throws:
java.lang.Exception

setResourceCacheSize

void setResourceCacheSize(WMSessionHandle shandle,
                          int size)
                          throws java.lang.Exception
Changes the size of resource cache.

Throws:
java.lang.Exception

clearResourceCache

void clearResourceCache(WMSessionHandle shandle)
                        throws java.lang.Exception
Clears resource cache.

Throws:
java.lang.Exception

getDeadlineRichedProcessIds

java.lang.String[] getDeadlineRichedProcessIds(WMSessionHandle shandle)
                                               throws java.lang.Exception
Gets the process Ids of the processes where there is at least one activity which reached the deadline.

Throws:
java.lang.Exception

checkDeadlinesWithFiltering

WMActivityInstanceIterator checkDeadlinesWithFiltering(WMSessionHandle shandle,
                                                       WMFilter procOrActFilter)
                                                       throws java.lang.Exception
When this operation is called, shark checks for deadlines of all active activities based on provided filter, and takes appropriate action if deadlines are exceeded.

Throws:
java.lang.Exception

checkDeadlinesForProcesses

WMActivityInstanceIterator checkDeadlinesForProcesses(WMSessionHandle shandle,
                                                      java.lang.String[] procIds)
                                                      throws java.lang.Exception
When this operation is called, shark checks for deadlines of all active activities for the process instances with a given Ids, and takes appropriate action if deadlines are exceeded.

Throws:
java.lang.Exception

checkDeadlinesForActivities

WMActivityInstanceIterator checkDeadlinesForActivities(WMSessionHandle session,
                                                       WMActivityInstance[] acts)
                                                       throws java.lang.Exception
When this operation is called, shark checks for deadlines of activities specified by given parameters, and takes appropriate action if deadlines are exceeded.

Throws:
java.lang.Exception

checkLimitsWithProcessFiltering

WMProcessInstanceIterator checkLimitsWithProcessFiltering(WMSessionHandle sessionHandle,
                                                          WMFilter procFilter,
                                                          boolean checkActivities)
                                                          throws java.lang.Exception
When this operation is called, shark checks for limits of all active processes, and if checkActivities parameter is 'true' it also checks for the limits of all of the activite activities for these processes, and takes appropriate action if limits are exceeded.

Throws:
java.lang.Exception

checkLimitsForProcesses

WMProcessInstanceIterator checkLimitsForProcesses(WMSessionHandle sessionHandle,
                                                  java.lang.String[] procIds,
                                                  boolean checkActivities)
                                                  throws java.lang.Exception
When this operation is called, shark checks for limits of the process specified by given parameter, and if checkActivities parameter is 'true' it also checks for the limits of all of the active activities for these processes, and takes appropriate action if limits are exceeded.

Throws:
java.lang.Exception

checkLimitsWithActivityFiltering

WMActivityInstanceIterator checkLimitsWithActivityFiltering(WMSessionHandle sessionHandle,
                                                            WMFilter actFilter)
                                                            throws java.lang.Exception
When this operation is called, shark checks for limits of all active activities and all active processes, and takes appropriate action if limits are exceeded.

Throws:
java.lang.Exception

checkLimitsForActivities

WMActivityInstanceIterator checkLimitsForActivities(WMSessionHandle sessionHandle,
                                                    WMActivityInstance[] acts)
                                                    throws java.lang.Exception
When this operation is called, shark checks for limit of the activity specified by given parameters, and takes appropriate action if limit is exceeded.

Throws:
java.lang.Exception