Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Returns the order execution history for workflows.

SYNTAX

Get-JS7OrderHistory [[-ControllerId] <String>] [[-OrderId] <String>] [[-WorkflowIdWorkflowPath] <PSObject><String>] [[-WorkflowPathWorkflowName] <String>] [[-Folder] <String>] [-Recursive] [[-ExcludeOrderExcludeWorkflow] <String[]>] [[-RegularExpression] <String>] [[-DateFrom] <DateTime>] [[-DateTo] <DateTime>] [[-RelativeDateFrom] <String>] [[-RelativeDateTo] <String>] [[-Timezone] <TimeZoneInfo>] [[-Limit] <Int32>] [-Successful] [-Failed] [-InProgress] [[-WorkflowId] <PSObject>] [<CommonParameters>]

DESCRIPTION

History information is returned for orders from a JobScheduler JS7 Controller.
Order executions can be selected by workflow, order Order ID, folder, history status etc.

The history information retured returned includes start time, end time, return code etc.

The following REST Web Service API resources are used:

* /orders/history

PARAMETERS

...

ControllerId

-OrderId ControllerId <String>
Optionally specifies the unique identifier of an order that should be returned.

Required?false
Position?1
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

WorkflowId

OrderId

-OrderId <String>
Optionally specifies the identifier of an order for which the order history should be returned. -WorkflowId <PSObject>

Required?false
Position?2
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-WorkflowPath <String>
Optionally specifies the path and name of a workflow for which order history information is returned. If the name of a workflow is specified then the -Folder parameter is used to determine the folder.
Otherwise the -WorkflowPath parameter is assumed to include the full path and name of the workflow.
One of the parameters -OrderId -Folder or -WorkflowPath has to be specified.

Required?false
Position?3
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

WorkflowName

-WorkflowName <String>

Required?false
Position?34
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-Folder <String>
Optionally specifies the folder that includes workflows for which jobs the order history should be returned. The folder is determined
from the root folder.

Required?false
Position?45
Default value/
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-Recursive <SwitchParameter>
Specifies that any sub-folders should be looked up when used with the -Folder parameter.
By default no sub-folders will be looked up for jobsworkflow paths.

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

ExcludeWorkflow

-ExcludeOrder ExcludeWorkflow <String[]>
This parameter accepts a single workflow path or an array list of workflow paths that are excluded from the results.
Optionally the workflow path can be appended an order ID separated by a semicolonIf a workflow path is specified then all orders of the given workflow are excluded.

Required?false
Position?56
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-RegularExpression <String>
Specifies that a regular expression that filters orders to be returned.
The regular expression is applied to the order expession is applied to Order IDs to filter results.
The Order ID includes the Order Name attribute that is specified when adding the order like this for an Order Name "myIdentifier":

"#2020-11-19#P0000000498-myIdentifier"

A regular expression 'Identifier$' matches the above Order ID.

Required?false
Position?67
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-DateFrom <DateTime>
Specifies the date starting from which history items should be returned.
Consider that a UTC date has to be provided.

Default should no Order ID be provided: Begin of the current day as a UTC date

Required?false
Position?78
Default value(Get-Date -Hour 0 -Minute 0 -Second 0(Get-Date).ToUniversalTime() -Format 'yyyy-MM-dd')
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-DateTo <DateTime>
Specifies the date until which history items should be returned.
Consider that a UTC date has to be provided.

Default should no Order ID be provided: End of the current day as a UTC date

Required?false
Position?89
Default value(Get-Date -Hour 0 -Minute 0 -Second 0).AddDays(1).ToUniversalTime()
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-RelativeDateFrom <String>
Specifies a relative date starting from which history items should be returned, e.g.

* -1s, -2s: one second ago, two seconds ago
* -1m, -2m: one minute ago, two minutes ago
* -1h, -2h: one hour ago, two hours ago
* -1d, -2d: one day ago, two days ago
* -1w, -2w: one week ago, two weeks ago
* -1M, -2M: one month ago, two months ago
* -1y, -2y: one year ago, two years ago

