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
 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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

setProcessCacheSize

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

Throws:
java.lang.Exception

clearProcessCache

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

Throws:
java.lang.Exception

setResourceCacheSize

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

Throws:
java.lang.Exception

clearResourceCache

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

Throws:
java.lang.Exception

getDeadlineRichedProcessIds

public 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

public 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

public 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

public 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

public 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

public 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

public 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

public 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