Getting Phases

<< Click to Display Table of Contents >>

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

Getting Phases

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

 

# Assumming $project contains a list of projects, for example from Get-RayFlowProject...

$allPhases = $projects[0] | Get-RayFlowPhase

$allPhases = Get-RayFlowPhase -Project $projects[0]

 

Note: this example takes just the first project from the list. You could also work on all of them, both pipeline and parameter supports arrays. And this is the result (formatted as a table for convenience):

 

$allPhase | Format-Table
Id                                        Name                            ShortName          Url

--                                        ----                            ---------          ---

35e5dd1c-7596-426f-a73d-8b9ff9b92f05        Order Interface            PO                  http://win-d25fl6...

bebf313b-7d23-4031-865d-f126236fa7c4        Order Acceptance            POA          http://win-d25fl6...

54cefcf6-4a1d-4c69-a5ce-4bb818475aad        Compatibility assesment     COMP          http://win-d25fl6...

c4877972-8d41-423d-876b-abea2bcbbf83        Evaluation                    EVAL          http://win-d25fl6...

bfe8b600-fe71-4cd8-9147-8d3916f05079        Packaging                    PKG          http://win-d25fl6...

eea3095c-0f3e-4813-9c91-b2065115fbfe        Quality Assurance            QA                  http://win-d25fl6...

348c85f5-4dbe-4824-b46c-eacced113f7e        User Acceptance            UAT          http://win-d25fl6...

8281b4a5-1879-4504-a730-971a0e7c9d3f        Software Deployment            DEP          http://win-d25fl6...

 

You can also select a specific phase by its name (both short or long). The following snippet does twice the same, once asking for phase POA and once for Order Acceptance. Both results are the same:

 

$phasePOA = $projects[0] | Get-RayFlowPhase -PhaseName POA
$phasePOA
 

Id            : a66db031-88fa-40b7-a19b-715da7d3552f

Name          : Order Acceptance

ShortName     : POA

Url           : http://ame2017/RayFlow/Phase?phaseid=a66db031-88fa-40b7-a19b-715da7d3552f

ParentProject : {f164be99-84de-4cea-a7d4-db102c3ac738} Packaging

ParentPhase   :

 

$phasePOA = $projects[0] | Get-RayFlowPhase -PhaseName "Order Acceptance"    
$phasePOA
 

Id            : a66db031-88fa-40b7-a19b-715da7d3552f

Name          : Order Acceptance

ShortName     : POA

Url           : http://ame2017/RayFlow/Phase?phaseid=a66db031-88fa-40b7-a19b-715da7d3552f

ParentProject : {f164be99-84de-4cea-a7d4-db102c3ac738} Packaging

ParentPhase   :

 

 

By default, only root phases are returned. You can include sub-phases when querying for a phase by adding the -Recursive switch.

 

## Returns all top-level phases
$phasePOA = $projects[0] | Get-RayFlowPhase
 
## Returns all top-level phases and their children
$phasePOA = $projects[0] | Get-RayFlowPhase -Recursive

 

If you want to get a phase by its unique identifier, call Get-RayFlowPhase with parameter -PhaseId. Please note, that it is not possible to include -PhaseId and -PhaseName in the same time. You should still include the -Recursive switch to make sure that all phases (including sub-phases) will be scanned for your identifier.