Simplicity Media Distributor Utility

Simplicity Media Distributor App.

Great things can be achieved with the right tools.

Simplicity's suite of utilities and processes that provide the mechanisms for moving, consolidating and distributing data to meet your businesses automation and workflow requirements.

This section will provide you with a brief understanding and knowledge of these components and a quick reference to aid you in your Simplicity development.

Overview.

The media distributor moves files from one repository to another.

The locations it works with may be local to the server, available via a LAN network connection, through a SQL database or on a SFTP server.

It has the ability to check for the presence of a full fileset before processing starts and to send email notification of job completion success or failure.

It can also extract or insert files to and from WinZip / GZip files and import or export data from a SQL database.

Media Distributor Utility - Common Tasks.

Great things can be achieved with the right tools.

Simplicity's suite of utilities and processes that provide the mechanisms for moving, consolidating and distributing data to meet your businesses automation and workflow requirements.

This section will provide you with a brief understanding and knowledge of these components and a quick reference to aid you in your Simplicity development.

A list of the command line options that can be used in conjunction with the media distributor are listed here.

Media Distributor Walk Through - Creating a New Job.

Steps 1 - 31

The following walk through takes you through the process of creating a new media distributor job.

 

STEP 1.

Locate your "SAMediaDistributor" folder in the "Simplicity Technologies" folder located in your "Program Files" directory.

Step 1

 

 

STEP 2.

Select the SAMediaDistributor executable.

Step 2

 

 

STEP 3.

Right click and select "Create shortcuts here".

Step 3

 

 

STEP 4.

Click on the shortcut text to rename it.

Step 4

 

 

STEP 5.

Enter "Media Distributor Editor".

Step 5

 

 

STEP 6.

Right click and select properties. Now on the target box add the suffix /editor.

Step 5b

 

 

STEP 7.

Now click on your new short cut to run the Media Distributor in editor mode.

Step 5c

 

 

STEP 8.

You should now see your maintenance utility as below.

Step 5d

 

 

STEP 9.

Download the sample configurations to get you started.

Step 5e

 

 

STEP 10.

Unzip the sample configuration files to a directory.

Step 5f

 

 

STEP 11.

You can now open the sample configuration files in the editor as below.

Step 5g

 

 

STEP 12.

Once you have made all your required configuration changes click "Save As" and give your configuration file a name.

Step 6

 

 

STEP 13.

Once your package has been saved this can be copied to your media distributor configuration files folder.

Step 7

 

 

STEP 14.

Previewing your execution package you should see content that looks similar to the example below.

Step 8

 

 

STEP 15.

Copy the final execution package to your import processor XML configuration file location.

Step 10

 

 

STEP 16a.

Now you will need to create your execution command file as per the sample below. This example is for processing a single file.

Step 11

 

 

STEP 16b.

Now you will need to create your execution command file as per the sample below. This example is for processing entire directory of files.

Step 11b

 

 

STEP 17.

Save this to your command files folder for your automated jobs.

Step 12

 

 

STEP 18.

Now open "Task Scheduler" to schedule your command file that you created in steps 16a and 16b.

Step 17

 

 

STEP 19.

Right click and select "Create Task".

Step 18

 

 

STEP 20.

Give your new task a name.

Step 19

 

 

STEP 21.

Move to the triggers tab and click "New".

Step 20

 

 

STEP 22.

Specify the schedule you require and click "OK".

Step 21

 

 

STEP 23.

Select the "Actions" tab and click "New".

Step 22

 

 

STEP 24.

Click "Browse" to select your command file.

Step 23

 

 

STEP 25.

Browse to the appropriate folder and click "Open".

Step 24

 

 

STEP 26.

Make sure the program and start in locations are specified and click "OK" when configured..

Step 25

 

 

STEP 27.

Your action should appear in the actions list.

Step 26

 

 

STEP 28.

Check your settings under conditions are appropriate for your scheduled task.

Step 27

 

 

STEP 29.

