Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. Ensure JAVA JDK is installed on machine/server.

  2. Install Unanet Integrated Management Utility and download the sharefile.bat and sharefile.ps1 files from the Support site:

    https://support.unanet.com/support/solutions/articles/35000140139-integration-management-utility-imu-19-1

    https://support.unanet.com/support/solutions/articles/35000141596-sharefile-bat-sharefile-ps1

  3.  Configure the Unanet IMU Export - KC - IMU (Integration Management Utility).
    1. Ensure that any exported files are put into C:\unanet_imu\temp directory.

  4.  Configure ShareFile connection:

    1. Install Windows PowerShell 4.0: http://social.technet.microsoft.com/wiki/contents/articles/21016.how-to-install-windows-powershell-4-0.aspx

    2. Install ShareFile PowerShell SDK 1.82 tool, which is a snap-in for Microsoft PowerShell that provides access to ShareFile’s API.

      Instructionshttp://support.citrixonline.com/en_US/ShareFile/help_files/SF120003#SFCLI
      Installer Linkhttps://github.com/citrix/ShareFile-PowerShell/releases
       
    3. Create a directory called C:\unanet_imu\sftps_files.
    4. Create a directory called C:\unanet_imu\temp if one does not already exist.
    5. Open PowerShell and enter the following two commands (without the leading dashes):

      NOTE:  If you open PowerShell ISE, you can copy/paste the commands instead of typing:

      Add-PSSnapIn ShareFile

      New-SfClient -Name "C:\<any_directory_on_client>\sflogin.sfps"

      The second command will create a token file that’s used for authentication. Here it is named sflogin.sfps but it can be named anything you want.
      After you enter the second command, you will be prompted for SFTP credentials.

    6.  After the above step, your PowerShell screen should appear as follows and there should be a .sfps token in the directory you specified.

      Image Modified

    7. Ensure that the sharefile.bat and sharefile.ps1 files have been downloaded to the C:\unanet_imu directory (from Step 2):
      Image Removed
      Image Added

    8. Right-click sharefile.ps1 and edit in Notepad. Modify in the two places highlighted below:

      Image Modified

    9. Test by placing a file in the local files (C:\unanet_imu\temp) directory and running the sharefile.bat file from the regular command prompt.

    10. You should then see your files in the cloud https://tridentis.sharefile.com/.

       Image Modified

  5. Create a Basic Task in Windows Task Scheduler to first run the IMU export, then run the ShareFile transfer as shown below:
    Image Removed
    Image Added

    EXAMPLE: Calling a .bat file from within the IMU.


    TEXT FROM EXAMPLE:

                   <echo>Starting ShareFile .bat file</echo>

                   <exec executable="cmd"

                dir="c:/integrations/MYClient/processing"

                timeout="${pre-processing.timeout}"

                output="${run.log.dir}/${pre-processing.output.log}"

                error="${run.log.dir}/${pre-processing.error.log}"

                resultproperty="pre-processing.result">


                       <arg value="/c"/>

                       <arg value="sharefile.bat"/>

                       <arg value="-p"/>

                   </exec>


                   <echo>Searching for Errors...</echo>

                   <if><resourcecontains resource="${run.log.dir}/run.log" substring="Timeout: killed the sub-process" casesensitive="true"/>

            <then>

                                                 <fail>The pre-process timed out and was killed after ${pre-processing.timeout} milliseconds</fail>

            </then>

                   </if>

                   <if><contains string="${sql.out}${sql.err}" substring="ERROR" casesensitive="true"/>

            <then>

              <fail>Errors detected in the CSV Translation process.</fail>

            </then>

            <else>

              <echo>No errors detected.</echo>

            </else>

                   </if>

                   <echo>Pre-processing return code: ${pre-processing.result}</echo>


                   <echo>CSV Translator complete</echo>


...