Java Doc for WorkflowAttribute.java in  » ERP-CRM-Financial » Kuali-Financial-System » edu » iu » uis » eden » plugin » attributes » 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 » ERP CRM Financial » Kuali Financial System » edu.iu.uis.eden.plugin.attributes 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


edu.iu.uis.eden.plugin.attributes.WorkflowAttribute

All known Subclasses:   org.kuali.workflow.attribute.KualiResearchRiskAttribute,  edu.iu.uis.eden.routetemplate.MockWorkflowAttribute,  org.kuali.workflow.module.purap.attribute.KualiPurchaseOrderBudgetAttribute,  org.kuali.workflow.attribute.KualiAccountAttribute,  org.kuali.workflow.attribute.KualiCGAttribute,  org.kuali.workflow.attribute.KualiPayeeTaxIdAttribute,  org.kuali.workflow.module.purap.attribute.KualiPurchaseOrderContractAndGrantsAttribute,  edu.iu.uis.eden.routemanager.ExplodingRuleAttribute,  org.kuali.workflow.attribute.KualiSubAccountAttribute,  mocks.MockChartOrgAttribute,  edu.iu.uis.eden.routetemplate.AbstractWorkflowAttribute,  edu.iu.uis.eden.routetemplate.TestRuleAttributeThree,  org.kuali.workflow.attribute.KualiVerificationWorkgroupAttribute,  edu.iu.uis.eden.routetemplate.TestRuleAttribute,  edu.iu.uis.eden.routetemplate.TestRuleAttributeDuex,  org.kuali.workflow.attribute.KualiChartAttribute,  org.kuali.workflow.attribute.KualiOrgReviewAttribute,  edu.iu.uis.eden.routetemplate.RuleRoutingAttribute,
WorkflowAttribute
public interface WorkflowAttribute extends Serializable(Code)

Interface which abstracts a piece of information ("attribute") associated with a Workflow document, which can be used to make routing decisions when combined with Rules.

WorkflowAttribute lifecycle:

Definition via XML

  1. Attribute definition is defined in XML (... any actions that are performed on-definition)
  2. Attribute definition is registered in a Rule Template definition in XML
  3. Rule Template is associated with a Document and a Rule in XML

Definition via UI (this documentation needs work)

  1. ...?...
  2. WorkflowAttribute.validateRuleData(Map) and WorkflowAttribute.validateRoutingData(Map) and are called to validate the configuration/extension values of the rule definition, and the user-configured rule data (??). see edu.iu.uis.eden.routetemplate.web.WebRuleBaseValues , edu.iu.uis.eden.routetemplate.RuleRoutingAttribute .
  3. Not sure where and why these are called, or how that is reconciled with XML-based ingestion....? The 'required' field only seems to matter with regard to these two methods; it seems to only ever be used in implementations of these two methods

