Final State

Created by akaBot Support, Modified on Tue, 8 Oct, 2024 at 2:08 PM by akaBot Support

Introducing the "Final State" Activity

Table of Contents

  1. Activity program name
  2. Description
  3. Properties
  4. How to use


1. Activity program name

System.Activities.Statements.State

2. Description

  • Quick Access: Toolbox > System > State Machine > Final State

This activity is used when you want to end a state machine workflow.

Tested on akaBot Studio version 2.2.0.5
Note: There might be some differences in terms depending on the version.

3. Properties

Property category
Property name
Input field
Description
Others
Display Name
Any string
The display name of the activity shown on the design panel.



4. How to use

The following is an example of how to use the "Final State" to determine if a day is a report creation day based on the day of the week. To use the "Final State," you need to place the State Machine and State activities.

First, drag and drop System > State Machine > State Machine into the designer panel.

Refer to this guide for details on how to place the State Machine.



Next, drag and drop "State" from "System" > "State Machine" into the designer panel.


After double-clicking on the "State," drag and drop "Assign" from "System" > "Primitives" into the "Entry" section and place it there.



In the properties, under "Others" > "To", input a String type variable (in this example, "day") and also input a value (in this example, DateTime.Now.ToString("ddd")).
※ Please refer to "Creating Variables" for details on how to create variables.



Return to the "State Machine", then drag and drop "Final State" from System > State Machine, and place it in the workflow.


Double-click on the part labeled "T1" on the transition line connecting the "State" and the "Final State".


In the "Properties" panel, go to "Others" > "Condition" and enter the expression (in this example, enter day = "Monday").



Return to the "State Machine" and double-click the placed "Final State".



To check the execution results, place "System" > "Original" > "Write Line," and set the necessary variables, etc.
In this example, enter "Report creationg date"



Return to the "State Machine," then drag and drop "System" > "State Machine" > "Final State" to place it, and connect it with the "State" using a transition line.



Double-click the section marked "T1" on the transition line connecting the second "State" and the "Final State."



In the properties, enter the expression (in this example, day <> "Monday") in the "Other" > "Condition" section, and change the "DisplayName" from "T1" to "T2."
Note: The text in "DisplayName" can be changed to any string of your choice.



Return to the "State Machine" and double-click the second "Final State."



In order to verify the execution results, place "Write Line" under "System" > "Primitives," and set the necessary variables, entering "Report creation is not required" in this example.



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

When executed on a Monday, verify that it displays "Report creation date".

When executed on a day other than Monday, verify that it displays "Report creation is not required".



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