The settings tab allows you specify more options. An important consideration is what this should do if it is run when this task is already running. This should typically set to "Do not start a new instance". Running concurrent import processes may have adverse affects.

Step 28

 

 

STEP 30.

When you click "OK" you will be prompted for the security credentials to commit your changes.

Step 29

 

 

STEP 31.

The task should now appear ready to run at it's scheduled time. Right clicking on tasks here allow you to perform common operations on the tasks like manually starting or stopping the scheduled task.

Step 30

 

 

 

Back to Topics Index.

 

Media Distributor Command Line Arguments

The optional command line arguments for defining the execution behaviour of the utility are as follows:


Search Sub Directorys
/s

Verbose Logging
/v

Run in Editor Mode
/editor

Console Window Output
/console

Process Only
/process:"ProcessName"

SFTP Client
/sftp

Pause After Completion
/pause

Run as named instance
/instance:"MyInstance"

Run for media files in directory
/dir:"D:\Data\"

Run for media file
/file:"D:\Data\Filename.dat"

Run using configuration files
/cfilter:"test*.xml"

Back to Topics Index.

Media Distributor Utility - Glossary.

Great things can be achieved with the right tools.

Simplicity's suite of utilities and processes that provide the mechanisms for moving, consolidating and distributing data to meet your businesses automation and workflow requirements.

This section will provide you with a brief understanding and knowledge of these components and a quick reference to aid you in your Simplicity development.

Media Distributor Editor - Configuration Classes Glossary.

Configuration Classes Index

CONFIGURATION DOCUMENT

Media Distributor Definitions: The collection of configurations to execute in the specified order.

From Display Text: The email address name to send notification emails from.

From Email Address: The email address to send notification emails from.

SMTP Server Name: The SMTP server to send the notification emails to.

SMTP Server Port: The SMTP server port to send the notification emails to. Typically this will be set to Port 25.

 

Click on the preview below to view the full image.

Step 1

 

Back to Topics Index.

MEDIA DISTRIBUTOR CONFIGURATION

Job Name: The media distributor job name. The value specified here also sets the system variable %MEDIADISTRIBUTORNAME% with the value.

Active: Specifies whether this particular distribution job is run when this configuration document is used.

Batch Key Code: Sets the system variable %BATCHKEYCODE%

Batch Name: Sets the system variable %BATCHNAME%

Client ID: Sets the system variable %CLIENTID%

Client Name: Sets the system variable %CLIENTNAME%

Copy Rules: The collection of copy operations to be performed in the order specified.

Custom Variables: The collection of custom variables and values specified. Additional standard system variables include (%DATE%, %DATETIME%, %UTCDATE%, %UTCDATETIME%)

Delete Source File On Job Completion: Whether the source file should be deleted after the copy operation has completed.

File Set Key Code Assignments: This the collection of file matching key code assignments. When a file matches all of the specified inclusion and exclusion rules that result in the file being included then this file is assigned the 'File Set Key Code' as defined in the matching assignment criteria. If multiple matchs could apply then the first matching assignment is used. A quantity of matching files may be specified to make up a valid file set.

Match File Only: This value is set to true automatically if a file name is passed to the media distributor app via the command line '/file:' argument. If this is true then the variable %PROCESSONLY% will be set to false and vice versa.

Match Process Only: This value is set to true automatically if no file name is passed to the media distributor app via the command line '/file:' argument and the '/process:{FILESETKEYCODE}' argument is also supplied. If this is true then the variable %PROCESSONLY% will be set to true and vice versa. When you use the /process argument ensure you send the file set key code as this is used to match to the varying rule sets to determine what will be executed.

Media File Processing Match Rules: When a file matches all of the specified inclusion and exclusion rules this will result in the file being flagged for processing.

On Exception Copy File To Locations: The collection of copy operations to be performed in the order specified in the event of an exception occurring during processing.

Post Copy Stored Procedures: The list of stored procedures to execute after each file copy rule is processed.

Post Distribution Processing Stored Procedures: The list of stored procedures to execute after completion of all file copy rules.

