Customize pre-processors

You can add and customize new pre-processors for the SFBI module. These custom pre-processors should be tested completely and appropriate approval process should be completed before deploying them in production.

To add and customize new pre-processors:

  1. Create a new .NET 4.6.2 class library project.
  2. Copy the following DLLs from the SFBI deployment package and add a reference to the .NET project created in the previous step:
    • PhaseForward.ServicesSolutions.IIE.PreProcessors
    • PhaseForward.ServicesSolutions.IIE.Utilities
    • PhaseForward.ServicesSolutions.InFormImportExport
  3. Create a new class that implements the "IPreProcessor" interface or inherits from the "PreProcessorBase" class.
    In the following example, the new class name is "MyCustomPreProc”.
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    
    namespace PhaseForward.ServicesSolutions.InFormImportExport
    {
        public class MyCustomPreProc : PreProcessorBase
        {
            public MyCustomPreProc(string name, string rootFolder) : base(name) { }
    
            public override MyCustomPreProc Process(PreProcessorParams preProcParams)
            {
                //Set mandatory properties using method from base class
    	     SetupProcessing(preProcParams);
                //curParams.FileType = File Type 
                //curParams.InboundFile = Full File Path
                //curParams.InboundFileName = File Name
                //curParams.InboundFileExtension = File Extension
                //curParams.MedMLPatientData = MedML datastructure
                return curParams;
            }        
        }
    }
    
  4. Copy the compiled DLL file to <Installed Path>\IvrsIntegration\bin directory.
  5. Update the ObjectFactory configuration file located in <Installed Path>\IvrsIntegration\bin directory as follows:
    <object type=" MyCustomPreProc" class="PhaseForward.ServicesSolutions.InFormImportExport. MyCustomPreProc" assembly=" PhaseForward.ServicesSolutions.IIE.Preprocessors"/>
  6. Add the pre-processor to the configuration file in <Installed Path>\IvrsIntegration\<VendorName>\<ConfigName>\Configuration as follows:
    <PreProcessors>
        <PreProcessor Name="Dispatcher" />
        <PreProcessor Name="FormFrozen" />
        <PreProcessor Name="FormLocked" />
        <PreProcessor Name="FormComment" />
        <PreProcessor Name="DataConstraintChecker" />
        <PreProcessor Name="MyCustomPreProc" />
        <PreProcessor Name="FileGenerator" />
    </PreProcessors>
    
  7. 7. Restart the SFBI windows service and application pool.

Note:

: If the newly added pre-processor is still not visible, add the pre-processor to the configuration file (Inform_IVRS_<trial>_<VendorName>_<ConfigName>.config) in <Installed Path>\IvrsIntegration\<Website> as follows:
<PreProcessors>
    <PreProcessor Name="Dispatcher" />
    <PreProcessor Name="FormFrozen" />
    <PreProcessor Name="FormLocked" />
    <PreProcessor Name="FormComment" />
    <PreProcessor Name="DataConstraintChecker" />
    <PreProcessor Name="MyCustomPreProc" />
    <PreProcessor Name="FileGenerator" />
</PreProcessors>