01: package org.drools.ruleflow.instance;
02:
03: /*
04: * Copyright 2005 JBoss Inc
05: *
06: * Licensed under the Apache License, Version 2.0 (the "License");
07: * you may not use this file except in compliance with the License.
08: * You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing, software
13: * distributed under the License is distributed on an "AS IS" BASIS,
14: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15: * See the License for the specific language governing permissions and
16: * limitations under the License.
17: */
18:
19: import java.util.Collection;
20:
21: import org.drools.Agenda;
22: import org.drools.WorkingMemory;
23: import org.drools.common.InternalWorkingMemory;
24: import org.drools.ruleflow.common.instance.ProcessInstance;
25: import org.drools.ruleflow.core.Node;
26: import org.drools.ruleflow.core.RuleFlowProcess;
27:
28: /**
29: * A process instance for a RuleFlow process.
30: * Contains a reference to all its node instances, and the agenda that
31: * is controlling the RuleFlow process.
32: *
33: * @author <a href="mailto:kris_verlaenen@hotmail.com">Kris Verlaenen</a>
34: */
35: public interface RuleFlowProcessInstance extends ProcessInstance {
36:
37: RuleFlowProcess getRuleFlowProcess();
38:
39: void addNodeInstance(RuleFlowNodeInstance nodeInstance);
40:
41: void removeNodeInstance(RuleFlowNodeInstance nodeInstance);
42:
43: Collection getNodeInstances();
44:
45: RuleFlowNodeInstance getFirstNodeInstance(long nodeId);
46:
47: void setWorkingMemory(InternalWorkingMemory workingMemory);
48:
49: WorkingMemory getWorkingMemory();
50:
51: Agenda getAgenda();
52:
53: RuleFlowNodeInstance getNodeInstance(Node node);
54:
55: void start();
56:
57: }
|