Task Reference
All built-in tasks with properties and data-flow descriptions
Core Tasks
These tasks are provided by Aurora.Workflows.Tasks (targeting .NET Standard 2.0).
SetVariableTask Core
Evaluates a C# expression and stores the result in the data context under the configured output variable name.
| Property | Type | Description |
|---|---|---|
Expression | string | The C# expression to evaluate. Required |
CustomOutputVariableName | string | Name under which the result is stored in the context. |
Output: object – the evaluated expression result.
SetVariableTask always requires an Expression; it cannot operate without one.DebugOutputTask Core
Evaluates a C# expression and writes the result to the console, the logger, and (optionally) the Visual Studio debug output window.
| Property | Type | Description |
|---|---|---|
Expression | string | The message or expression to print. |
Color | ConsoleColor? | Optional console foreground color. |
LogLevel | LogLevel | Microsoft.Extensions.Logging level. Default: Information. |
UseVsDebugOutput | bool | Also write to the Visual Studio debug output window. |
WaitTask Core
Pauses execution for a configurable duration with optional random jitter.
| Property | Type | Description |
|---|---|---|
Interval | int (ms) | Base wait time in milliseconds. |
Tolerance | int (ms) | Random jitter applied around the interval. Set to 0 for a fixed delay. |
ReadFileTask I/O
Reads the contents of a file as a byte array.
| Property | Type | Description |
|---|---|---|
Expression | string | File path or expression evaluating to a file path. |
Output: byte[] – raw file bytes.
WriteFileTask I/O
Writes a byte array to a file.
| Property | Type | Description |
|---|---|---|
Expression | string | File path or expression evaluating to a file path. |
Append | bool | Append to the file instead of overwriting. Default: false. |
Input: byte[] – the data to write.
DeleteFileTask I/O
Deletes the file at the given path.
| Property | Type | Description |
|---|---|---|
Expression | string | File path to delete. |
FileCopyTask I/O
Copies a file from source to destination.
| Property | Type | Description |
|---|---|---|
Expression | string | Source file path. |
DestinationPath | string | Destination file path. |
Overwrite | bool | Overwrite the destination if it already exists. |
FileExistsTask I/O
Checks whether a file exists and stores the result.
Output: bool
GetFileListTask I/O
Returns a list of file paths matching a search pattern.
| Property | Type | Description |
|---|---|---|
Expression | string | Directory path to search. |
Filter | string | File filter pattern (e.g., *.csv). |
SearchOption | SearchOption | Top-level only or all subdirectories. |
Output: string[]
GetFileInfoTask / GetFileNameTask / GetDirectoryNameTask I/O
Helper tasks that extract metadata from a file path:
- GetFileInfoTask – returns a
FileInfoobject. - GetFileNameTask – returns the file name component of a path as
string. - GetDirectoryNameTask – returns the directory component as
string.
CreateDirectoryTask / DeleteDirectoryTask / DirectoryExistsTask / GetDirectoryListTask / GetDirectoryInfoTask I/O
Directory management tasks. All accept an Expression property with the path.
- CreateDirectoryTask – creates the directory (and all parent directories).
- DeleteDirectoryTask – deletes the directory. Optional
Recursiveproperty. - DirectoryExistsTask – outputs
bool. - GetDirectoryListTask – outputs
string[]of subdirectory paths. - GetDirectoryInfoTask – outputs a
DirectoryInfoobject.
CombinePathTask / ReplaceFilePathTask I/O
- CombinePathTask – combines path segments using
Path.Combine. Output:string. - ReplaceFilePathTask – replaces parts of a file path string. Output:
string.
ExecuteScriptTask Runtime
Executes an inline C# script using the Roslyn scripting engine. The script can access DataContext and produce any output.
| Property | Type | Description |
|---|---|---|
Script | string | The C# script to execute. Access the data context via DataContext. |
CaptureException | bool | If true, exceptions are caught and returned as output instead of propagating. |
Output: object – the value returned by the script.
ShellExecuteTask Environment
Launches a process using Process.Start.
| Property | Type | Description |
|---|---|---|
Expression (FileName) | string | Executable path or file to open. |
Arguments | string | Command-line arguments. |
WorkingDirectory | string | Working directory for the process. |
WaitForExit | bool | Block until the process exits. Default: true. |
RedirectConsoleOutput | bool | Capture stdout/stderr. |
CreateNoWindow | bool | Do not create a console window. |
UseShellExecute | bool | Use the OS shell to launch (disables redirect and no-window). |
WindowStyle | ProcessWindowStyle | Normal, Minimized, Maximized, Hidden. |
AutoDispose | bool | Dispose the Process object after exit. Default: true. |
Output (default): ProcessExecutionResult – contains exit code and captured console output.
Output (secondary): Process – the raw process object (only when AutoDispose = false).
HttpClientTask Network
Sends an HTTP request to a URL.
| Property | Type | Description |
|---|---|---|
Expression (URL) | string | The request URL. |
Method | string | HTTP verb. Default: GET. |
Headers | Dictionary<string, string[]> | Additional request headers. |
ContentType | string | Content-Type header. Default: application/octet-stream. |
Content | string | Request body as a string. |
Input: byte[] – optional binary body (takes precedence over Content).
Output: HttpResponseMessage
ReadStringFromRequestTask / ReadQueryStringFromRequestTask / WriteStringToResponseTask Network
Companion tasks for the HttpListenerTrigger:
- ReadStringFromRequestTask – reads the request body as a
string. - ReadQueryStringFromRequestTask – reads a named query string parameter as a
string. - WriteStringToResponseTask – writes a string body to the HTTP response and closes it.
ReadStringFromHttpResponse Network
Reads the response body of an HttpResponseMessage (output of HttpClientTask) as a string.
CreateAuthenticationHeadersTask Network
Builds a set of HTTP authentication headers (e.g. Basic or Bearer) and stores them as an HttpCustomHeaders object that can be fed directly into HttpClientTask.
SendMailTask Messaging
Sends an e-mail via SMTP.
| Property | Type | Description |
|---|---|---|
Expression (Recipient) | string | To address. |
Sender | string | From address. |
DisplayName | string | Sender display name. |
Bcc | string | BCC address. |
Subject | string | E-mail subject. |
Body | string | E-mail body (plain text). |
Host | string | SMTP server hostname. |
Port | string | SMTP port. Default: 587. |
EnableSsl | bool | Default: true. |
UseDefaultCredentials | bool | Use the current Windows credentials. |
UserName / Password | string | SMTP credentials (used when UseDefaultCredentials = false). |
Input: string – optional body text (overrides the Body property).
SendMailViaGraphTask / SendMailViaGraphDelegatedTask Messaging
Send e-mail via the Microsoft Graph API using application or delegated permissions.
SerializeToJsonTask / DeserializeFromJsonTask Serialization
- SerializeToJsonTask – serializes the input object to JSON and outputs
byte[]. - DeserializeFromJsonTask – deserializes a JSON
byte[]to the configured target type.
ChatGptPromptTask Network
Sends a prompt to the OpenAI Chat Completions API and returns the response text.
| Property | Type | Description |
|---|---|---|
Expression | string | The prompt to send. |
ApiKey | string | OpenAI API key. |
Model | string | Model name, e.g. gpt-4o. |
Output: string – the model response text.
GoogleSearchTask Network
Performs a Google Custom Search and returns the results.
| Property | Type | Description |
|---|---|---|
Expression | string | Search query. |
ApiKey | string | Google API key. |
SearchEngineId | string | Custom Search Engine ID. |
String Tasks
ConcatStringsTask
Concatenates multiple string values. Configure each part in the Parts collection. Output: string.
StringReplaceTask
Replaces occurrences of a search string in the input. Properties: Expression (input), Search, Replace. Output: string.
StringSplitTask
Splits a string by a delimiter. Output: string[].
ConvertStringToByteTask / ConvertByteToStringTask
Convert between string and byte[] using the configured encoding.
Collection Tasks
CreateCollectionTask
Creates an empty List<object> and stores it in the context.
AddItemToCollectionTask / RemoveItemToCollectionTask / ClearCollectionTask
Modify a collection stored in the context. Input: the collection. The item to add/remove is supplied via the data context or expression.
GetCollectionItemCountTask
Returns the count of an ICollection. Output: int.
MergeCollectionsTask
Merges two collections into one. Output: List<object>.
Scope Tasks
Scope tasks contain child tasks in a dedicated Scope area and control how and when those children execute.
ForEachTask Scope
Iterates over an IEnumerable and executes the scope tasks for each item.
| Property | Type | Description |
|---|---|---|
Expression | string | Expression evaluating to an IEnumerable. |
ElementVariableName | string | Name of the variable holding the current iteration element. Defaults to the output variable name. |
AsParallel | bool | Execute iterations in parallel. |
ProceedIterationOnError | bool | Continue with the next item if an error occurs. |
Input: IEnumerable | Output: object (current item)
LoopTask Scope
Executes the scope tasks repeatedly as long as a condition expression evaluates to true.
| Property | Type | Description |
|---|---|---|
Expression | string | Boolean expression evaluated before each iteration. |
ExecuteAsynchronous | bool | Run the scope body asynchronously without blocking the outer workflow. |
ProceedIterationOnError | bool | Continue looping if an error occurs. |
ConditionalScope Scope
Executes the scope tasks only if the expression evaluates to true.
| Property | Type | Description |
|---|---|---|
Expression | string | Boolean expression to evaluate. |
TryCatchScopeTask Scope
Executes the scope tasks inside a try/catch. If an exception occurs it is swallowed and the error state is written to the context.
Output: bool – true if an error occurred, false otherwise.
AsyncTask Scope
Executes the scope tasks on a background thread or thread pool thread without blocking the main workflow execution.
| Property | Type | Description |
|---|---|---|
UseThreadPool | bool | Use the .NET thread pool. |
WaitForBranchCompletion | bool | Block until the async branch completes before the workflow continues. |
TimeThrottledScope Scope
Executes the scope tasks at most once within the configured interval. State is persisted to disk so the throttle survives process restarts.
| Property | Type | Description |
|---|---|---|
Interval | TimeSpan | The minimum time between executions. |
Expression | string | Additional boolean guard (default: true). |
ChangeDetectedScope Scope
Executes the scope tasks only when the value of the expression changes compared to its last evaluated value. The previous value is persisted to disk.
| Property | Type | Description |
|---|---|---|
Expression | string | The expression whose result is tracked for changes. |
SplitTask / MergeTask Scope
SplitTask fans out execution into multiple parallel branches. MergeTask synchronizes all branches before the workflow continues. These two tasks are used together to implement parallel fan-out / fan-in patterns.
Utility Tasks
GetDateTimeTask
Returns the current DateTimeOffset and optionally formats it as a string.
RandomNumberGeneratorTask
Generates a random integer between Min and Max. Output: int.
GetApplicationDirectoryTask
Returns the application base directory (AppContext.BaseDirectory) as a string.
CollectGarbageTask
Calls GC.Collect() to force garbage collection. Use sparingly.
DisposeObjectTask
Calls Dispose() on an IDisposable stored in the context.
EmptyTask
Does nothing. Useful as a placeholder node in the visual designer.
ThrowExceptionTask
Throws an exception unconditionally. Use in testing or to force an error path.
GetTasksErrorStateTask
Inspects child tasks and returns whether any of them is in an error state. Output: bool.
GetProcessesTask / SelectProcessTask
GetProcessesTask returns a list of all running processes. SelectProcessTask selects a specific process by name. Both output Process or Process[].
LoadAssemblyTask
Loads a .NET assembly from a file path into the current AppDomain at runtime.
ExecuteWorkflowTask
Loads and executes another workflow (.awf or .awfc) from within a workflow.
SingletonTask
Ensures that only one instance of its scope executes at a time, even across parallel trigger firings.