KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ofbiz > workflow > WfProcess


1 /*
2  * $Id: WfProcess.java 5462 2005-08-05 18:35:48Z jonesde $
3  *
4  * Copyright (c) 2001, 2002 The Open For Business Project - www.ofbiz.org
5  *
6  * Permission is hereby granted, free of charge, to any person obtaining a
7  * copy of this software and associated documentation files (the "Software"),
8  * to deal in the Software without restriction, including without limitation
9  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10  * and/or sell copies of the Software, and to permit persons to whom the
11  * Software is furnished to do so, subject to the following conditions:
12  *
13  * The above copyright notice and this permission notice shall be included
14  * in all copies or substantial portions of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
19  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
20  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
21  * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
22  * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  *
24  */

25 package org.ofbiz.workflow;
26
27 import java.util.Iterator JavaDoc;
28 import java.util.Map JavaDoc;
29 import java.util.List JavaDoc;
30
31 /**
32  * WfProcess - Workflow Process Interface
33  *
34  * @author <a HREF="mailto:jaz@ofbiz.org">Andy Zeneski</a>
35  * @version $Rev: 5462 $
36  * @since 2.0
37  */

38 public interface WfProcess extends WfExecutionObject {
39
40     /**
41      * Gets the requester of this process
42      * @throws WfException
43      * @return requester of this process
44      */

45     public WfRequester requester() throws WfException;
46
47     /**
48      * Sets the requester for this process
49      * @param newValue
50      * @throws WfException
51      * @throws CannotChangeRequester
52      */

53     public void setRequester(WfRequester newValue) throws WfException, CannotChangeRequester;
54
55     /**
56      * @throws WfException
57      * @return
58      */

59     public int howManyStep() throws WfException;
60
61     /**
62      * @throws WfException
63      * @return
64      */

65     public Iterator JavaDoc getIteratorStep() throws WfException;
66
67     /**
68      * @param maxNumber
69      * @throws WfException
70      * @return List of WfActivity objects.
71      */

72     public List JavaDoc getSequenceStep(int maxNumber) throws WfException;
73
74     /**
75      * @param member
76      * @throws WfException
77      * @return
78      */

79     public boolean isMemberOfStep(WfActivity member) throws WfException;
80
81     /**
82      * Gets the manager associated with this process
83      * @throws WfException
84      * @return
85      */

86     public WfProcessMgr manager() throws WfException;
87
88     /**
89      * Gets the results of this process
90      * @throws WfException
91      * @throws ResultNotAvailable
92      * @return result Map of results from this process
93      */

94     public Map JavaDoc result() throws WfException, ResultNotAvailable;
95
96     /**
97      * Receives activity results.
98      * @param activity WfActivity sending the results.
99      * @param results Map of the results.
100      * @throws WfException
101      */

102     public void receiveResults(WfActivity activity, Map JavaDoc results) throws WfException;
103
104     /**
105      * Receives notification when an activity has completed.
106      * @param activity WfActivity which has completed.
107      * @throws WfException
108      */

109     public void activityComplete(WfActivity activity) throws WfException;
110
111     /**
112      * Starts the Workflow process
113      * @throws WfException
114      * @throws CannotStart
115      * @throws AlreadyRunning
116      */

117     public void start() throws WfException, CannotStart, AlreadyRunning;
118     
119     /**
120      * Starts the Workflow process on the defined activity
121      * @param activityId The activity to start
122      * @throws WfException
123      * @throws CannotStart
124      * @throws AlreadyRunning
125      */

126     public void start(String JavaDoc activityId) throws WfException, CannotStart, AlreadyRunning;
127
128     /**
129      * @param state
130      * @throws WfException
131      * @throws InvalidState
132      * @return
133      */

134     public Iterator JavaDoc getActivitiesInState(String JavaDoc state) throws WfException, InvalidState;
135
136 } // interface WfProcessOperations
137
Popular Tags