Aras Innovator Platform

ConversionRule

The ‘ConversionRule’ ItemType is where the rules and events for the conversion are defined.

Properties:

  • Name: Unique name to describe what the Rule does using the Conversion Server.

  • Conversion Type: Points to the ‘ConverterType’ Item that performs the Conversion.

  • Description (optional): Detailed description of the Conversion Rule.

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

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

  • Cutoff: The number of hours that is given to a failed Conversion Task to finish successfully.

If the Conversion Task has status Failed for the specified number of hours, the conversion task is marked as failed and removed from processing by the framework. The suggested default value is 24.

  • Enabled: Boolean to enable or disable the Conversion Rule.

Relationships:

  • File Types (‘ConversionRuleFileType’): Relationship to ‘FileType’

Used to specify which types of files trigger this Conversion Rule. Each FileType can be enabled or disabled using the ‘Enabled’ property on the Relationship.

  • Rule Events (‘ConversionRuleEventHandler’): Relationship to ‘Method’

Used to specify Server-side methods that are run prior to the creation of the Conversion Task. (Event Type = OnTaskCreating)

These methods can then be used to check certain conditions such as the File size and prevent the Conversion Task from being created.

  • Task Event Templates(‘ConversionRuleEventTemplate’): Relationship to ‘Method’

  • Used to specify Server-side methods that are run at different times while the Conversion Task is processing.

  • Conversion mode - blocking vs non-blocking (default):

    Non-blocking is intended to process long-running tasks (more than 30 minutes); the Innovator Server sends a request to the Conversion Server to execute a Task, and the Conversion Server notifies the Innovator Server about completion, so the Innovator doesn’t wait for completion, which avoids the possibility of a timeout.

Available Events (In order of execution):

  • OnStartTaskProcessing: Fired right after the conversion task is created and the processing cycle gets the task for processing.

  • OnBeforeConvert: Fired right before the conversion task is ready to be sent for conversion.

  • OnConvert: Overrides the conversion event.

  • OnAfterConvert: Fired on the processing cycle iteration after the framework sets result to ConversionTaskResult.