DIM Image Plugin Set Up Guide

DIM Image Plugin Set Up Guide

Overview

This document will outline the process for setting up the Image Plugin created by Field2Base for use with the Data Integration Module (DIM).
The Image Plugin allows a Customer running the DIM to generate Image files (JPG, PNG, etc.) from Camera regions in Sent Forms and store them in a file location of their choosing. There are not a lot of customizable options for this plugin, but the Customer can define the following:
  1. The Filename of the images outputted based on static text or Form Region data.
  2. The Folder Location where the images will be saved which can be on the local machine or on a network share.
 

Installation 

Installation involves downloading and copying the Image Plugin and its support libraries to the machine running the DIM service.  
Note: Before proceeding, it is assumed that the person doing this setup is familiar with the DIM and already has version 2.2.1 (or newer) installed and running. If that is not the case, please contact your Account Manager about getting the latest version of the DIM.
  1. On the machine running the DIM, stop the DIM Service by opening up the DIM Admin Utility and stopping the Service or by opening up Windows Services and stopping the Service directly.
  2. Save the following ZIP file locally on the machine: Download DIM Image Plugin here
  3. Extract and save these files to the DIM Program Files folder. The DIM Program Files folder will be one of the following depending on the machine’s OS:
    1. 32 Bit: C:\Program Files\F2B Data Integration Module
    2. 64 Bit: C:\Program Files (x86)\F2B Data Integration Module
 

Configuration 

The configuration involves gathering all of the definitions for using the Image Plugin and then actually creating a project in the DIM Project Manager.
Before starting set-up, define all of the required elements on setting up an Image Plugin DIM Project. The five required Image Plugin Definitions are:
  1. The name of the eForm that will be generating Images.
  2. The name(s) of the Image Region(s) in the Form.
  3. The Filename format of the Image(s) generated.
  4. The File Type of the Image(s) to be generated (.PNG by default)
  5. The Folder Location (on the local computer or out on a network share) where the Image(s) will be stored.
Note: If you do not have all of above elements defined, do not proceed any further.

