The Conversion Server, despite its name, is a great tool that can be leveraged for time consuming processes and not just file conversion tasks. This means that it can be used for really any asynchronous process.
This is best used for tasks that may take a bit longer than the standard method, allowing users to continue with other operations within Aras Innovator. We will be taking a look at an example in this blog post with a custom configuration and go over the steps to set this up on your own machines!
In our example we will be creating a simple method to get a list of parts in a Part BOM assembly then send them in an email. Let’s begin with setting up our Conversion Rule, Conversion Type, and Conversion Task methods.
First we will create a Conversion Type that will be required for the Conversion Rule:
- Log into Aras Innovator as an Administrator and go to the TOC > Administration > File Handling and open up Conversion Types.
- Go ahead and click the add item button and create a new Conversion Type calling it something like “Part BOM Email”
Now we can create our Conversion Rule:
- Go back to the TOC > Administration then click File Handling and Conversion Rules
- Click the create new item button again then give the rule a name such as “Part BOM Rule”
- Set the Conversion Type to be “Part BOM Email”
- Click done to save the Conversion Rule
Once we have completed our configuration for the Conversion Rule we will setup a method to create the Conversion Tasks using the Conversion Rule ID and Conversion Manager Identity ID.
- Open up the TOC > Administration > Methods and create a new method
- Give your method a name such as “createPartBOMConversionTask”
- Note make sure that your method is set to server-side C#
- Copy the following code to your new method:
Now we will need to grab the Conversion Rule ID and the Conversion Manager Identity:
- Go back to the TOC > Administration > File Handling > Conversion Rule and right click on the Part BOM Rule > click Share > Copy ID
- In the createPartBOMConversionTask method go ahead and add the Conversion Rule ID to the variable called “ruleID”
- Open the TOC > Administration > Identities then search for the Conversion Manager
- Follow the same steps to copy the ID from here and paste this into the variable called “conversionIdentityID”
In order to get the Part BOM names we will need to add another method triggered by a button we will configure on the Part form.
- Add the following code:
- Open the TOC > Administration > Forms and search for Part; then open it
- Hit Edit and in the editor add a button
- In the Field Label tab give the button a name “Part BOM Report”
- Go to the Field Event tab and select the add method button, then search for and add our "getPartBOM" method
- Select onClick for the event and hit the Done button to save the form
Last we will have to configure the ConversionServerConfig.xml in the root directory of your Aras Innovator instance (same place the InnovatorServerConfig.xml is found):
- Open this file up and we will need to add a Converter tag to the Converters section
- This will be in between the <ConversionServer> <Converters> tags as shown below:
Note we will be intentionally leaving out the DLL code for the purposes of just going over setup. If you would like to add your own custom DLL’s check out the “Example for Developing Conversion Server Tasks.pdf” in the CD image, specifically section “3 Creating the Example Converter DLL” to correctly create the Converter Class and “3.2 Build and Deploy the DLL” to create the DLL files.
In order to confirm that your configuration works correctly, do the following:
- Go to the TOC > Administration > File Handling > Conversion Tasks
- Search by Rule for "Part BOM Rule" and you should see the created Conversion Task
- Note that it may say failed unless you have connected DLL code, but we should see the inputted Part BOM user data from our getPartBOM client method
Thank you for following along with this week’s blog, we hope this has given some new insight on how the Conversion Server works and other capabilities that may not have been previously know. Let us know if you have any questions about your setup or if your organization utilizes the Conversion Server for their own tasks!