KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * $Id: WfActivity.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.List JavaDoc;
28 import java.util.Iterator JavaDoc;
29 import java.util.Map JavaDoc;
30
31 /**
32  * WfActivity - Workflow Activity 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 WfActivity extends WfExecutionObject {
39
40     /**
41      * Retrieve amount of Assignment objects.
42      * @throws WfException General workflow exception.
43      * @return Amount of current assignments.
44      */

45     public int howManyAssignment() throws WfException;
46
47     /**
48      * Retrieve the Iterator of Assignments objects.
49      * @throws WfException General workflow exception.
50      * @return Assignment Iterator.
51      */

52     public Iterator JavaDoc getIteratorAssignment() throws WfException;
53
54     /**
55      * Retrieve all assignments of this activity.
56      * @param maxNumber the high limit of number of assignment in result set (0 for all).
57      * @throws WfException General workflow exception.
58      * @return List of WfAssignment objects.
59      */

60     public List JavaDoc getSequenceAssignment(int maxNumber) throws WfException;
61
62     /**
63      * Check if a specific assignment is a member of this activity.
64      * @param member Assignment object.
65      * @throws WfException General workflow exception.
66      * @return true if the assignment is a member of this activity.
67      */

68     public boolean isMemberOfAssignment(WfAssignment member) throws WfException;
69
70     /**
71      * Getter for the process of this activity.
72      * @throws WfException General workflow exception.
73      * @return WfProcess Process to which this activity belong.
74      */

75     public WfProcess container() throws WfException;
76
77     /**
78      * Retrieve the Result map of this activity.
79      * @throws WfException General workflow exception.
80      * @throws ResultNotAvailable No result is available.
81      * @return Map of results from this activity
82      */

83     public Map JavaDoc result() throws WfException, ResultNotAvailable;
84
85     /**
86      * Assign Result for this activity.
87      * @param newResult New result.
88      * @throws WfException General workflow exception.
89      * @throws InvalidData Data is invalid
90      */

91     public void setResult(Map JavaDoc result) throws WfException, InvalidData;
92
93     /**
94      * Complete this activity.
95      * @throws WfException General workflow exception.
96      * @throws CannotComplete Cannot complete the activity
97      */

98     public void complete() throws WfException, CannotComplete;
99
100     /**
101      * Activates this activity.
102      * @throws WfException
103      * @throws CannotStart
104      * @throws AlreadyRunning
105      */

106     public void activate() throws WfException, CannotStart, AlreadyRunning;
107
108 } // interface WfActivity
109
Popular Tags