From 70cb24a3e6b9ac2d7511a8a7e6dec9ff95a731f8 Mon Sep 17 00:00:00 2001 From: Florian Carrier Date: Fri, 24 Jan 2020 12:28:47 +0000 Subject: [PATCH] Formatting --- Public/Get-RiskProBatchResult.ps1 | 4 ++-- Public/Invoke-CreateModelGroup.ps1 | 23 ++++++----------------- Public/Test-Model.ps1 | 2 +- Public/Test-Solve.ps1 | 2 +- 4 files changed, 10 insertions(+), 21 deletions(-) diff --git a/Public/Get-RiskProBatchResult.ps1 b/Public/Get-RiskProBatchResult.ps1 index 6f18f5d..2c812f7 100644 --- a/Public/Get-RiskProBatchResult.ps1 +++ b/Public/Get-RiskProBatchResult.ps1 @@ -10,10 +10,10 @@ function Get-RiskProBatchResult { The log parameter corresponds to the RiskPro batch client output to analyse. .INPUTS - System.String. You can pipe the RiskPro batch client log to Test-RiskProBatchOutcome. + System.String. You can pipe the RiskPro batch client log to Test-RiskProBatchClientOutcome. .OUTPUTS - System.String. Test-RiskProBatchOutcome returns the result of the RiskPro batch client command. + System.String. Test-RiskProBatchClientOutcome returns the result of the RiskPro batch client command. .NOTES File name: Get-RiskProBatchResult.ps1 diff --git a/Public/Invoke-CreateModelGroup.ps1 b/Public/Invoke-CreateModelGroup.ps1 index e9ee1b9..c3220c7 100644 --- a/Public/Invoke-CreateModelGroup.ps1 +++ b/Public/Invoke-CreateModelGroup.ps1 @@ -27,14 +27,12 @@ function Invoke-CreateModelGroup { .PARAMETER Models The optional models parameter corresponds to the list of models to add to the model group. - .PARAMETER Synchronous - The synchonous switch defines if the operation should be run in synchronous mode. - .NOTES File name: Invoke-CreateModelGroup.ps1 Author: Florian CARRIER Creation date: 22/10/2019 - Last modified: 22/01/2020 + Last modified: 23/01/2020 + WARNING Synchronous mode not supported for operation 'createModelGroup'! #> [CmdletBinding ()] Param( @@ -95,30 +93,21 @@ function Invoke-CreateModelGroup { )] [ValidateNotNullOrEmpty ()] [String[]] - $Models, - [Parameter ( - HelpMessage = "Define if the synchronous mode should be enabled" - )] - [Switch] - $Synchronous + $Models ) Begin { # Get global preference variables Get-CallerPreference -Cmdlet $PSCmdlet -SessionState $ExecutionContext.SessionState # Get administration Java class - $JavaClass = Get-JavaClass -ModelGroup "Administration" + $JavaClass = Get-JavaClass -Name "Administration" # Format models list # TODO semicolon separated list of models } Process { # Define operation parameters $OperationParameters = New-Object -TypeName "System.Collections.Specialized.OrderedDictionary" - $OperationParameters.Add("ad.modelModelGroup", $ModelGroup) - if ($PSBoundParameters.ContainsKey("Models")) { - $OperationParameters.Add("ad.models", $Models) - } - # Configure synchronous mode - $OperationParameters.Add("ws.sync", $Synchronous) + $OperationParameters.Add("ad.modelGroupName", $ModelGroup) + if ($PSBoundParameters.ContainsKey("Models")) { $OperationParameters.Add("ad.models", $Models) } # Format Java parameters $Parameters = ConvertTo-JavaProperty -Properties $OperationParameters # Invoke RiskPro batch client diff --git a/Public/Test-Model.ps1 b/Public/Test-Model.ps1 index 0763a5d..7b61949 100644 --- a/Public/Test-Model.ps1 +++ b/Public/Test-Model.ps1 @@ -93,6 +93,6 @@ function Test-Model { # Query model $GetModelID = Get-ModelID -JavaPath $JavaPath -RiskProPath $RiskProBatchClient -ServerURI $ServerURI -Credentials $Credentials -JavaOptions $JavaOptions -Model $Model # Return outcome - return (Test-RiskProBatchOutcome -Log $GetModelID) + return (Test-RiskProBatchClientOutcome -Log $GetModelID) } } diff --git a/Public/Test-Solve.ps1 b/Public/Test-Solve.ps1 index cf0d494..6bb4d43 100644 --- a/Public/Test-Solve.ps1 +++ b/Public/Test-Solve.ps1 @@ -186,6 +186,6 @@ function Test-Solve { # Query solve $GetSolveID = Get-SolveID -JavaPath $JavaPath -RiskProPath $RiskProBatchClient -ServerURI $ServerURI -Credentials $Credentials -JavaOptions $JavaOptions -Solve $Solve -Kind $Kind -Synchronous:$Synchronous # Return outcome - return (Test-RiskProBatchOutcome -Log $GetSolveID) + return (Test-RiskProBatchClientOutcome -Log $GetSolveID) } }