Class BusinessProcessClient
Inherited Members
Namespace: System.Dynamic.ExpandoObject
Syntax
[GeneratedCode("NSwag", "13.20.0.0 (NJsonSchema v10.9.0.0 (Newtonsoft.Json v13.0.0.0))")]
public class BusinessProcessClient : ClientBase, IBusinessProcessClient
Constructors
BusinessProcessClient(IPictureparkServiceSettings, HttpClient)
Declaration
public BusinessProcessClient(IPictureparkServiceSettings configuration, HttpClient httpClient)
Parameters
IPictureparkServiceSettings configuration |
HttpClient httpClient |
Properties
JsonSerializerSettings
Declaration
protected JsonSerializerSettings JsonSerializerSettings { get; }
Property Value
JsonSerializerSettings |
ReadResponseAsString
Methods
CancelAsync(string, CancellationToken)
Cancel business process
Declaration
public virtual Task CancelAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task |
Implements
Remarks
Only available if the business process indicates support for cancellation in SupportsCancellation.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
ChangeStateAsync(string, BusinessProcessStateChangeRequest, CancellationToken)
Change business process state
Declaration
public virtual Task<BusinessProcess> ChangeStateAsync(string id, BusinessProcessStateChangeRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
BusinessProcessStateChangeRequest
request
The business process state change request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
BusinessProcess |
Implements
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.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
CreateAsync(BusinessProcessCreateRequest, CancellationToken)
Create business process
Declaration
public virtual Task<BusinessProcess> CreateAsync(BusinessProcessCreateRequest request, CancellationToken cancellationToken = default)
Parameters
BusinessProcessCreateRequest
request
The business process create request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
BusinessProcess |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetAsync(string, CancellationToken)
Get business process
Declaration
public virtual Task<BusinessProcess> GetAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcess>
BusinessProcess |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetDetailsAsync(string, CancellationToken)
Get details
Declaration
[Obsolete]
public virtual Task<BusinessProcessDetails> GetDetailsAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessDetails>
BusinessProcessDetails |
Implements
Remarks
Gets details of the given business process.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetFailedItemsAsync(string, int, 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 Task<BusinessProcessBatch> GetFailedItemsAsync(string id, int limit, string pageToken = null, CancellationToken cancellationToken = default)
Parameters
string
id
Business process id. |
int
limit
Number of items to fetch. |
string
pageToken
PageToken for paging. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessBatch>
BusinessProcessBatch |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
GetSuccessfulItemsAsync(string, int, 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 Task<BusinessProcessBatch> GetSuccessfulItemsAsync(string id, int limit, string pageToken = null, CancellationToken cancellationToken = default)
Parameters
string
id
Business process id. |
int
limit
Number of items to fetch. |
string
pageToken
PageToken for paging. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessBatch>
BusinessProcessBatch |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
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 Task<BusinessProcessSummaryBase> GetSummaryAsync(string id, CancellationToken cancellationToken = default)
Parameters
string
id
Business process id. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessSummaryBase>
BusinessProcessSummaryBase |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
ReadObjectResponseAsync<T>(HttpResponseMessage, IReadOnlyDictionary<string, IEnumerable<string>>, CancellationToken)
Declaration
protected virtual Task<BusinessProcessClient.ObjectResponseResult<T>> ReadObjectResponseAsync<T>(HttpResponseMessage response, IReadOnlyDictionary<string, IEnumerable<string>> headers, CancellationToken cancellationToken)
Parameters
HttpResponseMessage response |
IReadOnlyDictionary<string, IEnumerable<string>> headers |
CancellationToken cancellationToken |
Returns
Task<BusinessProcessClient.ObjectResponseResult<T>> |
Type Parameters
T |
SearchAsync(BusinessProcessSearchRequest, CancellationToken)
Search
Declaration
public virtual Task<BusinessProcessSearchResult> SearchAsync(BusinessProcessSearchRequest request, CancellationToken cancellationToken = default)
Parameters
BusinessProcessSearchRequest
request
The business process request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessSearchResult>
BusinessProcessSearchResult |
Implements
Remarks
Search for business processes.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
UpdateNotificationAsync(string, BusinessProcessNotificationUpdateRequest, CancellationToken)
Update business process notification
Declaration
public virtual Task UpdateNotificationAsync(string id, BusinessProcessNotificationUpdateRequest request, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
BusinessProcessNotificationUpdateRequest
request
The business process notification update request. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task |
Implements
Remarks
Only available for business processes created through Create.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
WaitForCompletionAsync(string, TimeSpan?, bool, CancellationToken)
Waits until the business process is completed or the timeout is reached.
Declaration
public Task<BusinessProcessWaitForLifeCycleResult> WaitForCompletionAsync(string processId, TimeSpan? timeout = null, bool waitForContinuationCompletion = true, CancellationToken cancellationToken = default)
Parameters
string
processId
The process ID. |
TimeSpan?
timeout
The timeout in ms to wait for completion. |
bool
waitForContinuationCompletion
Waits for the completion of the continuation business process (if existing, recursively). Default to true. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessWaitForLifeCycleResult>
The wait result. |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkException
Internal server error |
WaitForCompletionCoreAsync(string, TimeSpan?, bool?, CancellationToken)
Wait for completion
Declaration
protected virtual Task<BusinessProcessWaitForLifeCycleResult> WaitForCompletionCoreAsync(string id, TimeSpan? timeout = null, bool? waitForContinuationCompletion = null, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
TimeSpan?
timeout
The timeout to wait for completion. |
bool?
waitForContinuationCompletion
Waits for the completion of the continuation business process (if existing, recursively). Default to true. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
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
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
WaitForLifeCyclesAsync(string, IEnumerable<BusinessProcessLifeCycle>, TimeSpan?, CancellationToken)
Waits until the business process transitioned into one of the given lifecycles or the timeout is reached.
Declaration
public Task<BusinessProcessWaitForLifeCycleResult> WaitForLifeCyclesAsync(string processId, IEnumerable<BusinessProcessLifeCycle> lifeCycleIds, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
string
processId
The process ID. |
IEnumerable<BusinessProcessLifeCycle>
lifeCycleIds
The business process lifecycle IDs to wait for. |
TimeSpan?
timeout
The timeout in ms to wait for completion. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessWaitForLifeCycleResult>
The wait result. |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkException
Internal server error |
WaitForLifeCyclesCoreAsync(string, IEnumerable<BusinessProcessLifeCycle>, TimeSpan?, CancellationToken)
Wait for life cycles
Declaration
protected virtual Task<BusinessProcessWaitForLifeCycleResult> WaitForLifeCyclesCoreAsync(string id, IEnumerable<BusinessProcessLifeCycle> lifeCycles = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
IEnumerable<BusinessProcessLifeCycle>
lifeCycles
Business process life cycles to wait for. |
TimeSpan?
timeout
The timeout to wait for completion. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessWaitForLifeCycleResult>
BusinessProcessWaitForLifeCycleResult |
Remarks
Wait for the business process to hit one of the given life cycles.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |
WaitForStatesAsync(string, IEnumerable<string>, TimeSpan?, CancellationToken)
Waits until the business process transitioned into one of the given states or the timeout is reached.
Declaration
public Task<BusinessProcessWaitForStateResult> WaitForStatesAsync(string processId, IEnumerable<string> states, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
string
processId
The process ID. |
IEnumerable<string>
states
The states to wait for. |
TimeSpan?
timeout
The timeout in ms to wait for completion. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessWaitForStateResult>
The wait result. |
Implements
Exceptions
ApiException
A server side error occurred. |
PictureparkException
Internal server error |
WaitForStatesCoreAsync(string, IEnumerable<string>, TimeSpan?, CancellationToken)
Wait for states
Declaration
protected virtual Task<BusinessProcessWaitForStateResult> WaitForStatesCoreAsync(string id, IEnumerable<string> states = null, TimeSpan? timeout = null, CancellationToken cancellationToken = default)
Parameters
string
id
The business process id. |
IEnumerable<string>
states
Business process states to wait for. |
TimeSpan?
timeout
The timeout to wait for completion. |
CancellationToken
cancellationToken
A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Task<BusinessProcessWaitForStateResult>
BusinessProcessWaitResult |
Remarks
Wait for the business process to hit one of the given states.
Exceptions
ApiException
A server side error occurred. |
PictureparkValidationException
Validation exception |
PictureparkForbiddenException
Forbidden |
PictureparkNotFoundException
Entity not found |
PictureparkConflictException
Version conflict |
PictureparkTooManyRequestsException
Too many requests |
PictureparkException
Internal server error |