Adding Custom File Layer Types

System Administrators can add custom file layer types to supplement the supplied file layer types (ZIP, GZIP, PGP, Text, and Unknown).

Before you begin

This procedure is for advanced users with a knowledge of XAPIs and APIs.

About this task

The following procedure creates some example file layers to demonstrate the process. The specific XML will be different when you create different custom file layers. To create the example custom file layers:

Procedure

  1. Create a business process named FileGatewayCustomLayerXAPI with the following BPML:
    <process name="FileGatewayCustomLayerXAPI">
     <!--
     This business process can be used to manage File 
     Gateway Custom Layers.
    -->
     <sequence name="Begin Process">
      <operation name="XAPIServiceType">
       <participant name="XAPIService"/>
       <output message="XAPIServiceTypeInputMessage">
         <assign to="api">multiApi</assign>
         <assign to="." from="*"></assign>
       </output>
       <input message="inmsg">
         <assign to="." from="*"></assign>
       </input>
      </operation>
     </sequence>
    </process>
    
  2. Using a text editor, create a file named CreateCustomLayersSampleBPInput_EX.xml. Copy and paste the following contents into the XML file, removing any page breaks:
    <MultiApi>
     <API Name="manageFgProducerFileLayerType">
     <!-- This API affects the first Producer File Layer Type 
       and the Parameter types associated with it. See the 
       FG_P_FLR_TYPE, FG_P_FLR_PRM_TYPE, and FG_P_FLR_TRANS
       table information below.  -->  
       <Input>
       <FgProducerFileLayerType ContainsName="N" 
        Description="EX Prod Container" 
        DisplayLabel="EX Prod Container " IsContainer="Y" 
        LayerType="FGC_EXPCON" Lockid="0" 
        ProducerFileLayerTypeKey="EXPCON_GUID">
       <FgProducerFileLayerParameterTypeList
        TotalNumberOfRecords="3">
       <FgProducerFileLayerParameterType DefaultValue=".+" 
        Description="File name pattern as regular expression" 
        DisplayLabel="File name pattern" 
        DisplayType="String" Ordinal="0" 
        ParameterName="FILENAME_PATTERN" 
        ProducerFileLayerParameterTypeKey="EXPCON_P1_GUID" 
        ProducerFileLayerTypeKey="EXPCON_GUID" />
       <FgProducerFileLayerParameterType Description=
        "File name pattern group fact names, comma delimited" 
         DisplayLabel="File name pattern fact names" 
         DisplayType="String" Ordinal="1" 
         ParameterName="FILENAME_PATTERN_FACTNAMES" 
         ProducerFileLayerParameterTypeKey="EXPCON_P2_GUID" 
         ProducerFileLayerTypeKey="EXPCON_GUID" />
        <FgProducerFileLayerParameterType 
         Description="Spin value for encryption" 
         DisplayLabel="Spin" 
         DisplayType="String" Ordinal="2" 
         ParameterName="EncryptionSpin" 
         ProducerFileLayerParameterTypeKey="EXPCON_P3_GUID" 
         ProducerFileLayerTypeKey="EXPCON_GUID" />
        </FgProducerFileLayerParameterTypeList>
       </FgProducerFileLayerType>
      </Input>
     </API>
    <API Name="manageFgProducerFileLayerType">
    <!-- This API affects the second Producer File Layer Type 
       and the Parameter types associated with it. See the 
       FG_P_FLR_TYPE, FG_P_FLR_PRM_TYPE, and FG_P_FLR_TRANS
       table information below. -->  
        <Input>
          <FgProducerFileLayerType ContainsName="N" 
           Description="EX Prod Non Container" 
           DisplayLabel="EX Prod Non Container" 
           IsContainer="N" LayerType="FGC_EXPNCN" 
           ProducerFileLayerTypeKey="EXPNCON_GUID">
          <FgProducerFileLayerParameterTypeList 
           TotalNumberOfRecords="2">
          <FgProducerFileLayerParameterType 
           DefaultValue=".+" 
           Description="File name pattern as regular expression" 
           DisplayLabel="File name pattern" 
           DisplayType="String" Ordinal="0" 
           ParameterName="FILENAME_PATTERN" 
           ProducerFileLayerParameterTypeKey="EXPNCON_P1_GUID" 
           ProducerFileLayerTypeKey="EXPNCON_GUID" />
          <FgProducerFileLayerParameterType 
           Description="File name pattern group fact names, 
            comma delimited" 
           DisplayLabel="File name pattern fact names" 
           DisplayType="String" Ordinal="1" 
           ParameterName="FILENAME_PATTERN_FACTNAMES" 
           ProducerFileLayerParameterTypeKey="EXPNCON_P2_GUID" 
           ProducerFileLayerTypeKey="EXPNCON_GUID" />
          </FgProducerFileLayerParameterTypeList>
         </FgProducerFileLayerType>
       </Input>
     </API>
    <API Name="manageFgConsumerFileLayerType">
    		<!-- This API affects the first Consumer File Layer Type 
       (container type) and the Parameter types associated with 
     it. See the FG_C_FLR_TYPE, FG_C_FLR_PRM_TYPE, 
     and FG_C_FLR_TRANS
      table information below.  -->  
        <Input>
          <FgConsumerFileLayerType 
           ConsumerFileLayerTypeKey="EXCCON_GUID" 
           Description="EX Con Container" 
           DisplayLabel="EX Con Container" 
           IsContainer="Y" LayerType="FGC_EXCCON">
          <FgConsumerFileLayerParameterTypeList 
           TotalNumberOfRecords="2">
          <FgConsumerFileLayerParameterType 
           ConsumerFileLayerParameterTypeKey="EXCCON_P1_GUID" 
           ConsumerFileLayerTypeKey="EXCCON_GUID" 
           DefaultValue="${ProducerFilename}" 
           Description="File name format" 
           DisplayLabel="File name format" 
           DisplayType="String" Ordinal="0" 
           ParameterName="FILENAME_FORMAT" /> 
    <!-- File name format is a required parameter.--> 
    
          <FgConsumerFileLayerParameterType 
           ConsumerFileLayerParameterTypeKey="EXCCON_P2_GUID" 
           ConsumerFileLayerTypeKey="EXCCON_GUID" 
           DefaultValue="3" Description="Encryption Charm" 
           DisplayLabel="Encryption Charm" 
           DisplayType="String" Ordinal="1" 
           ParameterName="EncryptionCharm" />
          </FgConsumerFileLayerParameterTypeList>
         </FgConsumerFileLayerType>
       </Input>
     </API>
    <API Name="manageFgConsumerFileLayerType">
    <!-- This API affects the second Consumer File Layer Type 
       (non-container type) and the Parameter types associated 
       with it. See the FG_C_FLR_TYPE, FG_C_FLR_PRM_TYPE, and 
       FG_C_FLR_TRANS table information below. 
     -->  
        <Input>
          <FgConsumerFileLayerType 
           ConsumerFileLayerTypeKey="EXCNCN_GUID" 
           Description="EX Con Non-Container" 
           DisplayLabel="EX Con Non-Container" 
           IsContainer="N" LayerType="FGC_EXCNCN">
          <FgConsumerFileLayerParameterTypeList 
            TotalNumberOfRecords="1">
          <FgConsumerFileLayerParameterType 
           ConsumerFileLayerParameterTypeKey="EXCNCON_P1_GUID" 
           ConsumerFileLayerTypeKey="EXCNCN_GUID" 
           DefaultValue="${ProducerFilename}" 
           Description="File name format" 
           DisplayLabel="File name format" 
           DisplayType="String" Ordinal="0" 
           ParameterName="FILENAME_FORMAT" /> 
    <!-- File name format is a required parameter.--> 
    
          </FgConsumerFileLayerParameterTypeList>
         </FgConsumerFileLayerType>
       </Input>
     </API>
    <API Name="manageFgConsumerFileLayerTranslation">
        <Input>
          <FgConsumerFileLayerTranslation 
           BusinessProcessName="CustomBP3" 
           ConsumerFileLayerTranslationKey=
            "EXCTRAN1_GUID" 
           ConsumerFileLayerTypeKey="EXCCON_GUID" 
           ProducerFileLayerTypeKey="EXPNCON_GUID" />
       </Input>
     </API>
    <API Name="manageFgConsumerFileLayerTranslation">
        <Input>
          <FgConsumerFileLayerTranslation 
           BusinessProcessName="CustomBP1" 
           ConsumerFileLayerTranslationKey=
            "EXCTRAN2_GUID" 
           ConsumerFileLayerTypeKey="EXCCON_GUID" 
           ProducerFileLayerTypeKey="" />
        </Input>
     </API>
    <API Name="manageFgProducerFileLayerTranslation">
        <Input>
          <FgProducerFileLayerTranslation 
           BusinessProcessName="CustomBP2" 
           ProducerFileLayerTypeKey="EXPCON_GUID" 
           ProducerFileLayerTranslationKey="EXPTRAN1_GUID" />
        </Input>
      </API>
    </MultiApi>
    
  3. Execute the FileGatewayCustomLayerXAPI business process, specifying CreateCustomLayersSampleBPInput_EX.xml you created in step 2 as the primary document.
  4. Restart Sterling File Gateway.
  5. Create an routing channel template using the custom layer types. In the example XML, the following layers are used:
    • EX Prod Container - outer layer for producer
    • EX Prod Non Container - inner layer for producer
    • EX Con Container - outer layer for consumer
    • EX Con Non-Container - inner layer for consumer
    Tip: The parameters for the custom layers can include custom parameters. You can create up to eight custom parameters for each custom layer.
  6. Now that you have completed the example, you can modify the XML file to create custom file layer types to meet your needs. For practice, substitute each occurrence of EX with your unique characters (represented in the steps as xx), or substituting any descriptive terms. For each one, specify the following parameters:
    Parameter Description
    Description Descriptive string for the layer type. For a parameter, the value of Description is displayed in the UI.
    DisplayLabel Descriptive string displayed in the drop down box while creating layers. For a Layer, the value under “DisplayLabel” is displayed in the UI.
    IsContainer Y or N
    LayerType String
    ProducerFileLayertypeKey A unique value
  7. Substitute business processes that you write to translate one file type for another for the following business processes in the XML file:
    • CustomBP1 - If creating XX Con Container, substitute the business process you want to use for translation for CustomBP1.
    • CustomBP2 - If creating XX Prod Container, substitute the business process you want to use for translation for CustomBP2.
    • CustomBP3 - If creating XX Prod Non Container and XX Con Non Container, substitute the business process you want to use for translation for CustomBP3.
  8. Save the XML file as CreateCustomLayersSampleBPInput_xx.xml.
  9. Execute the FileGatewayCustomLayerXAPI business process, specifying CreateCustomLayersSampleBPInput_xx.xml as the primary document.
  10. Restart Sterling File Gateway.
  11. Create an RCT using the custom layer types you need. In the example XML, the following layers are used:
    • xx Prod Container - outer layer for producer
    • xx Prod Non Container - inner layer for producer
    • xx Con Container - outer layer for consumer
    • xx Con Non-Container - inner layer for consumer

Results

The parameters for some of the custom layers include custom parameters with the changes you made to the labels.

What to do next

Restriction: You cannot export custom file layer types from one system and import the custom file layer types to another system. You must create any custom file layer types you require in each system separately.