Note: If  a DIM Project already exists for this eForm, it is recommended you contact Field2Base Technical Support about the best option to prevent duplications from occurring.
1. Open up the DIM Project Manager Utility.
2. Select the File Menu and click New.
3. Enter your Company ID and Login Credentials.
4. Select Custom Code.
5. For the Class, Click Browse.
6. Select the WriteImagePlugin.dll file.
7. Enable the Project.
8. Save the Project.
9. Go to the DIM Program Files folder (see #3 in in the Installation section).
10. Open the Jobs folder.
11. Open the .XML file that corresponds to your eForm name using a text editor.
12. Update the <processPlugin> block from “null" />” to “…null”>”.
13. Copy the following lines below that block from the WriteImagePlugin.xml file:
<destinationFolder>c:\test</destinationFolder>
<imageFormat>png</imageFormat>
<saveImageRegion>
<region>Page1@Photo1</region>
<fileName>{internalFormId} Photo1.png</fileName>
</saveImageRegion>
<saveImageRegion>
<region>Page1@Photo2</region>
<fileName>{internalFormId} Photo2.png</fileName>
</saveImageRegion>
</processPlugin>
14. Update the <destinationFolder>, <region>, and <filename> tags with the values for your intended use.
15. If you have more than two Photos that you want captured, then copy additional <saveImageRegion> blocks before the </processPlugin> tag.
16. Save the file.
 

Additional Configuration Notes

Using Region Names in the Configuration

Regions can be used in the fileName and destinationFolder tags with using this format: {Page1@RegionName}

Modifying the filename Tag

The fileName tag dictates what name the generated file(s) are given per specified Region. For example, if you wanted to specify the fileName would using a Text Region named “PhotoTitle1” that resides on Page 1 of a Form, the resulting configuration for the fileName tag would look like this:
<fileName>{Page1@PhotoTitle1}.png</fileName>
Like in the example block provided earlier, this must be configured per Region. If there are three Regions you would like to have specific names, you must have three <fileName> lines that specify those names. Alternatively, you can set the name of a file to reflect the unique ID associated with the Form using this format: {internalFormId}
 Note:  Make sure to include the image format as part of the fileName. (PNG, JPG, etc.)

Modifying the destinationFolder Tag

Modifying the <destinationFolder> tag dictates where the images will be placed. This can be a location on a local machine or a network share. The most common way to specify this location is by a static file path, like in the example below.
<destinationFolder>C:\Users\Bob\Desktop\WriteImagePlugin</destinationFolder>
Alternatively, like the filename tag example above, you can set the name to a Region value which would look like this:
<destinationFolder>{Page1@FolderLocation}</destinationFolder>

Modifying the imageFormat Tag

The imageFormat can be left alone if the PNG file format is acceptable. Otherwise see the notes in the DIM Project (XML) File for other acceptable formats.


Saving the XML Job File

Once you have modified the XML File to your liking, save the file. The DIM project should be ready to be used once the XML Job File has been saved.
 Note: If you open a DIM Project in the DIM Project Manager that has edits done directly in the XML with Notepad (or a similar text editor), then please keep in mind that those changes will be lost once you click Save and you will need to re-apply them after you make and save any changes in the Project Manager.

Writing Images to Network Share Locations

The final note to make for the configuration of the DIM Project is that if the image(s) being generated are to be saved on a network share folder location, the DIM Service needs to have the ability to write to that location. If that folder location is not a public folder, then the DIM Service will need to be updated with a User Account (usually a Domain Account) with the privileges to write to that folder. The Service can be updated by doing the following:
  1. Go to the Windows Services.
  2. Select the F2B Data Integration Service.
  3. Stop the Service.
  4. Right Click and Select Properties.
  5. Go to the Log On tab.
  6. Change the “Log on as:” option to This Account.
  7. Enter the User Account to use.
  8. Start the Service. 
If the Service times out, then the User Account most likely does not have sufficient privileges to access the folder location and another account will need to be used.
Note: Do not proceed with Testing until all changes to the DIM Project have been saved and the file has been closed.


Testing

The testing is a combination of running the new Project with the DIM service and confirming the Project works correctly.
 
1. Using the same method as the first step in Installation, start the DIM Service.
2. Go to the DIM Admin Utility’s Logs section.
3. Filter the Logs to view today’s date.
4. Confirm the newly created Project loaded correctly. The log will look like:
      02/08 11:16:28.56 AM -5 Info : Added job: Test Project
5. Wait a few minutes for the Project to start processing Forms.
6. Confirm the images are being generated correctly. The log will look like:
      02/08 11:16:31.70 AM -5 Info : Found 100 RFIs for Test Project
      2/08 11:16:54.28 AM -5 Info : Downloading data in Test Project for dispatch 151
      Ref#: 12345
      Sender: John Doe
      Subject: Test Form
      Server timestamp: 2/3/2016 12:14:56-05:00
      Tablet Serial: F2B-Test-iOS-123
7. Open up a File browsing window and go to the predefined location of the Image(s).
8. Open the images and confirm they are rendered correctly.
 
    • Related Articles

    • DIM PDF Plugin Setup

      Overview The PDF Plugin allows customers running the Data Integration Manager (DIM) to save PDF files of Sent Forms to a specified file location. There are limited customize-able options for this plugin. The following options are available: The ...
    • DIM Custom Plugin Reference Guide

      Overview The Data Integration Module (DIM) allows Users to create custom Plugins that can directly interface with the Data Integration Service and Projects. This document describes how to setup and use Plugins with the DIM.  DIM Processing Overview  ...
    • DIM Migration Guide

      Overview This article provides the information necessary to migrate the Field2Base Data Integration Module (DIM) over from one server to another.  Please refer to the DIM Install Guide for the initial installation of the Field2Base DIM.  Once that's ...
    • DIM Reset Guide

      Overview This document will familiarize you with the process behind resetting your installation of the Field2Base Data Integration Module (DIM). You may want to reset the DIM if you wish to recapture all data starting from a specific point in time ...
    • Data Integration Module (DIM) User Guide

      Overview The Field2Base Data Integration Module allows you to automatically download data from your Sent Forms to your backend systems. The DIM provides transformation of your Form Data into a variety of formats including CSV and SQL. The DIM Sample ...