Host architecture
_______________
The Workflow Host
In a web server installation of WorkZone Process a web server host must be implemented to facilitate creation and processing of and communication with workflows.
Implementation
The Host is a DLL which is built as an extension to WF4 Runtime which is part of the .NET Framework 4.5. The WF4 Host creates instances of the workflows defined in the database and the workflows are implemented as XAML. The workflow instances are executed by runtime. The workflow host uses the webservice to communicate with the clients.
Persistence with timeouts
The WF4 Host has several classes of which two are going to be mentioned here:
Persistence. Persistence saves the state of the workflow in the database, and unpersists the workflow when the methodResumeBookmarkis called through the web service. For every workflow which is persisted, a timeout is set.TimeoutHandlingunpersists workflows when they are set to expire, depending on the default duration defined for the workflow in WorkZone Configurator.
The WCF Webservice
The workflow host is called when an end user starts and manages processes in the client. Communication between the client and the workflow host is facilitated by a Windows Communication Foundation (WCF) web service. If, for example, the type of workflow is §20, then the workflow host looks for that particular workflow type in the database, and – when found – starts a workflow instance.
The webservice is configured in IIS to start whenever IIS starts.
Activity library
ActivityLibrary is a collection of activities, that is, the building blocks of the workflows.
Tracking Participants
TrackingParticipants is a class which:
- keeps track of what happens with the running workflows. This is recorded in the in the database in the table
workflowlog. You can access the workflow log using WorkZone QueryBuilder. See Investigate failed processes in the workflow log. - writes to SJDebug which is a diagnostic tool to track and log activities.
Base
The base contains all the basic elements that are used by the host, ActivityLibrary and TrackingParticipants. For example methods linking to SOM.