Runtime evaluation

  1. Client application constructs edu.iu.uis.eden.clientapp.vo.WorkflowAttributeDefinitionVO and attaches it to the client-side document
  2. Upon action taken on the document, the Attributes that are described by the WorkflowAttributeDefinitionVOs are looked up (... how ...) and constructed on the client side.
  3. If the attribute is a WorkflowAttributeXmlValidator (e.g. edu.iu.uis.eden.routetemplate.xmlrouting.StandardGenericXMLRuleAttribute ), then WorkflowAttributeXmlValidator.validateClientRoutingData is called to validate any data the client app may have set on the client-instantiated attribute (the edu.iu.uis.eden.clientapp.vo.WorkflowAttributeDefinitionVO )
  4. Attribute content (content the attribute generates to place in the eDoc document content) is obtained from the attribute via WorkflowAttribute.getDocContent or edu.iu.uis.eden.docsearch.SearchableAttribute.getSearchContent , depending on whether the attribute is a WorkflowAttribute or edu.iu.uis.eden.docsearch.SearchableAttribute
  5. When a Rule is invoked (for instance, when a requests node is fired), all attributes associated with the rule (those associated with the Rule Template associated with the rule) which are WorkflowAttributes are enumerated and for each:
    1. A special case is made for attributes defined in XML as of "RuleXmlAttribute" type ( EdenConstants.RULE_XML_ATTRIBUTE_TYPE ): the attribute is cast to GenericXMLRuleAttribute and RuleAttribute business object is set on it ( GenericXMLRuleAttribute.setRuleAttribute(edu.iu.uis.eden.routetemplate.RuleAttribute) before proceeding with isMatch invocation. (what about a RuleAttributeAware interface so this can be done generically for all worklfow attribute implementations?)
    2. WorkflowAttribute.isMatch(DocumentContentList) is called with the Rule's extension values passed
  6. If all attributes for the rule match, the rule is fired

See Also:   WorkflowAttributeDefinitionVO
author:
   rkirkend




Method Summary
public  StringgetDocContent()
     Returns a String containing this Attribute's routingData values, formatted as a series of XML tags.
public  List<Row>getRoutingDataRows()
     RoutingDataRows contain Rows describing the UI-level presentation of the ruleData fields used to determine where a given document would be routed according to the associated rule. The getRoutingDataRows method returns a list of rows that contain Fields describing the UI-level presentation of a single RuleExtensionValue for the routing report feature. These rows are used to determine where an eDoc would route if these values were entered.
public  List<RuleExtensionValue>getRuleExtensionValues()
     Returns the List of RuleExtensionValue objects associated with this Rule, each of which contains the name and value of one of the parameters used by this Attribute to control when the associated Rule gets evaluated.
public  List<Row>getRuleRows()
     Each Row contains Fields describing the UI-level presentation of a single RuleExtensionValue.

A single Row may contain more than one actual Field instance, but Fields beyond the first one are there to provide context for the display and evaluation of the first one. The getRuleRows method returns a list of rows that contain Fields describing the UI-level presentation of a single RuleExtensionValue for the creation of a rule. A single row may contain more than one actual Field object, but Fields beyond the first one are there to provide context for the display and evaluation of the first one. For example, a secondary field may be a lookupable or a searchable valid values object.

public  booleanisMatch(DocumentContent docContent, List<RuleExtension> ruleExtensions)
     Returns true if this Attribute finds a match in the given DocContent.
public  booleanisRequired()
     Returns true if the extensionValues on this Attribute must be filled in before the associated Rule can be persisted.
public  voidsetRequired(boolean required)
     Sets the required flag for this Attribute to true.
public  ListvalidateRoutingData(Map paramMap)
     Validates routingData values in the incoming map.
public  ListvalidateRuleData(Map paramMap)
     Validates ruleExtension values in the incoming map.



Method Detail
getDocContent
public String getDocContent()(Code)
Returns a String containing this Attribute's routingData values, formatted as a series of XML tags. The returned tags need not be contained within a single top-level tag.

For example, DollarRangeAttribute returns a single tag containing its totalDollarAmount, thus:

 <totalDollarAmount>345</totalDollarAmount>
 



getRoutingDataRows
public List<Row> getRoutingDataRows()(Code)
RoutingDataRows contain Rows describing the UI-level presentation of the ruleData fields used to determine where a given document would be routed according to the associated rule. The getRoutingDataRows method returns a list of rows that contain Fields describing the UI-level presentation of a single RuleExtensionValue for the routing report feature. These rows are used to determine where an eDoc would route if these values were entered. They are constructed the same way rule rows are described above and a lot of times are identical.



getRuleExtensionValues
public List<RuleExtensionValue> getRuleExtensionValues()(Code)
Returns the List of RuleExtensionValue objects associated with this Rule, each of which contains the name and value of one of the parameters used by this Attribute to control when the associated Rule gets evaluated. RuleExtensionValues are assigned when the Rule is created.

For example, the DollarRangeAttribute has two associated RuleExtensionValues - its minimum and maximum values - which control when a rule containing that attribute gets evaluated.

The UI instantiates a Rule from a RuleTemplate, uses the RuleRows of all of that Rule's Attributes to build a form, uses user input to create a set of RuleExtensionValues which get persisted when the rule is persisted. To create a RuleExtensionValue object, instantiate a new object, set the key which will be located on the Rule's attribute, set the value which will be entered on the form from the UI side, and finally add each RuleExtensionValue object to a list. (Basically, given a configured/initialized attribute, marshalls out the RuleExtensionValues representing the current state of the attribute - Aaron Hamid FIXME)




getRuleRows
public List<Row> getRuleRows()(Code)
Each Row contains Fields describing the UI-level presentation of a single RuleExtensionValue.

A single Row may contain more than one actual Field instance, but Fields beyond the first one are there to provide context for the display and evaluation of the first one. The getRuleRows method returns a list of rows that contain Fields describing the UI-level presentation of a single RuleExtensionValue for the creation of a rule. A single row may contain more than one actual Field object, but Fields beyond the first one are there to provide context for the display and evaluation of the first one. For example, a secondary field may be a lookupable or a searchable valid values object. An individual field consists of a field label, a field help url, a field type, whether a lookupable is associated with this field, a property name, a property value, valid values, the name of the lookupable, and the default lookupable name for this field. The field label is a short title that will display on the jsp describing what data to enter for this field. The field help url is optional, but will pop open in a new window the url entered. The field type is the type of field to display (e.g. hidden, text, drop down, radio, quickfinder (lookupable), lookup result only (this type is needed for the lookupable, but does not actually render on the jsp), and finally drop down refresh (this type is a drop down box that when it's value changes another drop down box's valid values will be changed as well)). The lookupable indicator determines whether this field will have a lookupable (valid value search) associated with it. The property name is the name of the field when rendered on the jsp. This needs to be unique when compared to other field names on the jsp. The property value is the value entered into the text box or other field type on the jsp. This value will be empty when creating the field and populated during form submission. A List of valid values is optional and needed to populate drop down boxes or radio buttons. This list consists of KeyLabelPair objects which the key will be the value passed in on submission and the label will be what is display on the jsp. The lookupable is the name of the lookable service to be called for this field. The default lookupable name is the name of the field on the lookupable itself. This may be the same of the property name of the field. This is needed when field conversions are needed. If the lookupable returns a key that doesn't match a property name on the jsp it needs to be converted to one that does. So if the property name is different than the default lookupable name, the lookupable will convert the return key to the property name of the field. Example: say by default a lookupable returns "color=red" on the url. The default lookupable name would be "color" and if you needed a different name for this property on the jsp such as "wallcolor", the lookupable will now return "wallcolor=red" instead of the default "color=red". The default lookupable name also is the key for rule extension values. When an extension value is saved the value comes from the UI and the key from this field. If this field is left null, then the property name of the field will become the key stored in the database for the extension value. A row can also consist of a group label and number of rows for this label to span for this attribute. If a group label is present, it will display on the rule creation jsp and group together the individual rows for this attribute. The total rows number will rowspan the group label across the rows of this attribute. NOTE: the group label and number of rows to span must be specified on each row object for the display to work correctly.




isMatch
public boolean isMatch(DocumentContent docContent, List<RuleExtension> ruleExtensions)(Code)
Returns true if this Attribute finds a match in the given DocContent. If true, the associated document will be routed to the users specifed by the UNF The isMatch method is responsible for determining whether content in a document matches content saved in workflow, thus determining whether to fire a rule or not. The isMatch method takes a DocumentContent object and a list of rule extension objects and returns a Boolean. The DocumentContent object contains the data in XML format that will be compared with the rules saved in workflow. Rule extension objects come from a potential rule that may match the document content on this eDoc. The potential rule is selected based on the Document Type and Rule Templates associated with this eDoc. Each rule extension object contains a list of rule extension value objects which have the data we will use in key value format to compare to the document content. The key will be determined by a unique string assigned by this attribute. The Value is determined when a rule is created and data is entered for the particular key. If a match is found, this method returns true and the eDoc will be routed based on this rule. If no match is found, the method returns false and the eDoc will not be routed based on this rule.



isRequired
public boolean isRequired()(Code)
Returns true if the extensionValues on this Attribute must be filled in before the associated Rule can be persisted.



setRequired
public void setRequired(boolean required)(Code)
Sets the required flag for this Attribute to true. If required is true, the extensionValues for this Attribute must be filled in before the associated Rule can be persisted. This method sets a flag on whether this attribute is required or not. When a rule template is created, the rule's attribute can be required. This setting is then passed to the attribute by this method and can be used by the validateRuleData or validateRoutingData method as fit.



validateRoutingData
public List validateRoutingData(Map paramMap)(Code)
Validates routingData values in the incoming map. Called by the UI during rule creation. This method is responsible for validating and setting the data entered on the form from the UI of the routing report to the Rule's attribute. The values will be in a Map with the key being the key of the RuleExtensionValue and the value being the value of the data entered from the UI. This method is used for the routing report which may have different fields than the rule data.
Parameters:
  parmaMap - Map containing the names and values of the routing data for this Attribute



validateRuleData
public List validateRuleData(Map paramMap)(Code)
Validates ruleExtension values in the incoming map. Called by the UI during rule creation. This method is responsible for validating and setting the data entered on the form from the UI of the rule creation to the Rule's attribute. The values will be in a Map with the key being the key of the RuleExtensionValue and the value being the value of the data entered from the UI. This method is used for rule creation which may have different fields than the routing report data.
Parameters:
  paramMap - Map containing the names and values of the rule extensions for this Attribute



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