Display custom message when user cancels an Custom Automation Service task

Display custom message when user cancels an Custom Automation Service task

book

Article ID: KB0076711

calendar_today

Updated On:

Products Versions
Spotfire Analyst All Versions

Description

When running an Automation Job locally, 'Execute Locally' uses the TIBCO Spotfire installed client’s internal progress framework to execute jobs. This allows for better progress of the execution and the ability to cancel/abort the job execution.

Issue/Introduction

Display a user friendly message when a user cancels a custom automation service task when executing locally from Client Job Builder in Spotfire Analyst

Resolution

To do this, use ProgressCanceledException to provide a custom message when a user cancels the job.

For example:
try 
{ 
if (valid condition not met) 
{ 
return new TaskExecutionStatus(false); 
} 
catch (Spotfire.Dxp.Framework.ApplicationModel.ProgressCanceledException ex) 
{ 
return new TaskExecutionStatus(false,"The job execution was cancelled by the user."); 
}

Additional Information

Documentation: