Design Pattern Choice Help:Urgent RRS feed

  • Question

  • Hi,

    I am using Dotnet  version 2.0.

    I need a idea about the abstract factory pattern(using interface) how to implement it, can anybody please help me:


    I have got 2 documents Doc1 and Doc2.

    I have got 5 workflow WF1,WF2,WF3,WF3,WF4,WF5.


    Doc1 has to perform following workflow : WF1,WF3,WF4

    Doc2 has to perform following workflow : WF1,WF2,WF3,WF3,WF4,WF5.


    Going forward we can add documents like say Doc 3.Which will have already existing Workflow and can also add new workflow if required.


    I need a design idea in this.Can this me XML based workflow too.


    Its really urgent,


    Thanks in advance


    Thursday, January 17, 2008 7:34 PM

All replies

  • Hi,

    Sorry if i confused u.

    My basic idea is how can my this requirement be implemented.Can it be done through factory pattern.


    The requirement is.

    I have got 2 document type : Doc1 and Doc 2.
    Now each document has to undergo certain Work FLow process, so that it gets processed fully.
    Assume as of today the existing Workflows(These are concrete classes) are WF1, WF2, WF3, WF4,WF5.


    Doc1 has to undergo WF1,WF3 and WF4 to get fully processed.
    Doc2 has to undergo WF1, WF2, WF3, WF4,WF5.


    I want the design in such a way so that in future assume a new documnet type say Doc3 is introduced in the system and also a new workflow say WF6.

    Doc3 has to undergo WF1,WF4,WF6 to get it processed.


    What would be the best design approach for this. so that enhancement like introducing Doc3 can be done with minimal change.

    Hope i am clear now.





    Friday, January 18, 2008 4:31 PM
  • To add to it..

    Assume i get Doc1 as input i should be only creating object of workflow( WF1,WF3 and WF4 ) and not of Workflow(Wf2 and Wf5).


    Friday, January 18, 2008 4:40 PM