2. Workflow Hosting and Tracking
• Understand how Workflow tracking works
• Understand Workflow persistence
• Understand Workflow hosting
Goals
3. Workflow Hosting and Tracking
• Viewing tracked Workflows; canceling and restarting
• Using persistence points in Workflows
• Hosting Workflow endpoints
Lesson Plan
4. Workflow Hosting and Tracking
Workflow Tracking
• Workflow Tracking facilitates the
management of workflows
• Provides information about
workflow instances and their
state/status
• Allows for the inspection of
messages
• Provides an interface for viewing
the details of a workflow, and it’s
execution,
• Supports restart, abort and cancel
capabilities
5. Workflow Hosting and Tracking
Workflow Tracking
• Double clicking on a workflow
tracking record will bring up the
workflow tracking detail window.
• Provides a detailed look at the
workflow instance
• The progress and status of each
activity step
• The arguments associated with
each activity step
• The messages associated with the
workflow.
6. Workflow Hosting and Tracking
Restarting and Cancelling Workflows
While a Workflow is running, you
can cancel the execution of the
workflow by
• Going into workflow tracking
• Right clicking the workflow record
• Selecting cancel from the drop down
menu that appears.
Likewise if a work flow is aborted,
for any reason, you can
• Right click the workflow record
• Select start to re-start the workflow
from it’s last persist point (if any), or
the beginning if it has not yet been
persisted.
7. Workflow Hosting and Tracking
Purging Workflows
• Each database needs a SQL Server Agent
job to purge workflow tracking records
marked for deletion.
• The job creation script is called
CreateJob_PurgeWorkflowTracking.sql and
can be found in the Sql folder under the
Neuron ESB installation folder (ex:
"C:Program FilesNeudesicNeuron ESB
v3Sql").
• Open the script file and replace the
${DatabaseName} placeholder.
• By default the script enables the job, sets the
job's owner as "sa" and schedules the job to
execute every 10 minutes.
• Make sure to start the SQL Server Agent
service.
8. Workflow Hosting and Tracking : Demo
Purpose:
To familiarize users with Workflow Tracking in the Neuron ESB Explorer
Objectives:
It will acquaint users with the following areas of the messaging section:
• Viewing workflow instances
• Viewing Tracking Details
• Canceling Workflows
• Restarting Workflows
9. Workflow Hosting and Tracking
Deploying a Workflow Endpoint
Once a workflow definition has
been created it will need to be
hosted by a workflow endpoint in
order to be able to process
messages.
Creating a workflow endpoint will
require a subscriber, topic,
definition and endpoint host.
Once created a workflow endpoint
will immediately be hosted by
Neuron ESB, and begin processing
messages.
10. Workflow Hosting and Tracking
Workflow Endpoint : Settings
• Max Concurrent Workflows – Maximum
number of concurrent instances of this
workflow endpoint that will exist at one
time
• Event Timeout – Time (in seconds) an
event will process before throwing a
timeout error
• Max Tracking Variable Length – Maximum
length of information stored in a variable
to be saved to the database.
• Enable Tracking Workflow Activity
Execution – Enables the tracking of
activity execution in a workflow in
workflow tracking.
• Store Arguments and variables for
Workflow tracking activities – Enables the
storing of arguments and variables when
tracking workflow activity execution
11. Deploying a Workflow Endpoint : Demo
Purpose:
To familiarize users with Workflow Endpoint in the Neuron ESB Explorer
Objectives:
It will acquaint users with the following areas of the messaging section:
• Creating a Workflow Endpoint
• Deploying a Workflow Endpoint
• Verifying Workflow Operations
12. Workflow Hosting and Tracking : Lab
Purpose:
Learn how to host a workflow definition via a workflow endpoint in Neuron ESB.
Objectives:
• Create a Workflow Endpoint
• Sending a message to the workflow
• Viewing Workflow Tracking
Editor's Notes
The goals of this lesion are to provide the user with an understanding of how workflow tracking is implemented and used, when and where to use persistence in a workflow definition and how to host workflow definitions.
This lesson has been broken into three sections to make the information presented easier to understand. The sections that we will be covering are
Viewing tracked Workflows; canceling and restarting
Using persistence points in Workflows
Hosting Workflow endpoints
Workflow Tracking facilitates the management of workflows by providing information about workflow instances and their state or status. It provides an interface for viewing the details of a workflow instance and it’s execution. From workflow tracking you can restart aborted workflows and cancel workflows that have not yet completed.
To bring up the information on a specific workflow instance, double click on it in workflow tracking. Here you will see detailed information about the execution of the workflow to include details on the activities (from the state of the message to the execution times of the activities) and the messages that were involved in the execution of the workflow. It allows you to inspect the messages using the message viewer (which is covered in detail in the Monitoring Neuron ESB presentation).
To cancel a workflow that has not yet completed you simply need to right click on it in workflow tracking and select cancel from the drop down menu that appears. Likewise if you would like to restart an aborted workflow you can right click on it in workflow tracking and select re-start from the drop down menu that appears. Keep in mind that re-starting a workflow will re-start it from its last persistence point, if any.
Neuron ESB ships with a SQL job to purge workflows from the database. The database needs a SQL Server Agent job to purge workflow tracking records marked for deletion. The job creation script is called CreateJob_PurgeWorkflowTracking.sql and can be found in the Sql folder under the Neuron ESB installation folder (ex: "C:\Program Files\Neudesic\Neuron ESB v3\Sql\"). Open the script file and replace the ${DatabaseName} placeholder.
By default the script enables the job, sets the job's owner as "sa" and schedules the job to execute every 10 minutes. Make sure to start the SQL Server Agent service.
Once a workflow definition has been created it will need to be hosted by a workflow endpoint in order to be able to process messages. To do this first navigate to Connections -> Workflow Endpoints. Creating a workflow endpoint will require a subscriber, topic, definition and endpoint host. Once created, applied and saved a workflow endpoint will immediately be hosted by Neuron ESB, and begin processing messages.
The settings tab of a workflow endpoint allows you to configure certain aspects of a workflow.
Max Concurrent Workflows – Maximum number of concurrent instances of this workflow endpoint that will exist at one time
Event Timeout – Time (in seconds) an event will process before throwing a timeout error
Max Tracking Variable Length – Maximum length of information stored in a variable to be saved to the database.
Enable Tracking Workflow Activity Execution – Enables the tracking of activity execution in a workflow in workflow tracking.
Store Arguments and variables for Workflow tracking activities – Enables the storing of arguments and variables when tracking workflow activity execution