001: package org.enhydra.shark.api.client.wfservice;
002:
003: import org.enhydra.shark.api.client.wfmc.wapi.WMActivityInstance;
004: import org.enhydra.shark.api.client.wfmc.wapi.WMActivityInstanceIterator;
005: import org.enhydra.shark.api.client.wfmc.wapi.WMAttribute;
006: import org.enhydra.shark.api.client.wfmc.wapi.WMFilter;
007: import org.enhydra.shark.api.client.wfmc.wapi.WMSessionHandle;
008:
009: /**
010: * Extension of client side interface enabling user to do various things such as to
011: * navigate through process instance or fastly delete finished process instances.
012: *
013: * @author Sasa Bojanic
014: * @author Vladimir Puskas
015: */
016: public interface ExecutionAdministrationExt {
017:
018: /**
019: * Back navigation through the running process instance. It is assumed that process is
020: * running, that there is only one activity running, and that there is only one
021: * activity in XPDL definition prior to the currently running activity. Implementation
022: * of this API method must:
023: * <ul>
024: * <li> find the only one running activity of the given process,
025: * <li> find activity definition prior to the running activity (it could be specified
026: * to search only manual activities)
027: * <li> abort the running activity
028: * <li> update process context with the context provided
029: * <li> start previous activity from the definition
030: * </ul>
031: * NOTE: if block activities are used, be sure that you do not nest them - it won't
032: * work properly in that case. Also, be sure that ActivitySet is referenced from only
033: * one block activity.
034: */
035: WMActivityInstance goBack(WMSessionHandle shandle,
036: String processId, boolean onlyToManual,
037: WMAttribute[] context) throws Exception;
038:
039: /**
040: * Forward navigation through the running process instance. It is assumed that process
041: * is running, that there is only one activity running, and that there is only one
042: * activity in XPDL definition following the currently running activity. Implementation
043: * of this API method must:
044: * <ul>
045: * <li> find the only one running activity of the given process,
046: * <li> find activity definition following the running activity
047: * <li> abort the running activity
048: * <li> update process context with the context provided
049: * <li> start next activity from the definition
050: * </ul>
051: * NOTE: if block activities are used, be sure that you do not nest them - it won't
052: * work properly in that case.
053: */
054: WMActivityInstance goForth(WMSessionHandle shandle,
055: String processId, WMAttribute[] context) throws Exception;
056:
057: /**
058: * Navigation through the running process instance. It is assumed that process is
059: * running, in the case you don't provide 'actId' parameter (it is null) that there is
060: * only one activity running, and that there is activity in XPDL definition with a
061: * given definition Id. Implementation of this API method must:
062: * <ul>
063: * <li> if 'actId' parameter is 'null' find the only one running activity of the given
064: * process, or find the running activity based on not-null 'actId' parameter
065: * <li> find activity definition specified by the 'nextActDefId' parameter
066: * <li> abort the running activity
067: * <li> update process context with the context provided
068: * <li> start specified activity
069: * </ul>
070: * NOTE: if block activities are used, be sure that you do not nest them - it won't
071: * work properly in that case. Also, be sure that ActivitySet is referenced from only
072: * one block activity.
073: */
074: WMActivityInstance goAnywhere(WMSessionHandle shandle,
075: String processId, String actId, String nextActDefId,
076: WMAttribute[] context) throws Exception;
077:
078: /**
079: * Navigation through the running process instance (process must be in 'open.running'
080: * state) to the 'Manual' activity completed prior to the given running activity.
081: * Implementation of this API method must:
082: * <ul>
083: * <li> find first 'Manual' activity inside the process that was completed before
084: * specified activity was created,
085: * <li> abort the specified running activity
086: * <li> update process context with the context provided
087: * <li> start new instance of activity based on definition of activity instance found
088: * in step one
089: * </ul>
090: * NOTE: if block activities are used, be sure that you do not nest them - it won't
091: * work properly in some cases. Also, be sure that ActivitySet is referenced from only
092: * one block activity.
093: */
094: WMActivityInstance goPrevious(WMSessionHandle shandle,
095: String procId, String actId, WMAttribute[] context)
096: throws Exception;
097:
098: /**
099: * Navigation through the running process instance (process must be in 'open.running'
100: * state). Implementation of this API method must:
101: * <ul>
102: * <li> if 'actId' parameter is 'null' find the only one running activity of the given
103: * process, or find the running activity based on not-null 'actId' parameter
104: * <li> update process context with the context provided
105: * <li> complete the running activity
106: * </ul>
107: */
108: void goNext(WMSessionHandle shandle, String procId, String actId,
109: WMAttribute[] context) throws Exception;
110:
111: /**
112: * Fast deleting of finished shark process instances and all othere related entities
113: * (activities, assignments, variables, ....).
114: * <p>
115: * IMPORTANT NOTE: This method won't work with MySQL databases.
116: *
117: * @param shandle
118: * @param procFilter the filter that can be provided to specify a criteria for deleting
119: * processes (i.e. only processes from a certain definition(s)). If it is
120: * null, all the finished processes will be deleted from DB.
121: * @param depth must be specified to the maximum value of nested sub-process instances
122: * @param maxExceptions maximum number of exceptions to ignore during process instance
123: * deletion before actual exception is thrown to the user
124: * @param preferredTime time in milliseconds for which you would like deletion of a
125: * group of process instances is deleted
126: * @param waitingTime time in milliseconds to wait before starting another group
127: * deletion
128: * @param minBatchSize minimum number of process instances to be deleted in one pass
129: * (the minimum size of group of processes to be deleted)
130: * @throws Exception
131: */
132: void deleteProcessInstances(WMSessionHandle shandle,
133: WMFilter procFilter, int depth, int maxExceptions,
134: int preferredTime, int waitingTime, int minBatchSize)
135: throws Exception;
136:
137: /**
138: * Reevaluates assignments for the active, non-accepted activities of the specified
139: * user.
140: */
141: WMActivityInstanceIterator reevaluateAssignmentsForUser(
142: WMSessionHandle shandle, String username,
143: boolean returnChangedOnly) throws Exception;
144:
145: }
|