Execute commands to retrieve file from repository within workflow

booher04
Tera Guru

Our client is looking to execute commands to retrieve and modify a file from a repository from within a catalog item workflow.  I am sure this needs to be done from the run script wf activities but not sure if this is the correct approach and how to start that or if there is a better option such as running an API Call/Rest Message to the end point to do this.  

 

Example:  they have a catalog item, within the workflow at a certain point, they would like to run these commands to get the file from their repository and modify it and then progress through the rest of the workflow.

3 REPLIES 3

Kristen Ankeny
Kilo Sage

I would use a custom orchestration activity instead of a run script within the workflow (assuming they are using workflow and not flow designer).

Thanks for the advice.  The main issue I have is how to even configure these commands they want to run, in their "world" they run these from the command line on a windows machine or command line in linux.  I'm trying to figure out the best way to run them and get the file from them to edit.

 

Here's an example of one of the commands they provided to me:  git clone git@ssh.dev.test.com:v3/fnf/TFE/azure_root_resources

You should be able to define an SSH activity to be able to run commands from the MID Server: https://docs.servicenow.com/bundle/sandiego-it-service-management/page/administer/orchestration-acti...