Add the Converter within Aras Innovator

  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)

      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.

    5. Delay: 5 (set in minutes)

      The delay in minutes after which a failed task can be rerun; suggested default is 5 minutes.

    6. Cutoff: 24 (set in hours)

      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.

    7. Enabled: 1 (Checked to enable the rule)
    8. Relationship Tabs:

      • 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.

        Figure 7.

      • 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.

Figure 8.

  1. 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.