Source Code Cross Referenced for VolatileProcess.java in  » Workflow-Engines » wfmopen-2.1.1 » domain » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Workflow Engines » wfmopen 2.1.1 » domain 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


0001:        /*
0002:         * This file is part of the WfMOpen project.
0003:         * Copyright (C) 2001-2003 Danet GmbH (www.danet.de), GS-AN.
0004:         * All rights reserved.
0005:         *
0006:         * This program is free software; you can redistribute it and/or modify
0007:         * it under the terms of the GNU General Public License as published by
0008:         * the Free Software Foundation; either version 2 of the License, or
0009:         * (at your option) any later version.
0010:         *
0011:         * This program is distributed in the hope that it will be useful,
0012:         * but WITHOUT ANY WARRANTY; without even the implied warranty of
0013:         * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014:         * GNU General Public License for more details.
0015:         *
0016:         * You should have received a copy of the GNU General Public License
0017:         * along with this program; if not, write to the Free Software
0018:         * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
0019:         *
0020:         * $Id: VolatileProcess.java,v 1.10.2.1 2007/11/02 22:11:45 mlipp Exp $
0021:         *
0022:         * $Log: VolatileProcess.java,v $
0023:         * Revision 1.10.2.1  2007/11/02 22:11:45  mlipp
0024:         * Merged bug fixes from HEAD.
0025:         *
0026:         * Revision 1.11  2007/09/21 06:19:35  mlipp
0027:         * Fixed problem with NamingException during process deletion.
0028:         *
0029:         * Revision 1.10  2007/07/04 21:32:22  mlipp
0030:         * Using local interface whereever possible.
0031:         *
0032:         * Revision 1.9  2007/05/03 21:58:24  mlipp
0033:         * Internal refactoring for making better use of local EJBs.
0034:         *
0035:         * Revision 1.8  2007/01/25 22:59:04  mlipp
0036:         * Fixed result().
0037:         *
0038:         * Revision 1.7  2006/09/29 12:32:11  drmlipp
0039:         * Consistently using WfMOpen as projct name now.
0040:         *
0041:         * Revision 1.6  2006/03/08 14:46:43  drmlipp
0042:         * Synchronized with 1.3.3p5.
0043:         *
0044:         * Revision 1.5  2005/10/10 20:02:12  mlipp
0045:         * Synchronized with 1.3.3.
0046:         *
0047:         * Revision 1.4  2005/04/22 15:11:06  drmlipp
0048:         * Merged changes from 1.3 branch up to 1.3p15.
0049:         *
0050:         * Revision 1.2.2.3  2005/04/16 21:18:32  drmlipp
0051:         * Made audit event filtering more flexible and added possibility to turn
0052:         * off audit log.
0053:         *
0054:         * Revision 1.2.2.2  2005/04/14 21:38:49  drmlipp
0055:         * Added new property.
0056:         *
0057:         * Revision 1.3  2005/02/04 14:25:27  drmlipp
0058:         * Synchronized with 1.3rc2.
0059:         *
0060:         * Revision 1.2.2.1  2005/01/31 15:43:55  drmlipp
0061:         * Started implementation of deferred choice.
0062:         *
0063:         * Revision 1.2  2005/01/05 21:31:01  mlipp
0064:         * Implemented new abstract methods.
0065:         *
0066:         * Revision 1.1.1.3  2004/08/18 15:18:46  drmlipp
0067:         * Update to 1.2
0068:         *
0069:         * Revision 1.44  2004/06/14 19:37:20  lipp
0070:         * Fixed assignment functions and cleaned up assignment related
0071:         * interfaces.
0072:         *
0073:         * Revision 1.43  2004/05/05 09:44:07  lipp
0074:         * Finished SAX based process creation (no cleanup of old code, yet).
0075:         *
0076:         * Revision 1.42  2004/03/20 21:08:44  lipp
0077:         * Added access to requesting processes' channels.
0078:         *
0079:         * Revision 1.41  2004/02/13 09:01:15  lipp
0080:         * Changed channel message data type to Map which is more appropriate.
0081:         *
0082:         * Revision 1.40  2004/02/12 14:26:59  lipp
0083:         * Adapted to name change.
0084:         *
0085:         * Revision 1.39  2004/02/12 14:17:03  lipp
0086:         * Adapted to extended process interface.
0087:         *
0088:         * Revision 1.38  2003/09/24 15:19:09  lipp
0089:         * Updated to interface changes.
0090:         *
0091:         * Revision 1.37  2003/09/22 12:56:53  lipp
0092:         * Fixed key creation for block activity (must be unique).
0093:         *
0094:         * Revision 1.36  2003/09/21 21:28:14  lipp
0095:         * Introducing "virtual" block activity.
0096:         *
0097:         * Revision 1.35  2003/06/27 09:44:13  lipp
0098:         * Fixed copyright/license information.
0099:         *
0100:         * Revision 1.34  2003/05/31 20:05:25  lipp
0101:         * Added support for different condition types.
0102:         *
0103:         * Revision 1.33  2003/05/16 08:08:49  lipp
0104:         * Handling OTHERWISE condition type.
0105:         *
0106:         * Revision 1.32  2003/05/14 13:05:06  lipp
0107:         * Made creator of subprocess inherited attribute.
0108:         *
0109:         * Revision 1.31  2003/05/08 08:14:17  lipp
0110:         * Adapted to changes.
0111:         *
0112:         * Revision 1.30  2003/05/05 14:39:50  lipp
0113:         * Moved code for removing process automatically to event handling.
0114:         *
0115:         * Revision 1.29  2003/05/05 07:04:51  lipp
0116:         * Handling parameters for sub-flow now.
0117:         *
0118:         * Revision 1.28  2003/04/26 16:12:35  lipp
0119:         * Moved some classes to reduce package dependencies.
0120:         *
0121:         * Revision 1.27  2003/04/19 18:33:28  lipp
0122:         * Improved handling of info.
0123:         *
0124:         * Revision 1.26  2003/02/03 10:09:27  lipp
0125:         * Adapted to latest changes in src.
0126:         *
0127:         * Revision 1.25  2002/11/26 11:23:29  lipp
0128:         * Modified RemoteException comment.
0129:         *
0130:         * Revision 1.24  2002/11/25 21:16:23  lipp
0131:         * Adapted to transition interface changes.
0132:         *
0133:         * Revision 1.23  2002/11/15 15:13:54  lipp
0134:         * Clarified usage of transitions as attribute. Included in caching.
0135:         *
0136:         * Revision 1.22  2002/11/04 08:40:25  barzik
0137:         * adapted to several modifications in the workflow component
0138:         *
0139:         * Revision 1.21  2002/10/21 19:08:05  lipp
0140:         * Continuing implementation of new state handling.
0141:         *
0142:         * Revision 1.20  2002/10/21 11:54:23  lipp
0143:         * Better suspend state handling.
0144:         *
0145:         * Revision 1.19  2002/10/18 13:46:02  lipp
0146:         * Getting on with adaptions...
0147:         *
0148:         * Revision 1.18  2002/10/09 14:27:33  lipp
0149:         * Intermediate, compilable state.
0150:         *
0151:         * Revision 1.17  2002/10/09 07:30:29  lipp
0152:         * log fire events as debug.
0153:         *
0154:         * Revision 1.16  2002/10/08 15:32:39  lipp
0155:         * Providing base implementations for more methods in AbstractActivity.
0156:         *
0157:         * Revision 1.15  2002/10/02 21:23:25  lipp
0158:         * Some adaptations.
0159:         *
0160:         * Revision 1.14  2002/09/17 06:53:17  huaiyang
0161:         * Do not use super.init(null).
0162:         *
0163:         * Revision 1.13  2002/08/30 11:38:51  lipp
0164:         * Added create time as process method.
0165:         *
0166:         * Revision 1.12  2002/08/30 09:06:40  lipp
0167:         * Renamed internal state to typed state and use polymorphism for type
0168:         * names where possible.
0169:         *
0170:         * Revision 1.11  2002/08/30 07:58:19  huaiyang
0171:         * Separation of Domain class and persistent class more cleaner.
0172:         *
0173:         * Revision 1.10  2002/08/29 20:55:34  lipp
0174:         * Added last state time persistence and process create time.
0175:         *
0176:         * Revision 1.9  2002/08/29 14:33:17  huaiyang
0177:         * Use createTransitionRef.
0178:         *
0179:         * Revision 1.8  2002/08/29 11:00:45  huaiyang
0180:         * Move operation methods towards domain for new style of procDefSpec.
0181:         *
0182:         * Revision 1.7  2002/08/28 15:04:34  huaiyang
0183:         * New methods in AbstractProcess.
0184:         *
0185:         * Revision 1.6  2002/08/28 12:58:03  lipp
0186:         * Fixed unittests.
0187:         *
0188:         * Revision 1.5  2002/08/28 12:47:20  lipp
0189:         * Starting new process generation.
0190:         *
0191:         * Revision 1.4  2002/08/28 09:54:51  lipp
0192:         * Moving domain logic to domain package...
0193:         *
0194:         * Revision 1.3  2002/08/27 11:36:37  lipp
0195:         * Better use of ProcessDefinition.
0196:         *
0197:         * Revision 1.2  2002/08/25 20:55:54  lipp
0198:         * Clearing up use of ProcessDefinition.
0199:         *
0200:         * Revision 1.1  2002/08/22 15:19:34  lipp
0201:         * Redesign of EJB persistence.
0202:         *
0203:         */
0204:        package domain;
0205:
0206:        import java.io.Serializable;
0207:
0208:        import java.util.ArrayList;
0209:        import java.util.Collection;
0210:        import java.util.Date;
0211:        import java.util.HashMap;
0212:        import java.util.List;
0213:        import java.util.Map;
0214:
0215:        import java.rmi.RemoteException;
0216:        import java.security.Principal;
0217:
0218:        import org.jdom.Element;
0219:
0220:        import de.danet.an.workflow.internalapi.ExtActivityLocal;
0221:        import de.danet.an.workflow.internalapi.ExtProcessLocal;
0222:        import de.danet.an.workflow.internalapi.ExtTransitionLocal;
0223:        import de.danet.an.workflow.localapi.ActivityLocal;
0224:        import de.danet.an.workflow.localapi.ProcessLocal;
0225:        import de.danet.an.workflow.localapi.ProcessDefinitionDirectoryLocal;
0226:        import de.danet.an.workflow.localapi.TransitionLocal;
0227:        import de.danet.an.workflow.localcoreapi.WfActivityLocal;
0228:        import de.danet.an.workflow.localcoreapi.WfProcessLocal;
0229:        import de.danet.an.workflow.omgcore.CannotChangeRequesterException;
0230:        import de.danet.an.workflow.omgcore.InvalidDataException;
0231:        import de.danet.an.workflow.omgcore.InvalidPerformerException;
0232:        import de.danet.an.workflow.omgcore.ProcessData;
0233:        import de.danet.an.workflow.omgcore.ResultNotAvailableException;
0234:        import de.danet.an.workflow.omgcore.TransitionNotAllowedException;
0235:        import de.danet.an.workflow.omgcore.WfAuditEvent;
0236:        import de.danet.an.workflow.omgcore.WfProcess;
0237:        import de.danet.an.workflow.omgcore.WfProcessMgr;
0238:        import de.danet.an.workflow.omgcore.WfRequester;
0239:        import de.danet.an.workflow.omgcore.WfExecutionObject.NotRunningState;
0240:        import de.danet.an.workflow.omgcore.WfExecutionObject.State;
0241:
0242:        import de.danet.an.workflow.api.InvalidKeyException;
0243:        import de.danet.an.workflow.api.ProcessDefinition;
0244:        import de.danet.an.workflow.api.Process;
0245:        import de.danet.an.workflow.api.Transition;
0246:        import de.danet.an.workflow.api.Activity.Implementation;
0247:        import de.danet.an.workflow.api.Activity.JoinAndSplitMode;
0248:        import de.danet.an.workflow.api.Activity.StartFinishMode;
0249:
0250:        import de.danet.an.workflow.domain.AbstractProcess;
0251:        import de.danet.an.workflow.domain.TransitionDefinitionLocal;
0252:
0253:        /**
0254:         * This class implements the persistance layer required by
0255:         * <code>AbstractProcess</code> by, well, providing no
0256:         * persistence ...
0257:         *
0258:         * @author <a href="mailto:lipp@danet.de"></a>
0259:         * @version $Revision: 1.10.2.1 $
0260:         */
0261:
0262:        public class VolatileProcess extends AbstractProcess implements 
0263:                ExtProcessLocal {
0264:            /** Persistent attribute <code>id</code>. */
0265:            private String paId;
0266:
0267:            /** Persistent attribute <code>key</code>. */
0268:            private String paKey;
0269:
0270:            /** Persistent attribute <code>name</code>. */
0271:            private String paName;
0272:
0273:            /** Persistent attribute <code>createTime</code>. */
0274:            private Date paCreateTime = new Date();
0275:
0276:            /** Persistent attribute <code>description</code>. */
0277:            private String paDescription;
0278:
0279:            /** Persistent attribute <code>priority</code>. */
0280:            private Priority paPriority = Priority.NORMAL;
0281:
0282:            /** Persistent attribute <code>typedState</code>. */
0283:            private State paTypedState;
0284:
0285:            /** Persistent attribute <code>lastStateTime</code>. */
0286:            private Date paLastStateTime;
0287:
0288:            /** Persistent attribute <code>processMgr</code>. */
0289:            private String paProcessMgr;
0290:
0291:            /** Persistent attribute <code>requester</code>. */
0292:            private WfRequester paRequester;
0293:
0294:            /** Persistent attribute <code>processDef</code>. */
0295:            private ProcessDefinition paProcessDef;
0296:
0297:            /** Persistent attribute <code>processData</code>. */
0298:            private ProcessData paProcessData;
0299:
0300:            /** Persistent attribute <code>processMgrName</code>. */
0301:            private String paProcessMgrName;
0302:
0303:            /** Persistent attribute <code>processMgrVersion</code>. */
0304:            private String paProcessMgrVersion;
0305:
0306:            /** Persistent attribute <code>Debug</code>. */
0307:            private boolean paDebug;
0308:
0309:            /** Persistent attribute <code>auditEventSelection</code>. */
0310:            private int paAuditEventSelection;
0311:
0312:            /** Persistent attribute <code>storeAuditEvents</code>. */
0313:            private boolean paStoreAuditEvents;
0314:
0315:            // normal attributes
0316:            private Collection activities = new ArrayList();
0317:            private WfProcessMgr pmgr = new VolatileMgr();
0318:
0319:            private static int procKeyGen = 1;
0320:
0321:            private List transitions = new ArrayList();
0322:
0323:            /**
0324:             * Creates an instance of <code>TestProcess</code>
0325:             * with all attributes initialized to default values.
0326:             * @param key a <code>String</code> value
0327:             */
0328:            public VolatileProcess(String key) {
0329:                setPaLastStateTime(new Date());
0330:                setPaPriority(Priority.NORMAL);
0331:                setPaTypedState(NotRunningState.NOT_STARTED);
0332:                paKey = key;
0333:            }
0334:
0335:            /**
0336:             * Creates an instance of <code>TestProcess</code>
0337:             * with all attributes initialized to default values.
0338:             */
0339:            public VolatileProcess() {
0340:                this (Integer.toString(procKeyGen++));
0341:            }
0342:
0343:            /**
0344:             * Describe <code>thisRemote</code> method here.
0345:             *
0346:             * @return a <code>Process</code> value
0347:             */
0348:            public Process toProcess() {
0349:                return new ProcessRemoteWrapper(this );
0350:            }
0351:
0352:            /* (non-Javadoc)
0353:             * Comment copied from interface or superclass.
0354:             */
0355:            public ExtProcessLocal toProcessLocal() {
0356:                return this ;
0357:            }
0358:
0359:            /**
0360:             * Remove this process.
0361:             */
0362:            protected void removeThis() {
0363:            }
0364:
0365:            /**
0366:             * Returns the process manager which created this process.
0367:             * @return the associated process manager.
0368:             */
0369:            public WfProcessMgr manager() {
0370:                return pmgr;
0371:            }
0372:
0373:            /* (non-Javadoc)
0374:             * Comment copied from interface or superclass.
0375:             */
0376:            public void copyProcessDefinition(String procDefXpdl) {
0377:            }
0378:
0379:            //
0380:            // Implement abstract methods as unsupported
0381:            //
0382:
0383:            /**
0384:             * Describe <code>createTime</code> method here.
0385:             *
0386:             * @return a <code>Date</code> value
0387:             */
0388:            public Date createTime() {
0389:                return getPaCreateTime();
0390:            }
0391:
0392:            /**
0393:             * Return the creator of the process.
0394:             * @return the process creator.
0395:             */
0396:            public Principal processCreator() {
0397:                return null;
0398:            }
0399:
0400:            /**
0401:             * Return the process this process is a subflow of.
0402:             * @return the process or <code>null</code> if this process is not
0403:             * a subflow
0404:             */
0405:            public ProcessLocal requestingProcessLocal() {
0406:                return null;
0407:            }
0408:
0409:            /**
0410:             * Describe <code>setActivities</code> method here.
0411:             *
0412:             * @param act a <code>Collection</code> value
0413:             */
0414:            public void setActivities(Collection act) {
0415:                activities = act;
0416:            }
0417:
0418:            /**
0419:             * Describe <code>addActivity</code> method here.
0420:             *
0421:             * @param act an <code>Activity</code> value
0422:             */
0423:            public void addActivity(ActivityLocal act) {
0424:                activities.add(act);
0425:            }
0426:
0427:            /**
0428:             * Describe <code>addTransition</code> method here.
0429:             *
0430:             * @param id a <code>String</code> value
0431:             * @param from an <code>Activity</code> value
0432:             * @param to an <code>Activity</code> value
0433:             */
0434:            public void addTransition(String id, String group, int order,
0435:                    ActivityLocal from, ActivityLocal to) {
0436:                addTransition(id, group, order, from, to, null);
0437:            }
0438:
0439:            /**
0440:             * Describe <code>addTransition</code> method here.
0441:             *
0442:             * @param id a <code>String</code> value
0443:             * @param from an <code>Activity</code> value
0444:             * @param to an <code>Activity</code> value
0445:             * @param cond condition.
0446:             */
0447:            public void addTransition(String id, String group, int order,
0448:                    ActivityLocal from, ActivityLocal to, String cond) {
0449:                doCreateTransition(id, group, order, from, to,
0450:                        Transition.COND_TYPE_CONDITION, cond);
0451:            }
0452:
0453:            /**
0454:             * Gets a list of transitions for this process.
0455:             * @return list of transitions for this process
0456:             */
0457:            public List transitionsLocal() {
0458:                return transitions;
0459:            }
0460:
0461:            /**
0462:             * Provide a new unique activity key.
0463:             *
0464:             * @return the key.
0465:             */
0466:            protected Long createActivityKey() {
0467:                throw new UnsupportedOperationException();
0468:            }
0469:
0470:            /**
0471:             * Describe <code>createActivity</code> method here.
0472:             *
0473:             * @param actElement an <code>Element</code> value
0474:             * @param jm a <code>JoinAndSplitMode</code> value
0475:             * @param sm a <code>JoinAndSplitMode</code> value
0476:             * @return a <code>WfActivity</code> value
0477:             */
0478:            protected WfActivityLocal createActivity(Element actElement,
0479:                    Long blockId, JoinAndSplitMode jm, JoinAndSplitMode sm) {
0480:                throw new UnsupportedOperationException();
0481:            }
0482:
0483:            /**
0484:             * Factory method that create new persistent objects of type
0485:             * <code>WfActivity</code>. Must be implement by the persistence
0486:             * layer.
0487:             *
0488:             * @param blockActId if the activity is part of a block activity,
0489:             * else <code>null</code>
0490:             * @param priority a <code>Priority</code> value
0491:             * @param name the activity's name
0492:             * @param description activity description
0493:             * @param startMode the start mode
0494:             * @param finishMode the finish mode
0495:             * @param joinMode the join mode
0496:             * @param splitMode the split mode
0497:             * @param implementation the implementation description
0498:             * @param performer the performer
0499:             * @param deadlines the deadlines
0500:             * @param deferChoiceOnSplit if true, choice is to be deferred
0501:             * @param auditEventSelection the audit event selection
0502:             * @param storeAuditEvents if true, audit events are stored in the
0503:             * database
0504:             * @return the created activity.
0505:             */
0506:            protected WfActivityLocal createActivity(String blockActId,
0507:                    Priority priority, String name, String description,
0508:                    StartFinishMode startMode, StartFinishMode finishMode,
0509:                    JoinAndSplitMode joinMode, JoinAndSplitMode splitMode,
0510:                    Implementation[] implementation, String performer,
0511:                    List deadlines, boolean deferChoiceOnSplit,
0512:                    int auditEventSelection, boolean storeAuditEvents) {
0513:                throw new UnsupportedOperationException();
0514:            }
0515:
0516:            /**
0517:             * Describe <code>requester</code> method here.
0518:             *
0519:             * @return a <code>WfRequester</code> value
0520:             */
0521:            public WfRequester requester() {
0522:                return new WfRequester() {
0523:                    public Collection performers() {
0524:                        throw new UnsupportedOperationException();
0525:                    }
0526:
0527:                    public boolean isMemberOfPerformers(WfProcess member) {
0528:                        throw new UnsupportedOperationException();
0529:                    }
0530:
0531:                    public void receiveEvent(WfAuditEvent e)
0532:                            throws InvalidPerformerException {
0533:                        throw new UnsupportedOperationException();
0534:                    }
0535:                };
0536:            }
0537:
0538:            /**
0539:             * Return the process definition directory.
0540:             * While there is no immediate relation between a process
0541:             * instance and the known process definitions, the definitions
0542:             * nevertheless make up part of the environment of a process.
0543:             * Specifically, this method is needed to start a sub-process
0544:             * in an activity.
0545:             * @return the process definition directory
0546:             */
0547:            public ProcessDefinitionDirectoryLocal processDefinitionDirectoryLocal() {
0548:                throw new UnsupportedOperationException();
0549:            }
0550:
0551:            /**
0552:             * Describe <code>getXPDL</code> method here.
0553:             *
0554:             * @return a <code>String</code> value
0555:             */
0556:            public String getXPDL() {
0557:                throw new UnsupportedOperationException();
0558:            }
0559:
0560:            /**
0561:             * Describe <code>steps</code> method here.
0562:             *
0563:             * @return a <code>Collection</code> value
0564:             */
0565:            public Collection stepsLocal() {
0566:                return activities;
0567:            }
0568:
0569:            /**
0570:             * Describe <code>processDefinition</code> method here.
0571:             *
0572:             * @return a <code>ProcessDefinition</code> value
0573:             */
0574:            public ProcessDefinition processDefinition() {
0575:                throw new UnsupportedOperationException();
0576:            }
0577:
0578:            /**
0579:             * Returns <code>true</code> if the process will be removed automatically
0580:             * on completion.
0581:             */
0582:            public boolean removeOnClose() throws RemoteException {
0583:                return false;
0584:            }
0585:
0586:            public int cleanupMode() {
0587:                return ProcessDefinition.REMOVE_MANUAL;
0588:            }
0589:
0590:            /**
0591:             * Describe <code>history</code> method here.
0592:             *
0593:             * @return a <code>Collection</code> value
0594:             */
0595:            public Collection history() {
0596:                throw new UnsupportedOperationException();
0597:            }
0598:
0599:            /**
0600:             * Describe <code>setRequester</code> method here.
0601:             *
0602:             * @param requester a <code>WfRequester</code> value
0603:             * @exception CannotChangeRequesterException if an error occurs
0604:             */
0605:            public void setRequester(WfRequester requester)
0606:                    throws CannotChangeRequesterException {
0607:                throw new UnsupportedOperationException();
0608:            }
0609:
0610:            /**
0611:             * Describe <code>activityByKey</code> method here.
0612:             *
0613:             * @param key a <code>String</code> value
0614:             * @return an <code>Activity</code> value
0615:             * @exception InvalidKeyException if an error occurs
0616:             */
0617:            public ActivityLocal activityByKeyLocal(String key)
0618:                    throws InvalidKeyException {
0619:                throw new UnsupportedOperationException();
0620:            }
0621:
0622:            /**
0623:             * Return an arbitrary activity with the given key. The activity
0624:             * need not belong to this process.
0625:             * @param key activity key
0626:             * @return the activity
0627:             * @throws InvalidKeyException if the activity cannot be found
0628:             */
0629:            protected ExtActivityLocal lookupActivityLocal(String key)
0630:                    throws InvalidKeyException {
0631:                throw new UnsupportedOperationException();
0632:            }
0633:
0634:            /**
0635:             * Describe <code>processContext</code> method here.
0636:             *
0637:             * @return a <code>ProcessData</code> value
0638:             */
0639:            public ProcessData processContext() {
0640:                throw new UnsupportedOperationException();
0641:            }
0642:
0643:            /**
0644:             * Describe <code>complete</code> method here.
0645:             *
0646:             * @param activity a <code>Long</code> value
0647:             * @param s a <code>State</code> value
0648:             */
0649:            public void complete(Long activity, State s) {
0650:                throw new UnsupportedOperationException();
0651:            }
0652:
0653:            /**
0654:             * Describe <code>createTransitionRef</code> method here.
0655:             *
0656:             * @param serialNum a <code>long</code> value
0657:             * @param fromActivity an <code>Activity</code> value
0658:             * @param toActivity an <code>Activity</code> value
0659:             */
0660:            protected void createTransitionRef(long serialNum,
0661:                    ActivityLocal fromActivity, ActivityLocal toActivity) {
0662:                throw new UnsupportedOperationException();
0663:            }
0664:
0665:            /**
0666:             * Create a new transition with given id, From Activity, To Activity.
0667:             * @param id a <code>String</code> value
0668:             * @param fromAct an <code>Activity</code> value
0669:             * @param toAct an <code>Activity</code> value
0670:             * @return the created transition.
0671:             */
0672:            protected TransitionLocal createTransition(String id, String group,
0673:                    int order, ActivityLocal fromAct, ActivityLocal toAct) {
0674:                return doCreateTransition(id, group, order, fromAct, toAct,
0675:                        Transition.COND_TYPE_CONDITION, null);
0676:            }
0677:
0678:            public static class ExtTransitionDefinition extends
0679:                    TransitionDefinitionLocal implements  ExtTransitionLocal {
0680:
0681:                private boolean pendingToken = false;
0682:
0683:                /**
0684:                 * @param pid
0685:                 * @param tid
0686:                 * @param group
0687:                 * @param order
0688:                 * @param from
0689:                 * @param to
0690:                 * @param condType
0691:                 * @param condition
0692:                 */
0693:                public ExtTransitionDefinition(String pid, String tid,
0694:                        String group, int order, ActivityLocal from,
0695:                        ActivityLocal to, int condType, String condition) {
0696:                    super (pid, tid, group, order, from, to, condType, condition);
0697:                }
0698:
0699:                /* (non-Javadoc)
0700:                 * @see de.danet.an.workflow.apix.ExtTransition#hasPendingToken()
0701:                 */
0702:                public boolean hasPendingToken() {
0703:                    return pendingToken;
0704:                }
0705:
0706:                /* (non-Javadoc)
0707:                 * @see de.danet.an.workflow.apix.ExtTransition#setPendingToken(boolean)
0708:                 */
0709:                public void setPendingToken(boolean value) {
0710:                    pendingToken = value;
0711:                }
0712:            }
0713:
0714:            /**
0715:             * Create a new transition with given id, From Activity, To Activity.
0716:             * @param id a <code>String</code> value
0717:             * @param fromAct an <code>Activity</code> value
0718:             * @param toAct an <code>Activity</code> value
0719:             * @param cond condition.
0720:             * @return the created transition.
0721:             */
0722:            protected TransitionLocal doCreateTransition(String id,
0723:                    String group, int order, ActivityLocal fromAct,
0724:                    ActivityLocal toAct, int condType, String cond) {
0725:                TransitionLocal trans = new ExtTransitionDefinition(paKey, id,
0726:                        group, order, fromAct, toAct, condType, cond);
0727:                transitions.add(trans);
0728:                return trans;
0729:            }
0730:
0731:            /**
0732:             * Describe <code>activityRequesterInfo</code> method here.
0733:             *
0734:             * @param req a <code>WfRequester</code> value
0735:             * @return a <code>WfAuditEvent</code> value
0736:             */
0737:            protected WfAuditEvent activityRequesterInfo(WfRequester req) {
0738:                throw new UnsupportedOperationException();
0739:            }
0740:
0741:            /**
0742:             * Returns an audit event object with process relevant information
0743:             * initialized.
0744:             * @return the process related information.
0745:             */
0746:            public WfAuditEvent auditEventBase() {
0747:                return auditEventBase(null);
0748:            }
0749:
0750:            /**
0751:             * Start a timer that will call <code>handleTimeout</code> at the
0752:             * given date with the given info.
0753:             * @param due target date
0754:             * @param info the context
0755:             */
0756:            public void startTimer(Date due, Serializable info) {
0757:            }
0758:
0759:            /**
0760:             * Stop all timers that this object has created.
0761:             */
0762:            public void stopTimers() {
0763:            }
0764:
0765:            /**
0766:             * Deliver a message on the given channel to a receiver tool
0767:             * listening on that channel.
0768:             *
0769:             * @param channel the channel name
0770:             * @param message the message
0771:             * @return <code>true</code> if the mesage could be delivered,
0772:             * <code>false</code> if no activity was listening
0773:             * @throws InvalidDataException if the message contains invalid data
0774:             * @ejb.interface-method view-type="remote"
0775:             * @ejb.transaction type="Required"
0776:             */
0777:            public boolean deliverChannelMessage(String channel, Map message)
0778:                    throws InvalidDataException {
0779:                throw new UnsupportedOperationException();
0780:            }
0781:
0782:            /**
0783:             * Deliver a message on the given channel to a receiver tool
0784:             * listening on that channel. If no tool is listening, store the
0785:             * message.
0786:             *
0787:             * @param channel the channel name
0788:             * @param message the message
0789:             * @throws InvalidDataException if the message contains invalid data
0790:             * @ejb.interface-method view-type="remote"
0791:             * @ejb.transaction type="Required"
0792:             */
0793:            public void submitChannelMessage(String channel, Map message)
0794:                    throws InvalidDataException {
0795:                throw new UnsupportedOperationException();
0796:            }
0797:
0798:            /**
0799:             * Looks for a message on the given channel and if found returns it.
0800:             *
0801:             * @param channel the channel name
0802:             * @return the message or <code>null</code>
0803:             * @ejb.interface-method view-type="remote"
0804:             * @ejb.transaction type="Required"
0805:             */
0806:            public Map lookForMessage(String channel) {
0807:                throw new UnsupportedOperationException();
0808:            }
0809:
0810:            /* (non-Javadoc)
0811:             * @see de.danet.an.workflow.domain.AbstractProcess#result()
0812:             */
0813:            public ProcessData result() throws ResultNotAvailableException {
0814:                return paProcessData;
0815:            }
0816:
0817:            //
0818:            // Implement accessor methods for the persistent attributes
0819:            //
0820:
0821:            /* (non-Javadoc)
0822:             * Comment copied from interface or superclass.
0823:             */
0824:            public boolean choose(ActivityLocal activity)
0825:                    throws TransitionNotAllowedException {
0826:                // TODO Auto-generated method stub
0827:                return false;
0828:            }
0829:
0830:            /* (non-Javadoc)
0831:             * Comment copied from interface or superclass.
0832:             */
0833:            public void closeActivity(ActivityLocal activity, State closedState) {
0834:                // TODO Auto-generated method stub
0835:
0836:            }
0837:
0838:            /* (non-Javadoc)
0839:             * Comment copied from interface or superclass.
0840:             */
0841:            public void handleException(ActivityLocal activity,
0842:                    String exceptionName) {
0843:                // TODO Auto-generated method stub
0844:
0845:            }
0846:
0847:            /**
0848:             * The getter method implementation for the persistent 
0849:             * attribute <code>key</code>.
0850:             *
0851:             * @return the value of key.
0852:             */
0853:            protected String getPaKey() {
0854:                return paKey;
0855:            }
0856:
0857:            /**
0858:             * The getter method implementation for the persistent 
0859:             * attribute <code>name</code>.
0860:             *
0861:             * @return the value of name.
0862:             * @see #setPaName
0863:             */
0864:            protected String getPaName() {
0865:                return paName;
0866:            }
0867:
0868:            /**
0869:             * The setter method implementation for the persistent 
0870:             * attribute <code>name</code>.
0871:             *
0872:             * @param newName the new value of name.
0873:             * @see #getPaName
0874:             */
0875:            protected void setPaName(String newName) {
0876:                paName = newName;
0877:            }
0878:
0879:            /**
0880:             * The getter method implementation for the persistent 
0881:             * attribute <code>description</code>.
0882:             *
0883:             * @return the value of description.
0884:             * @see #setPaDescription
0885:             */
0886:            protected String getPaDescription() {
0887:                return paDescription;
0888:            }
0889:
0890:            /**
0891:             * The setter method implementation for the persistent 
0892:             * attribute <code>description</code>.
0893:             *
0894:             * @param newDescription the new value of description.
0895:             * @see #getPaDescription
0896:             */
0897:            protected void setPaDescription(String newDescription) {
0898:                paDescription = newDescription;
0899:            }
0900:
0901:            /**
0902:             * The getter method implementation for the persistent 
0903:             * attribute <code>priority</code>.
0904:             *
0905:             * @return the value of priority.
0906:             * @see #setPaPriority
0907:             */
0908:            protected Priority getPaPriority() {
0909:                return paPriority;
0910:            }
0911:
0912:            /**
0913:             * The setter method implementation for the persistent 
0914:             * attribute <code>priority</code>.
0915:             *
0916:             * @param newPriority the new value of priority.
0917:             * @see #getPaPriority
0918:             */
0919:            protected void setPaPriority(Priority newPriority) {
0920:                paPriority = newPriority;
0921:            }
0922:
0923:            /**
0924:             * The getter method implementation for the persistent 
0925:             * attribute <code>typedState</code>.
0926:             *
0927:             * @return the value of typedState.
0928:             * @see #setPaTypedState
0929:             */
0930:            protected State getPaTypedState() {
0931:                return paTypedState;
0932:            }
0933:
0934:            /**
0935:             * The getter method implementation for the persistent 
0936:             * attribute <code>lastStateTime</code>.
0937:             *
0938:             * @return the value of lastStateTime.
0939:             * @see #setPaLastStateTime
0940:             */
0941:            protected Date getPaLastStateTime() {
0942:                return paLastStateTime;
0943:            }
0944:
0945:            /**
0946:             * The setter method implementation for the persistent 
0947:             * attribute <code>lastStateTime</code>.
0948:             *
0949:             * @param newLastStateTime the new value of lastStateTime.
0950:             * @see #getPaLastStateTime
0951:             */
0952:            protected void setPaLastStateTime(Date newLastStateTime) {
0953:                paLastStateTime = newLastStateTime;
0954:            }
0955:
0956:            /**
0957:             * The setter method implementation for the persistent 
0958:             * attribute <code>typedState</code>.
0959:             *
0960:             * @param newTypedState the new value of typedState.
0961:             * @see #getPaTypedState
0962:             */
0963:            protected void setPaTypedState(State newTypedState) {
0964:                paTypedState = newTypedState;
0965:            }
0966:
0967:            /**
0968:             * The getter method implementation for the persistent 
0969:             * attribute <code>processMgr</code>.
0970:             *
0971:             * @return the value of processMgr.
0972:             * @see #setPaProcessMgr
0973:             */
0974:            protected String getPaProcessMgr() {
0975:                return paProcessMgr;
0976:            }
0977:
0978:            /**
0979:             * The setter method implementation for the persistent 
0980:             * attribute <code>processMgr</code>.
0981:             *
0982:             * @param newProcessMgr the new value of processMgr.
0983:             * @see #getPaProcessMgr
0984:             */
0985:            protected void setPaProcessMgr(String newProcessMgr) {
0986:                paProcessMgr = newProcessMgr;
0987:            }
0988:
0989:            /**
0990:             * The getter method implementation for the persistent 
0991:             * attribute <code>requester</code>.
0992:             *
0993:             * @return the value of requester.
0994:             * @see #setPaRequester
0995:             */
0996:            protected WfRequester getPaRequester() {
0997:                return paRequester;
0998:            }
0999:
1000:            /**
1001:             * The setter method implementation for the persistent 
1002:             * attribute <code>requester</code>.
1003:             *
1004:             * @param newRequester the new value of requester.
1005:             * @see #getPaRequester
1006:             */
1007:            protected void setPaRequester(WfRequester newRequester) {
1008:                paRequester = newRequester;
1009:            }
1010:
1011:            /**
1012:             * The getter method implementation for the persistent 
1013:             * attribute <code>processDef</code>.
1014:             *
1015:             * @return the value of processDef.
1016:             * @see #setPaProcessDef
1017:             */
1018:            protected ProcessDefinition getPaProcessDef() {
1019:                return paProcessDef;
1020:            }
1021:
1022:            /**
1023:             * The setter method implementation for the persistent 
1024:             * attribute <code>processDef</code>.
1025:             *
1026:             * @param newProcessDef the new value of processDef.
1027:             * @see #getPaProcessDef
1028:             */
1029:            protected void setPaProcessDef(ProcessDefinition newProcessDef) {
1030:                paProcessDef = newProcessDef;
1031:            }
1032:
1033:            /**
1034:             * The getter method implementation for the persistent 
1035:             * attribute <code>processData</code>.
1036:             *
1037:             * @return the value of processData.
1038:             * @see #setPaProcessData
1039:             */
1040:            protected ProcessData getPaProcessData() {
1041:                return paProcessData;
1042:            }
1043:
1044:            /**
1045:             * The setter method implementation for the persistent 
1046:             * attribute <code>processData</code>.
1047:             *
1048:             * @param newProcessData the new value of processData.
1049:             * @see #getPaProcessData
1050:             */
1051:            protected void setPaProcessData(ProcessData newProcessData) {
1052:                paProcessData = newProcessData;
1053:            }
1054:
1055:            /**
1056:             * The getter method implementation for the persistent 
1057:             * attribute <code>processMgrName</code>.
1058:             *
1059:             * @return the value of processMgrName.
1060:             * @see #setPaProcessMgrName
1061:             */
1062:            protected String getPaProcessMgrName() {
1063:                return paProcessMgrName;
1064:            }
1065:
1066:            /**
1067:             * The setter method implementation for the persistent 
1068:             * attribute <code>processMgrName</code>.
1069:             *
1070:             * @param newProcessMgrName the new value of processMgrName.
1071:             * @see #getPaProcessMgrName
1072:             */
1073:            protected void setPaProcessMgrName(String newProcessMgrName) {
1074:                paProcessMgrName = newProcessMgrName;
1075:            }
1076:
1077:            /**
1078:             * The getter method implementation for the persistent 
1079:             * attribute <code>processMgrVersion</code>.
1080:             *
1081:             * @see #setPaProcessMgrVersion
1082:             * @return the value of processMgrVersion.
1083:             */
1084:            protected String getPaProcessMgrVersion() {
1085:                return paProcessMgrVersion;
1086:            }
1087:
1088:            /**
1089:             * The setter method implementation for the persistent 
1090:             * attribute <code>processMgrVersion</code>.
1091:             *
1092:             * @param newProcessMgrVersion the new value of processMgrVersion.
1093:             * @see #getPaProcessMgrVersion
1094:             */
1095:            protected void setPaProcessMgrVersion(String newProcessMgrVersion) {
1096:                paProcessMgrVersion = newProcessMgrVersion;
1097:            }
1098:
1099:            /**
1100:             * The getter method for the persistent attribute <code>id</code>.
1101:             *
1102:             * @return the value of process id.
1103:             * @see #setPaId
1104:             */
1105:            protected String getPaId() {
1106:                return paId;
1107:            }
1108:
1109:            /**
1110:             * The setter method for the persistent attribute <code>Id</code>.
1111:             *
1112:             * @param newId the new value of process id.
1113:             * @see #getPaId
1114:             */
1115:            protected void setPaId(String newId) {
1116:                paId = newId;
1117:            }
1118:
1119:            /**
1120:             * The getter method implementation for the persistent 
1121:             * attribute <code>createTime</code>.
1122:             *
1123:             * @return the value of createTime.
1124:             * @see #setPaCreateTime
1125:             */
1126:            protected Date getPaCreateTime() {
1127:                return paCreateTime;
1128:            }
1129:
1130:            /**
1131:             * The getter method implementation for the persistent 
1132:             * attribute <code>blockDeadlines</code>.
1133:             *
1134:             * @see #setPaBlockDeadlines
1135:             * @return the value of blockDeadlines.
1136:             */
1137:            protected Map getPaBlockDeadlines() {
1138:                return new HashMap();
1139:            }
1140:
1141:            /**
1142:             * The getter method implementation for the persistent 
1143:             * attribute <code>Debug</code>.
1144:             *
1145:             * @see #setPaDebug
1146:             * @return the value of Debug.
1147:             */
1148:            protected boolean getPaDebug() {
1149:                return paDebug;
1150:            }
1151:
1152:            /**
1153:             * The setter method implementation for the persistent 
1154:             * attribute <code>Debug</code>.
1155:             *
1156:             * @param newDebug the new value of Debug.
1157:             * @see #getPaDebug
1158:             */
1159:            protected void setPaDebug(boolean newDebug) {
1160:                paDebug = newDebug;
1161:            }
1162:
1163:            /**
1164:             * The getter method implementation for the persistent 
1165:             * attribute <code>auditEventSelection</code>.
1166:             *
1167:             * @see #setPaAuditEventSelection
1168:             * @return the value of auditEventSelection.
1169:             */
1170:            protected int getPaAuditEventSelection() {
1171:                return paAuditEventSelection;
1172:            }
1173:
1174:            /**
1175:             * The setter method implementation for the persistent 
1176:             * attribute <code>auditEventSelection</code>.
1177:             *
1178:             * @param newAuditEventSelection the new value of auditEventSelection.
1179:             * @see #getPaAuditEventSelection
1180:             */
1181:            protected void setPaAuditEventSelection(int newAuditEventSelection) {
1182:                paAuditEventSelection = newAuditEventSelection;
1183:            }
1184:
1185:            /**
1186:             * The getter method implementation for the persistent 
1187:             * attribute <code>storeAuditEvents</code>.
1188:             *
1189:             * @see #setPaStoreAuditEvents
1190:             * @return the value of storeAuditEvents.
1191:             */
1192:            protected boolean getPaStoreAuditEvents() {
1193:                return paStoreAuditEvents;
1194:            }
1195:
1196:            /**
1197:             * The setter method implementation for the persistent 
1198:             * attribute <code>storeAuditEvents</code>.
1199:             *
1200:             * @param newStoreAuditEvents the new value of storeAuditEvents.
1201:             * @see #getPaStoreAuditEvents
1202:             */
1203:            protected void setPaStoreAuditEvents(boolean newStoreAuditEvents) {
1204:                paStoreAuditEvents = newStoreAuditEvents;
1205:            }
1206:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.