Java Doc for WorkflowEngineUtilities.java in  » Workflow-Engines » obe-1.0 » org » obe » engine » 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 » obe 1.0 » org.obe.engine 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.obe.engine.WorkflowEngineUtilities

WorkflowEngineUtilities
public class WorkflowEngineUtilities (Code)
Utility class to support the engine run-time.
author:
   Anthony Eden
author:
   Adrian Price

Inner Class :public static class AttributeDescription



Method Summary
public static  intactivityStateToProcessState(int newState)
     Maps activity state to process state.
public static  intactivityStateToWorkItemState(int newState)
     Maps activity state to work item state.
public static  voidapplyResults(Parameter[] parms, ProcessInstance processInstance, boolean ignoreNullSchemaTypeValues)
     Applies the results of a tool invocation to a process instance.
public static  voidapplyResults(ActualParameter[] actualParms, ProcessInstance processInstance, ApplicationEvent event, ApplicationEventBroker broker)
     Applies data from an application event to a process instance.
public static  DatecalculateDeadlineDate(Activity activity, Deadline deadline, Date startedDate, CalendarFactory calendarFactory)
     Calculates the deadline date for an activity.
public static  DatecalculateDueDate(WorkflowProcess workflow, Date startedDate, CalendarFactory calendarFactory)
     Calculates the due date for a workflow.
public static  DatecalculateDueDate(Activity activity, String performer, String user, Date startedDate, CalendarFactory calendarFactory)
     Calculates the due date for an activity.
public static  DatecalculateExpiryDate(Duration expiration, String calendar, CalendarFactory calendarFactory)
     Calculates the expiration date for an application event.
Parameters:
  expiration - The duration for which the event will be valid.
Parameters:
  calendar - The name of the business calendar to use.
Parameters:
  calendarFactory - The calendar factory to use.
public static  DatecalculateTargetDate(WorkflowProcess workflow, Date startedDate, CalendarFactory calendarFactory)
     Calculates the target date for a workflow.
public static  DatecalculateTargetDate(Activity activity, String performer, String user, Date startedDate, CalendarFactory calendarFactory)
     Calculates the target date for an activity.
public static  voidcheckValid(WorkflowProcess workflow, boolean internal)
     Validates that a WorkflowProcess is available for instantiation.
public static  StringcreateEventCondition(EventTypeMetaData metaData, ActualParameter[] actualParms, EngineContext ctx)
     Synthesizes a conditional expression from a set of formal and actual parameter specifications.
public static  Object[]createEventKeys(EventTypeMetaData metaData, ActualParameter[] actualParms, EngineContext ctx)
     Creates the keys for a key-based event subscription.
Parameters:
  metaData - Event type meta data.
Parameters:
  actualParms - The actual parameters from the<obe:Event> element in the workflow process.
Parameters:
  ctx - The engine context.
public static  Parameter[]createParameters(FormalParameter[] formalParms, ActualParameter[] actualParms, EngineContext ctx)
    
public static  Parameter[]createParameters(Application toolDef, ActualParameter[] actualParms, EngineContext ctx)
    
public static  AttributeDescriptiondescribeAttribute(WorkflowProcess workflow, String id, boolean includeSystemAttrs)
     Describes a process attribute.
Parameters:
  workflow - The workflow definition.
Parameters:
  id - The attribute ID.
Parameters:
  includeSystemAttrs - true to include system attributes.
public static  AssignmentStrategyDeffindAssignmentStrategy(Activity activity)
    
public static  StringfindCalendar(WorkflowProcess workflow)
     Finds the name of the business calendar to use.
Parameters:
  workflow - Workflow definition to search.
public static  StringfindCalendar(String performer, Activity activity)
     Finds the name of the business calendar to use.
Parameters:
  performer - The ID of the performer for whom the computation isbeing made.
public static  CompletionStrategyfindCompletionStrategy(Activity activity, ServiceManager svcMgr)
    
public static  DataFieldfindDataField(WorkflowProcess workflow, String id)
     Finds the definition of a process attribute.
