- Overview
- Callout
- Complex Scenarios
- Credentials
- Data Service
- Form
- Release notes
- Project compatibility
- Real Time Forms
- Updating form data
- Running forms using JavaScript
- Customizing Forms Using CSS
- Conditional components
- Adding multiple components on the same row in Columns
- Using the Data Table component
- Get File/Folder path
- Reading cell values from a Data Grid component
- Displaying PDF files
- Displaying images in forms
- Scrolling through Data Grids
- Using Dev Tools with forms
- Calculate form component values
- Managing dates in forms
- Opening hyperlinks inside forms
- Displaying a default tab in forms
- Displaying the full label of a component
- Searching long strings in drop-down lists
- About the pre 23.4 Form experience
- Project Compatibility
- Real Time Forms
- Dynamic Checkboxes
- Conditional Dropdowns
- Displaying a Default Tab
- Displaying Images
- Displaying PDF Files
- Displaying the Full Label
- Dynamic HTML Elements
- Managing Dates
- Searching Long Strings in Drop-downs
- Customizing Forms Using Local CSS Files
- Executing Do Block On Checkbox Change
- Customizing Columns Width
- Updating Form Data
- Resetting Collection Data
- Advanced Logic
- Executing Do Block on Dropdown Option Change
- Reading Cell Values From a Data Grid Component
- Conditional Components
- Scrolling Through Data Grid Components
- Using the Grid Component
- Dev Tools
- Calculated Value
- Dynamic Dropdowns
- Switching Tabs With Button Click
- Opening Hyperlinks Inside Form
- FTP
- IPC
- Persistence
- Release notes
- Project compatibility
- About the Persistence activity package
- Bulk Form Designer
- Start Job And Get Reference
- Wait For Job And Resume
- Add Queue Item And Get Reference
- Wait For Queue Item And Resume
- Wait For Form Task And Resume
- Resume After Delay
- Assign Tasks
- Create External Task
- Wait For External Task And Resume
- Complete Task
- Forward Task
- Get Form Tasks
- Get Task Data
- Get App Tasks
- Add Task Comment
- Update Task Labels
- Create App Task
- Wait For App Task And Resume
- Configure task timer
- Working with App tasks
- Building Your First Form Action
- Advanced Controls for Drop-downs
- Embedding Objects in Form Actions
- Allowing Users to Upload Files to the Storage Bucket
- Adding Advanced Logic Using Java Script
- Setting a Default Tab
- Removing the Delete button from Edit Grid using custom CSS
- Customizing Edit Grid templates
- Using buttons to trigger custom logic
- Using an External Form Layout
- Dynamically expanding form components at runtime
- Aligning the content of a form component from left to right using JSON attributes
- Sample Workflows
- Automation Ops Pipelines
- System
- Release notes
- About the System activity package
- Project compatibility
- Supported character encoding
- RegEx Builder Wizard
- Add Data Column
- Add Data Row
- Add Log Fields
- Add or Subtract from Date
- Add Transaction Item
- Add Queue Item
- Append Item to Collection
- Append Item to List
- Append Line
- Beep
- Break / Exit Loop
- Browse for File
- Browse for Folder
- Build Collection
- Build Data Table
- Bulk Add Queue Items
- Change Case for Text
- Change Type
- Check False
- Check True
- Clear Data Table
- Collection to Data Table
- Comment
- Compress/Zip Files
- Copy File
- Copy Folder
- Combine text
- Comment Out / Disabled Activities
- Continue / Skip Current
- Create File
- Create Folder
- Create List
- Custom Input
- Delete
- Delete File
- Delete Folder
- Delete Storage File
- Delete Queue Items
- Disable Local Trigger
- Do While
- Download file from URL
- Download Storage File
- Enable Local Trigger
- Evaluate Business Rule
- Exists in Collection
- Extract/Unzip Files
- Extract Date and Time from Text
- Extract Text
- File Change Trigger
- File Exists
- Filter Collection
- Filter Data Table
- Folder Exists
- For Each
- For Each File in Folder
- File Change Trigger V3
- Find and Replace
- Find Matching Patterns
- For Each Folder in Folder
- For Each Row in Data Table
- Format Date as Text
- Format Value
- Generate Data Table From Text
- Get Asset
- Get Credential / Get Orchestrator Credential
- Get Current Job Info
- Get Environment Folder
- Get Environment Variable
- Get File Info
- Get Folder Info
- Get Jobs
- Get Processes
- Get Row Item
- Get Transaction Item
- Get Username/Password
- Get Queue Items
- Global Variable Changed Trigger
- Input Dialog
- Invoke Code
- Invoke Com Method
- Invoke Power Shell
- Invoke Process
- Invoke VBScript
- Invoke Workflow File
- Is Text Matching
- Join Data Tables
- Kill Process
- Launch Workflow Interactive
- List Storage Files
- Log Message
- Lookup Data Table
- Manual Trigger
- Merge Collections
- Merge Data Table
- Message Box
- Modify Date
- Modify Text
- Move File
- Move Folder
- Multiple Assign
- New Item Added to Queue
- Notify Global Variable Changed
- Orchestrator HTTP Request
- Output Data Table
- Path Exists
- Postpone Transaction Item
- Process End Trigger
- Process Start Trigger
- Raise Alert
- Read List Item
- Read Text File
- Read Storage Text
- Remove Data Column
- Remove Data Row
- Remove Duplicate Rows
- Remove From Collection
- Remove Log Fields
- Replace Matching Patterns
- Repeat Number of Times
- Repeat Trigger
- Rename File
- Rename Folder
- Report Status
- Reset Timer
- Resume Timer
- Retry Scope
- Return
- Run Local Triggers
- Run Parallel Process
- Set Asset
- Set Credential
- Set Environment Variable
- Set Transaction Progress
- Set Transaction Status
- Should Stop
- Split Text
- Sort Data Table
- Start Timer
- Start Job
- Stop Job
- Stop Local Triggers
- Stop Timer
- Text to Left/Right
- Text to Upper/Lowercase
- Time Trigger
- Trigger Scope
- Timeout Scope
- Update Row Item
- Update List Item
- Upload Storage File
- Wait for Download
- Wait Queue Item
- While
- Workflow Placeholder
- Write Storage Text
- Write Text File
- AddDataRow
- AddQueueItem
- AddTransactionItem
- AppendLine
- BulkAddQueueItems
- ClearDataTable
- CompressZipFiles
- CopyFile
- CreateFile
- CreateFolder
- DeleteFileOrFolder
- DeleteQueueItems
- DeleteStorageFile
- DownloadStorageFile
- ExtractUnzipFiles
- FilterDataTable
- GetAsset
- GetCredential
- GetJobs
- GetQueueItem
- GetQueueItems
- GetResourceForLocalPath
- GetRowItem
- GetTransactionItem
- InvokeProcess
- JoinDataTables
- ListStorageFiles
- LookUpDataTable
- MergeDataTable
- MoveFile
- OrchestratorHTTPRequest
- OutputDataTable
- PathExists
- PostponeTransactionItem
- ReadStorageText
- ReadTextFile
- RemoveDataColumn
- RemoveDuplicateRows
- Replace
- SetAsset
- SetCredential
- SetTransactionProgress
- SetTransactionStatus
- SortDataTable
- StartJob
- StopJob
- UpdateRowItem
- UploadStorageFile
- WaitQueueItem
- WriteStorageText
- WriteTextFile
- Testing
- Release notes
- About the Testing activity package
- Project compatibility
- Project Settings
- Add Test Data Queue Item
- Address
- Attach Document
- Bulk Add Test Data Queue Items
- Create Comparison Rule
- Delete Test Data Queue Items
- Get Test Data Queue Item
- Get Test Data Queue Items
- Given Name
- Last Name
- Random Date
- Random Number
- Random String
- Random Value
- Verify Control Attribute
- Verify Documents Equivalence
- Verify Expression
- Verify Expression With Operator
- Verify Range
- Verify Text Equivalence
- Address
- AddTestDataQueueItem
- AttachDocument
- BulkAddTestDataQueueItems
- DeleteTestDataQueueItems
- GetTestDataQueueItem
- GetTestDataQueueItems
- GivenName
- LastName
- RandomDate
- RandomNumber
- RandomString
- RandomValue
- VerifyAreEqual
- VerifyAreNotEqual
- VerifyContains
- VerifyExpression
- VerifyExpressionWithOperator
- VerifyIsGreater
- VerifyIsGreaterOrEqual
- VerifyIsLess
- VerifyIsLessOrEqual
- VerifyIsRegexMatch
- VerifyRange
- Workflow Events
- Workflow Foundation
Sample Workflows
The Snippets panel in UiPath Studio stores XAML files added by users. The sample XAML files are stored in folders. The folder that stores XAML files used in long-running workflows is called Orchestration.
The sample XAML files are read-only. You need to create a separate Process in Studio, where you replicate the activities and configurations found in the snippets.
These snippets represent sample workflows created with the activities available in the Persistence activity package.
Prerequisites
- To develop long-running workflows, based on the workflows in the Snippets panel, you need to have the UiPath.Persistence.Activities package installed.
- We recommend using the Orchestration Process template to start building long-running workflows.
This snippet creates a Queue Item and suspends the workflow until the processing of that Queue Item is completed.
-
Drag an Add Queue Item And Get Reference activity into your workflow.
This activity adds a Queue Item into a Queue container located in Orchestrator, using In/Out parameters. Then it retrieves the corresponding data about the newly created Queue Item Object into aQueueItemData
type variable, in order to suspend the workflow, until the Queue Item is added into the Queue. See the Add Queue Item And Get Reference page for more information about the activity.When the Queue Items are added to the Orchestrator Queue, allQueueItemData
type variables will be populated with the data retrieved from Orchestrator.-
In the Item Information collection, create a parameter with the Direction In/Out and set the value as a variable that you want to pass as a Queue Item. For this example, pass a String variable named
Test
. - In the
QueueItemObject(Output) property field, press
CTRL + k
on your keyboard and create aQueueItemData
type variable, to store the data about the queue item, after it was created in Orchestrator. For this example, create aQueueItemData
variable namedQueueItemObject
.
-
- Drag any activities that you want to run before the workflow is suspended to retrieve data about the queue item. In this snippet, the Any steps to be executed before suspending the workflow section is commented out, acting as a container inside which you can place activities that won't be executed at runtime.
-
Drag a Wait For Queue Item And Resume activity into your workflow.
This activity waits for a Queue Item to be added and processed in Orchestrator, in order to retrieve data about it and map it back into the workflow, inside theQueueItemData
type variables. See the Wait For Queue Item And Resume page for more information about the activity.-
In the Queue Item Object (Input) property field, pass the
QueueItemObject
variable, to reference the exact queue item that you wanted to add to Orchestrator. -
In the Queue Item Object (Output) property field, press
CTRL + k
on your keyboard and create aQueueItemData
type variable to store the data about the queue item after it was processed and retrieved.
-
- Add a Write Line activity into your workflow, to print out the Queue Item that you added in Orchestrator. For this example, in the Text property field, pass the
Test
variable.
This snippet creates an External Action and suspends the workflow until the user completes the action.
-
Drag a Create External Task activity into your workflow.
This activity creates an External Action in Action Center with the given Task Title, Task Priority, Task Catalog (now called Action Catalog) and Task Data. See the Create External Task page for more information about the activity.
-
Populate the TaskDataCollection property window with arguments that pass information In, Out, or In/Out. For this example, create three arguments, each of them with a different Direction:
In
,Out
, andIn/Out
. Set the Type asString
. For the Value field, pressCTRL + K
on you keyboard and create three variables, that either give information (forIn
type arguments), or extract information ( forOut
type arguments).For this example, create three String type variables:
- InVariable - the
Value of the argument of type
In
. - OutVariable - the
Value of the argument of type
Out
. -
InOutVariable - the Value of the argument of type
In/Out
.
CTRL + k
on your keyboard and create anExternalTaskData
type variable. For this example, name the variableTaskPersistData
. ThisExternalTaskData
object is used to pass data from Orchestrator, in order to let the Robot know that until a specific Action task is completed, the workflow is suspended.
- InVariable - the
Value of the argument of type
- Add any activities that you want to run before the workflow is suspended to
retrieve data about the
ExternalTaskData
object.- For this example, drag and drop a Sequence activity into your
workflow and populate with three Write Line activities. Each
Write Line activity is meant to output the data of the three
variables passed in the External Task. Pass the following values in the
Text property fields:
InVariable
,OutVariable
,InOutVariable
.
- For this example, drag and drop a Sequence activity into your
workflow and populate with three Write Line activities. Each
Write Line activity is meant to output the data of the three
variables passed in the External Task. Pass the following values in the
Text property fields:
-
Drag a Wait For External Task and Resume activity into your workflow.
This activity suspends the workflow until an External Task is completed, and then maps it back into the workflow, inside theExternalTaskData
type variables. See the Wait For External Task And Resume page to learn more about this activity.-
In the Task Object (Input) property field, pass the
ExternalTaskData
variable, to reference the exact External Task that you created. For this example, pass theTaskPersistData
variable. -
In the Task Action property field, press
CTRL + k
on your keyboard and create a String type variable and name itTaskAction
. This stores the action taken by the user to complete the task. -
In the Task Object (Output) property field, press
CTRL + k
on your keyboard and create anExternalTaskData type variable and name itTaskData
. This variable stores the updated Task object retrieved from Orchestrator after the completion of the External Action.
-
-
Add any activities that you want to run after the workflow is resumed. For this example, print in the Output panel all the values retrieved after the completion of the External Action, using four Write Line activities. Pass the following variables in the Text fields:
TaskAction
,InVariable
,OutVariable
,InOutVariable
.
This snippet creates a Form Action and suspends the workflow until the user completes the Action.
-
Drag a Create Form Task activity into your workflow.
This activity creates a Form Action in Action Center with the given Task Title, Task Priority, Task Catalog (now called Action Catalog) and Task Data. See the Create Form Task page for more information about the activity.
-
Populate the Task Data Collection property window with arguments that pass information In, Out, or In/Out. For this example, create three arguments, each of them with a different Direction:
In
,Out
, andIn/Out
. Set the Type asString
. For the Value field, pressCTRL + K
on you keyboard and create three variables that either give information (forIn
type arguments) or extract information ( forOut
type arguments).For this example, create three String type variables:
- InVariable - the
Value of the argument of type
In
. - OutVariable - the
Value of the argument of type
Out
. -
InOutVariable - the Value of the argument of type
In/Out
.
In the Task Object (Output) property field, pressCTRL + k
on your keyboard and create aFormTaskData
type variable. For this example, name the variableTaskPersistData
. ThisFormTaskData
object is used to pass data from Orchestrator, in order to let the Robot know that until a specific Action task is completed, the workflow is suspended.
- InVariable - the
Value of the argument of type
- Add any activities that you want to run before the workflow is suspended to retrieve data about the
FormTaskData
object. For this example, drag and drop a Sequence activity into your workflow and populate it with three Write Line activities. Each Write Line activity is meant to output the data of the three variables passed in the External Action. Pass the following values in the Text property fields:InVariable
,OutVariable
,InOutVariable
. -
Drag a Wait For External Task and Resume activity into your workflow.
This activity suspends the workflow until a Form Action is completed, and then maps it back into the workflow, inside theFormTaskData
type variables.-
In the Task Object (Input) property field, pass the
FormTaskData
variable, to reference the exact Form Task that you created in Action Center. For this example, pass theTaskPersistData
variable. -
In the Task Action property field, press
CTRL + k
on your keyboard and create a String type variable and name itTaskAction
. This stores the action taken by the user to complete the task. -
In the Task Object (Output) property field, press
CTRL + k
on your keyboard and create a FormTaskData type variable and name itTaskData
. This variable stores the updated Task object retrieved from Orchestrator after the completion of the task.
-
- Drag any activities that you want to run after the workflow is resumed. For this example, pass in the Output panel all the values retrieved after the completion of the External Action, using four Write Line activities. Pass the following variables in the Text fields:
TaskAction
,InVariable
,OutVariable
,InOutVariable
.
This snippet creates two External Actions, assigns them to a user, and displays a list of the failed action assignments.
-
Drag two Create External Task activities into your workflow.
-
For the first activity, give the action a title and set its priority. In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create anExternalTaskData
type variable. For this example, name itTask1PersistData
. -
For the second activity, give the action a title and set its priority. In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create anExternalTaskData
type variable. For this example, name itTask2PersistData
.
-
-
Drag two Add To Collection activities into your workflow.
Note:The Add To Collection activity is a Classic activity.
To make the Add To Collection activity available in your project:
- Have System.Activities package 22.4.1 or lower installed.
- Go to the Activities panel.
- Click the View Options icon.
- Click Show Classic.
The activity can be found under Default Activities > Programming > Collection.
- In the Collection property fields, press
CTRL + k
on your keyboard and create aList<TaskUserAssignment>
type variable and name itTaskAssignementsInput
. Go to the Variables panel and initialize the variable in the Default field asnew List(Of TaskUserAssignment
. - In the Item property field, create an instance of
TaskUserAssignment
, that has the following parameters: the ExternalTaskData variable and the email address of the user you want to assign the task to.For this example, type in the following:
- The
new TaskUserAssignment(Task1PersistData.Id, "emailaddress")
expression for the first Add To Collection activity -
The
new TaskUserAssignment(Task2PersistData.Id, "emailaddress")
expression for the second Add To Collection activity.
- The
-
Set the TypeArgument property as
System.Collections.Generic.List<UiPath.Persistence.Activities.Tasks.TaskUserAssignment>
.
-
Drag an Assign Tasks activity into your workflow.
-
In the TaskUserAssignments (Input) property field, pass the
List<TaskUserAssignment>
variable. For this example, pass theTaskAssignmentsInput
variable. -
In the Task Assignment Type property field, type in the exact assignment operation that you want to perform: Assign or Reassign. For this example, type in
Assign
. -
In the FailedTaskAssignments (Output) property field, press
CTRL + k
on your keyboard and create aList<TaskAssignmentResponse>
type variable and name itFailedTaskAssignmentsOutput
.
-
- Drag a Write Line activity, to output the number of failed task assignments. In the Text property field, pass the
List<TaskAssignmentResponse>
type variable, then use the.Count
and.ToString
properties. For this example, pass the following expression:FailedTaskAssignemntsOutput.Count.ToString
.
Starts an unattended process and suspends the workflow until a particular job is completed.
-
Drag a Start Job And Get Reference activity into your workflow.
This activity starts a Job in Orchestrator, based on the arguments inputted, and then retrieves the corresponding Job Object. See the Start Job And Get Reference page for more information about the activity.
- In the ProcessName
property field, pass the Display name of the Process that you
want to use for the Job. For this example, store the name inside a
variable. Press
CTRL +k
on your keyboard and create aString
type variable and name itProcessName
. In the Value field, pass the Display name of the Process, for example,TestProcess_test
.Note: The Display name needs to be written in the following format:packageName _environment
.
- In the Job Arguments (Collection) property, create the arguments
that you want to use when invoking the job in Orchestrator. This
property modifies the
Out
andIn/Out
type of arguments based on the input received from the Job in Orchestrator, and then maps them back into the workflow. For this example, create aString
Type argument, namedTest
, of DirectionIn/Out
. In the Value field, pressCTRL + k
on your keyboard and create aString
type variable. Name the variableTest
.
- In the Job Object (Output) property field, press
CTRL + k
on your keyboard and create aJobData
type variable, namedJobPersistenceData
. This variable stores the Job Data Object created when the Job in Orchestrator is invoked, in order to use it for the Wait for Job and Resume activity.
- In the ProcessName
property field, pass the Display name of the Process that you
want to use for the Job. For this example, store the name inside a
variable. Press
- Add any activities that you want
to run before the workflow is suspended to retrieve data about the
JobData
object. -
Drag a Wait for Job and Resume activity into your workflow.
This activity suspends the workflow until a specific Job in Orchestrator is completed. After the Job is completed, the workflow is resumed.
-
In the Job Object (Input) property field, pass the
JobData
type variable, created for the Start Job And Get Reference activity. For this example, pass theJobPersistenceData
variable. This points the Robot to the exact Job that needs to be completed until the workflow is resumed. -
In the Job Object (Output) property field, press
CTRL + k
on your keyboard and create aJobData
type variable. For this example, name itJobDataObject
.
-
- Drag a Write Line
activity, in order to print out the argument that has been mapped back into the
workflow. In the Text property field, pass the variable used as the
Value for the argument created in the Job Arguments
(Collection). For this example, pass the
Test
variable.
This snippet suspends the given workflow and resumes it after one hour.
- Add any activities that you want to run before the workflow is suspended.
-
Drag a Resume After Delay activity into your workflow. This activity suspends the given workflow and resumes it at a specified date and time.
See the Resume After Delay page to learn more about this activity.
-
2.1. In the Variables panel, create a
System.TimeSpan
type variable. For this example, name the variableOneHour
. Set the Default value of theTimeSpan
variable asNew TimeSpan(1,0,0)
. -
2.2. In the Resume Time property field of the activity, pass the
DateTime.Now
expression and theTimeSpan
variable. For this example, pass the following expression:DateTime.Now + OneHour
.
-
- Add any activities that you want to run after the workflow is resumed.
This snippet suspends the given workflow and resumes it after five minutes.
- Drag any activities that you want to run before the workflow is suspended.
-
Drag a Resume After Delay activity into your workflow. This activity suspends the given workflow and resumes it at a specified date and time.
-
In the Variables panel, create a
System.TimeSpan
type variable. For this example, name the variableFiveMinute
. Set the Default value of theTimeSpan
variable asNew TimeSpan(0,5,0)
. -
In the Resume Time property field of the activity, pass the
DateTime.Now
expression and theTimeSpan
variable. For this example, pass the following expression:DateTime.Now + FiveMinute
.
-
- Drag any activities that you want to run after the workflow is resumed.
This snippet suspends the given workflow and resumes it after ninety seconds.
- Add any activities that you want to run before the workflow is suspended.
-
Drag a Resume After Delay activity into your workflow. This activity suspends the given workflow and resumes it at a specified date and time.
-
In the Variables panel, create a
System.TimeSpan
type variable. For this example, name the variableNinetySeconds
. Set the Default value of theTimeSpan
variable asNew TimeSpan(0,0,90)
. -
In the Resume Time property field of the activity, pass the
DateTime.Now
expression and theTimeSpan
variable. For this example, pass the following expression:DateTime.Now + NinetySeconds
.
-
- Drag any activities that you want to run after the workflow is resumed.
This snippet creates multiple Form Actions in a loop, based on the number of invoices in a data table, and suspends the workflow until all the actions are completed.
-
Drag a BuildDataTable activity into your workflow.
-
In the Output property field, press
CTRL + k
on your keyboard and create aDataTable
type variable, to store the data table that you are building. For this example, name theDataTable
variable asHighValueInvoices
. -
Click . The Build Data Table window opens.
-
Rename
Column1
asInvoiceNumber
andColumn2
asInvoiceAmount
. -
Add data inside the rows of the table and press OK.
-
-
Drag an Assign activity into your workflow. This acitivity assigns a name for the Data Table, stored in a
String
variable.-
In the To property field, pass the
DataTable
variable. For this example, pass theHighValueInvoices
variable. -
In the Value property field, press
CTRL + k
on your keyboard and create aString
type variable. For this example, name itDataTableName
. Set the Default value of theDataTableName
variable as ``"invoices"`.
-
- Drag a For Each activity into your workflow. In the List of items property field, pass an expression with the following format:
DataTableVariable.Rows
. For this example, passHighValueInvoices.Rows
. This iterates through every row in the data table. -
Drag a Create Form Task activity inside the Body of the For Each activity.
-
In the Task Title property field, input the Invoice Number value that the For Each activity retrieves and convert it to String. For this example, input the following expression:
item("InvoiceNumber").ToString
, whereInvoiceNumber
is the name of the column holding the respective number for each invoice. -
In the Form Data (Collection), create an argument that passes each invoice amount inside the Form Action. Create a
String
Type argument and set the Direction asIn
. In the Value field, input each invoice amount and convert them to String. For this example, input the following expression:item("InvoiceAmount").ToString
, whereInvoiceAmount
is the name of the column holding the respective amount for each invoice. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
type variable. For this example, name the variable asTaskPersistData
.
-
-
Drag an Add To Collection activity inside the Body of the For Each activity.
-
In the Collection property field, press
CTRL + k
on your keyboard and create aList<FormTaskData>
variable and name itTaskList
. Go to the Variables panel and initialize the variable in the Default field asNew List(Of UiPath.Persistence.Activities.FormTask.FormTaskData
. -
In the Item property field pass the
FormTaskData
variable, created to store the data on the Form Actions created. For this example, pass theTaskPersistData
variable. -
For the TypeArgument property, choose
UiPath.Persistence.Activities.FormTask.FormTaskData
.
-
-
Drag a Parallel For Each activity into your workflow.
-
For the TypeArgument property, choose
UiPath.Persistence.Activities.FormTask.FormTaskData
. -
In the Values property field, pass the
List<FormTaskData>
variable. For this example, pass theTaskList
variable.
-
-
Drag a Wait for Form Task and Resume activity into the body of the Parallel For Each activity.
-
In the TaskObject(Input) property field, input the
item
object, referenced in the Parallel For Each activity. In this case, theitem
object represents the Form Actions stored in theTaskList
variable. -
In the TaskAction property field, press
CTRL + k
on your keyboard and create aString
variable. For this example, name itTaskAction
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name itTaskData
.
-
- Drag a Write Line activity into your workflow. This activity displays in the Output panel the action taken by the user to complete the Form Action. In the Text value, input the
TaskAction
variable.
This snippet creates multiple Form Actions in sequence and suspends the workflow until any of the Form Actions is completed.
-
Drag a Create Form Task activity into your sequence workflow.
-
In the TaskTitle property field, press
CTRL + k
on your keyboard and create aString
variable. Name itTaskTitle1
. In the Variables panel, set the Default value as"Task - " + "Approver 1"
. -
In the FormData(Collection) property, create an argument of Type
String
and DirectionIn
. Name the argumentApprover
and set the Value as"Approver1"
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name the variableTaskPersistData1
.
-
-
Drag a second Create Form Task activity into your workflow.
-
In the TaskTitle property field, press
CTRL + k
on your keyboard and create aString
variable. Name itTaskTitle2
. In the Variables panel, set the Default value as"Task - " + "Approver 2"
. -
In the FormData(Collection) property, create an argument of Type
String
and DirectionIn
. Name the argumentApprover
and set the Value as"Approver2"
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name the variableTaskPersistData2
.
-
-
Drag a third Create Form Task activity into your workflow.
-
In the TaskTitle property field, press
CTRL + k
on your keyboard and create aString
variable. Name itTaskTitle3
. In the Variables panel, set the Default value as"Task - " + "Approver 3"
. -
In the FormData(Collection) property, create an argument of Type
String
and DirectionIn
. Name the argumentApprover
and set the Value as"Approver3"
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name the variableTaskPersistData3
.
-
- Drag a Pick activity into your workflow.
- Drag a Pick Branch activity into the body of the Pick activity. Rename the activity as
Pick Branch (Task1)
. -
Drag a Wait For Form Task And Resume activity into the Trigger body of the
Pick Branch (Task1)
activity.-
In the TaskObject (Input) property field, pass the
FormTaskData
variable created to store data about the Form Action. For this example, pass theTaskPersistData1
variable. -
In the TaskAction property field, press
CTRL + k
and create aString
variable. Name itTaskAction1
. -
In the TaskObject(Output) property field, press
CTRL+ k
on your keyboard and create aFormTaskData
variable. Name itTaskData1
.
-
-
Drag a Write Line activity into the Action body of the
Pick Branch (Task1)
activity. This activity is meant to display in the Output panel the action taken by the user to complete the Form Action. In the Text value, input theTaskAction1
variable. - Drag a Pick Branch activity into the body of the Pick activity. Rename the activity as
Pick Branch (Task2)
. -
Drag a Wait For Form Task And Resume activity into the Trigger body of the
Pick Branch (Task2)
activity.-
In the TaskObject (Input) property field, pass the
FormTaskData
variable created to store data about the Form Action. For this example, pass theTaskPersistData2
variable. -
In the TaskAction property field, press
CTRL + k
and create aString
variable. Name itTaskAction2
. -
In the TaskObject(Output) property field, press
CTRL+ k
on your keyboard and create aFormTaskData
variable. Name itTaskData2
.
-
- Drag a Write Line activity into the Action body of the
Pick Branch (Task2)
activity. This activity displays in the Output panel the action taken by the user to complete the Form Action. In the Text value, input theTaskAction2
variable. - Drag a Pick Branch activity into the body of the Pick activity. Rename the activity as
Pick Branch (Task3)
. -
Drag a Wait For Form Task And Resume activity into the Trigger body of the
Pick Branch (Task3)
activity.-
In the TaskObject (Input) property field, pass the
FormTaskData
variable created to store data about the Form Action. For this example, pass theTaskPersistData3
variable. -
In the TaskAction property field, press
CTRL + k
and create aString
variable. Name itTaskAction3
. -
In the TaskObject(Output) property field, press
CTRL+ k
on your keyboard and create aFormTaskData
variable. Name itTaskData3
.
-
- Drag a Write Line activity into the Action body of the
Pick Branch (Task3)
activity. This activity displays in the Output panel the action taken by the user to complete the Form Action. In the Text value, input theTaskAction3
variable.
This snippet creates multiple Form Actions, based on input from a Data Table, and suspends the workflow until a certain set of Form Actions are completed.
-
Drag a Build Data Table activity into your workflow.
-
In the DataTable property field, press
CTRL + k
on your keyboard and create aSystem.DataTable
variable. For this example, name itCodeReviews
. -
Click . The Build Data Table window opens.
-
Rename
Column1
asReviewerName
andColumn2
asReviewerType
. Set the Type of theReviewerType
column toString
. -
Add data inside the rows of the table. For the
ReviewerType
column, this example uses two types of reviewers: code owners and reviewers.
-
- Drag an Assign activity into your workflow. This assigns a name to the data table you created. In the To property field, pass the
System.DataTable
variable and add.TableName
property to it. In the Value field, pressCTRL + k
on your keyboard and create aString
variable. For this example, name itDataTableName
. -
Drag a Parallel For Each activity into your workflow. For this example, name it
Create Tasks for PR Review
.-
In the Values property field, pass the
System.DataTable
variable and add the property.AsEnumerable
. For this example, pass the following expression:CodeReviews.AsEnumerable
.
-
-
Drag an Assign activity in the Body of the Parallel For Each activity.
-
In the To property field, press
CTRL + k
on your keyboard and create aString
variable, that holds the data retrieved from theReviewerType
column in theCodeReviews
data table. For this example, name the variableReviewerType
. -
In the Value property field, pass an expression that retrieves each row item from the
ReviewerType
column and stores it in the variable created inside the To field. For this example, pass the following expression:ìtem("ReviewerType").toString
.
-
-
Drag a Create Form Task activity into the Body of the Parallel For Each activity.
-
In the TaskTitle property field, pass the following expression:
"Code Review - " + InPullRequestName
. TheInPullRequestName
is aString
variable, that has the Default value"#1"
. -
In the FormData(Collection) property, create four arguments of Type
String
: - 'PR Number' - with the
Direction
In
, and the Value set as theInPullRequestName
. Reviewer Name
- with the DirectionIn
, and the Value set asitem("ReviewerName").toString
.Reviewer Type
- with the DirectionIn/Out
, and the value set as theReviewerType
variable.-
Reviewer Comment
- with the DirectionOut
. In the Value field, pressCTRL + k
on your keyboard and create aString
variable. Name itReviewerComments
. This argument maps into the workflow whatever comments are made in the Action.5.3. In the TaskObject(Output) property field, pressCTRL + k
on your keyboard and create aFormTaskData
variable. Name itTaskPersistData
.
-
-
Drag an Add To Collection activity into the body of the Parallel For Each activity. This activity stores all the Form Actions created into a list.
-
In the Collection property field, press
CTRL + k
on your keyboard and create aList<FormTaskData>
variable. Name itTaskDataList
. Go to the Variables panel and set the Default value of the variable asNew List(of UiPath.Persistence.Activities.FormTask.FormTaskData)
. -
In the Item property field, pass the
FormTaskData
variable. For this example, pass theTaskPersistData
variable. -
For the TypeArgument property, choose
UiPath.Persistence.Activities.FormTask.FormTaskData
.
-
- In the Variables panel, create two variables of type
Int32
and set their Default value to0
:OwnersApprovals
andReviewersApprovals
. -
Drag another Parallel For Each activity. For this example, name it
Wait for Conditional Task(s) Completion
.-
In the Condition property field, pass the following expression:
OwnersApprovals>=2 Or (OwnersApprovals = 1 And ReviewersApprovals>=2)
. This conditions the workflow to resume only when the condition is met. -
For the TypeArgument property, choose
UiPath.Persistence.Activities.FormTask.FormTaskData
. -
In the Value property field, pass the list where the Form Actions are stored. For this example, pass the
TaskDataList
variable.
-
- Drag a Sequence activity into the Body of the Wait For Conditional Task(s) Completion activity. Rename it
Wait for Task and Resume
. -
Drag a Wait For Form Task And Resume activity into the Wait for Task and Resume sequence activity.
-
In the TaskObject(Input) property field, pass the
item
variable. -
In the TaskAction property field press
CTRL + k
on your keyboard and create aString
variable. For this example, name itTaskAction
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name itTaskData
.
-
-
Drag an If activity into the Wait for Task and Resume sequence activity. This activity is meant to count the number of Form Actions that have been approved by code owners.
-
In the Condition property field pass the following expression:
TaskAction="approve" And ReviewerType="code owner"
. -
Drag and drop an Assign activity in the Then block. In the To property field, pass the
OwnersApprovals
variable. In the Value property field pass theOwnersApprovals + 1
expression.
-
-
Drag another If activity into the Wait for Task and Resume sequence activity. This activity is meant to count the number of Form Actions that have been approved by reviewers.
-
In the Condition property field pass the following expression:
TaskAction="approve" And ReviewerType="reviewer"
. -
Drag an Assign activity in the Then block. In the To property field, pass the
ReviewersApprovals
variable. In the Value property field pass theReviewersApprovals + 1
expression.
-
-
Drag three Write Line activity into the Wait for Task and Resume sequence activity. This activity displays the given values in the Output panel.
-
In the first activity, pass the
ReviewComments
variable. -
In the second activity, pass the
OwnersApprovals
variable and add the.toString
property. -
In the third activity, pass the
ReviewersApprovals
variable and add the.toString
property.
-
This snippet creates three Form Actions and suspends the workflow until two Actions are completed.
-
Drag a Create Form Task activity into your sequence workflow.
-
In the TaskTitle property field, press
CTRL + k
on your keyboard and create aString
variable. Name itTaskTitle1
. In the Variables panel, set the Default value as"Task - " + "Approver 1"
. -
In the FormData(Collection) property, create an argument of Type
String
and DirectionIn
. Name the argumentApprover
and set the Value as"Approver1"
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name the variableTaskPersistData1
.
-
-
Drag a Create Form Activity into your sequence workflow.
-
In the TaskTitle property field, press
CTRL + k
on your keyboard and create aString
variable. Name itTaskTitle2
. In the Variables panel, set the Default value as"Task - " + "Approver 2"
. -
In the FormData(Collection) property, create an argument of Type
String
and DirectionIn
. Name the argumentApprover
and set the Value as"Approver2"
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name the variableTaskPersistData2
.
-
-
Drag a Create Form Activity into your sequence workflow.
-
In the TaskTitle property field, press
CTRL + k
on your keyboard and create aString
variable. Name itTaskTitle3
. In the Variables panel, set the Default value as"Task - " + "Approver 3"
. -
In the FormData(Collection) property, create an argument of Type
String
and DirectionIn
. Name the argumentApprover
and set the Value as"Approver3"
. -
In the TaskObject(Output) property field, press
CTRL + k
on your keyboard and create aFormTaskData
variable. For this example, name the variableTaskPersistData3
.
-
-
Drag a Parallel activity into your workflow.
-
In the Condition property field, press
CTRL + k
on your keyboard and create aInt32
variable. For this example, name the variableCompleteTasksCount
and set the Default value to0
. -
In the Expression Editor inside the Condition property, set the condition as
CompleteTasksCount=2
. This conditions the Parallel activity to complete when two out of the three actions are completed.
-
- Drag a Sequence activity into the body of the Parallel activity. Rename the activity as
Sequence Task1
. -
In the
Sequence Task1
activity, drag a Wait For Form Task and Resume activity. Rename it asWait for Form Task and Resume(Task1)
.-
In the TaskObject (Input) property field, pass the
FormTaskData
variable created to store data about the Form Action. For this example, pass theTaskPersistData1
variable. -
In the TaskAction property field, press
CTRL + k
and create aString
variable. Name itTaskAction1
. -
In the TaskObject(Output) property field, press
CTRL+ k
on your keyboard and create aFormTaskData
variable. Name itTaskData1
.
-
- Drag a Write Line activity into the Action body of the
Sequence Task1
activity. his activity is meant to display in the Output panel the action taken by the user to complete the Form Action. In the Text value, input theTaskAction1
variable. -
Drag an Assign activity in the
Wait for Form Task and Resume(Task1)
activity. Pass theCompleteTaskCount
in the To field and theCompleteTaskCount
+ 1 expression in the Value field. If the action is completed and the workflow is resumed, then a new iteration is added to theCompleteTaskCount
variable. - Drag a Sequence activity into the body of the Parallel activity. Rename the activity as
Sequence Task2
. - In the
Sequence Task2
activity, drag and drop a Wait For Form Task and Resume activity. Rename it asWait for Form Task and Resume(Task2)
- In the TaskObject (Input) property field, pass the FormTaskData variable
created to store data about the Form Action. For this example, pass the
TaskPersistData2
variable. - In the TaskAction property field, press
CTRL + k
and create a String variable. Name it TaskAction2 - In the
TaskObject(Output) property field, press CTRL+ k on your
keyboard and create a
FormTaskData
variable. Name itTaskData2
.
- In the TaskObject (Input) property field, pass the FormTaskData variable
created to store data about the Form Action. For this example, pass the
- Drag a Write Line activity into the body of the
Sequence Task2
activity. This activity displays in the Output panel the action taken by the user to complete the Form Action. In the Text value, input theTaskAction2
variable. - Drag an Assign activity in the
Wait for Form Task and Resume(Task2)
activity. Pass theCompleteTaskCount
in the To field and theCompleteTaskCount + 1
expression in the Value field. If the action is completed and the workflow is resumed, then a new iteration is added to theCompleteTaskCount
variable. - Drag a Sequence activity into the body of the Parallel activity. Rename the activity as
Sequence Task3
. -
In the
Sequence Task3
activity, drag and drop a Wait For Form Task and Resume activity. Rename it asWait for Form Task and Resume(Task3)
.-
In the TaskObject (Input) property field, pass the
FormTaskData
variable created to store data about the Form Action. For this example, pass theTaskPersistData3
variable. -
In the TaskAction property field, press
CTRL + k
and create aString
variable. Name itTaskAction3
. -
In the TaskObject(Output) property field, press
CTRL+ k
on your keyboard and create aFormTaskData
variable. Name itTaskData3
.
-
- Drag a Write Line activity into the Action body of the
Sequence Task3
activity. his activity is meant to display in the Output panel the action taken by the user to complete the Form Action. In the Text value, input theTaskAction3
variable. - Drag an Assign activity in the
Wait for Form Task and Resume(Task3)
activity. Pass theCompleteTaskCount
in the To field and theCompleteTaskCount + 1
expression in the **Value** field. If the action is completed and the workflow is resumed, then a new iteration is added to theCompleteTaskCount
variable.
- Add Queue Item and Wait till completion
- Create External Task and Suspend till completion
- Create Form Task and Suspend till completion
- Create Task and Assign to User
- Start Job and Resume After Completion
- Suspend and Resume after 1 hour
- Suspend and Resume After 5 Minutes
- Suspend and Resume After 90 Seconds
- Wait For All Form Tasks Completion
- Wait for Any Form Task Completion
- Wait For Some Form Tasks Completion in Loop
- Wait For Some Form Tasks Completion