Optionally a time offset can be specified, e.g. -1d+02:00, as otherwise midnight UTC is assumed.
Alternatively a timezone offset can be added, e.g. by using -1d+TZ, that . This is calculated by the cmdlet
for the timezone that is specified with the -Timezone parameter.

This parameter takes precedence over the -DateFrom parameter.

Required?false
Position?910
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-RelativeDateTo <String>
Specifies a relative date until which history items should be returned, e.g.

* -1s, -2s: one second ago, two seconds ago
* -1m, -2m: one minute ago, two minutes ago
* -1h, -2h: one hour ago, two hours ago
* -1d, -2d: one day ago, two days ago
* -1w, -2w: one week ago, two weeks ago
* -1M, -2M: one month ago, two months ago
* -1y, -2y: one year ago, two years ago

Optionally a time offset can be specified, e.g. -1d+02:00, as otherwise midnight UTC is assumed.
Alternatively a timezone offset can be added, e.g. by using -1d+TZ, that . This is calculated by the cmdlet
for the timezone that is specified with the -Timezone parameter.

This parameter takes precedence over the -DateFrom parameter.

Required?false
Position?1011
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-Timezone <TimeZoneInfo>
Specifies the timezone to which dates should be converted from the history information.
A timezone can e.g. be specified like this:

Get-JS7OrderHistory -Timezone (Get-Timezone -Id 'GMT Standard Time')

All dates in JobScheduler JS7 are UTC and can be converted e.g. to the local time zone like this:

Get-JS7OrderHistory -Timezone (Get-Timezone)

Default: Dates are returned in UTC.

Required?false
Position?1112
Default value(Get-Timezone -Id 'UTC')
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

-Limit <Int32>
Specifies the max. number of history items for order executions to be returned.
The default value is 10000, for an unlimited number of items the value -1 can be specified.

Required?false
Position?1213
Default value0
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

Required?false
Position?named
Default valueFalse
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

WorkflowId

-WorkflowId <PSObject>
This is an implicit parameter used when pipelining order objects to this cmdlet as e.g. with

Get-JS7Order -Folder /some_path | Get-JS7OrderHistory

Required?false
Position?14
Default value
Accept pipeline input?true (ByPropertyName)
Accept wildcard characters?false

...

PS > $items = Get-JS7OrderHistory -RegularExpression '^/sossos$'

Returns today's order execution history for any orders from the /sos folderwith an Order ID that ends with the string "sos".

-------------------------- EXAMPLE 3 --------------------------

PS > $items = Get-JS7OrderHistory -RegularExpression 'report'

Returns today's order execution history for orders that contain the string 'report' in the order's path.

-------------------------- EXAMPLE 4 --------------------------

PS > $items = Get-JS7OrderHistory -Timezone (Get-Timezone)

Returns today's order execution history for any orders with dates being converted to the local timezone.

-------------------------- EXAMPLE 5 4 --------------------------

...

-------------------------- EXAMPLE 6 5 --------------------------

PS > $items = Get-JS7OrderHistory -WorkflowPath /sos/dailyplan/CreateDailyPlansome_path/some_workflow

Returns today's order execution history for a given workflow.

-------------------------- EXAMPLE 7 6 --------------------------

PS > $items = Get-JS7OrderHistory -ExcludeOrder /sos/dailyplan/CreateDailyPlan, /sos/notification/SystemNotifier:MonitorSystemExcludeWorkflow workflow1,workflow2

Returns today's order execution history for any orders excluding orders from the specified workflow paths. The workflow path '/sos/notification/SystemNotifier' is appended the order ID 'MonitorSystem' separated by a semicolon to indicate that the specified order ID only is excluded from the results. workflows.

-------------------------- EXAMPLE 8 7 --------------------------

...

-------------------------- EXAMPLE 9 8 --------------------------

...

-------------------------- EXAMPLE 10 9 --------------------------

...

-------------------------- EXAMPLE 11 10 --------------------------

...

-------------------------- EXAMPLE 12 11 --------------------------

...

-------------------------- EXAMPLE 13 12 --------------------------

...

Returns the order execution history for any jobs for the last week.

-------------------------- EXAMPLE 14 13 --------------------------

...