Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Here is a breakdown of each parameter and what they are used for:

Parameter

Description

Default value

TaskName

The path of the task that you want to run. If a relative path is used, it will be relative from the location of the current task in readibots. Note that using “..” at the beginning of a relative path is currently treated as if you used “.” (known issue).

ArgumentList

An array of hashtables or dictionaries identifying the parameters that you want to pass into the task that you want to run. If you are doing a refresh, the values used in a dictionary must match the unique keys configured in that task’s change monitoring settings, each row identified by the values in a single dictionary will be refreshed, and the RbDataRefresh parameter in the task being invoked will receive these dictionaries. If you are not doing a refresh, the task will be invoked sequentially once for each dictionary that you pass in, with the dictionary values splatted into the task invocation.

DataSetName

The name of the dataset (view) that you want to retrieve results from once the task has completed running.

Filter

A string filter that you want to apply to the data returned from the dataset, so that you only retrieve matching rows.

Property

One or more properties (columns) that you want to retrieve from the dataset.

Refresh

Indicates that the task will be invoked as a refresh task.

RefreshType

The type of refresh that is being invoked. Valid values include Add and Update.

Update

RetrieveData

Indicates that you want to retrieve data from the default view that is refreshed (tasks that support refresh can only return a single default view, so there is no need to identify it by name).

Name

Specifies a friendly name for the new job. You can use the name to identify the job to other job cmdlets, such as the Receive-Job cmdlet. 

The default friendly name is Job#, where # is an ordinal number that is incremented for each job.

Examples

Below are a few examples showing how you might use this Start-RbJob in practice.

...

Code Block
Start-RbJob -TaskName .\..\Users -Refresh -ArgumentList @{ObjectId = $user1ObjectId},@{ObjectId = $user2ObjectId}

Run a bot and retrieve all data from one of the data grids (views)

Code Block
$job = Start-RbJob -TaskName './getcurrentsessions' -DataSetName 'Sessions'
$data = Receive-Job -Job $job -Wait -AutoRemoveJob

Refresh the users dataset and retrieve the user principal name, first name and last name from the results

...