• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 402
  • Last Modified:

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?
 
0
rj2
Asked:
rj2
  • 3
  • 2
2 Solutions
 
surajgupthaCommented:
>> 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
 
fridomCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
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

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now