Workflow service
The webservice is a WCF webservice which allows the clients to start and communicate with the workflows. The table below describes the operations available with the webservice.
Operation |
Signature |
Description |
---|---|---|
CreateWorkflowFromXml |
Guid CreateWorkflowFromXml(string workflowData);
|
Creates a new workflow instance, based on the parameter The parameter must be loadable as strings in XmlDocument, and interpreted as a value of the type |
CreateWorkflow
|
Guid CreateWorkflow(WorkflowCreationData workflowData); |
Creates a new running workflow instance based on The value returned is a unique identifier for the created workflow instance.
|
ResumeBookmark |
BookmarkResumptionResult ResumeBookmark(Guid instanceId, string bookmarkName, object value); |
This method is invoked by user actions in the client, or the expiration of a process. The parameters it needs is the workflow instance ID, the bookmark ID, and an object value, for example the ID of a proxy user. The value returned indicates whether the call succeeded or not: |
GetWorkflowStatus | WorkflowStatus GetWorkflowStatus(Guid instanceId); |
The value returned is the current status of the workflow: Created, Running, Persisted, Completed or Faulted. |
The table below describes the operations available with the host.
Operation |
Signature |
Description |
---|---|---|
CreateWorkflowFromXml |
|
Creates a new workflow instance, based on the parameter The parameter |
CreateWorkflow
|
|
Creates a new running workflow instance based on The value returned is a unique identifier for the created workflow instance.
The parameter |
CreateWorkflow |
|
The same as the previous CreateWorkflow, but it also includes the paramters CompletedCallback which is called when the workflow is completed. |
ResumeBookmark |
|
This method is invoked by user actions in the client, or the expiration of a process. The parameters it needs is the workflow instance ID, the bookmark ID, and an object value, for example the ID of a proxy user. The parameter The value returned indicates whether the call succeeded or not: |
ResumeBookmark |
|
The same as the previous ResumeBookmark, but it also includes the parameter CompletedCallback which is called when the workflow is completed. |
GetWorkflowStatus |
|
The value returned is the current status of the workflow: |
Initialize |
|
Initializes the workflow host and loads the data from the db which is necessary for creating workflows. Creates workflow descriptors, that is, the known workflows in the database, type, version, and XAML that describes the workflow types as an internal data structure. In addition, it sets up timers for pending timeouts in currently persisted workflows. |
GetOutputs |
|
Gets the output argument Limitation: outputs can only be gotten for workflows which have been completed by this instance of the workflow host. In all other cases, null will be returned. The reason is that this type of output is not stored in the database. |
GetWorkflowInformation |
|
Returns all available information on a workflow instance.
|
GetKnownWorkflows |
|
Gets all workflow types available, that is, those workflow types where the host is able to create workflow instances. |
InjectWorkflowDescriptor |
void InjectWorkflowDescriptor(Activity activity, sjSession session) |
Makes an activity known to the workflow host, so that workflow instances can be created from it. The parameter
|
InjectWorkflowDescriptor |
void InjectWorkflowDescriptor(string xaml, string typeName, Version version, sjSession session) |
Makes a workflow described by XAML known to the workflow host, so that workflow instances can be created from it. The parameter |
The interface types are represented by classes. Below, these classes are described:
public WorkflowType WorkflowType { get; private set; }
WorkflowType
gets the workflow type.
public string WorkflowTitle { get; private set; }
WorkflowTitle
gets the workflow title.
public string WorkflowParent { get; private set; }
WorkflowParent
gets the parent workflow?
public string ProcessId { get; private set; }
ProcessID
gets the ID of the running process.
public string Description { get; private set; }
Description
gets the description of the process.
public string AssociatedRegister { get; private set; }
AssociatedRegister
gets the name of the case register, record (document), contact or address.
public string AssociatedRegisterKey { get; private set; }
AssociatedRegisterKey
gets the register key.
public DateTime EndDate { get; private set; }
EndDate
gets the workflow end date.
public IDictionary<string, object> Arguments { get; private set; }
IDictionary
gets the values of the workflow in arguments.
The table describes the values that WorkflowStatus can get:
Value |
Description |
---|---|
Created |
The workflow instance has been created but is not yet running. |
Running |
The workflow instance is running. |
Persisted |
The workflow instance is idle and persisted. |
Completed |
The workflow instance is completed. |
Faulted |
The workflow instance has been terminated by an unhandled exception. |
public WorkflowDescriptor Descriptor { get; }
Descriptor
gets the descriptor of a running workflow. See description of WorkflowDescriptor.
public string Owner { get; }
Owner
gets the name code of the process owner.
public WorkflowStatus Status { get; }
Status
gets the status of the workflow. See description of WorkflowStatus.
public Exception ExceptionThrown { get; }
ExceptionThrown
gets the exception description when the workflow is faulted.
public IDictionary<string, object> Outputs { get; }
IDictionary<string, object>
gets the output argument for a given completed workflow instance.
public DateTime PendingTimerExpiration { get; }
PendingTimerExpiration
gets the expiration date and time of a pending workflow, if a timer is running for the workflow.
public bool TimerRunning { get; private set; }
TimerRunning
tells if there is a timer on the workflow, and if it is not yet expired.
public string ServerName { get; private set; }
ServerName
gets the name of the server that the host will be running on if the timer on the workflow expires.
public Activity WorkflowType { get; private set; }
WorkflowType
gets the workflow type as a .NET System.Activities.Activity.
public Version Version { get; private set; }
Version
gets the version of the workflow as a .NET System.Version.
public string WorkflowKey { get; private set; }
WorkflowKey
gets the key in the workflow
register.
public string AssemblyKey { get; private set; }
AssemblyKey
gets the workflow assembly key in the workflow_assembly
register.
public string TypeName { get; private set; }
TypeName
gets the name of the workflow type.
public Version Version { get; private set; }
Version
gets the version of the workflow.