Scroll Top

Workflow Automation – Replacing Scripting Or Code

In most organizations, systems and processes have grown organically. Over a period of time, manual scripting and ‘workarounds’ have been implemented by skilled IT experts to automate what were once time consuming and resource hungry manual filing tasks. Such workarounds would have been welcomed into their various settings at the time of implementation, but with business environments forever in flux, they may become harder and harder to track, implement and integrate. New systems and infrastructure may mean new scripts, different ways of working, driven by efficiency savings or regulatory compliance may render original scripting obsolete. New programming standards, turnover of skilled staff, and mergers and acquisitions can all expose an organization to expensive costs and out of data systems. Will the new systems, staff, processes and programming integrate with the old? As experts on Managed File Transfer solutions and Automated Workflow Engines, we believe that it is important not to let the tail wag the dog.

We have provided two simple examples which stand up on their own to present our case for a coordinated approach when it comes to automation of workflow 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 client to server and back again. The script logs the command and return values to a file.

#!/bin/bash

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

#scpg3 put
echo “/opt/xxxxx/bin/scpg3 -B -q testfile $SRV:test” >> scpg3_put_$DATE
/opt/xxxxx/bin/scpg3 -B -q testfile.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

Here is how an MFT Automated Workflow Solution would do it.

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

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

ftp.Hostname = “ftp.test.com”
ftp.Username = “User”
ftp.Password = “Pass”
ftp.Passive = 1
ftp.AuthTls = 1
ftp.Ssl = 0
connectStatus = ftp.Connect()
If (connectStatus 1) Then
‘MsgBox ftp.LastErrorText
‘WScript.Quit
Main = DTSTaskExecResult_Failure
Else
dirStatus = ftp.ChangeRemoteDir(“RMed”)
If (dirStatus 1) Then
‘MsgBox ftp.LastErrorText
‘WScript.Quit
Main = DTSTaskExecResult_Failure
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 UploadsCustomer UploadsRMedInvoice_RMed.txt”
remotePatientFile = “C:ClientsStratFile UploadsCustomer UploadsRMedPatient_RMed.txt”
‘MsgBox remoteInvoiceFile
‘MsgBox remotePatientFile

transferStatus = ftp.getFile(remoteInvoiceFile, localInvoiceFile)
if (transferStatus 1) then
‘MsgBox ftp.LastErrorText
Main = DTSTaskExecResult_Failure
else
Main = DTSTaskExecResult_Success
end if

transferStatus = ftp.GetFile(remotePatientFile, localPatientFile)
if (transferStatus 1) then
‘MsgBox ftp.LastErrorText
Main = DTSTaskExecResult_Failure
else
Main = DTSTaskExecResult_Success
end if

END IF
ftp.Disconnect

End Function

Here is how an MFT Automated Workflow Solution would do it:

1. Select Originating folder
2. Select Files by name abc*.*
3. Select Destination Folder
4. Export Filenames to.csv
5. Schedule frequency of task
6. Save task

These two examples are for simple tasks. These two tasks do not have any element of security or encryption written into them, which would be standard for an MFT automated workflow solution. There will be savings and improvements that your business can make, and from casting your eye briefly at the two examples, you will know where these areas are. You may have reservations because of the complexity of the scripting you currently employ, however rest assured that mature Automated Workflow Solutions do not just perform simple tasks. Generally they possess a rich and configurable suite of preset workflows to cover off the majority of your file transfer needs, and these can be customized with minimal training, and without programming expertise. Even for those tricky little processes where you need something that can be refined even further, a good Workflow Engine will have modules and APIs that allow further programming access.

There is irony in manually scripting automated processes; Automated Workflow Engines just does not see it.



AUTOPOST by BEDEWY VISIT GAHZLY

Related Posts

Privacy Preferences
When you visit our website, it may store information through your browser from specific services, usually in form of cookies. Here you can change your privacy preferences. Please note that blocking some types of cookies may impact your experience on our website and the services we offer.