001: /*--
002:
003: Copyright (C) 2002-2005 Adrian Price.
004: All rights reserved.
005:
006: Redistribution and use in source and binary forms, with or without
007: modification, are permitted provided that the following conditions
008: are met:
009:
010: 1. Redistributions of source code must retain the above copyright
011: notice, this list of conditions, and the following disclaimer.
012:
013: 2. Redistributions in binary form must reproduce the above copyright
014: notice, this list of conditions, and the disclaimer that follows
015: these conditions in the documentation and/or other materials
016: provided with the distribution.
017:
018: 3. The names "OBE" and "Open Business Engine" must not be used to
019: endorse or promote products derived from this software without prior
020: written permission. For written permission, please contact
021: adrianprice@sourceforge.net.
022:
023: 4. Products derived from this software may not be called "OBE" or
024: "Open Business Engine", nor may "OBE" or "Open Business Engine"
025: appear in their name, without prior written permission from
026: Adrian Price (adrianprice@users.sourceforge.net).
027:
028: THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
029: WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
030: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
031: DISCLAIMED. IN NO EVENT SHALL THE AUTHOR(S) BE LIABLE FOR ANY DIRECT,
032: INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
033: (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
034: SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
035: HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
036: STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
037: IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
038: POSSIBILITY OF SUCH DAMAGE.
039:
040: For more information on OBE, please see
041: <http://obe.sourceforge.net/>.
042:
043: */
044:
045: package org.obe.client.api.model;
046:
047: import org.wfmc.wapi.WAPI;
048: import org.wfmc.wapi.WMActivityInstanceState;
049: import org.wfmc.wapi.WMFilter;
050:
051: /**
052: * Describes the activity instance system attributes supported by OBE. The
053: * string constants in this interface can be passed to
054: * {@link WAPI#getActivityInstanceAttributeValue} and as the
055: * <code>attributeName</code> argument to
056: * {@link WMFilter#WMFilter(String,int,Boolean)}.
057: *
058: * @author Adrian Price
059: */
060: public class ActivityInstanceAttributes {
061: /**
062: * The ID of the activity definition of which this is an instance.
063: * <p/>
064: * <table border="1">
065: * <tr><th>Data Type</th><th>Access</th></tr>
066: * <tr><td><code>java.lang.String</code></td><td>ReadOnly</td></tr>
067: * </table>
068: */
069: public static final String ACTIVITY_DEFINITION_ID = "activityDefinitionId";
070:
071: /**
072: * The unique ID of the activity instance.
073: * <p/>
074: * <table border="1">
075: * <tr><th>Data Type</th><th>Access</th></tr>
076: * <tr><td><code>java.lang.String</code></td><td>ReadOnly</td></tr>
077: * </table>
078: */
079: public static final String ACTIVITY_INSTANCE_ID = "activityInstanceId";
080:
081: /**
082: * The iterator used to control a looping BlockActivity.
083: * <p/>
084: * <table border="1">
085: * <tr><th>Data Type</th><th>Access</th></tr>
086: * <tr><td><code>org.obe.spi.model.PersistentIterator</code></td>
087: * <td>ReadOnly</td></tr>
088: * </table>
089: */
090: public static final String BLOCK_ACTIVITY_ITERATOR = "blockActivityIterator";
091:
092: /**
093: * The date/time at which the activity instance was completed.
094: * <p/>
095: * <table border="1">
096: * <tr><th>Data Type</th><th>Access</th></tr>
097: * <tr><td><code>java.util.Date</code></td><td>ReadOnly</td></tr>
098: * </table>
099: */
100: public static final String COMPLETED_DATE = "completedDate";
101:
102: /**
103: * The date/time by which the activity instance must be complete.
104: * <p/>
105: * <table border="1">
106: * <tr><th>Data Type</th><th>Access</th></tr>
107: * <tr><td><code>java.util.Date</code></td><td>ReadOnly</td></tr>
108: * </table>
109: */
110: public static final String DUE_DATE = "dueDate";
111:
112: /**
113: * The state of the activity's 'join' transition restriction. Is
114: * <code>null</code> for start activities (i.e., those with no afferent
115: * transitions).
116: * <p/>
117: * <table border="1">
118: * <tr><th>Data Type</th><th>Access</th></tr>
119: * <tr><td><code>org.obe.spi.model.JoinInstance</code></td><td>ReadOnly</td></tr>
120: * </table>
121: */
122: public static final String JOIN = "join";
123:
124: /**
125: * The activity name (copied from the definition).
126: * <p/>
127: * <table border="1">
128: * <tr><th>Data Type</th><th>Access</th></tr>
129: * <tr><td><code>java.lang.String</code></td><td>ReadOnly</td></tr>
130: * </table>
131: */
132: public static final String NAME = "name";
133:
134: /**
135: * The IDs of the participants assigned to the activity. These IDs are the
136: * concrete participant names as resolved by the participant repository, as
137: * opposed to any abstract participants declared in the process definition.
138: * <p/>
139: * <table border="1">
140: * <tr><th>Data Type</th><th>Access</th></tr>
141: * <tr><td><code>java.lang.String[]</code></td><td>ReadOnly</td></tr>
142: * </table>
143: */
144: public static final String PARTICIPANTS = "participants";
145:
146: /**
147: * The activity instance priority. This value is set from the activity
148: * definition, and defaults to that of the process instance.
149: * <p/>
150: * <table border="1">
151: * <tr><th>Data Type</th><th>Access</th></tr>
152: * <tr><td><code>int</code></td><td>Read/Write</td></tr>
153: * </table>
154: */
155: public static final String PRIORITY = "priority";
156:
157: /**
158: * The ID of the process definition that defines the activity.
159: * <p/>
160: * <table border="1">
161: * <tr><th>Data Type</th><th>Access</th></tr>
162: * <tr><td><code>java.lang.String</code></td><td>ReadOnly</td></tr>
163: * </table>
164: */
165: public static final String PROCESS_DEFINITION_ID = "processDefinitionId";
166:
167: /**
168: * The ID of the process instance to which the activity instance belongs.
169: * <p/>
170: * <table border="1">
171: * <tr><th>Data Type</th><th>Access</th></tr>
172: * <tr><td><code>java.lang.String</code></td><td>ReadOnly</td></tr>
173: * </table>
174: */
175: public static final String PROCESS_INSTANCE_ID = "processInstanceId";
176:
177: /**
178: * The date/time at which the activity instance was started.
179: * <p/>
180: * <table border="1">
181: * <tr><th>Data Type</th><th>Access</th></tr>
182: * <tr><td><code>java.util.Date</code></td><td>ReadOnly</td></tr>
183: * </table>
184: */
185: public static final String STARTED_DATE = "startedDate";
186:
187: /**
188: * The state of the activity instance.
189: * <p/>
190: * <table border="1">
191: * <tr><th>Data Type</th><th>Access</th></tr>
192: * <tr><td><code>int</code></td><td>ReadOnly</td></tr>
193: * </table>
194: *
195: * @see WMActivityInstanceState
196: */
197: public static final String STATE = "state";
198:
199: /**
200: * The date/time by which the activity instance is expected to be complete.
201: * <p/>
202: * <table border="1">
203: * <tr><th>Data Type</th><th>Access</th></tr>
204: * <tr><td><code>java.util.Date</code></td><td>ReadOnly</td></tr>
205: * </table>
206: */
207: public static final String TARGET_DATE = "targetDate";
208:
209: /**
210: * The temporal status of the activity instance.
211: * <p/>
212: * <table border="1">
213: * <tr><th>Data Type</th><th>Access</th></tr>
214: * <tr><td><code>org.obe.client.api.model.TemporalStatus</code></td><td>ReadOnly</td></tr>
215: * </table>
216: */
217: public static final String TEMPORAL_STATUS = "temporalStatus";
218:
219: public static final String OWNER_ID = "ownerId";
220:
221: public static final String OWNER_TYPE = "ownerType";
222:
223: private ActivityInstanceAttributes() {
224: }
225: }
|