Java Doc for Step.java in  » Wiki-Engine » JSPWiki » com » ecyrd » jspwiki » workflow » 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 » Wiki Engine » JSPWiki » com.ecyrd.jspwiki.workflow 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


com.ecyrd.jspwiki.workflow.Step

All known Subclasses:   com.ecyrd.jspwiki.workflow.AbstractStep,
Step
public interface Step (Code)

Discrete unit of work in a Workflow, such as a Decision or a Task . Decisions require user input, while Tasks do not. All Steps, however, possess these properties:

Steps contain a Step.getMessageKey() method that returns a key that can be used with the com.ecyrd.jspwiki.i18n.InternationalizationManager . See also Workflow.getMessageArguments , which is a convenience method that returns message arguments.


author:
   Andrew Jaquith
since:
   2.5




Method Summary
public  voidaddSuccessor(Outcome outcome, Step step)
     Adds a successor Step to this one, which will be triggered by a supplied Outcome.
public  Outcomeexecute()
    

Executes the processing for this Step and returns an Outcome indicating if it succeeded ( Outcome.STEP_COMPLETE or Outcome.STEP_ABORT ).

public  PrincipalgetActor()
     The Principal responsible for completing this Step, such as a system user or actor assigned to a Decision.
public  CollectiongetAvailableOutcomes()
     Returns a Collection of available outcomes, such as "approve", "deny" or "reassign", in the order in which they were added via Step.addSuccessor(Outcome,Step) .
public  DategetEndTime()
     The end time for this Step.
public  ListgetErrors()
     Returns a List of error strings generated by this Step.
public  Object[]getMessageArguments()
     Returns the message arguments for this Step, typically by delegating to the parent Workflow's Workflow.getMessageArguments method.
public  StringgetMessageKey()
     Message key for human-friendly name of this Step, including any parameter substitutions.
public  OutcomegetOutcome()
     Returns the Outcome of this Step's processing; by default, Outcome.STEP_CONTINUE .
public  PrincipalgetOwner()
     Convenience method that returns the owner of the Workflow by delegating to Workflow.getOwner .
public  DategetStartTime()
     The start time for this Step.
public  StepgetSuccessor(Outcome outcome)
     Identifies the next Step for a particular Outcome; if there is no next Step for this Outcome, this method returns null.
public  WorkflowgetWorkflow()
     Gets the Workflow that is the parent of this Step.
public  booleanisCompleted()
     Determines whether the Step is completed; if not, it is by definition awaiting action by the owner or in process.
public  booleanisStarted()
     Determines whether the Step has started.
public  voidsetOutcome(Outcome outcome)
     Sets the current Outcome for the step.
public  voidstart()
     Starts the Step, and sets the start time to the moment when this method is first invoked.



Method Detail
addSuccessor
public void addSuccessor(Outcome outcome, Step step)(Code)
Adds a successor Step to this one, which will be triggered by a supplied Outcome. Implementations should respect the order in which Outcomes are added; Step.getAvailableOutcomes() should return them in the same order they were added.
Parameters:
  outcome - the Outcome triggering a particular successor Step
Parameters:
  step - the Step to associated with this Outcomes (nulldenotes no Steps)



execute
public Outcome execute() throws WikiException(Code)

Executes the processing for this Step and returns an Outcome indicating if it succeeded ( Outcome.STEP_COMPLETE or Outcome.STEP_ABORT ). Processing instructions can do just about anything, such as executing custom business logic or changing the Step's final outcome via Step.setOutcome(Outcome) . A return value of STEP_COMPLETE indicates that the instructions executed completely, without errors; STEP_ABORT indicates that the Step and its parent Workflow should be aborted (that is, fail silently without error). If the execution step encounters any errors, it should throw a WikiException or a subclass.

Note that successful execution of this methods does not necessarily mean that the Step is considered "complete"; rather, it just means that it has executed. Therefore, it is possible that execute could run multiple times.

the result of the Step, where true means success,and false means abort
throws:
  WikiException - if the step encounters errors while executing



getActor
public Principal getActor()(Code)
The Principal responsible for completing this Step, such as a system user or actor assigned to a Decision. the responsible Principal



getAvailableOutcomes
public Collection getAvailableOutcomes()(Code)
Returns a Collection of available outcomes, such as "approve", "deny" or "reassign", in the order in which they were added via Step.addSuccessor(Outcome,Step) . Concrete implementations should always return a defensive copy of the outcomes, not the original backing collection. the set of outcomes



getEndTime
public Date getEndTime()(Code)
The end time for this Step. This value should be set when the step completes. Returns Workflow.TIME_NOT_SET if not completed yet. the end time



getErrors
public List getErrors()(Code)
Returns a List of error strings generated by this Step. If this Step generated no errors, this method returns a zero-length array. the errors



getMessageArguments
public Object[] getMessageArguments()(Code)
Returns the message arguments for this Step, typically by delegating to the parent Workflow's Workflow.getMessageArguments method. the message arguments.



getMessageKey
public String getMessageKey()(Code)
Message key for human-friendly name of this Step, including any parameter substitutions. By convention, the message prefix should be a lower-case version of the Step's type, plus a period (e.g., task. and decision.). the message key for this Step.



getOutcome
public Outcome getOutcome()(Code)
Returns the Outcome of this Step's processing; by default, Outcome.STEP_CONTINUE . the outcome



getOwner
public Principal getOwner()(Code)
Convenience method that returns the owner of the Workflow by delegating to Workflow.getOwner . the owner of the Workflow



getStartTime
public Date getStartTime()(Code)
The start time for this Step. Returns Workflow.TIME_NOT_SET if not started yet. the start time



getSuccessor
public Step getSuccessor(Outcome outcome)(Code)
Identifies the next Step for a particular Outcome; if there is no next Step for this Outcome, this method returns null.
Parameters:
  outcome - the outcome the next step



getWorkflow
public Workflow getWorkflow()(Code)
Gets the Workflow that is the parent of this Step. the workflow



isCompleted
public boolean isCompleted()(Code)
Determines whether the Step is completed; if not, it is by definition awaiting action by the owner or in process. If a Step has completed, it must also return a non-null result for Step.getOutcome() . true if the Step has completed; falseif not.



isStarted
public boolean isStarted()(Code)
Determines whether the Step has started. true if the Step has started; falseif not.



setOutcome
public void setOutcome(Outcome outcome)(Code)
Sets the current Outcome for the step. If the Outcome is a "completion" Outcome, it should also sets the completon time and mark the Step as complete. Once a Step has been marked complete, this method cannot be called again. If the supplied Outcome is not in the set returned by Step.getAvailableOutcomes() , or is not Outcome.STEP_CONTINUE or Outcome.STEP_ABORT , this method returns an IllegalArgumentException. If the caller attempts to set an Outcome and the Step has already completed, this method throws an IllegalStateException.
Parameters:
  outcome - whether the step should be considered completed



start
public void start() throws WikiException(Code)
Starts the Step, and sets the start time to the moment when this method is first invoked. If this Step has already been started, this method throws an . If the Step cannot be started because the underlying implementation encounters an error, it the implementation should throw a WikiException.
throws:
  WikiException - if the step encounters errors while starting



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