Reimbursement multilevel Approval Workflow project in ASP.NET plus tracking service

Source: Internet
Author: User
Tags constructor

I'll add the tracking service for the reimbursement multilevel Approval workflow project in asp.net.

The SqlTrackingService class represents a fully functional tracking service. Use this service to collect and store trace information, to store trace profiles, and to provide these when the workflow runtime engine requests it. The SQL Tracking service writes the trace data sent to it by the Run-time tracking infrastructure to the SQL database. In many cases, it is important for the SqlTrackingService service to maintain consistency between its database and the runtime engine state of the workflow. Therefore, the SqlTrackingService class implements the IPendingWork interface and can participate in the Workflow transaction batch functionality provided by the WorkflowCommitWorkBatchService service. You can set the IsTransactional property, or pass the appropriate arguments to the constructor, to configure the SqlTrackingService service to participate in the batch, and to add the object that represents the SQL database pending changes to the work batch.

The SqlTrackingService service also retains the tracking configuration file in its database. The workflow runtime engine knows the changes made to any of the tracking profiles that are used. The SqlTrackingService service implements the Iprofilenotification interface and periodically checks the trace configuration file in its database to notify the workflow runtime engine of changes made to the trackingprofile stored in its database. You can set the Profilechangecheckinterval property or pass the appropriate parameter to the constructor to set the interval, and the SqlTrackingService service will check its tracking profile at that interval. [MSDN]

First: Configure the database for tracking.

Under the C:\WINDOWS\Microsoft.NET\Framework\v3.0\Windows Workflow foundation\sql\en directory, there are two files Tracking_schema.sql and Tracking_ Logic.sql, Ann successively executes the order.

Second: Configure tracking service. The configuration file is as follows:

<?xml version= "1.0" encoding= "Utf-8"?>

<configuration>

<configSections>

< Section name= "workflowwithtracking"

type= "System.Workflow.Runtime.Configuration.WorkflowRuntimeSection, 

System.Workflow.Runtime, version=3.0.00000.0, Culture=neutral, 

Publickeytoken=31bf3856ad364e35 "/>

</configSections>

<WorkflowWithTracking>

< commonparameters>

<add name= "ConnectionString"

value= "Data source=.;i Nitial catalog=c6ps;integrated security=true "/>

</CommonParameters>

<Services>

; add Type= "System.Workflow.Runtime.Tracking.SqlTrackingService, 

System.Workflow.Runtime, version= 3.0.00000.0, 

culture=neutral,publickeytoken=31bf3856ad364e35 "/>

</Services>

</ Workflowwithtracking>

</configuration>

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.