AAurora Workflows
Get started
Documentation

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.

PropertyTypeDescription
ExpressionstringThe C# expression to evaluate. Required
CustomOutputVariableNamestringName under which the result is stored in the context.

Output: object – the evaluated expression result.

A 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.

PropertyTypeDescription
ExpressionstringThe message or expression to print.
ColorConsoleColor?Optional console foreground color.
LogLevelLogLevelMicrosoft.Extensions.Logging level. Default: Information.
UseVsDebugOutputboolAlso write to the Visual Studio debug output window.

WaitTask Core

Pauses execution for a configurable duration with optional random jitter.

PropertyTypeDescription
Intervalint (ms)Base wait time in milliseconds.
Toleranceint (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.

PropertyTypeDescription
ExpressionstringFile path or expression evaluating to a file path.

Output: byte[] – raw file bytes.

WriteFileTask I/O

Writes a byte array to a file.

PropertyTypeDescription
ExpressionstringFile path or expression evaluating to a file path.
AppendboolAppend to the file instead of overwriting. Default: false.

Input: byte[] – the data to write.

DeleteFileTask I/O

Deletes the file at the given path.

PropertyTypeDescription
ExpressionstringFile path to delete.

FileCopyTask I/O

Copies a file from source to destination.

PropertyTypeDescription
ExpressionstringSource file path.
DestinationPathstringDestination file path.
OverwriteboolOverwrite 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.

PropertyTypeDescription
ExpressionstringDirectory path to search.
FilterstringFile filter pattern (e.g., *.csv).
SearchOptionSearchOptionTop-level only or all subdirectories.

Output: string[]

GetFileInfoTask / GetFileNameTask / GetDirectoryNameTask I/O

Helper tasks that extract metadata from a file path:

  • GetFileInfoTask – returns a FileInfo object.
  • 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 Recursive property.
  • DirectoryExistsTask – outputs bool.
  • GetDirectoryListTask – outputs string[] of subdirectory paths.
  • GetDirectoryInfoTask – outputs a DirectoryInfo object.

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.

PropertyTypeDescription
ScriptstringThe C# script to execute. Access the data context via DataContext.
CaptureExceptionboolIf 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.

PropertyTypeDescription
Expression (FileName)stringExecutable path or file to open.
ArgumentsstringCommand-line arguments.
WorkingDirectorystringWorking directory for the process.
WaitForExitboolBlock until the process exits. Default: true.
RedirectConsoleOutputboolCapture stdout/stderr.
CreateNoWindowboolDo not create a console window.
UseShellExecuteboolUse the OS shell to launch (disables redirect and no-window).
WindowStyleProcessWindowStyleNormal, Minimized, Maximized, Hidden.
AutoDisposeboolDispose 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.

PropertyTypeDescription
Expression (URL)stringThe request URL.
MethodstringHTTP verb. Default: GET.
HeadersDictionary<string, string[]>Additional request headers.
ContentTypestringContent-Type header. Default: application/octet-stream.
ContentstringRequest 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.

PropertyTypeDescription
Expression (Recipient)stringTo address.
SenderstringFrom address.
DisplayNamestringSender display name.
BccstringBCC address.
SubjectstringE-mail subject.
BodystringE-mail body (plain text).
HoststringSMTP server hostname.
PortstringSMTP port. Default: 587.
EnableSslboolDefault: true.
UseDefaultCredentialsboolUse the current Windows credentials.
UserName / PasswordstringSMTP 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.

PropertyTypeDescription
ExpressionstringThe prompt to send.
ApiKeystringOpenAI API key.
ModelstringModel name, e.g. gpt-4o.

Output: string – the model response text.

GoogleSearchTask Network

Performs a Google Custom Search and returns the results.

PropertyTypeDescription
ExpressionstringSearch query.
ApiKeystringGoogle API key.
SearchEngineIdstringCustom 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.

PropertyTypeDescription
ExpressionstringExpression evaluating to an IEnumerable.
ElementVariableNamestringName of the variable holding the current iteration element. Defaults to the output variable name.
AsParallelboolExecute iterations in parallel.
ProceedIterationOnErrorboolContinue with the next item if an error occurs.

Input: IEnumerable  |  Output: object (current item)

Scope tasks must have child elements in the Scope area.

LoopTask Scope

Executes the scope tasks repeatedly as long as a condition expression evaluates to true.

PropertyTypeDescription
ExpressionstringBoolean expression evaluated before each iteration.
ExecuteAsynchronousboolRun the scope body asynchronously without blocking the outer workflow.
ProceedIterationOnErrorboolContinue looping if an error occurs.
Scope tasks must have child elements in the Scope area.

ConditionalScope Scope

Executes the scope tasks only if the expression evaluates to true.

PropertyTypeDescription
ExpressionstringBoolean expression to evaluate.
Scope tasks must have child elements in the Scope area.

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: booltrue if an error occurred, false otherwise.

Scope tasks must have child elements in the Scope area.

AsyncTask Scope

Executes the scope tasks on a background thread or thread pool thread without blocking the main workflow execution.

PropertyTypeDescription
UseThreadPoolboolUse the .NET thread pool.
WaitForBranchCompletionboolBlock 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.

PropertyTypeDescription
IntervalTimeSpanThe minimum time between executions.
ExpressionstringAdditional boolean guard (default: true).
Scope tasks must have child elements in the Scope area.

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.

PropertyTypeDescription
ExpressionstringThe expression whose result is tracked for changes.
Scope tasks must have child elements in the Scope area.

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.