001: package org.enhydra.shark.api.internal.working;
002:
003: import java.util.List;
004: import java.util.Map;
005:
006: import org.enhydra.shark.api.client.wfmc.wapi.WMSessionHandle;
007: import org.enhydra.shark.api.client.wfmodel.AlreadyRunning;
008: import org.enhydra.shark.api.client.wfmodel.CannotAcceptSuspended;
009: import org.enhydra.shark.api.client.wfmodel.CannotComplete;
010: import org.enhydra.shark.api.client.wfmodel.CannotStart;
011: import org.enhydra.shark.api.client.wfmodel.CannotStop;
012: import org.enhydra.shark.api.client.wfmodel.InvalidData;
013: import org.enhydra.shark.api.client.wfmodel.NotRunning;
014: import org.enhydra.shark.api.client.wfmodel.ResultNotAvailable;
015:
016: /**
017: * @author Sasa Bojanic
018: * @author Vladimir Puskas
019: */
020: public interface WfActivityInternal extends WfRequesterInternal,
021: WfExecutionObjectInternal {
022:
023: // returns:
024: // -1 -> assignments are not re-evaluated (possible when activity type is improper, state is closed or error happened)
025: // 0 -> assignment re-evaluation happened, but the new assignments are the same as the old ones
026: // 1 -> assignment re-evaluation happened, and new assignments are different than the old ones
027: int reevaluateAssignments(WMSessionHandle shandle) throws Exception;
028:
029: String getResourceUsername(WMSessionHandle shandle)
030: throws Exception;
031:
032: List getAssignmentResourceIds(WMSessionHandle shandle)
033: throws Exception;
034:
035: void updateAssignmentResourceIds(WMSessionHandle shandle,
036: String oldResUname, String newResUname) throws Exception;
037:
038: WfProcessInternal container(WMSessionHandle shandle)
039: throws Exception;
040:
041: Map result(WMSessionHandle shandle) throws Exception,
042: ResultNotAvailable;
043:
044: void set_result(WMSessionHandle shandle, Map result)
045: throws Exception, InvalidData;
046:
047: void complete(WMSessionHandle shandle) throws Exception,
048: CannotComplete;
049:
050: // internal
051: void finish(WMSessionHandle shandle) throws Exception,
052: CannotComplete;
053:
054: void terminateFromProcess(WMSessionHandle shandle)
055: throws Exception, CannotStop, NotRunning;
056:
057: void abortFromProcess(WMSessionHandle shandle) throws Exception,
058: CannotStop, NotRunning;
059:
060: WfActivityInternal block_activity(WMSessionHandle shandle)
061: throws Exception;
062:
063: String activity_set_definition_id(WMSessionHandle shandle)
064: throws Exception;
065:
066: String activity_definition_id(WMSessionHandle shandle)
067: throws Exception;
068:
069: String activity_definition_name(WMSessionHandle shandle)
070: throws Exception;
071:
072: String block_activity_id(WMSessionHandle shandle) throws Exception;
073:
074: String manager_name(WMSessionHandle shandle) throws Exception;
075:
076: String process_id(WMSessionHandle shandle) throws Exception;
077:
078: String getPerformerId(WMSessionHandle shandle);
079:
080: boolean isPerformerSynchronous(WMSessionHandle shandle);
081:
082: void activate(WMSessionHandle shandle) throws Exception,
083: CannotStart, AlreadyRunning;
084:
085: void set_accepted_status(WMSessionHandle shandle, boolean accepted,
086: String resourceUname) throws Exception,
087: CannotAcceptSuspended;
088:
089: Exception getException(WMSessionHandle shandle);
090:
091: void setException(WMSessionHandle shandle, Exception tage);
092:
093: String getExceptionName(WMSessionHandle shandle);
094:
095: void setExceptionName(WMSessionHandle shandle, String exceptionName);
096:
097: boolean checkDeadlines(WMSessionHandle shandle,
098: long timeLimitBoundary, Map actsToAsyncExcNames)
099: throws Exception;
100:
101: List getDeadlineInfo(WMSessionHandle shandle) throws Exception;
102:
103: int getDefinitionType(WMSessionHandle shandle) throws Exception;
104:
105: WfActivityInternal duplicate(WfProcessInternal proc)
106: throws Exception;
107:
108: }
|