DicomObjects.NET10 Documentation
DicomObjects.DicomWeb Namespace / WorkItemWebClient Class / ChangeStateAsync Method
New State for the Workitem, cannot set to SCHEDULED
The Transaction UID used to lock the target Workitem
The encoding to use (native/json/xml)
A token that may be used to cancel the operation
Example



In This Topic
    ChangeStateAsync Method (WorkItemWebClient)
    In This Topic
    Asynchronous operation to change the state of a Workitem. It corresponds to the UPS DIMSE N-ACTION operation "Change UPS State". State changes are used to claim ownership, complete, or cancel a Workitem.
    Syntax
    'Declaration
     
    
    <AsyncStateMachineAttribute(DicomObjects.DicomWeb.WorkItemWebClient/d__28)> 
    Public Function ChangeStateAsync( _ 
       ByVal State As UPSState, _ 
       ByVal TransactionUID As String, _ 
       Optional ByVal Encoding As DicomDataEncoding, _ 
       Optional ByVal cancellationToken As CancellationToken _ 
    ) As Task(Of HttpResponseMessage)
    'Usage
     
    
    Dim instance As WorkItemWebClient
    Dim State As UPSState
    Dim TransactionUID As String
    Dim Encoding As DicomDataEncoding
    Dim cancellationToken As CancellationToken
    Dim value As Task(Of HttpResponseMessage)
     
    value = instance.ChangeStateAsync(State, TransactionUID, Encoding, cancellationToken)
    [AsyncStateMachine(DicomObjects.DicomWeb.WorkItemWebClient/d__28)] 
    public Task<HttpResponseMessage> ChangeStateAsync( 
       UPSState State, 
       string TransactionUID, 
       DicomDataEncoding Encoding, 
       CancellationToken cancellationToken 
    )

    Parameters

    State
    New State for the Workitem, cannot set to SCHEDULED
    TransactionUID
    The Transaction UID used to lock the target Workitem
    Encoding
    The encoding to use (native/json/xml)
    cancellationToken
    A token that may be used to cancel the operation

    Return Value

    HttpResponseMessage
    Remarks
    The async operation will return as soon as the response is available and headers are read (content is not read yet)
    Example
    WorkItemWebClient wwc = new WorkItemWebClient(BaseUri);
    var resp = wwc.ChangeState(UPSState.INPROGRESS, "1.2.3.4.5.6.7.8.9");
    Log($"Change State response: {resp.StatusCode}");
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also