Versions Compared

Key

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

...

Request Node Name

ruleTemplate

RequestFirewallChange.eDoc.Request.Node

none

RequestFirewallChange.eDoc.ReviewCurrentConfiguration.Node

RequestFirewallChange.eDoc.ReviewCurrentConfiguration.RuleTemplate

RequestFirewallChange.eDoc.InitialApproval.Node

RequestFirewallChange.eDoc.InitialApproval.RuleTemplate

RequestFirewallChange.eDoc.FinalApproval.Node

RequestFirewallChange.eDoc.FinalApproval.RuleTemplate

RequestFirewallChange.eDoc.AcknowledgeConfiguration.Node

RequestFirewallChange.eDoc.AcknowledgeConfiguration.RuleTemplate

The resulting XML looks like so:

Code Block
titleRequestFirewallChange.eDoc.ChildDocType.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">
<documentTypes xmlns="ns:workflow/DocumentType" xsi:schemaLocation="ns:workflow/DocumentType resource:DocumentType">
	<documentType>
		<name>RequestFirewallChange.eDoc.ChildDocType</name>
		<parent>RequestFirewallChange.eDoc.ParentDocType</parent>
		<description>Request Firewall Change eDocLite Child Document Type</description>
		<label>Request Firewall Change eDocLite Child Document Type</label>
		<postProcessorName>edu.iu.uis.eden.edl.EDocLitePostProcessor</postProcessorName>
		<superUserWorkgroupName>ucd.IET.AppDev.KualiRice.SysAdmin.Workgroup</superUserWorkgroupName>
		<defaultExceptionWorkgroupName>ucd.IET.AppDev.KualiRice.SysAdmin.Workgroup</defaultExceptionWorkgroupName>
		<docHandler>${workflow.url}/EDocLite</docHandler>
		<active>true</active>
		<routingVersion>2</routingVersion>
		<routePaths>
			<routePath>
          			<start name="RequestFirewallChange.eDoc.Request.Node" nextNode="RequestFirewallChange.eDoc.ReviewCurrentConfiguration.Node" />
		          	<requests name="RequestFirewallChange.eDoc.ReviewCurrentConfiguration.Node" nextNode="RequestFirewallChange.eDoc.InitialApproval.Node" />
				<requests name="RequestFirewallChange.eDoc.InitialApproval.Node" nextNode="RequestFirewallChange.eDoc.FinalApproval.Node" />
				<requests name="RequestFirewallChange.eDoc.FinalApproval.Node" nextNode="RequestFirewallChange.eDoc.AcknowledgeConfiguration.Node" />
				<requests name="RequestFirewallChange.eDoc.AcknowledgeConfiguration.Node" />
        	      </routePath>
		</routePaths>
	      <routeNodes>
			<start name="RequestFirewallChange.eDoc.Request.Node">
				<activationType>P</activationType>
			</start>
			<requests name="RequestFirewallChange.eDoc.ReviewCurrentConfiguration.Node">
				<activationType>P</activationType>
				<ruleTemplate>RequestFirewallChange.eDoc.ReviewCurrentConfiguration.RuleTemplate</ruleTemplate>
			</requests>
			<requests name="RequestFirewallChange.eDoc.InitialApproval.Node">
				<activationType>P</activationType>
				<ruleTemplate>RequestFirewallChange.eDoc.InitialApproval.RuleTemplate</ruleTemplate>
			</requests>
			<requests name="RequestFirewallChange.eDoc.FinalApproval.Node">
				<activationType>P</activationType>
				<ruleTemplate>RequestFirewallChange.eDoc.FinalApproval.RuleTemplate</ruleTemplate>
			</requests>		
			<requests name="RequestFirewallChange.eDoc.AcknowledgeConfiguration.Node">
				<activationType>S</activationType>
				<ruleTemplate>RequestFirewallChange.eDoc.AcknowledgeConfiguration.RuleTemplate</ruleTemplate>
				<mandatoryRoute>false</mandatoryRoute>
				<finalApproval>false</finalApproval>
			</requests>
		</routeNodes>
	</documentType>
</documentTypes>
</data>

Create the eDocLite Form

