we are planing to develop a wf server with Microsoft WF4
the requirements is to create a end user designer for the workflows , client application so every user track the tasks
what is the best architecture for this server ?
I appreciate your help
More details :
we are developing a document management system , we need to create workflow system like Ultimus sure not big like this but the same concept; wf server and wf designer , wf client
1-so the wf designer will connect to the wf server to manage the saved wfs like checkin , checkout , delete
2- the wf client , the normal user will connect to the server to get what is the tasks they have like approve , reject , bla bla
3- the wf client , the Admin user will connect to the server to get what is the tasks and to monitor the wfs , get the status of any workflow
I’m used ultimus before , you just install the ultimus server on the server and the clients will just connect to the server , this clients may be web , or mobile or desktop
this is the requirements of the system
I need to know the Software architecture
The best architecture depends on what your non-functional needs are (for example: is this a tool that will only be used internally or are you going to sell it? How many users? Where and how will users be able to access the system?), there are a lot of quality attributes you need to think about.
The fact that you’re dealing with WF4 isn’t that relevant – connecting to a back-end server ‘service’ like this is fairly common. WF4 might have some “special” ways you can integrate with it but I don’t know what those specifics are – perhaps they are what you’re after?
High Level Architecture
Nothing fancy needed here, 4 main layers:
UI – WF Designer
Designing workflows isn’t trivial, building a UI / system that allows users to do that is even harder, so my guess is you’ll want a UI technology that allows rich interaction – perhaps SilverLight is an option? This would allow you to deliver the app over the internet if need be (might be good for users who are connecting remotely).
Other options include HTML (think HTML5) or a thick client: this is where the environment of your users is important – what level of control do you have over it / what constraints are forced on you?
UI – Workflow Monitoring
Plenty of options here, this is where you need to get into dialog with your users and see what they want. You might want to offer several ways to monitor the execution of workflows:
Busiess Logic (BL)
This should be straight forward, but think carefully about how you integrate with WF – on the one hand binding yourself to it directly will provide some excellent opportunities to quickly deliver cool functionality – but on the other hand you’ll be tightly-coupled to WF: if it changes you’re in trouble.
I imagine the BL will need to consume information from a variety of places – some of which you’ll invent yourself: these should all be abstracted out behind an interface (DI).
You might also provide some services (for populating AJAX driven UI controls, driving widgets, etc); put as much logic in the BL as possible and provide different channels to it via the UI and Integration layers.
I’m guessing this will need to be wrapped up as a Windows Service; if you keep your core logic cleanly defined you should also be able to re-use it in a Website, WebServices, etc.
Integration Layer
This might be relatively thin, have a look at some DI frameworks before you go rolling your own; WCF is an obvious option too.
Data Repositories and Custom WF Services
This layer will hold the concrete implementations of any data repositories you create. It will also contain any custom WF components you make. Remember that these layers are logical in the first instance, but also translate into physical layers a lot of the time as well. At some point you’re going to need to write code that runs directly against WF4 – that’s cool but you want to ensure that code is as small and “throw-away-ible” as possible; the architecture described here should allow that. So, when you develop the code components that deeply integrate with WF4 keep them small and modular – easy to replace, consume them via the integration layer; all you have to do is keep loose-coupling in mind: DI, etc.
Final Considerations