Aras Innovator Platform

Deploying the Example Converter DLL

Once the converter is ready to use, it needs to be included in the Conversion Server setup. This section describes the steps to take when creating a new Conversion Rule using the Microsoft Word 2016 example.

  1. On the Conversion Server, open the ConversionServerConfig.xml in a text editor.
  2. Within the existing configSections tags at the top of the ConversionServerConfig.xml, there is a section group defined for settings that are unique to each Converter.
  3. Add the following tag:

    <configSections>
     <sectionGroup name="ConverterSettings">
    <section name="MyWordConverter” type="MyWordConverter.Configuration.MyWordConverterConfig"></section>
     </sectionGroup>
    </configSections>
  4. Within the Converters tag, add a Converter tag for the new converter.
  5. This tag specifies the DLL for the Converter as well as what Class within the DLL performs the conversion: <ConversionServer><Converters><Converter name="MyWordConvertertype="MyWordConverter.MyWordConverter, MyWordConverter” /></Converters></ConversionServer> The attributes of the tag are as follows:

    • Name: Name of the Converter. This value must match the ‘Conversion Type’ Item’s name.
    • Type: The text before the comma refers to the Class that is defined within the Converter DLL that performs the conversion.
    • The text after the comma refers to the name of the converter’s DLL in the ‘ConversionServer\bin\’ folder.

      Note
      Set the ‘url’ attribute of the ‘InnovatorServer’ tag to the ‘InnovatorServer.aspx’ page of the Aras Innovator URL that uses this Conversion Server.

  6. Within the existing ConverterSettings tags, add a tag for the new converter. The tag must match the name configured in step 2.
    1. Set the pdfSuffix to some string that you wish to add to the end of the generated PDF file name.
    2. <ConverterSettings>
      <MyWordConverter>
      <Settings pdfSuffix="_X” />
      </MyWordConverter>
      </ConverterSettings>
  7. All “type” attributes in both the “section” tag and “Converter” tag must contain the assembly name (“Conversion.Base” for ConversionServer, “ArasCadConverter” for cad converter etc).
  8. <?xml version="1.0" encoding="utf-8"?>
    <configuration>
     <configSections>
     <!-- Common converter service configuration -->
     <section name="ConversionServer” type="Aras.ConversionFramework.ConversionServer.Configuration.ConversionServerConfigurationSection, Conversion.Base"/>
     <sectionGroup name="ConverterSettings">
     <section name="ArasCadConverter” type="Aras.ConversionFramework.Converter.Hoops.Configuration.HoopsConverterConfiguration, ArasCadConverter">
     </section>
     <!-- … -->
     </sectionGroup>
     </configSections>
     <ConversionServer>
     <InnovatorServer url="http://some_url/some_instance/Server/InnovatorServer.aspx"/>
     <Converters>
     <Converter name="Aras CAD to PDF Converter” type="Aras.ConversionFramework.Converter.Hoops.HoopsConverter, ArasCadConverter” />
     </Converters>
     <!-- … -->
     </ConversionServer>
     <ConverterSettings>
     <!-- … -->
     </ConverterSettings>
    </configuration>
  9. Save and close the ‘ConversionServerConfig.xml
  1. Log on to Aras Innovator as an administrator.
  2. Go to Administration --> File Handling --> Conversion Types.
  3. Add a new ‘Conversion Type’ with the name equal to the name that is set in the web.config (Step 2. in section 4.1) ‘MyWordConverter’.
  4. Click

    and

    to save, unclaim, and close the Conversion Type.

  5. Go to Administration --> File Handling --> Conversion Servers.
  6. Open the Default ‘Conversion Server’ Item for editing.
  7. Under the ‘Converters’ relationship tab, add the newly created ‘Conversion Type’ Item.
  8. Click

    and

    to save, unclaim, and close the ‘Conversion Server’.

  9. Go to Administration --> File Handling --> Conversion Rules.
  10. Create a new ‘Conversion Rule’ and configure the following:
    1. Name: MyWordConverter
    2. Conversion Type: Search for and return ‘MyWordConverter’
    3. Description: Converts doc and docx files to PDF
    4. Timeout: 60 (set in minutes)
    5. Number of minutes after which the actual converting of the physical file is considered as hung and the conversion task is marked as failed. In other words, this is the time allowed to the OnConvert event handler to return a result; suggested default is 60 minutes.

    6. Delay: 5 (set in minutes)
    7. The delay in minutes after which a failed task can be rerun; suggested default is 5 minutes.

    8. Cutoff: 24 (set in hours)
    9. The number of hours that is given to a failed conversion to finish successfully; If in cutoff hours after the event handler was first tried it still has status Failed, the conversion task is marked as failed and removed from processing by the framework. The suggested default value is 24.

    10. Enabled: 1 (Checked to enable the rule)
    11. Relationship Tabs:
    12. FileTypes: Add all ‘File Type’ Items (file extensions) that trigger the Conversion Rule: If desired, you can create multiple ‘Conversion Rule’ Items for the same ‘Conversion Type’ to handle different FileTypes uniquely.

      Rule Events: none (Methods placed ‘onTaskCreating’) Methods may be placed on this event to prevent the Conversion Task from being created if certain criteria are met. Task Event Templates: Add methods to be executed at various points during the conversion. For the MyWordConverter, the following methods need to be added. The methods are available in Appendix B at the end of the document. ArasWord_initDependencies: Adds dependency on the Document Item that is the parent of the File that was added or updated. Cancels conversion if there is no Document Item found. Items listed added as dependencies are claimeded during events that have ‘Lock Dependencies’ set to True (‘1’). ArasWord_attachFile: Attaches the resulting File from the Conversion to the same Document as the source Word file.

      Click

      and

      to save, unclaim, and close the new ‘Conversion Rule’ Item.

Once the configuration is complete, the system is ready to use the new converter. Simply add a Word document on the Document Files tab of a Document Item in Aras Innovator and it is automatically converted.

Note
Remember that this document serves only as an example for integrating a file conversion utility with the Conversion Server. The example in this document is not meant for production use. Microsoft Word is not intended for use as a file converter without the direct interaction of the end user.