Just out of curiosity is there ability available within the workflow to execute a bat file stored on the LF repository at all ? I am not talking about using SDK to trigger something on the network share. There are api calls i think LF workflow can do, import to exchange the ics files etc. if not mistaken, there is no option to emulate a cmd prompt functionality in LF workflow or executing a bat file from it ?
Question
Question
Replies
The best way to run system commands is with the system.diagnostics class in the script activity. You can run commands at the operating system layer as the user running the workflow service (usually SYSTEM). You can also retrieve the return information from running the command.
Good explanation here http://www.codeproject.com/Articles/25983/How-to-Execute-a-Command-in-C
Chad even if we do get to run using c# code how would we be able to access file stored in LF repository, if we wish to perform some action to say for example a txt file and export it to a 3rd system even a database for that matter ?
My dilemma here is trying to get file stored in LF to get imported to a database which we can use for other 3rd party applications.
You could use WebDAV to execute it from the repository but I don't recommend it. I had some major stability problems after enabling and using WebDAV. Why not keep your bat files on the system drive?
Workflow can extract text from any text document in the repository and import to any database without the need for any custom scripting or batch files. The text data is available to workflow and the custom query activity can push data into any database.
If only excels were easy to extract text from these are big long bank statement downloads we parse and import to sql, not sure if workflow by default would know how to parse such excel files.
You can get an ODBC driver to query your excel file. I think it is included with the following free Access Database Engine package. Otherwise it is also included with your office installation. Make sure to get the 64-bit version if your running 64-bit workflow. Then you can setup a data source and use the custom query activity in workflow. Just make sure no one opens the excel document while workflow is accessing it, it is best to work with a copy.
https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=13255