Java Doc for ToolAgent.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » workflow » spis » aii » 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 » de.danet.an.workflow.spis.aii 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


de.danet.an.workflow.spis.aii.ToolAgent

All known Subclasses:   de.danet.an.workflow.tools.util.SimpleApplicationAgent,  de.danet.an.workflow.tools.rhino.JSExecutor,  de.danet.an.workflow.tools.scarab.GetIssueType,  de.danet.an.workflow.tools.xmlrpc.XmlRpcTool,  de.danet.an.workflow.tools.MailTool2,  de.danet.an.workflow.tools.soap.GenericSoapClient,  de.danet.an.workflow.tools.scarab.GetLastModification,  de.danet.an.workflow.tools.soapclient.SOAPClient,  de.danet.an.workflow.tools.scarab.GetEmail,  de.danet.an.workflow.tools.scarab.SetRole,  de.danet.an.workflow.tools.scarab.SetAttribute,  de.danet.an.workflow.tools.JellyTool,  de.danet.an.workflow.tools.MBeanInvoker,  de.danet.an.workflow.tools.scarab.AssignIssue,  de.danet.an.workflow.tools.XSLTTool,  de.danet.an.workflow.tools.scarab.GetAttributeValues,  de.danet.an.workflow.tools.EJBInvoker,  de.danet.an.workflow.tools.scarab.GetAssignedUser,  de.danet.an.workflow.tools.scarab.GetModule,  de.danet.an.workflow.tools.scarab.SetDependency,  de.danet.an.workflow.tools.scarab.GetArchiveEmail,  de.danet.an.workflow.tools.scarab.GetDependencyCopiedFrom,  de.danet.an.workflow.tools.webclient.BrowserTool,  de.danet.an.workflow.tools.chabacc.Sender,  de.danet.an.wfdemo.testtools.TestEjbInvoker,  de.danet.an.workflow.tools.scarab.CopyIssue,  de.danet.an.workflow.tools.chabacc.Receiver,  de.danet.an.workflow.tools.scarab.AddComment,
ToolAgent
public interface ToolAgent (Code)
This interface is used to control applications that execute work items. An application may implement this interface directly (it is "workflow aware"). Usually, however, this interface will be implemented by some adapter class that controls the application, and thus acts as an agent for the application.

An application is declared to participate in a workflow by the application tag in the XPDL. This declaration is associated with the implementation class of ToolAgent using an extension. The extension syntax supported allows to specify properties of the tool agent (see the User Manual for details).

An implementation of ToolAgent must be aware that several application invocations may be performed using the same instance of the class implementing ToolAgent. This implies that implementations must be thread-safe.

By default, the ToolAgent.invoke invoke method has full access to the activity as specified by the de.danet.an.workflow.api.Activity activityinterface . Implementations that require long term storage of the activity must be aware that the activity is passed as an interface to a remote object and therefore unsuitable for long term persistence. Tool agents should persist the activity's unique key instead of the activity. The activity may later be retrieved from the key using de.danet.an.workflow.api.ProcessDirectory.lookupActivityProcessDirectory.lookupActivity (obtaining the process directory from the de.danet.an.workflow.api.WorkflowService.processDirectoryWorkflowService .
See Also:   de.danet.an.workflow.spis.aii





Method Summary
 voidinvoke(Activity activity, FormalParameter[] formalParameters, Map actualParameters)
     Invoke an application on the given activity.
Parameters:
  activity - the activity to be executed.
 voidterminate(Activity activity)
     Terminates execution of the given activity.



Method Detail
invoke
void invoke(Activity activity, FormalParameter[] formalParameters, Map actualParameters) throws RemoteException, CannotExecuteException(Code)
Invoke an application on the given activity.
Parameters:
  activity - the activity to be executed. The supplied objectmust be serializable in order to support applications running asservers
Parameters:
  formalParameters - the formal parameter definition asspecified in the process definition. May be used e.g. bygeneric applications to adapt to specific formal parameterlists
Parameters:
  actualParameters - the actual parameters of theapplication invocation. There is an entry in the map for everyformal parameter using the id as key in the map. OUT parameters are initializedto zero. The map and the objects contained in the map must beserializable in order to support applications running asservers.
throws:
  RemoteException - if a temporary problem occurs and theworkflow engine should retry the tool invocation (usuallythrown when a deadlock situation occurs while accessing theactivity).
throws:
  CannotExecuteException - if thrown, causesthe activity to be terminated unless a mapping to a process exceptionis defined for the cause of the CannotExecuteException.If such a mapping is defined, the activity is abandoned.See the user manual for details.



terminate
void terminate(Activity activity) throws ApplicationNotStoppedException, RemoteException(Code)
Terminates execution of the given activity. If the activity has been terminated already, the method should do nothing (i.e. under certain conditions this method may be called more than once for a given activity).

Only the activity's methods key and uniqueKey should be used in an implementation of this method. Else, depending on the application server and database configuration, deadlocks may occur.

Up to version 1.3 this method has been called by the workflow engine when processing an invoked tool's call of de.danet.an.workflow.omgcore.WfActivity.completeWfActivity.complete() . The reasoning has been that the engine cannot be sure that complete() is called by the tool that has previously been invoked. (To ensure this, the engine would have to pass some token to the tool during invocation and the tool would have to pass this back to the engine when calling complete(). Such a procedure is, however, not defined by the OMG API.) By invoking terminate() on the currently running tool when processing complete(), the engine tried to make sure that at least the invoked tool is terminated if some imposter calls complete() instead of the invoked tool.

The overlapping of the tool processing the completion and the invocation of terminate() on the tool has, however, turned out to cause various problems with respect to transactions if the tool uses a database. Therefore, this procedure has been abandoned. Note that this change does not formally change the API as there has never been a contract about terminate() being called as part of processing complete(). The subject has been explained extensively only to provide an explanation if someone observes this change of behaviour.
Parameters:
  activity - the activity to be canceled. The supplied objectmust be serializable in order to support applications running asservers.
throws:
  ApplicationNotStoppedException - if execution cannot beterminated (see ApplicationNotStoppedExceptionApplicationNotStoppedException).
throws:
  RemoteException - if a temporary problem occurs and theworkflow engine should retry the tool termination




www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.