001: /*
002: * $Id: WfProcessMgr.java,v 1.1 2003/08/17 09:29:33 ajzeneski Exp $
003: *
004: * Copyright (c) 2001, 2002 The Open For Business Project - www.ofbiz.org
005: *
006: * Permission is hereby granted, free of charge, to any person obtaining a
007: * copy of this software and associated documentation files (the "Software"),
008: * to deal in the Software without restriction, including without limitation
009: * the rights to use, copy, modify, merge, publish, distribute, sublicense,
010: * and/or sell copies of the Software, and to permit persons to whom the
011: * Software is furnished to do so, subject to the following conditions:
012: *
013: * The above copyright notice and this permission notice shall be included
014: * in all copies or substantial portions of the Software.
015: *
016: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
017: * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
018: * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
019: * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
020: * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT
021: * OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR
022: * THE USE OR OTHER DEALINGS IN THE SOFTWARE.
023: *
024: */
025: package org.ofbiz.workflow;
026:
027: import java.util.Map;
028: import java.util.Iterator;
029: import java.util.List;
030:
031: /**
032: * WfProcessMgr - Workflow Process Manager Interface
033: *
034: * @author <a href="mailto:jaz@ofbiz.org">Andy Zeneski</a>
035: * @version $Revision: 1.1 $
036: * @since 2.0
037: */
038: public interface WfProcessMgr {
039:
040: /**
041: * @throws WfException
042: * @return
043: */
044: public int howManyProcess() throws WfException;
045:
046: /**
047: * @throws WfException
048: * @return
049: */
050: public Iterator getIteratorProcess() throws WfException;
051:
052: /**
053: * @param maxNumber
054: * @throws WfException
055: * @return List of WfProcess objects.
056: */
057: public List getSequenceProcess(int maxNumber) throws WfException;
058:
059: /**
060: * @param member
061: * @throws WfException
062: * @return
063: */
064: public boolean isMemberOfProcess(WfProcess member)
065: throws WfException;
066:
067: /**
068: * @throws WfException
069: * @return
070: */
071: public List processMgrStateType() throws WfException;
072:
073: /**
074: * @param newState
075: * @throws WfException
076: * @throws TransitionNotAllowed
077: */
078: public void setProcessMgrState(String newState) throws WfException,
079: TransitionNotAllowed;
080:
081: /**
082: * @throws WfException
083: * @return
084: */
085: public String name() throws WfException;
086:
087: /**
088: * @throws WfException
089: * @return
090: */
091: public String description() throws WfException;
092:
093: /**
094: * @throws WfException
095: * @return
096: */
097: public String category() throws WfException;
098:
099: /**
100: * @throws WfException
101: * @return
102: */
103: public String version() throws WfException;
104:
105: /**
106: * @throws WfException
107: * @return
108: */
109: public Map contextSignature() throws WfException;
110:
111: /**
112: * @throws WfException
113: * @return
114: */
115: public Map resultSignature() throws WfException;
116:
117: /**
118: * @throws WfException
119: * @return initial context based on DataFields
120: */
121: public Map getInitialContext() throws WfException;
122:
123: /**
124: * Create a WfProcess object
125: * @param requester
126: * @throws WfException
127: * @throws NotEnabled
128: * @throws InvalidRequester
129: * @throws RequesterRequired
130: * @return WfProcess created
131: */
132: public WfProcess createProcess(WfRequester requester)
133: throws WfException, NotEnabled, InvalidRequester,
134: RequesterRequired;
135:
136: } // interface WfProcessMgr
|