.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

worflow for short time activities

Posted By:      Posted Date: April 14, 2011    Points: 0   Category :JavaScript/VBScript

Dear Folks,

Currently I am working on a travel booking portal where travelers can search and book a flight but user has the option to book online and pay later within specified time frame (say 2 hours). Here, I am thinking of implementing the workflow for order fulfillment with following states.

OrderBooked (When user book flight online but has not paid yet)

OrderPaid (Later when user pays using credit card or any other payment mechanism)

OrderCanceled (If user doesnt pay in specified time)

OrderCompleted (in case user pay and ticket successfully generated)


Here I am no sure if we should implement WWF in this scenario as the life span of an order is very short (say 2- 4 hours). If payment is not done in this time span, order will be canceled. My understanding is that WWF is best suited for long running activities.

Please suggest



View Complete Post

More Related Resource Links

Worflow template with some predefined activities and a hole to add other activities

Hi,all,        I am trying to write a workflow template to simplify modeling a new workflow.  The workflow template include some predefiend activities and an empty ifelseactivity there. When the user wants to define a new workflow, it use this workflow as base workflow(something like NewWorkflow: WorkflowTemplate), and then add some ifelsebranchactivities in the empty ifElseActivity.        I tried to implement it. But I met some problems .  First, When I drag a new ifElseBranchActity into the hole, it was not permitted and said "Cannot add or remove child activities on a non-editable activity". Furthermore, in the InitializeComponent() function,the designer will generate all the elements that has in the template workflow again.  So there will be two activities with the same name, one is inherited from the workflow template, one is generated in the new workflow.       Is there any way to implement my requirement in workflow 3.5? or workflow 4?        Best wishes to you all!  

Is it possible to combine implementation variable with design time activities?

Here is my scenario : - We have a custom While activity which can take an Activity<bool> as a condition in the designer.- We can program some predefined conditions with Activity<bool> (useful for complex conditions), and they can have some variables, for exemple "IsGreaterThanActivity" with arguments "Number1" and "Number2".- Some of the conditions have internal states (for exemple, the current position in a list). We don't wan't to show them in the designer, it's implementation detail (so they use AddImplementationVariable). - Our custom While activity schedule the condition, if true his body, and so on... So, to not lose the internal state of the condition between executions, it would be nice to add an implementation variable to the custom while activity, and "bind" the condition state by an InArgument to the while.- We do not want to show the state in the designer (it should always be binded, so we do the binding in the CacheMetadata). But if we do a AddImplementationChild to add the condition in the CacheMetadata, the condition won't find design time variables / arguments. So we need to do a AddChild. But if we do AddChild, we can't get the implementation variable to store the state. And if we use the AddVariable, in the xaml we see the variable decleration, so it's possible to alter them. So is there any way to use

Strategy for saving information by thousand of users in a short time.



I am working on an application which will be like users will be working offline (most likely a window app) all day saving 10-50 rows of data on to a text file and at the end of the day when they come online they will be uploading the data to main sql server database using the app. There may be hundereds of users saving information at a time within a short span of 20-30 mins.

I am totally new to developing an application which has that amount of activity. Can anyone tell me the best possible strategy so as to avoid issue on concurrent saving in case of too many users. Will Sql Server 2005 will do ok or my app is likely to face any issue. Any errors that I might run in to.

 Any help is appreciated !

Round off time to the nearest minute

How would you round this up to the nearest minute? There isn't a built in function to do this so you have to use a little bit of maths to get there. There are 60 seconds in a minute. We already have 38 seconds on the clock. So we need to add on 60 - 38 = 22 more seconds.

Short Overview of SharePoint Features in Visual Studio 2010

As you probably know, Visual Studio 2010 was announced earlier this week and it contains a lot of cool features and project templates for SharePoint developers. Below is a short overview for some of the SharePoint development related features and project templates.

Performance Tests: Precise Run Time Measurements with System.Diagnostics.Stopwatch

Everybody who does performance optimization stumbles sooner or later over the Stopwatch class in the System.Diagnostics namespace. And everybody has noticed that the measurements of the same function on the same computer can differ 25% -30% in run time. This article shows how single threaded test programs must be designed to get an accuracy of 0.1% - 0.2% out of the Stopwatch class. With this accuracy, algorithms can be tested and compared.

Date and Time Functions in SQLSERVER

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

1 DATEPART Function
2 DATENAME Function
3 DAY, MONTH, and YEAR Functions
5 DATEADD Functions
6 DATEDIFF Function
7 More SQL Server Functions

Data Types - Date and Time in SqlServer

Date and time values can be stored with either the DATETIME or SMALLDATETIME data type. The difference between the two is that SMALLDATETIME supports a smaller range of dates and does not give the same level of precision when accounting for time. The DATETIME data type can hold values from January 1st of 1753 to December 31st of 9999. The time is stored to the 1 three hundredths of a second and each value takes up 8 bytes of storage. The SMALLDATETIME data type can hold values between January 1st 1900 and June 6th of 2079. The time is tracked to the minute and each value takes up 4 bytes of storage. The majority of business applications can live happily with SMALLDATETIME, however, if you are in an environment where each second matters or you need to make estimates to the distant future (or past) then you have to resort to DATETIME. If you fail to specify the time when inserting a value into a DATETIME or SMALLDATETIME column, a default of midnight is used. If you fail to specify the date portion the default of January 1, 1900 is used.

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

.NET 4 Web Application Startup Time

I was chatting with Jonathan Hawkins and some of the folks on the ASP.NET team about performance and Jonathan mentioned the startup time for large ASP.NET applications is improved on .NET 4. There are some improvements in the CLR and in ASP.NET itself that helped. If you have a giant app, you should do some tests.

Built-in Functions - Date and Time Functions

Date and time functions allow you to manipulate columns and variables with DATETIME and SMALLDATETIME data types.

Essential SQL Server Date, Time and DateTime Functions

The essential date and time functions that every SQL Server database should have to ensure that you can easily manipulate dates and times without the need for any formatting considerations at all.

Date/Time Conversions Using SQL Server

There are many instances when dates and times don't show up at your doorstep in the format you'd like it to be, nor does the output of a query fit the needs of the people viewing it. One option is to format the data in the application itself. Another option is to use the built-in functions SQL Server provides to format the date string for you.

Date and Time Data Types and Functions

The following sections in this topic provide an overview of all Transact-SQL date and time data types and functions. For information and examples that are common to date and time data types and functions

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or

The Free Barcode Creator produces barcode images one at a time, and allows easy saving to a file or pasting into an application. 2D versions are also available:

time zone


Hi all,
I have hosted a retail web application in Godaddy, how to pick particular country time in asp.net.
Thanks in advance.
J Walia

Hi all,

I have hosted a retail web application in Godaddy, how to pick particular country time in asp.net.

Thanks in advance.

J Walia

Session time out earlyer with in 5 min.


In my live site session time out with in 5 min only.how can i get the default i.e 20 min time . below webconfig file give below

<?xml version="1.0"?>
    Note: As an alternative to hand editing this file you can use the
    web admin tool to configure settings for your application. Use
    the Website->Asp.Net Configuration option in Visual Studio.
    A full list of settings and comments can be found in
    machine.config.comments usually located in
        <sectionGroup name="system.web.extensions" type="System.Web.Configuration.SystemWebExtensionsSectionGroup, &#xA;        System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, &#xA;        PublicKeyToken=31bf3856ad364e35">
            <sectionGroup name="scripting" type="System.Web.Configuration.ScriptingSectionGroup, &#xA;        System.Web.Extensions, Ver

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend