01: /*
02: * Copyright 2007 Outerthought bvba and Schaubroeck nv
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.outerj.daisy.workflow;
17:
18: import org.outerx.daisy.x10Workflow.TaskDocument;
19:
20: import java.util.Date;
21: import java.util.List;
22:
23: public interface WfTask {
24: String getId();
25:
26: Date getCreated();
27:
28: /**
29: * Returns null as long as the task is not ended.
30: */
31: Date getEnd();
32:
33: /**
34: * Time by which the task should be finished, can be null.
35: */
36: Date getDueDate();
37:
38: TaskPriority getPriority();
39:
40: /**
41: * The ID of the user to who this task is assigned.
42: * This is -1 if the task is not assigned to anyone
43: * (or assigned to a pool).
44: */
45: long getActorId();
46:
47: /**
48: * Returns true if this task is associated with pools.
49: * This is useful to know on beforehand if it is possible
50: * to unassign a task, so that it is assigned back to the pool(s).
51: */
52: boolean hasPools();
53:
54: /**
55: * Returns true if this task is associated with a swimlane.
56: * This is useful to know if the 'overwriteSwimlane' flag for
57: * the (re-)assignment of tasks will have any influence.
58: */
59: boolean hasSwimlane();
60:
61: /**
62: * Returns the ID of the process instance to which this task belongs.
63: */
64: String getProcessId();
65:
66: /**
67: * Returns the execution path in the workflow to where
68: * this task was created.
69: */
70: String getExecutionPath();
71:
72: WfVariable getVariable(String name);
73:
74: WfVariable getVariable(String name, VariableScope scope);
75:
76: List<WfVariable> getVariables();
77:
78: WfTaskDefinition getDefinition();
79:
80: TaskDocument getXml();
81: }
|