Parameters:
  id - The attribute ID.
public static  DataTypefindDataType(WorkflowProcess workflow, String id, boolean includeSystemAttrs)
     Describes a process attribute.
Parameters:
  workflow - The workflow definition.
Parameters:
  id - The attribute ID.
Parameters:
  includeSystemAttrs - true to include system attributes.
public static  EvaluatorgetEvaluator(XPDLPackage pkg, ServiceManager svcMgr)
    
public static  MapintrospectToMap(Class beanClass, Class stopClass)
     Introspects properties of the specified class(es) into a map.
public static  StringmapPerformerId(Participant performerDef)
    
public static  ToolInvocation[]prepareToolInvocations(WorkItem workItem, int toolIndex, EngineContext ctx)
     Returns everything necessary to invoke the tool(s) associated with a work item.
Parameters:
  workItem - The work item corresponding to the tool.
Parameters:
  toolIndex - The index of the tool to prepare (ignored in favour ofworkItem.getToolIndex() if workItem isnon-null or if the toolset mode is PARALLEL.
Parameters:
  ctx - The workflow context in which to prepare the tool invocation.
public static  intprocessStateToActivityState(int newState)
     Maps process state to activity state.
public static  voidsortForValidity(WorkflowProcess[] workflows)
     Sorts the workflows collection in ordered of descending validity, namely: validFrom DESC, validTo DESC, created DESC.
public static  voidvalidatePackage(XPDLPackage pkg)
    



Method Detail
activityStateToProcessState
public static int activityStateToProcessState(int newState)(Code)
Maps activity state to process state. When an activity instance with a SubFlow implementation transitions to the newState state, any child process belonging to that activity instance for which it would be a legal transition, should transition to the state returned by this method.
Parameters:
  newState - The new process instance state. The required activity instance state.



activityStateToWorkItemState
public static int activityStateToWorkItemState(int newState)(Code)
Maps activity state to work item state. When an activity instance transitions to the newState state, work items belonging to that activity instance and for which it would be a legal transition, should transition to the state returned by this method.
Parameters:
  newState - The new activity state. The required work item state.



applyResults
public static void applyResults(Parameter[] parms, ProcessInstance processInstance, boolean ignoreNullSchemaTypeValues) throws RepositoryException, AttributeReadOnlyException(Code)
Applies the results of a tool invocation to a process instance. INOUT- and OUT-type process variables are updated with the values provided by the application or procedure. IN-type parameters are ignored.
Parameters:
  parms - Parameter values returned by the tool invocation.
Parameters:
  processInstance - The process instance to which the values are to beapplied.
Parameters:
  ignoreNullSchemaTypeValues - true to ignore (i.e.,not store) null values for attributes whose type is defined by anSchemaType XML schema and which does not map to aBasicType. The reason for this is to enable worklist handlerclients to support optional file uploads to such attributes.
throws:
  RepositoryException - If the value could not be stored in theattribute.
throws:
  AttributeReadOnlyException - If the attribute in question is read-only (applies to most system attributes).



applyResults
public static void applyResults(ActualParameter[] actualParms, ProcessInstance processInstance, ApplicationEvent event, ApplicationEventBroker broker) throws WMWorkflowException(Code)
Applies data from an application event to a process instance.
Parameters:
  actualParms - The actual parameters passed by the eventsubscription.
Parameters:
  processInstance - The process instance to update.
Parameters:
  event - The application event.
Parameters:
  broker - The event broker to use.
throws:
  WMWorkflowException - If the event type could not be found or ifan attribute could not be updated.



calculateDeadlineDate
public static Date calculateDeadlineDate(Activity activity, Deadline deadline, Date startedDate, CalendarFactory calendarFactory) throws RepositoryException(Code)
Calculates the deadline date for an activity.
Parameters:
  activity -
Parameters:
  deadline -
Parameters:
  startedDate -
Parameters:
  calendarFactory -
throws:
  RepositoryException -



calculateDueDate
public static Date calculateDueDate(WorkflowProcess workflow, Date startedDate, CalendarFactory calendarFactory) throws RepositoryException(Code)
Calculates the due date for a workflow.
Parameters:
  workflow -
Parameters:
  startedDate -
Parameters:
  calendarFactory - The due date, or null if the workflow does not specify a limit.



calculateDueDate
public static Date calculateDueDate(Activity activity, String performer, String user, Date startedDate, CalendarFactory calendarFactory) throws RepositoryException, WMInvalidTargetUserException(Code)
Calculates the due date for an activity.
Parameters:
  activity -
Parameters:
  performer -
Parameters:
  user -
Parameters:
  startedDate -
Parameters:
  calendarFactory - The due date, or null if the activity does not specify a limit.



calculateExpiryDate
public static Date calculateExpiryDate(Duration expiration, String calendar, CalendarFactory calendarFactory) throws RepositoryException(Code)
Calculates the expiration date for an application event.
Parameters:
  expiration - The duration for which the event will be valid.
Parameters:
  calendar - The name of the business calendar to use.
Parameters:
  calendarFactory - The calendar factory to use. The expiration date.
throws:
  RepositoryException - If the calendar could not be found.



calculateTargetDate
public static Date calculateTargetDate(WorkflowProcess workflow, Date startedDate, CalendarFactory calendarFactory) throws RepositoryException(Code)
Calculates the target date for a workflow.
Parameters:
  workflow -
Parameters:
  startedDate -
Parameters:
  calendarFactory - The target date, or null if the workflow does not specify aduration.



calculateTargetDate
public static Date calculateTargetDate(Activity activity, String performer, String user, Date startedDate, CalendarFactory calendarFactory) throws RepositoryException, WMInvalidTargetUserException(Code)
Calculates the target date for an activity.
Parameters:
  activity -
Parameters:
  performer -
Parameters:
  user -
Parameters:
  startedDate -
Parameters:
  calendarFactory - The due date, or null if the activity does not specify a limit.



checkValid
public static void checkValid(WorkflowProcess workflow, boolean internal) throws WMInvalidProcessDefinitionException(Code)
Validates that a WorkflowProcess is available for instantiation.
Parameters:
  workflow - The WorkflowProcess
Parameters:
  internal - true if instantiating internally.
throws:
  WMInvalidProcessDefinitionException - if the process definition isdisabled, under revision, private and non-subflow, or has not yet comeinto force, or has expired.



createEventCondition
public static String createEventCondition(EventTypeMetaData metaData, ActualParameter[] actualParms, EngineContext ctx) throws WMWorkflowException(Code)
Synthesizes a conditional expression from a set of formal and actual parameter specifications. The key/value pairs for all parameters are ANDed together in the resulting conditional expression.
Parameters:
  metaData - The event definition contains the formal parameters whichdefine the keys referenced in the resulting conditional expression.
Parameters:
  actualParms - The actual parameters define the values to matchagainst their corresponding keys.
Parameters:
  ctx - The workflow context in which to evaluate the actualparameters. A conditional expression in the specified scripting language.
throws:
  WMWorkflowException -



createEventKeys
public static Object[] createEventKeys(EventTypeMetaData metaData, ActualParameter[] actualParms, EngineContext ctx) throws WMWorkflowException(Code)
Creates the keys for a key-based event subscription.
Parameters:
  metaData - Event type meta data.
Parameters:
  actualParms - The actual parameters from the<obe:Event> element in the workflow process.
Parameters:
  ctx - The engine context. Event keys for the IN- and INOUT-type formal event parameters.
throws:
  WMWorkflowException -



createParameters
public static Parameter[] createParameters(FormalParameter[] formalParms, ActualParameter[] actualParms, EngineContext ctx) throws WMWorkflowException(Code)



createParameters
public static Parameter[] createParameters(Application toolDef, ActualParameter[] actualParms, EngineContext ctx) throws WMWorkflowException(Code)



describeAttribute
public static AttributeDescription describeAttribute(WorkflowProcess workflow, String id, boolean includeSystemAttrs) throws WMInvalidAttributeException(Code)
Describes a process attribute.
Parameters:
  workflow - The workflow definition.
Parameters:
  id - The attribute ID.
Parameters:
  includeSystemAttrs - true to include system attributes. A description of the attribute.



findAssignmentStrategy
public static AssignmentStrategyDef findAssignmentStrategy(Activity activity)(Code)



findCalendar
public static String findCalendar(WorkflowProcess workflow)(Code)
Finds the name of the business calendar to use.
Parameters:
  workflow - Workflow definition to search. The business calendar name, or "default"if a calendar was not specified by the WorkflowProcess or Package.



findCalendar
public static String findCalendar(String performer, Activity activity) throws WMInvalidTargetUserException(Code)
Finds the name of the business calendar to use.
Parameters:
  performer - The ID of the performer for whom the computation isbeing made. The corresponding participant can have its own calendar,which will over-ride any activity-, workflow- or package-level calendar.
Parameters:
  activity - The activity definition to search. The business calendar ID, or "default" ifa calendar was not specified by the Activity, WorkflowProcess or Package.



findCompletionStrategy
public static CompletionStrategy findCompletionStrategy(Activity activity, ServiceManager svcMgr) throws WMWorkflowException(Code)



findDataField
public static DataField findDataField(WorkflowProcess workflow, String id) throws ObjectNotFoundException(Code)
Finds the definition of a process attribute.
Parameters:
  id - The attribute ID. The attribute definition.
throws:
  ObjectNotFoundException - if the attribute could not be found.



findDataType
public static DataType findDataType(WorkflowProcess workflow, String id, boolean includeSystemAttrs) throws WMInvalidAttributeException(Code)
Describes a process attribute.
Parameters:
  workflow - The workflow definition.
Parameters:
  id - The attribute ID.
Parameters:
  includeSystemAttrs - true to include system attributes. The corresponding DataType.



getEvaluator
public static Evaluator getEvaluator(XPDLPackage pkg, ServiceManager svcMgr) throws RepositoryException(Code)



introspectToMap
public static Map introspectToMap(Class beanClass, Class stopClass)(Code)
Introspects properties of the specified class(es) into a map. The results are cached internally on beanClass, with the result that sequential calls with the same beanClass but different stopClass will yield property information generated from the first such call.
Parameters:
  beanClass -
Parameters:
  stopClass - A map of PropertyDescriptors, keyed on propertyname.



mapPerformerId
public static String mapPerformerId(Participant performerDef) throws WMInvalidTargetUserException(Code)



prepareToolInvocations
public static ToolInvocation[] prepareToolInvocations(WorkItem workItem, int toolIndex, EngineContext ctx) throws RepositoryException, WMWorkflowException(Code)
Returns everything necessary to invoke the tool(s) associated with a work item.
Parameters:
  workItem - The work item corresponding to the tool.
Parameters:
  toolIndex - The index of the tool to prepare (ignored in favour ofworkItem.getToolIndex() if workItem isnon-null or if the toolset mode is PARALLEL.
Parameters:
  ctx - The workflow context in which to prepare the tool invocation. Tool invocation details.
throws:
  WMInvalidToolException - if the tool cannot be found.



processStateToActivityState
public static int processStateToActivityState(int newState)(Code)
Maps process state to activity state. When a process instance transitions to the newState state, activities belonging to that process instance and for which it would be a legal transition, should transition to the state returned by this method.
Parameters:
  newState - The new process instance state. The required activity instance state.



sortForValidity
public static void sortForValidity(WorkflowProcess[] workflows)(Code)
Sorts the workflows collection in ordered of descending validity, namely: validFrom DESC, validTo DESC, created DESC. The 'most valid' workflow is therefore always at index 0.
Parameters:
  workflows -



validatePackage
public static void validatePackage(XPDLPackage pkg) throws InvalidPackageException(Code)



Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

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