Getting Tasks

<< Click to Display Table of Contents >>

RayFlow PowerShell API > 7.3 > Implementation Guide > Working with RayFlow PowerShell API 

Getting Tasks

To enumerate all tasks, start with Get-RayFlowPhase first. For many cmdlets from RayFlow PowerShell API, you can either pipe the results or use variables. The Get-RayFlowTask command let supports both. To show all available tasks, use any of the following (they product the same output):

 

# Assumming $phase is a phase (or list of phases) which we got with Get-RayFlowPhase

$tasks = Get-RayFlowTask -Phase $phase
$tasks = $phase | Get-RayFlowTask

 

The result would be:

 

$tasks

 

Id                  : ff575f15-8ae2-4139-9e4a-e545b2cb804d

ApplicationId       : PKG-000002

ApplicationName     : CD Burner XP

ApplicationVersion  : 1.0.0

ApplicationVendor   : Canevere

ApplicationLanguage : ENG

ParentPhase         : [POA] Order Acceptance

Category            : REGULAR

Schedule            : MEDIUM

Type                : Package

User                :

Status              : Open

Url                 : http://ame2017/RayFlow/Phase?taskId=ff575f15-8ae2-4139-9e4a-e545b2cb804d

Files               : {cdbxp_setup_x64_4.5.7.6499.msi}

Comments            : {}

DataFields          : {[Application Id, PKG-000002], [Package Name, CD Burner XP], [Package Version, 1.0.0], 
                     [Product Name, CD Burner XP]...}

 

Id                  : e4a3ea1b-71fd-4cc4-97a2-15dbff024748

ApplicationId       : PKG-000004

ApplicationName     : Testapp

ApplicationVersion  : 1.2.3

ApplicationVendor   : TestManufacturer

ApplicationLanguage : ENG

ParentPhase         : [POA] Order Acceptance

Category            : REGULAR

Schedule            : MEDIUM

Type                : Package

User                :

Status              : Open

Url                 : http://ame2017/RayFlow/Phase?taskId=e4a3ea1b-71fd-4cc4-97a2-15dbff024748

Files               : {cdbxp_setup_x64_4.5.7.6499.msi, Report_20190517_133531.pdf (552721 bytes)}

Comments            : {}

DataFields          : {[Application Id, PKG-000004], [Package Name, Testapp], 
                       [Package Version, 1.2.3], [Product Name, TestApp]...}

 

You can query tasks using three different methods

 

To get only tasks belonging to the currently logged in user:

 

$tasks = Get-RayFlowTask -Phase $phase -OnlyMine

 

To get task by its unique identifier:

 

$tasks = Get-RayFlowTask -Phase $phase -TaskId <your task id>
### for example Get-RayFlowTask -Phase $phase -TaskId 'e4a3ea1b-71fd-4cc4-97a2-15dbff024748'

 

To get a task by its human-friendly ID (typically Application ID)

 

$tasks = Get-RayFlowTask -Phase $phase -TaskHumanFriendlyId
### for example Get-RayFlowTask -Phase $phase -TaskHumanFriendlyId 'PKG-000006'

 

 

papercliper

Note:

Querying by human-friendly identifier requires that your RayFlow instance is properly configured for properties matching. The settings for this can be found in the Basic section for data field mapping. Refer to RayFlow Server User Guide for more information about configuring data field matching.