"Invoke Workflow File" Activity

Created by akaBot Support, Modified on Thu, 23 Jan at 5:45 PM by akaBot Support

TABLE OF CONTENTS

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

1. Activity program name

RCA.Activities.Core.InvokeWorkflowFile

2. Description

  • For Studio versions up to 2.0.2.0:
    Quick Access: "Toolbox" > "Invoke" > "Invoke Workflow File"

  • For Studio versions from 2.0.3.0 onwards:
    Quick Access: "Toolbox" > "Core" > "Invoke" > "Invoke Workflow File"

This activity allows you to synchronously invoke a specified workflow and pass input parameter arguments. Additionally, you can import arguments from the specified workflow using the "Import Arguments" button.

  • Verified Studio version: 2.1.1.2

  • Note: Terminology or wording may vary slightly depending on the version.

3. Properties

Property Group

Property Name

Input Field

Description

Option

Workflow Timeout

Input value (TimeSpan)

Specifies the amount of time to wait for the activity to execute before an error is thrown.

Misc

Public

Checkbox

Logs variables and arguments within the activity into the log file and pushes them to the Center. (See "About the 'Public' Property.")

Display Name

Any string

Reflected in the Designer Panel as the activity's name.

General

Continue on Error

Input value (Boolean)

Specifies whether to continue processing if an error occurs. Set to True or False (default: False).

Input

Workflow File Name

Input value (String)

The file path of the .xaml file to be invoked.

Arguments

Input value (String)

Sets parameters to be passed to the invoked workflow.


4. How to Use

Below is an example of using the "Invoke Workflow File" activity to display a message box.

Using "Invoke Workflow File"

In the Designer Panel, clicking "Edit Arguments" will open the "Workflow Arguments" dialog. There are three argument directions to choose from:

  1. Input: Used when passing values from the caller to the callee.

  2. Output: Used when passing values from the callee back to the caller.

  3. Input/Output: Used when passing values in both directions between the caller and callee.

Here, we will review examples for the "Input" and "Input/Output" directions.

Creating the Sub.xaml Workflow

Caller: Main.xaml
Callee: Sub.xaml

Navigate to Home > New > Sequence.

In the "New Diagram" dialog box, set the name as Sub and click Create.

Ensure that a separate Sub.xaml file has been created.


Example with "Input" Direction

Passing values from the caller (Main.xaml) to the callee (Sub.xaml).

Open Sub.xaml and drag and drop a Message Box from "Core" > "Dialog" onto the Designer Panel.

Open the Arguments panel and create an argument:

  • Name: in_Message

  • Direction: In

  • Argument Type: String

In the Message Box's Properties, under Input > Text, input the argument name (in_Message in this example).

Save Sub.xaml (Home > Save > Save).

Open Main.xaml and drag and drop an Assign activity from "System > Original" onto the panel.

In the Properties, set:

  • To: A String variable (e.g., sample).

  • Value"Welcome to akaBot Support!".

Drag and drop an Invoke Workflow File activity from "Core > Invoke" onto the panel.

Click ... and select Sub.xaml in the "Select Workflow to Invoke" dialog box.

Click Import Arguments, map the in_Message argument to the sample variable, and click OK.

Run the workflow (Home > Start or press F5).
A message box will display:
"Welcome to akaBot Support!".


Example with "Input/Output" Direction

Passing values to the callee and receiving values back in the caller.

Create Sub.xaml (refer to the earlier instructions).

In Sub.xaml, drag and drop an Assign activity and set:

  • To: A String variable (e.g., addsample).

  • Value"  We're here to support you to use akaBot with our best".

Add another Assign activity, setting:

  • To: An Input/Output argument (e.g., io_Message).

  • Valueio_Message + addsample.

Save Sub.xaml.

Open Main.xaml, drag and drop an Assign activity, and set:

  • To: A String variable (e.g., sample).

  • Value"Welcome to akaBot Support!".

Drag and drop an Invoke Workflow File activity and configure it to invoke Sub.xaml.

Click Import Arguments, map the io_Message argument to the sample variable, and click OK.

Drag and drop a Message Box activity, setting its Input > Text to the sample variable.


Run the workflow (Home > Start or press F5).
A message box will display:
"Welcome to akaBot Support!  We're here to support you to use akaBot with our best".

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