CATRule to Postprocessing Customizations

Using a CATRule, you can specify whether to apply postprocessing to XML output and whether to use an external command to start the postprocessing. In addition, you can specify a directory for your postprocessing output. This rule is called on when you use either Generate Documentation for Operation or Generate Documentation for All Operations from the Instructions Tools section of the action bar.

This page discusses:

General Information

The DELWIDocGen_PostProcessOutput.CATRule is located in ..\resources\knowledge\scripts and can be invoked when you use either Generate Documentation for Operation or Generate Documentation for All Operations from the Instructions Tools section of the action bar.

Input Argument

The output file path generated from the output customizations is the input argument GeneratedOutputFilePath. It is a string.

Output Arguments

You can use the following output arguments:

  • CustomProcessingRequiredBoolean

    The valid values are:

    • false, which requires no custom postprocessing
    • true, which requires custom postprocessing, as determined by the remaining output arguments.

  • The following table provides the arguments:
    Output Argument Value Enables You to Select
    CustomPostProcessingExternalCmdPath ExternalCmdPathStr An external command to use for postprocessing by providing a path to the external command.
    CustomPostProcessingExternalCmdName ExternalCmdNameStr An external command to use for postprocessing by providing the name of the external command.
    CustomPostProcessingExternalCmdArgs ExternalCmdArgsStr Any arguments required for postprocessing, such as translators.
    CustomOutputFilePath CustomOutputFilePathStr The path for the postprocessing output to save.

Example

The example shows a user who has chosen to have postprocessing. Use the TextTransformer.exe command, which is in the C:\Program Files (x86)\ACME directory. The argument used is -pdf, and the custom file path is the same as the generated output path. Although the output files end in -pdf.

let GeneratedOutputFilePathStr(String)
let CustomProcessingRequiredBoolean(Boolean)
let ExternalCmdPathStr(String)
let ExternalCmdNameStr(String)
let ExternalCmdArgsStr(String)
let CustomOutputFilePathStr(String)

GeneratedOutputFilePathStr = Parameters->GetAttributeString("GeneratedOutputFilePath") 	
CustomProcessingRequiredBoolean = true
ExternalCmdPathStr = "C:\Program Files (x86)\ACME\ACMEtransformer.exe"
ExternalCmdNameStr = "ACMEtransformer.exe"
ExternalCmdArgsStr = ExternalCmdArgsStr + "-pdf " + CustomOutputFilePathStr				
ExternalCmdPathStr = "C:\Program Files (x86)\ACME\ACMEtransformer.exe"
CustomOutputFilePathStr = ReplaceSubText(GeneratedOutputFilePathStr,"data.xml","pdf")