Class BusinessProcessClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
public class BusinessProcessClient : ClientBase
Constructors
BusinessProcessClient(Contract.IPictureparkServiceSettings, Http.HttpClient)
Declaration
public BusinessProcessClient(Contract.IPictureparkServiceSettings configuration, Http.HttpClient httpClient)
Parameters
Picturepark.SDK.V1.Contract.IPictureparkServiceSettings
configuration
|
System.Net.Http.HttpClient
httpClient
|
Properties
JsonSerializerSettings
Declaration
protected Newtonsoft.Json.JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
Newtonsoft.Json.JsonSerializerSettings
|
ReadResponseAsString
Declaration
public bool ReadResponseAsString { get; set; }
Property Value
System.Boolean
|
Methods
CancelAsync(String, CancellationToken)
Cancel business process
Declaration
public virtual async Task CancelAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
|
Remarks
Only available if the business process indicates support for cancellation in SupportsCancellation.
ChangeStateAsync(String, BusinessProcessStateChangeRequest, CancellationToken)
Change business process state
Declaration
public virtual async Task<BusinessProcess> ChangeStateAsync(string id, BusinessProcessStateChangeRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
BusinessProcessStateChangeRequest
request
The business process state change request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
BusinessProcess |
Remarks
Only available for business processes created through Create. The operation is executed asynchronously and is not awaited. Call WaitForCompletion to wait for the process to finish.
CreateAsync(BusinessProcessCreateRequest, CancellationToken)
Create business process
Declaration
public virtual async Task<BusinessProcess> CreateAsync(BusinessProcessCreateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
BusinessProcessCreateRequest
request
The business process create request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
BusinessProcess |
GetAsync(String, CancellationToken)
Get business process
Declaration
public virtual async Task<BusinessProcess> GetAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcess>
BusinessProcess |
GetDetailsAsync(String, CancellationToken)
Get details
Declaration
[Obsolete]
public virtual async Task<BusinessProcessDetails> GetDetailsAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessDetails>
BusinessProcessDetails |
Remarks
Gets details of the given business process.
GetFailedItemsAsync(String, Int32, String, CancellationToken)
Gets a page of failed items of a batch based business process.
Use the page token to fetch next page.
Declaration
public virtual async Task<BusinessProcessBatch> GetFailedItemsAsync(string id, int limit, string pageToken = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Business process id. |
System.Int32
limit
Number of items to fetch. |
System.String
pageToken
PageToken for paging. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessBatch>
BusinessProcessBatch |
GetSuccessfulItemsAsync(String, Int32, String, CancellationToken)
Gets a page of successful items of a batch based business process.
Use the page token to fetch next page.
Declaration
public virtual async Task<BusinessProcessBatch> GetSuccessfulItemsAsync(string id, int limit, string pageToken = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Business process id. |
System.Int32
limit
Number of items to fetch. |
System.String
pageToken
PageToken for paging. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessBatch>
BusinessProcessBatch |
GetSummaryAsync(String, CancellationToken)
Returns a summary of the business process.
Depending on the type of the business process, this can be not available at all or contain just a minimal set of information.
If business process produces a batch based response, page over successful and failed items using respective endpoints.
Declaration
public virtual async Task<BusinessProcessSummaryBase> GetSummaryAsync(string id, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
Business process id. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessSummaryBase>
BusinessProcessSummaryBase |
ReadObjectResponseAsync<T>(Http.HttpResponseMessage, IReadOnlyDictionary<String, IEnumerable<String>>, CancellationToken)
Declaration
protected virtual async Task<BusinessProcessClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(Http.HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
System.Net.Http.HttpResponseMessage
response
|
System.Collections.Generic.IReadOnlyDictionary<System.String, System.Collections.Generic.IEnumerable<System.String>>
headers
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<BusinessProcessClient.ObjectResponseResult<T>>
|
Type Parameters
T
|
SearchAsync(BusinessProcessSearchRequest, CancellationToken)
Search
Declaration
public virtual async Task<BusinessProcessSearchResult> SearchAsync(BusinessProcessSearchRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
BusinessProcessSearchRequest
request
The business process request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessSearchResult>
BusinessProcessSearchResult |
Remarks
Search for business processes.
UpdateNotificationAsync(String, BusinessProcessNotificationUpdateRequest, CancellationToken)
Update business process notification
Declaration
public virtual async Task UpdateNotificationAsync(string id, BusinessProcessNotificationUpdateRequest request, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
BusinessProcessNotificationUpdateRequest
request
The business process notification update request. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task
|
Remarks
Only available for business processes created through Create.
WaitForCompletionAsync(String, Nullable<TimeSpan>, Boolean, CancellationToken)
Declaration
public async Task<BusinessProcessWaitForLifeCycleResult> WaitForCompletionAsync(string processId, TimeSpan? timeout = null, bool waitForContinuationCompletion = true, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
processId
|
System.Nullable<TimeSpan>
timeout
|
System.Boolean
waitForContinuationCompletion
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<BusinessProcessWaitForLifeCycleResult>
|
WaitForCompletionCoreAsync(String, Nullable<TimeSpan>, Nullable<Boolean>, CancellationToken)
Wait for completion
Declaration
protected virtual async Task<BusinessProcessWaitForLifeCycleResult> WaitForCompletionCoreAsync(string id, TimeSpan? timeout = null, bool? waitForContinuationCompletion = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
System.Nullable<System.TimeSpan>
timeout
The timeout to wait for completion. |
System.Nullable<System.Boolean>
waitForContinuationCompletion
Waits for the completion of the continuation business process (if existing, recursively). Default to true. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessWaitForLifeCycleResult>
BusinessProcessWaitResult |
Remarks
Shortcut to wait for the business process to hit one of the finished life cycles.
Finished life cycles are:
- Succeeded
- SucceededWithErrors
- Cancelled
- Failed
WaitForLifeCyclesAsync(String, IEnumerable<BusinessProcessLifeCycle>, Nullable<TimeSpan>, CancellationToken)
Declaration
public async Task<BusinessProcessWaitForLifeCycleResult> WaitForLifeCyclesAsync(string processId, IEnumerable<BusinessProcessLifeCycle> lifeCycleIds, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
processId
|
IEnumerable<BusinessProcessLifeCycle>
lifeCycleIds
|
System.Nullable<TimeSpan>
timeout
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<BusinessProcessWaitForLifeCycleResult>
|
WaitForLifeCyclesCoreAsync(String, IEnumerable<BusinessProcessLifeCycle>, Nullable<TimeSpan>, CancellationToken)
Wait for life cycles
Declaration
protected virtual async Task<BusinessProcessWaitForLifeCycleResult> WaitForLifeCyclesCoreAsync(string id, IEnumerable<BusinessProcessLifeCycle> lifeCycles = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
System.Collections.Generic.IEnumerable<BusinessProcessLifeCycle>
lifeCycles
Business process life cycles to wait for. |
System.Nullable<System.TimeSpan>
timeout
The timeout to wait for completion. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessWaitForLifeCycleResult>
BusinessProcessWaitForLifeCycleResult |
Remarks
Wait for the business process to hit one of the given life cycles.
WaitForStatesAsync(String, IEnumerable<String>, Nullable<TimeSpan>, CancellationToken)
Declaration
public async Task<BusinessProcessWaitForStateResult> WaitForStatesAsync(string processId, IEnumerable<string> states, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
processId
|
IEnumerable<System.String>
states
|
System.Nullable<TimeSpan>
timeout
|
System.Threading.CancellationToken
cancellationToken
|
Returns
System.Threading.Tasks.Task<BusinessProcessWaitForStateResult>
|
WaitForStatesCoreAsync(String, IEnumerable<String>, Nullable<TimeSpan>, CancellationToken)
Wait for states
Declaration
protected virtual async Task<BusinessProcessWaitForStateResult> WaitForStatesCoreAsync(string id, IEnumerable<string> states = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default(CancellationToken))
Parameters
System.String
id
The business process id. |
System.Collections.Generic.IEnumerable<System.String>
states
Business process states to wait for. |
System.Nullable<System.TimeSpan>
timeout
The timeout to wait for completion. |
System.Threading.CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
System.Threading.Tasks.Task<BusinessProcessWaitForStateResult>
BusinessProcessWaitResult |
Remarks
Wait for the business process to hit one of the given states.