Pre Copy Variable Changes: The collection of variables that should be set to new values as specified before each file copy rule is processed.

Pre Distribution Processing Stored Procedures: The list of stored procedures to execute prior to processing any file copy rules.

Job Failure - Email Recipients: The recipients to send job failure notification messages.

Job Failure - Subject Line: The subject line to use when sending email notifications for media distributor job failures.

Successful Completion - Email Recipients: The recipients to send successful job completion notification messages.

Successful Completion - Subject Line: The subject line to use when sending email notifications on a successful completion of the media distributor job.

 

Click on the preview below to view the full image.

Step 2

 

Back to Topics Index.

MEDIA DISTRIBUTOR COPY RULE

Copy Name: The friendly name for the copy rule.

File Set Key Code: The file set for this copy rules to apply to. Use of the wildcard * specifies this should apply to all file sets.

Destination Web Credentials \ Domain: Optionally specified when the file copy web destination requires specified credentials.

Destination Web Credentials \ Password: Optionally specified when the file copy web destination requires specified credentials.

Destination Web Credentials \ User: Optionally specified when the file copy web destination requires specified credentials.

Impersonation \ Domain: This is the impersonation domain to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Impersonation \ Logon Type: This is the impersonation logon type to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Impersonation \ Password: This is the impersonation password to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Impersonation \ User: This is the impersonation user to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Source Web Credentials \ Domain: Optionally specified when the file copy web source requires specified credentials.

Source Web Credentials \ Password: Optionally specified when the file copy web source requires specified credentials.

Source Web Credentials \ User: Optionally specified when the file copy web source requires specified credentials.

Compress To Zip File: Determines whether the copied files are compressed into a zip file as part of the copy operation.

Delete Destination If File Already Exists: If the destination file already exists prior to performing the copy operation then this will determine whether it will be deleted prior to performing this copy rule.

Delete Source File On Job Completion: Specifies if the source file should be deleted on completion.

Destination Location: SFTP (SFTP Server), Local (Local Drive or Network UNC Path), Procedure (Future Use)

Extract From Zip File: When working with a zip file determines whether the contents of the zip file are copied or the zip file itself.

File Extension: The file extension filter.

File Name: The file name filter.

Refresh Zip File Contents: Whether to refresh the ZIP file contents.

Root Path: The root path to use for the copy operation.

Source Location: SFTP (SFTP Server), Local (Local Drive or Network UNC Path), Procedure (Future Use)

Source Path and File Name: The source path and file name.

Sub Directory: The sub directory to the root path to use for the copy operation.

Zip File Contents: Specifies which files internally within the ZIP file are to be copied. * denotes all files.

Zip File Password: The password for the ZIP file if required.

 

Click on the preview below to view the full image.

Step 3

 

Back to Topics Index.

MEDIA DISTRIBUTOR CUSTOM VARIABLE

Name: The name of the custom variable to set to the value or variable as specified by the 'Value' attribute.

Value: The value to assign to the custom variable as specified in the 'Name' attribute.

 

Click on the preview below to view the full image.

Step 4

 

Back to Topics Index.

MEDIA DISTRIBUTOR FILE SET KEY CODE ASSIGNMENT

This is the file matching key code assignment. When a file matches all of the specified inclusion and exclusion rules that result in the file being included then this file is assigned the 'File Set Key Code' as defined in the matching assignment criteria. A quantity of matching files may be specified to make up a valid file set.

 

Click on the preview below to view the full image.

Step 5

 

Back to Topics Index.

MEDIA DISTRIBUTOR FILE PROCESS MATCH RULE

This the collection of file matching key code assignments. When a file matches all of the specified inclusion and exclusion rules that result in the file being included then this file is assigned the 'File Set Key Code' as defined in the matching assignment criteria.

 

Click on the preview below to view the full image.

Step 6

 

Back to Topics Index.

MEDIA DISTRIBUTOR STORED PROCEDURE EXECUTION

Execution Name: The friendly name of the stored procedure to be executed.

File Set Key Code: The file set for this stored procedure to be executed for. Use of the wildcard * specifies this should apply to all file sets.

Source Db Database Name: The name of the database to connect to.

Source Db External Port: The externally accessible port that this database can be connected on. Typically this value will be blank.

Source Db External Server Name: The fully qualified name or IP address that this database can be connected to. Typically this value will be blank.

Source Db Internal Port: The internal port that this database can be connected on.

Source Db Internal Server Name: The internal server name that this database can be connected to.

Source Db Password: The password to use when the connection is using sql authentication. If windows authentication is being used then this value will be blank.

Source Db User Name: The sql user to use when the connection is using sql authentication. If windows authentication is being used then this value will be blank.

Impersonation \ Domain: This is the impersonation domain to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Impersonation \ Logon Type: This is the impersonation logon type to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Impersonation \ Password: This is the impersonation password to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Impersonation \ User: This is the impersonation user to use. This is used in conjunction with windows authentication when the stored procedure is required to run under a different user account to the service account that is executing this media distribution job.

Parameters: The collection of parameters to specify when executing the stored procedure as specified in the 'Procedure Name' attribute.

Procedure Name: The stored procedure name to use. This should also include the database schema for the stored procedure. The schema will typlicall be 'dbo'.

Post Execution Variable Changes: The collection of variables that should be set to new values as specified after the stored procedure has completed executing.

Pre Execution Variable Changes: The collection of variables that should be set to new values as specified before the stored procedure is executed.

 

Click on the preview below to view the full image.

Step 7

 

Back to Topics Index.

MEDIA DISTRIBUTOR STORED PROCEDURE PARAMETER

Parameter Name: The name of the parameter to set to the value or variable as specified by the 'Parameter Value' attribute.

Parameter Value: The value to assign to the variable as specified in the 'Parameter Name' attribute. Variable names may also be used as the value to specify that this parameter value should now be equal to the value of the specified variable.

 

Click on the preview below to view the full image.

Step 8

 

Back to Topics Index.

MEDIA DISTRIBUTOR VARIABLE SELECT STATEMENT

File Set Key Code: The file set for this select statement to apply to. Use of the wildcard * specifies this should apply to all file sets.

Case Else: Specifies the collection of variables to set if no match is found in the collection of case items as specified in the 'Case Is' attribute.

Case Is: Specifies the collection of match case items to check against the value or variable specified by the 'Select Case' attribute.

Select Case: The value to variable to compare against the collection of match values specified in the 'Case Is' attribute.

 

Click on the preview below to view the full image.

Step 9

 

Back to Topics Index.

MEDIA DISTRIBUTOR VARIABLE SELECT STATEMENT CASE ITEM

Match Value: The value or variable name that must be matched in order to set the variables as specified in the 'On Match Set Variables' attribute.

On Match Set Variables: The collection of variables that should be set the new values as specified if the 'Match Value' attribute matches the 'Select Case' value or variable as specified in the 'Select Case' attribute in the 'VARIABLE SELECT STATEMENT' class.

 

Click on the preview below to view the full image.

Step 10

 

Back to Topics Index.

MEDIA DISTRIBUTOR VARIABLE SELECT STATEMENT SET VARIABLE

Variable Name To Set: The name of the variable to set to a new value.

Variable Value To Set: The new value to assign to the variable as specified in the 'Variable Name To Set' attribute. Variable names may also be used as the value to specify that this variable should now be equal to the value of another variable.

 

Click on the preview below to view the full image.

Step 11

 

 

Click on the preview below to view the full image.

Step 12

 

Back to Topics Index.

MEDIA DISTRIBUTOR RECIPIENT

Display Name: This the display name used for the email recipient.

Email Address: The email address used for the recipient.

 

Click on the preview below to view the full image.

Step 13

 

Back to Topics Index.

MEDIA DISTRIBUTOR SAMPLE EMAIL

This is a sample of the notification emails sent by the media distributor application. All variables used within the job are included in the output log.

Click on the preview below to view the full image.

Step 14

 

Back to Topics Index.

Australia - New Zealand