Execution & History

Understanding how to execute automation tasks and review their history is essential for successful automation operations in AZExecute. This guide covers task execution, monitoring, and troubleshooting using execution history.


Executing Automation Tasks

There are several ways to execute an automation task, depending on your role and the task's publication status:


Method 1: From Task Configuration Page (Operators)

When viewing a task's configuration page on the Steps tab, click the Execute button in the toolbar.

Execute from Configuration Page

Method 2: From Automation Tasks List (Operators)

In the Automation Tasks table, click the Execute button in the options column for any task.

Execute from Tasks List

Method 3: From Published Tasks (All Users)

If a task is published, users can execute it from the Published Tasks section without needing Operator access.

Execute Published Task

The Execution Dialog

When you execute a task, a dialog appears prompting you for any required parameters:

Task Information:

The dialog shows the task name and description to confirm you're executing the correct task.

Custom Parameters:

If the task has linked custom parameters, input fields appear for each parameter. Mandatory parameters are marked with an asterisk (*).

Validation:

The Execute button remains disabled until all mandatory parameters have valid values.

Help Text:

Parameter descriptions provide guidance on what values to enter.

Execution Dialog

Parameter values you provide are stored with the execution history for audit purposes and can be reviewed later.


Monitoring Task Execution

After clicking Execute, the task begins running in the background:

Automatic Navigation:

You're automatically redirected to the task's History tab where you can monitor progress in real-time.

Real-Time Updates:

The execution status updates automatically as steps complete. You don't need to refresh the page.

Progress Indicators:

Visual indicators show which steps are running, completed, or failed.

Step Output:

Expand individual steps to view their output in real-time as they execute.

Monitoring Task Execution

Execution Status States

Task executions progress through several status states:

Created:

The task execution has been queued but hasn't started yet. This state is usually brief.

Running:

The task is currently executing. One or more steps are actively running.

Completed:

All steps executed successfully. The task finished without errors.

Failed:

One or more steps failed. If "Stop on Failure" was enabled for the failed step, execution halted. Error details are available in the step output.

Suspended:

The task execution was paused (if your implementation supports task suspension).

Stopped:

The task was manually cancelled or stopped by an operator.

Execution Status States

Viewing Execution History

The History tab on each task's configuration page shows all past executions:


History Table Columns:

Execution Time: When the task started executing

Duration: How long the task took to complete (or how long it's been running)

Status: Final outcome (Completed, Failed, Running, etc.)

Executed By: Which user triggered the execution

Steps Completed: Number of steps that finished successfully vs. total steps

History Table

Expanding Execution Details:

Click on any execution row to expand and view detailed information:

Step-by-Step Results: See the status and output of each individual step

Step Output: View the complete console output from each step's execution

Error Details: If a step failed, view detailed error messages and stack traces

Parameter Values: Review what parameter values were provided for this execution

Global Variables: See all variables created during the execution and their values

Execution Details

Step Execution Details

Within an execution's details, you can expand individual steps to see their specific results:

Step Name and Type:

Identifies which step this is and what type of operation it performed.

Execution Order:

Shows the step's position in the task workflow.

Status:

Whether the step succeeded, failed, or was skipped.

Start and End Time:

When the step started and finished executing.

Duration:

How long the step took to execute.

Output Log:

Complete console output from the step's execution. This includes all Write-Host, Write-Output, and error messages.

Variables Created:

Lists any global variables this step created for use by later steps.

Step Execution Details

Troubleshooting Failed Executions

When a task execution fails, the execution history provides all the information you need to diagnose the problem:


Step 1: Identify the Failed Step

In the execution details, look for steps with a Failed status. These are typically highlighted in red or with an error icon.

Identify Failed Step

Step 2: Review Error Details

Expand the failed step to view:

• The error message describing what went wrong

• The complete output log leading up to the failure

• Any stack traces or exception details

Error Details

Step 3: Check Parameter Values

Review the parameter values that were provided for this execution. Incorrect parameter values are a common cause of failures.


Step 4: Verify Variable References

If the failed step uses global variables, check that:

• The variables were created by previous steps

• Variable names are spelled correctly (case-sensitive)

• Variables contain expected values


Step 5: Review Previous Steps

Sometimes a step fails because a previous step didn't produce expected output or didn't set up required prerequisites. Review the output of all steps before the failed one.


Common Failure Scenarios:

Permission Denied: The automation account or agent service account lacks necessary permissions

Resource Not Found: Target machine, Azure resource, or file path doesn't exist or isn't accessible

Timeout: Step took too long to complete (check if Azure resources are responsive)

Script Error: PowerShell script has a bug or syntax error

Invalid Parameter: Parameter value is in wrong format or outside acceptable range

Network Connectivity: Agent can't reach target systems or Azure services


Execution History Retention

Execution history is retained according to your organization's retention policies:

Default Retention:

By default, execution history is retained for 90 days. Older executions are automatically purged.

Extended Retention:

TenantAdmins can configure longer retention periods in the system settings if needed for compliance or auditing.

Export Capability:

Execution details can be exported for archival purposes before they're purged.

When execution history is purged, associated global variables are also deleted. Ensure you extract any important data before the retention period expires.


Best Practices for Execution Management

Monitor Long-Running Tasks:

For tasks that take more than a few minutes, periodically check the History tab to ensure they're progressing normally.

Review Failed Executions Promptly:

Investigate failures as soon as they occur while the context is fresh and logs are still available.

Use Descriptive Parameter Values:

When providing parameters, use clear values that will make sense when reviewing history later (e.g., "Production-WebServer-01" instead of "srv1").

Document Common Issues:

Keep notes about recurring failure patterns and their solutions for future reference.

Test Before Production:

Always test tasks in non-production environments first. Review execution history from tests to verify all steps work correctly.

Audit Published Tasks:

Regularly review execution history for published tasks to identify misuse or unexpected patterns.


Filtering and Searching History

The execution history table provides filtering and search capabilities to help you find specific executions:

Date Range Filter: Show only executions within a specific time period

Status Filter: Display only successful, failed, or running executions

User Filter: See only executions triggered by specific users

Search: Find executions by searching parameter values or output text

Filter Execution History

If you encounter any issues or need further assistance, please contact us at

info@azexecute.com

. Our support team is here to help you.

An unhandled error has occurred. Reload 🗙
An unhandled error has occurred. Reload 🗙