01: /*
02: * This file is part of the WfMOpen project.
03: * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
04: * All rights reserved.
05: *
06: * This program is free software; you can redistribute it and/or modify
07: * it under the terms of the GNU General Public License as published by
08: * the Free Software Foundation; either version 2 of the License, or
09: * (at your option) any later version.
10: *
11: * This program is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14: * GNU General Public License for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with this program; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: *
20: * $Id: ProcessLocal.java,v 1.1 2007/05/03 21:58:23 mlipp Exp $
21: *
22: * $Log: ProcessLocal.java,v $
23: * Revision 1.1 2007/05/03 21:58:23 mlipp
24: * Internal refactoring for making better use of local EJBs.
25: *
26: */
27: package de.danet.an.workflow.localapi;
28:
29: import java.util.Date;
30: import java.util.List;
31:
32: import de.danet.an.workflow.api.InvalidKeyException;
33: import de.danet.an.workflow.api.ProcessDefinition;
34: import de.danet.an.workflow.localcoreapi.WfProcessLocal;
35: import de.danet.an.workflow.omgcore.InvalidStateException;
36:
37: /**
38: * Interface <code>Process</code> adds some functions to the
39: * {@link de.danet.an.workflow.localcoreapi.WfProcessLocal OMG process}.
40: */
41: public interface ProcessLocal extends ExecutionObjectLocal,
42: WfProcessLocal {
43:
44: /**
45: * Returns the {@link ActivityLocal <code>Activity</code>} with the
46: * given key. The OMG interface only defines a {@link
47: * de.danet.an.workflow.localcoreapi.WfProcessLocal#steps method for listing
48: * all the activities} associated with the process. While, of
49: * course, one could select the activity with a certain key from
50: * that list, this would be rather insufficient.
51: * @param key the
52: * {@link de.danet.an.workflow.localcoreapi.WfActivityLocal#key key}
53: * of the activity
54: * @return the activity associated with the key
55: * @throws InvalidKeyException if no activity with the given key
56: * exists
57: */
58: ActivityLocal activityByKeyLocal(String key)
59: throws InvalidKeyException;
60:
61: /**
62: * Returns the process definition of this process.
63: * @return the representation of the process definition.
64: */
65: ProcessDefinition processDefinition();
66:
67: /**
68: * Gets a list of transitions for this process.
69: * @return list of transitions for this process
70: */
71: List transitionsLocal();
72:
73: /**
74: * Returns the creation time of the process.
75: * @return the creation time.
76: */
77: Date createTime();
78:
79: /**
80: * Enable or disable debugging of the process. Changing the debug
81: * mode is only allowed when the process has been started.
82: *
83: * @param debug if the process is to be debugged
84: * @throws InvalidStateException if changing debug mode is not
85: * allowed
86: */
87: void setDebugEnabled(boolean debug) throws InvalidStateException;
88: }
|