Basic Customization > Windchill Customization Basics > Deployment Methodologies > Using the Code and Configuration Deployment (CCD) Utility > Use Case 1: Customizing and Loading Workflow Templates
  
Use Case 1: Customizing and Loading Workflow Templates
1. Consider that the following folder structure is of a CCD Module that consists of a single workflow template.
|
\---main
\---loadFiles
\---custom
|customLoadSet.xml
|
\---workflowTemplate
CustomOneLevelRouting_WF.xml
CustomOneLevelRouting_WF.zip
2. To transport a new or updated workflow template, preparation of an XML load file is required. This load file should be included in a loadFileSet. You must reference that loadFileSet as a <loadFileSet> tag in your deploy.xml.
Following is an example of deploy.xml:
<module>
<loadFileSet>custom/customLoadSet.xml</loadFileSet>
</module>
3. In the descriptor.xml file provide a name for the workflow template.
Following is an example of descriptor.xml :
<module>
<name>WorkflowTemplatePkg</name>
</module>
4. The customLoadSet.xml file should include <loadFile> tags for each of the load files in your module.
Following is an example of customLoadSet.xml :
<?xml version-"1.0"?>
<!-- Xml.UUID=f89506ef-57d5-402a-ab24-053cafced09f -->
<!DOCTYPE loadFileList SYSTEM "/wt/load/windchillLoad.dtd">
<!--
List of files to load in order for Windchill PDMLink demo data.
File formats should follow the format as outlined in the
windchillLoad.dtd At a very minimum the filename
and title should be declared.
-->
<loadFileList>
<loadFile filename="custom/workflowTemplate/CustomOneLevelRouting_WF.xml">
</loadFile>
</loadFileList>
5. Export the custom workflow template. For more information, see Exporting Workflow Templates.
* 
The export format must be a .zip file.
6. Create a loader. For more information, see How to load an exported zip file via LoadFromFile utility in Windchill PDMLink 10.2.
7. In the Windchill shell, execute the following,
ant load.data
The updated workflow template is loaded into the system.
8. Extract the workflow template xml.
Place your custom workflow template (XML) at the loadFile file location. For example,
custom/workflowTemplate/CustomOneLevelRouting_WF.xml
If the workflow template has externalized expressions then you must copy the java file to <rootDir>\<moduleName>\main\src\ext\wt\workflow\externalize\WorkflowExpression.java
Following is an example of WorkflowExpression.java :
package wt.workflow.externalize;
public class WorkflowExpression {
public static Object[]
wfAssignedActivityTemplate_189837_START(java.lang.Boolean result) throws Exception {
Object[] wfAutoExternResult = {result};
return wfAutoExternResult;
}//wfAssignedActivityTemplate_189837_START - TRANSITION : null
}