Call a batch file or execute a command from workflow

  • 7 December 2017
  • 6 replies
  • 58 views

Badge +7

I have a process where I check email for attachements. move attachements to file share and someone else has written an access database that processes and imports the files. I would like to call either a batch to run this or directly call the access db from a command line. Just an execatutable with an argument sames as the batch file.

 

It is too difficult to try and rewrite this access process does anyone know a way to do this. Ansy help greatly appreciated.


6 replies

Badge +15

Hi,


 


I have never tried this before, but you should be able to enter custom code in your K2 workflow using Visual Studio. You should be able to insert codes to execute the executable you want. Just make sure that executable is located on the K2 server, and that it works.

Userlevel 4
Badge +14

Maybe try the community Powershell Service Object.


 


https://community.k2.com/t5/K2-blackpearl/PowerShell-Service-Object/ba-p/1025


 


HTH


Vernon


 

Badge +7

This seems like a perfect solution but I cannot seem to download it from the market place. I get an error after agreeing. "An invalid set of parameters has been specified in the url." I am not sure whether it is just me or a problem with the site. 

 

 I went to the link to get it from K2 underground. I got it download but it says it not a valid archive.

 

I could really really use this. I am desparate as I cannot seem to schedule this last piece.

 

Any ideas?

Userlevel 4
Badge +14

Nope, I get the same issue, I have raised this with the K2 Community Manager, will post back once its sorted.


 

Userlevel 4
Badge +14

Attached is the Poweshell Broker in the meantime. I hope it can do what you need.


 


Regards


Vernon


 

Badge +7

I was able to get it downloaded but I am not able to get it to work in K2 Studio maybe it just works in Visual Studio for K2 but if I had that I would not need this. Does anyone have any idea on how the powershell woudl be confiure on k2 4.7?

 

 

Reply