Today I show you, how can you write your custom workflow activity for build template.
In this activity you call some program or powershell cmdlet.
And if you need write custom log, read follow my post.
If you edit your workflow in UI mode, do next step:
1) Add from tools activity "Sequence"
2) In this activity put "Create Directory"
3) Under this put activity "InvokeProcess".
4) Under "Handle Standard Output" put "InvokeProcess" activity
5) Under "Handle Error Output" put "InvokeProcess" activity
After, you will see this picture:
In "InvokeSomeProcess", go to properties.
- Set in file name your program, which you want call, or powershell cmdlet.(for ex.: "powershell.exe")
- Put in Arguments some arguments if you need.(for ex.:"get-date")
- FileName:"powershell"
- Arguments:"String.Format(" ""{0}"">>""C:\Temp\CustomLog.txt"" ", data)"
Good luck!
No comments:
Post a Comment