TABLE OF CONTENTS
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
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:
Input: Used when passing values from the caller to the callee.
Output: Used when passing values from the callee back to the caller.
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).
Value: io_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
Feedback sent
We appreciate your effort and will try to fix the article