2016-07-26 02:50 AM - edited 2016-07-26 10:54 PM
WFA should have an option for providing a local file as input to a workflow and the workflow can
can then fetch the file from the WFA client desktop computer and make it available to my Workflow to compute upon.
Why is this needed?
This can be needed in many cases like.
The Solution Logic:
If you look I basically need a way to securely transfer a file present on my local desktop(windows/linux/mac) to the WFA server using the WFA's browser interface using the credentials only known to the one who owns the files. So I can make use of windows WinSCP .net assemblies. And I can easily setup an sshd server on my desktop client machine. This is all I need and this is the very core-logic behind this solution.
I have a WFA command executing on my WFA server that can remotely connect to my desktop using SCP/SFTP and pull/copy the given file from my desktop to a location on the WFA server. The subsequent commands in the workflow can now make use of this uploaded file as desired.
Prepare your WFA server. One time setup for your WFA server
3, That's all, your WFA server is ready to connect to any desktop using SCP/SFTP/FTP.
Prepare your desktop from where you access the WFA using a browser. The desktop where you have the files you want to upload. One time setup.
This step depends on the OS of your desktop.
Windows : There are many SSH Servers available. WinSSHD, FreeSSHD, MobaSSH. Install any one of these. You might have to modify firewall settings to allow incoming requests. Would recommend WinSSHD or OpenSSH for windows.
Linux, Ubuntu : SSH server is available by default. So nothing needed to be done.
Mac : You can use the step given here.
Once ready you should be able to login and access your Desktop using an SSH client like Putty, Bitwise SSH or the like. There are many. If you can't login, you need to get this step right before you proceed.
That's all. Now have a command in WFA which connects to your desktop and copy the files using SCP.
An example solution.
Import the attached dar file WFA3_0_sinhaa__Workflow_to_upload_files_from_your_desktop_to_WFA_server_and_print__the_contents_.dar
The workflow is : Workflow to upload files from your desktop to WFA server and print the contents. This workflow has 2 commands.
So my simple task is to print the contents of a file which I need to upload from my desktop using WFA by providing the file path as Input to the workflow during execution.
The credentials are only known to the workflow executor who provides during workflow execution. And since the SSH server is running on his deskop, he can control/restrict the incoming requests as he desires. So this is fairly secure and configurable.
Alternate Solution for Windows Desktops
If your requirement is only the contents of the file and not the file itself, then this can be done by enabling PS Remoting on your WFA and your windows desktop. See the attached doc Windows_desktop_file_contents_as_input.docx . Also attaching a sample workflow dar WFA3_0P2_Workflow_to_Input_content_of_a_desktop_file_to_WFA_sinhaa.dar.