Object oriented design question - how should business objects relate to Windows workflow foundation in n-tier solution

I'm designing an n-tier solution using a smart client (WPF) . Using Windows workflow foundation in business layer looks nice because a lot of the functionality revolves around workflow. So I'm hoping that using WF instead of rolling our own support for saving workflow to database, retrieveing workflow from database, monitor if changes in status have been made etc wil save some implementation time.

Does anyone have any info on how typical business objects should relate to workflow concerning classes?

If I want to design a sales support application for real estate agents I could have a class House. Status changes in workflow could be "waiting for assessment", "assessment done", "ready to advertise", "advertised", "offer is made","offer rejected","offer accepted","waiting for contract to be signed","contract signed","sold" etc.
Should I have a class "House" and how should it relate to workflow?
Does it make sense to use WF in this case?
Are there samples or info available that could shed some light on this?
 
LVL 10
rj2Asked:
Who is Participating?
 
surajgupthaConnect With a Mentor Commented:
>> Sales Support Application for Real Estate Agents.
The workflow of Waiting for Assessment, Assessment Done, ..... is this the only workflow in the application?

>> Does it make sense to use WF in this case?
Because if it is, i would personally hand code it instread of using WF and introduction another technology stack into the application.

>> Should I have a class "House" and how should it relate to workflow?
WF provides a way to design the whole workflow like a flow chart where u can define the activities and these activities can hold any objects. Including House

>>Are there samples or info available that could shed some light on this?
Yes making a decision to go for workflow or not and/or after deciding to choose workflow this website would be really useful
http://wf.netfx3.com

I would suggest you try some Handson Labs to get a hang of WF
http://www.microsoft.com/downloads/details.aspx?FamilyID=2e575633-e357-4ee7-aaff-34138f00e830&DisplayLang=en
0
 
fridomConnect With a Mentor CEO/ProgrammerCommented:
I guess you have checked:
http://msdn2.microsoft.com/en-us/library/ms734702.aspx 

and/or checked some availalbe libraries for that?

Then let's see after "normal" OO principals. Would you have an house class. Yes. It will be specially adopted to your business needs but you will have something. Now then you will have different "states" so you'd have some State object probably with state diagrams I bet here comes the workflow into play.

So I would do the following
build a totally simply class
see how you can intergrate it with the worflow classes (probably getting some decent book before delving into it) and then you can see wheter it fits your needs

Regards
Friedrich
0
 
rj2Author Commented:
>> Sales Support Application for Real Estate Agents.
The workflow of Waiting for Assessment, Assessment Done, ..... is this the only workflow in the application?

The flow can be slightly different from user to user.
For small real estate agents the flow is simple.
In larger companies there could be additional steps needed. Some steps could need approval from a supervisor before the workflow can continue.

So I would define my activities and have several different workflows and have a config where the user select which workflow best fits their needs. I would define as many workflows as needed so that everyone can find a workflow that fits their needs.
0
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

 
surajgupthaCommented:
Well that makes sense. If you are going for WF you should check out the links i posted and gets some hands on for you to fully understand the implication of using WF and how you would want to package that with the solution you are trying to develop.
0
 
rj2Author Commented:
surajguptha:
The site http://wf.netfx3.com contains a lot of info. What particular info did you have in mind that would help me decide if workflow is suitable for this particular case?
I will check out the hands on lab, thanks.

fridom: I will try building a simple class and try to add workflow into it and see what comes out, thanks.
0
 
surajgupthaCommented:
rj2, i pointed the link out just as a general reference to all WF related articles.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.