Page History
Name
Get-JS7OrderLog
SYNOPSIS
Read Reads the order log from the JS7 History.
SYNTAX
Get-JS7OrderLog [[-HistoryIdControllerId] <String>] [ [-OrderIdHistoryId] <String> ] [[-WorkflowPathOrderId] <String>] [[-FolderWorkflow] <String>] [-Recursive] [[-PathPositionString] <String>] [[-NodeState] <String><PSObject>] [[-StartTimePlannedTime] <DateTime>] [[-EndTimeStartTime] <DateTime>] [[-ExitCodeEndTime] <Int32><DateTime>] [[-State] <PSObject>] [[-ControllerId] <String>] [<CommonParameters>]
DESCRIPTION
Reads an order log for a given workflow, order Order ID and history History ID. This cmdlet is mostly used for pipelined input from the
Get-JobSchedulerOrderHistory JS7OrderHistory cmdlet that allows to search the execution history of orders and
that returns history History IDs that are used by this cmdlet to retrieve the order's log output.
The following REST Web Service API resources are used:
* /order/log/download
PARAMETERS
...
ControllerId
-HistoryId ControllerId <String>
Specifies the history ID that the order was running for. This information is provided by the
This parameter is used to accept pipeline input from the Get-JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false |
Position? | 1 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
HistoryId
-OrderId HistoryId <String>
This parameter specifies Specifies the order History ID that the order was running for the given history ID. This information is provided by the
Get-JS7OrderHistory cmdlet.
Required? | falsetrue |
Position? | 2 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
OrderId
-WorkflowPath OrderId <String>
This parameter specifies the workflow path and name that the order is assignedis used to accept pipeline input from the Get-JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false |
Position? | 3 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
Folder
-Folder <String>
Required? | false |
Position? | 4 |
Default value | / |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
Recursive
-Recursive <SwitchParameter>
Required? | false |
Position? | named |
Default value | False |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
Path
Workflow
-Workflow -Path <String>
This parameter is used to accept pipeline input from the Get-JobSchedulerOrderHistory JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false |
Position? | 54 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
PositionString
-Node PositionString <String>
This parameter is used to accept pipeline input from the Get-JobSchedulerOrderHistory JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false |
Position? | 65 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
State
-StartTime <DateTime>State <PSObject>
This parameter is used to accept pipeline input from the Get-JobSchedulerOrderHistory JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false |
Position? | 76 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
PlannedTime
-EndTime PlannedTime <DateTime>
This parameter is used to accept pipeline input from the Get-JobSchedulerOrderHistory JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false |
Position? | 87 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
StartTime
-ExitCode <Int32>StartTime <DateTime>
This parameter is used to accept pipeline input from the Get-JobSchedulerOrderHistory JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false |
Position? | 98 |
Default value0 | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
EndTime
-State <PSObject>EndTime <DateTime>
This parameter is used to accept pipeline input from the Get-JobSchedulerOrderHistory JS7OrderHistory cmdlet and forwards the parameter to the resulting object.
Required? | false | |
Position? | 10 | Default value |
Accept pipeline input? | true (ByValue, ByPropertyName) | |
Accept wildcard characters? | false |
ControllerId
-ControllerId <String>
9 | |
Required? | false |
Position? | 11 |
Default value | |
Accept pipeline input? | true (ByValue, ByPropertyName) |
Accept wildcard characters? | false |
...
PS > Get-JS7OrderHistory -WorkflowPath /product_demo/shellsample_chain workflow | Get-JS7OrderLog
Retrieves Returns the most recent order log for the given workflow.
...
PS > Get-JS7OrderHistory -WorkflowPath /product_demo/shellsample_chain workflow | Get-JS7OrderLog | Out-File /tmp/shell_chain.log -Encoding Unicode
...
PS > Get-JS7OrderHistory -RelativeDateFrom -8h | Get-JS7OrderLog | Select-Object @{name='path'; expression={ "/tmp/history/$(Get-Date $_.startTime -f 'yyyyMMdd-hhmmss')-$([io.path]::GetFileNameWithoutExtension($_.workflow))-$($_.orderId).log"}}, @{name='value'; expression={ $_.log }} | Set-Content
Read Reads the logs of orders that completed within the last 8 hours and writes the log output to individual files. The log file names are created from the start time, the workflow name and order Order ID.
-------------------------- EXAMPLE 4 --------------------------
PS > # execute once
$lastHistory = Get-JS7OrderHistory -RelativeDateFrom -8h | Sort-Object -Property startTime
# execute by interval in intervals
Get-JS7OrderHistory -DateFrom $lastHistory[0].startTime | Tee-Object -Variable lastHistory | Get-JS7OrderLog | Select-Object @{name='path'; expression={ "/tmp/history/$(Get-Date $_.startTime -f 'yyyyMMdd-hhmmss')-$([io.path]::GetFileNameWithoutExtension($_.workflow))-$($_.orderId).log"}}, @{name='value'; expression={ $_.log }} | Set-Content
...