We now build the data entry form First, we build a table documenting the fieldDefs (field definitions) based on the request details required by our process.

Field Name

Title

Type

Rule Attribute

Validation Rule(s)

dateOfChange

Date of Change

text

none

  1. required
  2. format: MM/DD/YYYY

descriptionOfChange

Description of the Port Change

text area

none

required

isUrgent

URGENT

select

RequestFirewallChange.eDoc.isUrgent.RuleAttribute

required

ingressEgressCharacteristic

text area

Ingress/Egress Characteristic

none

required

sourceSpecification

Source Specification

text

none

required

destinationSpecification

Destination Specification

text

none

required

termOfRuleChange

Term of Rule Change (indefinite or otherwise)

text

none

required

relatedProject

Project Related to Requested Rule(s) Change

text

none

required

Now we build the data entry form:

  1. The eDocLite Form Skeleton
    The Form Skeleton is the structure of the entire eDocLite form minus the Form Definition and Form Stylesheet. We separate this out so that you can use it as a base template for all of your eDocLite forms. This particular skeleton follows the scheme of the out-of-the-box Kuali Rice forms. The scheme uses the same look and feel and makes calls to the eDocLite widgets on the Kuali Rice server.
    Code Block
    titleRequestFirewallChange.eDoc.Form.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">
    <edoclite xmlns="ns:workflow/EDocLite" xsi:schemaLocation="ns:workflow/EDocLite resource:EDocLite">
      
    	<edl name="RequestFirewallChange.eDoc.Form" title="Request Firewall Change">
    		<security />
    		<createInstructions>** Fields with an asterisk are required.</createInstructions>
    		<instructions>** Fields with an asterisk are required.</instructions>
    		<validations />
    		<attributes />
    	        ...
    	        ...
    	</edl>
    
    	<style name="RequestFirewallChange.eDoc.Style">
    	<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:my-class="xalan://edu.iu.uis.eden.edl.WorkflowFunctions" version="1.0">
    		<xsl:include href="widgets" />
    		<xsl:output indent="yes" method="html" omit-xml-declaration="yes" version="4.01" />
    		<xsl:variable name="actionable" select="/documentContent/documentState/actionable" />
    		<xsl:variable name="docHeaderId" select="/documentContent/documentState/docId" />
    		<xsl:variable name="editable" select="/documentContent/documentState/editable" />
    		<xsl:variable name="globalReadOnly" select="/documentContent/documentState/editable != 'true'" />
    		<xsl:variable name="docStatus" select="//documentState/workflowDocumentState/status" />
    		<xsl:variable name="isAtNodeInitiated" select="my-class:isAtNode($docHeaderId, 'Initiated')" />
    		<xsl:variable name="isPastInitiated" select="my-class:isNodeInPreviousNodeList('Initiated', $docHeaderId)" />
    		<xsl:variable name="isUserInitiator" select="my-class:isUserInitiator($docHeaderId)" />
    		<xsl:param name="overrideMain" select="'true'" />
            
    		<xsl:template name="mainForm">
    			<html xmlns="">
    			  <head>
    			  <script language="javascript" />
    			  <xsl:call-template name="htmlHead" />
    			  </head>
      			<body onload="onPageLoad()">
    			  <xsl:call-template name="errors" />
    			  <xsl:call-template name="header" />
    			  <xsl:call-template name="instructions" />
    		  	  <xsl:variable name="formTarget" select="'EDocLite'" />
    		          <form action="{$formTarget}" enctype="multipart/form-data" id="edoclite" method="post" onsubmit="return validateOnSubmit(this)">
    		  	    <xsl:call-template name="hidden-params" />
    		  	    <xsl:call-template name="mainBody" />
    		  	    <xsl:call-template name="notes" />
    		  	    <br />
    		  	    <xsl:call-template name="buttons" />
    		  	    <br />
    		  	  </form>
                              <xsl:call-template name="footer" />
        		  	</body>
        		       </html>
    		</xsl:template>
    
    		<xsl:template name="mainBody">
    			...
    			...
     		</xsl:template>
    
      		<xsl:template name="nbsp">
    			<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
    		</xsl:template>
    	</xsl:stylesheet>
    	</style>
    
    	<association>
    		<docType>RequestFirewallChange.eDoc.ChildDocType</docType>
    		<definition>RequestFirewallChange.eDoc.Form</definition>
    		<style>RequestFirewallChange.eDoc.Style</style>
        		<active>true</active>
      	</association>
    
    </edoclite>
    </data>
    

  2. Form Definition
    The Form Definition defines the data entry fields on the form. Our definitions define field display characteristics and field validations. Place your form definition between the <edl> and </edl> tags in the Form Skeleton.
    Code Block
    titleRequestFirewallChange.eDoc.Form.xml
        <fieldDef name="dateOfChange" title="Date and Time for Change">
          <display>
            <type>text</type>
          </display>
          <validation required="true">
            <regex>^[0-1]?[0-9](/|-)[0-3]?[0-9](/|-)[1-2][0-9][0-9][0-9]$</regex>
            <message>Enter a valid date in the format mm/dd/yyyy.</message>
          </validation>
        </fieldDef>
    
        <fieldDef name="descriptionOfChange" title="Description of the Port Change">
          <display>
            <type>textarea</type>
            <meta>
              <name>rows</name>
              <value>5</value>
            </meta>
            <meta>
              <name>cols</name>
              <value>60</value>
            </meta>
            <meta>
              <name>wrap</name>
              <value>hard</value>
            </meta>
          </display>
          <validation required="true">
            <message>Enter a description of the port change.</message>
          </validation>
        </fieldDef>
    
        <fieldDef attributeName="RequestFirewallChange.eDoc.isUrgent.RuleAttribute" name="isUrgent" title="URGENT">
          <display>
            <type>select</type>
              <values title="NO">NO</values>
              <values title="YES">YES</values>
          </display>
          <validation required="true">
              <message>Is this request URGENT?</message>
          </validation>
        </fieldDef>
    
        <fieldDef name="ingressEgressCharacteristic" title="Ingress/Egress Characteristic">
          <display>
            <type>textarea</type>
            <meta>
              <name>rows</name>
              <value>5</value>
            </meta>
            <meta>
              <name>cols</name>
              <value>60</value>
            </meta>
            <meta>
              <name>wrap</name>
              <value>hard</value>
            </meta>
          </display>
          <validation required="true">
            <message>Enter the ingress/egress characteristic.</message>
          </validation>
        </fieldDef>
    
        <fieldDef name="destinationSourceSpecification" title="Destination/Source Specification">
          <display>
            <type>textarea</type>
            <meta>
              <name>rows</name>
              <value>5</value>
            </meta>
            <meta>
              <name>cols</name>
              <value>60</value>
            </meta>
            <meta>
              <name>wrap</name>
              <value>hard</value>
            </meta>
          </display>
          <validation required="true">
            <message>Enter the destination/source specification.</message>
          </validation>
        </fieldDef>
    
        <fieldDef name="termOfRuleChange" title="Term of Rule Change (indefinite or otherwise)">
          <display>
            <type>text</type>
            <meta>
              <name>size</name>
              <value>50</value>
            </meta>
          </display>
          <validation required="true">
            <message>Enter term of the rule change.</message>
          </validation>
        </fieldDef>
    
        <fieldDef name="relatedProject" title="Project Related to Requested Rule(s) Change">
          <display>
            <type>text</type>
            <meta>
              <name>size</name>
              <value>50</value>
            </meta>
          </display>
          <validation required="true">
            <message>Enter a related project to the requested rule change.</message>
          </validation>
        </fieldDef>
    

  3. Form Stylesheet
    The Form Stylesheet defines the layout of the form and renders the fields from our Form Definition onto the form. Our layout is an HTML table with a row for each field. In this case, we are customizing the mainBody piece of the stylesheet. In general, place your form stylesheet between the <style> and </style> tags in the Form Skeleton.
    Code Block
    titleRequestFirewallChange.eDoc.Form.xml
      <xsl:template name="mainBody">
        <table xmlns="" align="center" border="0" cellpadding="0" cellspacing="0" class="bord-r-t" width="80%">
          <tr>
            <td align="left" border="3" class="thnormal" colspan="1">
              <br />
              <h3>
                University of California, Davis
                <br />
                eDoclite Tutorial
    	  </h3>
              <br />
            </td>
            <td align="center" border="3" class="thnormal" colspan="2">
              <br />
              <h2>Request Firewall Change Form</h2>
            </td>
          </tr>
          <tr>
            <td class="headercell5" colspan="100%">
            <b>Request Details</b>
            </td>
          </tr>
          <tr>
            <td class="thnormal">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'dateOfChange'" />
                <xsl:with-param name="renderCmd" select="'title'" />
              </xsl:call-template>
              <font color="#ff0000">*</font>
            </td>
            <td class="datacell">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'dateOfChange'" />
                <xsl:with-param name="renderCmd" select="'input'" />
                <xsl:with-param name="readOnly" select="$isPastInitiated" />
              </xsl:call-template>
            </td>
          </tr>
          <tr>
            <td class="thnormal">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'descriptionOfChange'" />
                <xsl:with-param name="renderCmd" select="'title'" />
              </xsl:call-template>
              <font color="#ff0000">*</font>
            </td>
            <td class="datacell">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'descriptionOfChange'" />
                <xsl:with-param name="renderCmd" select="'input'" />
                <xsl:with-param name="readOnly" select="$isPastInitiated" />
              </xsl:call-template>
            </td>
          </tr>
          <tr>
            <td class="thnormal">
              <xsl:call-template name="widget_render">
              <xsl:with-param name="fieldName" select="'isUrgent'" />
              <xsl:with-param name="renderCmd" select="'title'" />
              </xsl:call-template>
              <font color="#ff0000">*</font>
            </td>
            <td class="datacell">
              <xsl:call-template name="widget_render">
              <xsl:with-param name="fieldName" select="'isURgent'" />
              <xsl:with-param name="renderCmd" select="'input'" />
              <xsl:with-param name="readOnly" select="$isPastInitiated" />
              </xsl:call-template>
            </td>
          </tr>
          <tr>
            <td class="thnormal">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'ingressEgressCharacteristic'" />
                <xsl:with-param name="renderCmd" select="'title'" />
              </xsl:call-template>
              <font color="#ff0000">*</font>
            </td>
            <td class="datacell">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'ingressEgressCharacteristic'" />
                <xsl:with-param name="renderCmd" select="'input'" />
                <xsl:with-param name="readOnly" select="$isPastInitiated" />
              </xsl:call-template>
            </td>
          </tr>
          <tr>
            <td class="thnormal">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'destinationSourceSpecification'" />
                <xsl:with-param name="renderCmd" select="'title'" />
    
              </xsl:call-template>
              <font color="#ff0000">*</font>
            </td>
            <td class="datacell">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'destinationSourceSpecification'" />
                <xsl:with-param name="renderCmd" select="'input'" />
                <xsl:with-param name="readOnly" select="$isPastInitiated" />
    
              </xsl:call-template>
            </td>
          </tr>
          <tr>
            <td class="thnormal">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'termOfRuleChange'" />
                <xsl:with-param name="renderCmd" select="'title'" />
              </xsl:call-template>
              <font color="#ff0000">*</font>
    
            </td>
            <td class="datacell">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'termOfRuleChange'" />
                <xsl:with-param name="renderCmd" select="'input'" />
                <xsl:with-param name="readOnly" select="$isPastInitiated" />
              </xsl:call-template>
            </td>
          </tr>
          <tr>
            <td class="thnormal">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'relatedProject'" />
                <xsl:with-param name="renderCmd" select="'title'" />
              </xsl:call-template>
              <font color="#ff0000">*</font>
            </td>
            <td class="datacell">
              <xsl:call-template name="widget_render">
                <xsl:with-param name="fieldName" select="'relatedProject'" />
                <xsl:with-param name="renderCmd" select="'input'" />
                <xsl:with-param name="readOnly" select="$isPastInitiated" />
              </xsl:call-template>
            </td>
          </tr>
        </table>
        <br xmlns="" />
    <xsl:template>
    

...