TerminateWorkflow

Created by akaBot Support, Modified on Mon, 18 Nov, 2024 at 3:47 PM by akaBot Support

This section introduces the EndWorkflow activity.


TABLE OF CONTENTS


1. Activity program name


Stystem.Activities.Statements.TerminateWorkflow


2. Description


Studio version ~2.0.2.0

 

Quick access: Toolbox > Runtime > Terminate Workflow


Studio Version 2.0.3.0~

Quick access: Toolbox > System > Runtime > Terminate Workflow


This activity allows you to terminate a workflow at any point and throw an exception.

3. Properties


Property category

Property nameInput fieldDescription
OtherPublicCheck box

The variables and arguments within the activity are written to the log file and pushed to the Center. (For details, refer to "Property Item 'Public'").

Display name


Arbitrary String

The name of the activity as displayed in the designer panel.

Reason

Value Input (String Type)

Enter the reason for terminating the workflow.

Exception


Value Input (Exception Type)

Set the exception to be thrown when the workflow is terminated.


4. How to use


Let's try terminating a workflow created using the "Write Line" activity.

As a preparation step, ensure that the Agent log level is set to "VERBOSE."
In order to check the output of the "Reason" and "Exception" fields in the output panel or log, you must set the Agent log level to "VERBOSE" before executing the workflow. For more details about the Agent, refer to "How to Use Agent."

After confirming the Agent log level, first, drag and drop System > Original > Write Line into the design panel.

In the "Text" field of the properties under Other, input a string or String-type variable (in this example, we use the string "StartTest").

Next, drag and drop System > Runtime > Terminate Workflow into the design panel.

In the "Reason" field of the properties under Other, input a string or String-type variable (in this example, the string "EndWorkflow").

Then, drag and drop another System > Original > Write Line activity into the design panel. In the "Text" field of the properties under Other, input a string or String-type variable (in this example, "EndTest").

Click Home > Start or press F5 to execute the workflow and open the output panel.

Since the second Write Line activity is not executed, there will be no entry for "Test End". Also, confirm that in the "Reason" field, the value "EndTest" is displayed, which was set in the "Reason" property of the Terminate Workflow activity.



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article