Skip to content

Commit

Permalink
Formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Akaizoku committed Jan 24, 2020
1 parent f483b5a commit 70cb24a
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
4 changes: 2 additions & 2 deletions Public/Get-RiskProBatchResult.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
23 changes: 6 additions & 17 deletions Public/Invoke-CreateModelGroup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Public/Test-Model.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
2 changes: 1 addition & 1 deletion Public/Test-Solve.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

0 comments on commit 70cb24a

Please sign in to comment.