Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Create the Parent Document Type

Here we create a parent document type Parent Document Type that defines the behavior of all Request Firewall Change documents. This particular parent document type defines everything short of routing paths. The idea is to allow for a hierarchy of child document types that inherit attributes of their parents.

...

Create the Child Document Type

Here we create a child document type Child Document Type that identifies the route path and route nodes based on our workflow diagram.

...

Here we create a Rule Attribute that is associated with the isUrgent field in the form. Lcollection of rule attributes.

Code Block
titleRequestFirewallChange.eDoc.RuleAttributes.xml
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="ns:workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ns:workflow resource:WorkflowData">
<ruleAttributes xmlns="ns:workflow/RuleAttribute" xsi:schemaLocation="ns:workflow/RuleAttribute resource:RuleAttribute">
	<ruleAttribute>
      	<name>RequestFirewallChange.eDoc.isUrgent.RuleAttribute</name>
	      <className>edu.iu.uis.eden.routetemplate.xmlrouting.StandardGenericXMLRuleAttribute</className>
      	<label>Request Firewall Change Is Urgent Rule Attribute</label>
	      <description>Request Firewall Change Is Urgent Rule Attribute</description>
      	<type>RuleXmlAttribute</type>

      	<routingConfig>
        		<fieldDef name="isUrgent" title="URGENT" workflowType="ALL">
	          		<display>
            			<type>select</type>
            			<values title="NO">NO</values>
            			<values title="YES">YES</values>
             		</display>
          			<validation required="true" />
          			<fieldEvaluation>
            			<xpathexpression>//isUrgent = wf:ruledata('isUrgent')</xpathexpression>
          			</fieldEvaluation>
       		</fieldDef>
        		<xmlDocumentContent>
          			<isUrgent>%isUrgent%</isUrgent>
        		</xmlDocumentContent>
      	</routingConfig>
    </ruleAttribute>
</ruleAttributes>

</data>

...

Here we create several Rule Templates that are applied to each route node.

First we document each ruleTemplate and any associated attributes:

Rule Template

Description

Attribute(s)

RequestFirewallChange.eDoc.ReviewCurrentConfiguration.RuleTemplate

Review Current Configuration RuleTemplate

none

RequestFirewallChange.eDoc.InitialApproval.RuleTemplate

Initial Approval RuleTemplate

RequestFirewallChange.eDoc.isUrgent.RuleAttribute

RequestFirewallChange.eDoc.FinalApproval.RuleTemplate

Final Approval RuleTemplate

RequestFirewallChange.eDoc.isUrgent.RuleAttribute

RequestFirewallChange.eDoc.AcknowledgeConfiguration.RuleTemplate

Acknowledge Configuration RuleTemplate

Initiator.Role.RuleAttribute
|

Code Block
titleRequestFirewallChange.eDoc.RuleTemplates.xml
<?xml version="1.0" encoding="UTF-8"?>
<data xmlns="ns:workflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="ns:workflow resource:WorkflowData">
<ruleTemplates xmlns="ns:workflow/RuleTemplate" xsi:schemaLocation="ns:workflow/RuleTemplate resource:RuleTemplate">
	<ruleTemplate allowOverwrite="true"><ruleTemplate>
      		<name>RequestFirewallChange.eDoc.ReviewCurrentConfiguration.RuleTemplate</name>
      		<description>Review Current Configuration RuleTemplate</description>
	</ruleTemplate>
	<ruleTemplate allowOverwrite="true"><ruleTemplate>
       		<name>RequestFirewallChange.eDoc.InitialApproval.RuleTemplate</name>
      		<description>Initial Approval RuleTemplate</description>
      		<attributes>
        			<attribute>
          				<name>RequestFirewallChange.eDoc.isUrgent.RuleAttribute</name>
          				<required>true</required>
        			</attribute>
      		</attributes>
	</ruleTemplate>
	<ruleTemplate allowOverwrite="true"><ruleTemplate>
      		<name>RequestFirewallChange.eDoc.FinalApproval.RuleTemplate</name>
      		<description>Final Approval RuleTemplate</description>
      		<attributes>
        			<attribute>
          				<name>RequestFirewallChange.eDoc.isUrgent.RuleAttribute</name>
          				<required>true</required>
        			</attribute>
      		</attributes>
	</ruleTemplate>
	<ruleTemplate allowOverwrite="true"><ruleTemplate>
       		<name>RequestFirewallChange.eDoc.AcknowledgeConfiguration.RuleTemplate</name>
      		<description>AcknowledgeConfiguration<description>Acknowledge Configuration RuleTemplate</description> 
			<attributes>
				<attribute>
					<name>Initiator.Role.RuleAttribute</name>
					<required>true</required>
				</attribute>
			</attributes>
	</ruleTemplate>
</ruleTemplates>
</data>

...