InstanceLockChangeState Method |
Changes the state.
Namespace: Scanjour.Workflow4.HostAssembly: Scanjour.Workflow4.Host (in Scanjour.Workflow4.Host.dll) Version: 24.5.0.0 (24.5.0.0)
Syntaxpublic Task<bool> ChangeState(
Guid instanceId,
WorkflowStatus toStatus,
string serverName,
string message = null,
WorkflowStatus? fromStatus = null,
int maxRetry = 3
)
Public Function ChangeState (
instanceId As Guid,
toStatus As WorkflowStatus,
serverName As String,
Optional message As String = Nothing,
Optional fromStatus As WorkflowStatus? = Nothing,
Optional maxRetry As Integer = 3
) As Task(Of Boolean)
public:
Task<bool>^ ChangeState(
Guid instanceId,
WorkflowStatus toStatus,
String^ serverName,
String^ message = nullptr,
Nullable<WorkflowStatus> fromStatus = nullptr,
int maxRetry = 3
)
member ChangeState :
instanceId : Guid *
toStatus : WorkflowStatus *
serverName : string *
?message : string *
?fromStatus : Nullable<WorkflowStatus> *
?maxRetry : int
(* Defaults:
let _message = defaultArg message null
let _fromStatus = defaultArg fromStatus null
let _maxRetry = defaultArg maxRetry 3
*)
-> Task<bool>
Parameters
- instanceId Guid
- The instance identifier.
- toStatus WorkflowStatus
- The requested status.
- serverName String
- Name of the server.
- message String (Optional)
[Missing <param name="message"/> documentation for "M:Scanjour.Workflow4.Host.InstanceLock.ChangeState(System.Guid,Scanjour.Workflow4.Host.WorkflowStatus,System.String,System.String,System.Nullable{Scanjour.Workflow4.Host.WorkflowStatus},System.Int32)"]
- fromStatus NullableWorkflowStatus (Optional)
- The required current status.
- maxRetry Int32 (Optional)
- The maxRetry number of retries on fail.
Return Value
TaskBooleanTrue if it was possible to change the state. An exception is only thrown if the batch update throws an unexpected exception
See Also