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.ProcessDefinitionDocument;
19: import org.outerj.daisy.i18n.I18nMessage;
20:
21: import java.util.List;
22: import java.util.Collection;
23:
24: public interface WfProcessDefinition {
25: /**
26: * A unique ID for this specific version of the workflow process.
27: */
28: String getId();
29:
30: String getName();
31:
32: String getVersion();
33:
34: I18nMessage getLabel();
35:
36: I18nMessage getDescription();
37:
38: /**
39: * A workflow process can have a "start task" to collect initial parameters
40: * for the workflow (possibly none) and to select the initial
41: * path to follow in the workflow (possibly only one option).
42: *
43: * <p>The start task is a task which is automatically completed
44: * upon starting the workflow, so it normally doesn't appear
45: * in anyones task list.
46: *
47: * <p>Returns null if there is no start task.
48: */
49: WfTaskDefinition getStartTaskDefinition();
50:
51: WfNodeDefinition getStartNode();
52:
53: /**
54: * Retrieves a task by name. Returns null if no task by the given name.
55: */
56: WfTaskDefinition getTask(String name);
57:
58: List<WfVariableDefinition> getGlobalVariableDefinitions();
59:
60: WfVariableDefinition getGlobalVariable(String name);
61:
62: /**
63: * Returns a list of all (named) tasks in the workflow
64: * definition. This includes the start task. Returns
65: * an empty collection if there are no tasks.
66: */
67: Collection<WfTaskDefinition> getTasks();
68:
69: /**
70: * Returns a list of problems encountered during parsing the
71: * workflow definition. It is possible that this information
72: * is only available from the WorkflowDefinition returned by
73: * {@link WorkflowManager#deployProcessDefinition}, i.o.w. right
74: * after defining it.
75: */
76: List<String> getProblems();
77:
78: ProcessDefinitionDocument getXml();
79: }
|