Skip to content
Dawid Potgieter edited this page May 31, 2017 · 1 revision

Activity Pages

Intellisense

It's quite annoyingly difficult to work without intellisense, but unfortunately this is part of Visual Studio 2010. However, if you do have VS2010, you can use the following procedure to be able to use VS to edit the workflow XAML :

  • Copy 'Active.Activities.dll' to the following folder : '${ProgramFiles}\Microsoft Visual Studio 10.0\Common7\IDE\PrivateAssemblies'
  • If you use scheduled tasks, you also need to copy 'Microsoft.Win32.TaskScheduler.dll' to the above folder. Many thanks to the creators of this library. (http://taskscheduler.codeplex.com)

That's it. If you open the XAML file in VS2010, you now have intellisense support (but not the "Run" command as in the builder).

P.S. Active Builder now includes a rudimentary Intellisense editor, basically just there for show, but it might help a bit.

Active.Run command line params

  • -file:{path\file.xaml} The XAML file to open. If not specified, the default 'Workflow.xaml' in the current folder is used.
  • -start If specified, the workflow will start executing immediately after loading.
  • -shutdown If specified, Active.Run will exit after completing the workflow execution.
  • -showworkflow If specified, Active.Run will show the workflow along with the console.
  • -debug If specified, debugging information about the workflow will be printed on the activity console.
  • -nolog If specified, suppresses the log file output that is generated by default.

Some Notes on Activities

To Get Current Executing Directory : AppDomain.CurrentDomain.BaseDirectory will return e.g. "C:\Temp"

InvokeProcess

This is the most versatile of the activities. You can run any executible or do anything that's possible from the command line.

  • FileName : This is the executable file path or command to execute. You could of course write cmd files or powershell scripts and invoke them.
  • Arguments : Command line arguments to pass to the invoked process.
  • ThrowOnExitCode : If this is set to true, then an exception will be thrown if a non 0 ExitCode is returned.
  • SuppressConsoleOutput : If this is set to true, then this activity will not generate any console output.
  • IsNative : If the command you're trying to execute is part of the command interpreter, i.e. "dir", set this to true.

SetServiceStartupMode

This activity allows you to set the startup mode of services. Note that you'll need to start Active.Run with administrative privileges for this to work on most services.

CreateSimpleScheduledTask

This activity allows you to create a scheduled task in the windows task scheduler. It is intentionally simplified as scheduled tasks can be setup in very complex ways.

  • FileName : This is the executable file path or command to execute. You could of course write cmd files or powershell scripts and invoke them.
  • Triggers : This is a list of triggers for the scheduled task. e.g. New List(Of Microsoft.Win32.TaskScheduler.Trigger) From { New Microsoft.Win32.TaskScheduler.DailyTrigger With {.DaysInterval = 2} }. See http://taskscheduler.codeplex.com for more information.
  • Arguments : Command line arguments to pass to the invoked process.

CreateUser

This allows you to create a user account either locally or on the domain. Obviously, the account running the current process must have the rights to do this. All properties on this activity are rather straight forward.

MSBuild

This is not really a deployment activity, but an experiment to see how difficult it would be create an automated build system without TFS licenses. As the name states, it allows you to call msbuild on a project file (currently it doesn't support .sln solution files). Please use Visual Studio Online instead!!!

Clone this wiki locally