Click here to Skip to main content
12,454,477 members (55,584 online)
Click here to Skip to main content

Stats

164K views
1.5K downloads
165 bookmarked
Posted

Navigational Workflows Unleashed in WWF/ASP.NET 3.5

, 21 Oct 2008 CPOL
Case-study on the internals of a Navigational Workflow engine for a fictional dating website called “World Wide Dating”.
DateSite
App_Data
bin
database setup procedure
DateSite.csproj.user
Global.asax
images
complete.png
critical.png
logo2.png
warning.png
Profile.dbml
Profile.dbml.layout
Properties
Service References
NavigationWorkflow
bin
NavigationWorkflow.layout
Properties
��-- Copyright (c) Microsoft Corporation.  All rights reserved.



SET NOCOUNT ON



--

-- ROLE state_persistence_users

--

declare @localized_string_AddRole_Failed nvarchar(256)

set @localized_string_AddRole_Failed = N'Failed adding the ''state_persistence_users'' role'



DECLARE @ret int, @Error int

IF NOT EXISTS( SELECT 1 FROM [dbo].[sysusers] WHERE name=N'state_persistence_users' and issqlrole=1 )

 BEGIN



	EXEC @ret = sp_addrole N'state_persistence_users'



	SELECT @Error = @@ERROR



	IF @ret <> 0 or @Error <> 0

		RAISERROR( @localized_string_AddRole_Failed, 16, -1 )

 END

GO





--

-- TABLE InstanceState

--

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[InstanceState]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)

drop table [dbo].[InstanceState]

GO

CREATE TABLE [dbo].[InstanceState] (

	[uidInstanceID] [uniqueidentifier] NOT NULL ,

	[state] [image] NULL ,

	[status] [int] NULL ,

	[unlocked] [int] NULL ,

	[blocked] [int] NULL ,

	[info] [ntext] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,

	[modified] [datetime] NOT NULL,

	[ownerID] [uniqueidentifier] NULL ,

	[ownedUntil] [datetime] NULL,

	[nextTimer] [datetime] NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE  UNIQUE CLUSTERED  INDEX [IX_InstanceState] ON [dbo].[InstanceState]([uidInstanceID]) ON [PRIMARY]

-- CREATE  NONCLUSTERED  INDEX [IX_InstanceState_Ownership] ON [dbo].[InstanceState]([ownerID],[ownedUntil])

GO





--

-- TABLE CompletedScope

--

IF EXISTS (SELECT * FROM [dbo].[sysobjects] WHERE id = object_id(N'[dbo].[CompletedScope]') AND OBJECTPROPERTY(id, N'IsUserTable') = 1)

DROP TABLE [dbo].[CompletedScope]

GO

CREATE TABLE [dbo].[CompletedScope] (

	[uidInstanceID] [uniqueidentifier] NOT NULL,

	[completedScopeID] [uniqueidentifier] NOT NULL,

	[state] [image] NOT NULL,

	[modified] [datetime] NOT NULL

) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

GO

CREATE  NONCLUSTERED  INDEX [IX_CompletedScope] ON [dbo].[CompletedScope]([completedScopeID]) ON [PRIMARY]

GO

CREATE  NONCLUSTERED  INDEX [IX_CompletedScope_InstanceID] ON [dbo].[CompletedScope]( [uidInstanceID] )

GO





DBCC TRACEON (1204)

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Pero Matić
Software Developer (Senior) Plan A Software
United States United States
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160826.1 | Last Updated 21 Oct 2008
Article Copyright 2008 by Pero Matić
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid