VeeMat


Hi All,

This is very basic question,

When should you use workflow

Can you use workflow in every program you write

Are there any practicle examples of a application which shows that advantage of

coding them using workflow model rather than object oriented model.

I have seen example like "Help Desk Application".

There are so many applications in market for "Help Desk" which are written in

procedural or object oriented way without workflow.

what is the advantage of writing them use workflow programming model

Why a process need to running long in memory or persisted and created back

We can do the same with current programming models by persisting the state of object using any persisting media and create the process back in the same state.

Thanks

Vee



Re: Workflow practicle uses and when to use

Jim.Qian


Hi, Vee,

The basic purposes of Windows Workflow Foundation or any other workflow products in the market are:

(1) centralize the business process handling in a central place rather than spread around anywhere in your application.

(2) handling dynamic buseness processes, which means your (or your clients') business logic changes frequently. Rather than rewrite your business layer code again and again, for example you can setup meta data and rules and have workflow engine handle the dynamic changes without changing your business layer code.

(3) by changing your code, you are doing it in a developer's way.

In many business secarios, non-developers (business users) have the requirement of changing the business flow without the involvement of developers. Many workflow products provide workflow designer tools for business user/developers to compose workflows without much code (of course it depends on how complex your workflow is.)

With WF, you the developer may set up all the workflow packages, then the business user just pick the right one from a list of ready-to-use packages ;

Or the business user may compose his/her own workflow packages based upon the atomic activities that you the developer that has coded for him/her.

So the final answer is, it depends on your project. If your business require a dynamic and changing process, WF sure helps a lot. If your busines process is static and you don't expect it will change soon or that often, of course using WF will complex your application archtecture, it might not worthy of doing it in your project.

Jim.Qian






Re: Workflow practicle uses and when to use

Alex_SG

Hi,

This is my business flow.

1. Ask Question (28 Questions) and user need to answers.

2. Calcuate the score depend on the answer.

3. If score >= 5 do A else do B

All the answers need to store in db.

My question is that how do i seperate the WF and Business Logic.

This is my first WF project.

Thanks for your help.

Alex







Re: Workflow practicle uses and when to use

NDG

WF is the business logic of the application.

If you need to use WF for this scenario depends on the complexity of the flow through the questions (dependency on previous answers). If it's just start to end, WF will not help you much.

WF could help in this scenario, if you want your application to be future proof.

Instead of only storing the questions in the database. You could store the questions and the workflow as an XML document. The client application opens the declarative XML flow and processes it. Even if the question flow changes, you don't have to re-code the client application.






Re: Workflow practicle uses and when to use

VeeMat

Thank you very much for the answer. That makes sense.

Lot of books and examples I have seen do not answer the basic question,

When to use , When not to use . Why to use .

How WF can a practically used giving some examples.Why to persist the process in memory,

when you can persist the state and recreate process.

Any pointers where more details to these answers can be found





Re: Workflow practicle uses and when to use

Constantin Mihai - MSFT

You may find most of the answers in the following title: Essential Windows Workflow Foundation -http://www.amazon.com/Essential-Workflow-Foundation-Microsoft-Development/dp/0321399838/ref=sr_1_1/102-3282132-6448131 ie=UTF8&s=books&qid=1178130274&sr=1-1

It's a very good book on explaining the rationale behind WF and its internals written by one its architects (Dharma) and program managers (Bob) who know first hand the WF details.

Thanks,

-Costi





Re: Workflow practicle uses and when to use

NDG - Nico De Greef

These are rather architectural questions then technological ones, meaning there's no If [business requirement] then use [technology] guide.

When to use

When it has an added value in cost/time/maintainability,... for the task. eg I'm using it for scripting because I like the flow-like user interface. When you have to update a script, you have an immediate overview of what it is doing exactly. Workflow is way to powerful for this task, but there's no disadvantage in doing so.

When not to use

Use workflow only when you see some advantages in comparison with other programming techniques. Do not use it just because it's fun.

Why to persist in memory

Why spend costly resources on termination and recreation if you know you'll be using the workflow within a very short term. This would be a scalability and performance decision.






Re: Workflow practicle uses and when to use


Re: Workflow practicle uses and when to use

Kavita Kamani - MSFT

Also check out how you can use rules for this sample - specifically see this sample: http://blogs.msdn.com/rulesteam/archive/2007/02/21/rules-against-xml-sample-on-the-community-site.aspx




Re: Workflow practicle uses and when to use

MarkDeibert

You are designing an XML Web service. One of your design concerns is XML Web service state architecture.

Which statement best describes the default state architecture in an XML Web service

Each response to a client application is the same object until released by the client, and maintains state between calls.

Each response to a client application is a shared object that does not maintain state between calls.

Each response to a client application is a shared object that maintains state between calls.

Each response to a client application is a new object and has a new state.







databaseforum