Workflow Automation: Replace Scripts or Code

Shopping Product Reviews

In most organizations, systems and processes have grown organically. Over a period of time, IT experts have implemented manual scripts and “workarounds” to automate what were once time- and resource-consuming manual archiving tasks. Such solutions would have been welcome in their various configurations at the time of implementation, but with ever-changing business environments, they can become increasingly difficult to track, deploy, and integrate. New systems and infrastructure can mean new scripts, different ways of working, driven by efficiency savings or regulatory compliance can make original scripts obsolete. New scheduling standards, skilled staff turnover, and mergers and acquisitions can expose an organization to high costs and missing data systems. Will the new systems, people, processes, and schedules integrate with the old ones? As experts in managed file transfer solutions and automated workflow engines, we believe it’s important not to let the tail wag the dog.

We’ve provided two simple examples that stand on their own to make our case for a coordinated approach when it comes to workflow automation for your file transfer needs.

Below is an example of a rudimentary script to set up an automated file transfer between a host and a client. This script transfers a file from the client to the server and vice versa. The script logs the command and returns values ​​to a file.

#!/bin/bash

DATE=`date +%d.%m.%Y-%H.%M`
SRV=sftexa

#scpg3 put
echo “/opt/xxxxx/bin/scpg3 -B -q test file $SRV:test” >> scpg3_put_$DATE
/opt/xxxxx/bin/scpg3 -B -q test file.dat $SRV:test
echo $? >> scpg3_put_$DATE

#scpg3 get
echo “/opt/xxxxx/bin/scpg3 -B -q $SRV:test test” >> scpg3_get_$DATE
/opt/xxxxx/bin/scpg3 -B -q $SRV:test test
echo $? 0>> scpg3_get_$DATE

This is how an automated workflow solution from MFT would do it.

1. Select the source folder
2. Select the destination folder
3. Select File(s) by name/type/size/date etc.
4. Schedule the transfer frequency
5.Save task

Here is an example of a script to extract files beginning with “abc” from an FTP server. Then the file names are exported to a csv file.

ftp.Hostname=”ftp.test.com”
ftp.Username = “User”
ftp.Password = “Password”
Passive ftp = 1
ftp.AuthTls = 1
ftp.SSL = 0
connectStatus = ftp.Connect()
If (connection state 1) Then
‘MsgBox ftp.LastErrorText
‘WScript.Exit
Main = DTSTaskExecResult_Failure
Plus
dirStatus = ftp.ChangeRemoteDir(“RMed”)
if (statedir 1) then
‘MsgBox ftp.LastErrorText
‘WScript.Exit
Main = DTSTaskExecResult_Failure
It will end if

‘MsgBox ftp.getCurrentRemoteDir()
localInvoiceFile = “C:Documents and Settings My Documents2dRMedInvoice_RMed.txt”
localPatientFile = “C:Documents and Settings My Documents2dRMedPatient_RMed.txt”
remoteInvoiceFile = “C:ClientsStratFile LoadsClient LoadsRMedInvoice_RMed.txt”
remotePatientFile = “C:ClientsStratFile UploadsClient UploadsRMedPatient_RMed.txt”
‘MsgBox remoteInvoiceFile
‘MsgBox RemotePatientFile

transferStatus = ftp.getFile(remoteInvoiceFile, localInvoiceFile)
if (transfer state 1) then
‘MsgBox ftp.LastErrorText
Main = DTSTaskExecResult_Failure
plus
Main = DTSTaskExecResult_Success
it would end if

TransferStatus = ftp.GetFile(remotePatientFile, localPatientFile)
if (transfer state 1) then
‘MsgBox ftp.LastErrorText
Main = DTSTaskExecResult_Failure
plus
Main = DTSTaskExecResult_Success
it would end if

WILL END IF
FTP Disconnect

final function

This is how an MFT automated workflow solution would do it:

1. Select the source folder
2. Select Files by Name abc*.*
3. Select the destination folder
4.Export filenames to.csv
5. Schedule the task frequency
6.Save task

These two examples are for simple tasks. These two tasks do not have any security or encryption elements written into them, which would be standard for an MFT automated workflow solution. There will be savings and improvements your business can make, and by looking briefly at the two examples, you’ll know where these areas lie. You may have reservations about the complexity of the scripts you currently employ, however you can be sure that mature automated workflow solutions do not just perform simple tasks. They typically have a complete and configurable set of preset workflows to cover most of your file transfer needs, and these can be customized with minimal training and no programming experience. Even for those tricky little processes where you need something that can be further refined, a good workflow engine will have modules and APIs that allow more programming access.

There is irony in manually creating automated processes; Automated workflow engines just don’t see it.

Leave a Reply

Your email address will not be published. Required fields are marked *