locked
Building blocks for Typical Workflow RRS feed

  • Question

  • Hi

    Please look at the example depicted at http://activiti.org/userguide/index.html#taskFormExample. I would like to know what should be the basic building blocks to achieve a workflow like this?? Please keep in mind that a vacation request may be approved/rejected after 5-6 days or may be even more, so asynchronousity and persistency are key elements here. Can we do this by using the designer only? Or is it necessarily required to use some code as well??

    Please let me know how should I proceed towards achieving this scenario.

    Thanks


    Akshaya K Sharma
    Tuesday, August 10, 2010 1:15 PM

Answers

  • Sorry for my chort response.

    1. Yes you can do all this with the designer.
    2. The only code you could have to do is for cutom activities as write data in a database.
    3. This workflow could be design in a rehosted designer and end-user will be able to design your workflows : but i never tryed to save workflow as Xamlx. Its possible you have custom code to write to.

    To the vacation example you'll need :

    1. A correlation scope to correlate all Receive on same Handle
    2. A flowchart
    3. A Receive and sendreply activity to handle the vacation request and return an Id that will be used for correlation. In this sequence you can add a cutom activity to save request in a database.
    4. An other Receive and sendreplyactivity to receive the approbation of the manager. this receive will wait for the corrlation id and a boolean to approve or note
    5. An flowdecision to eval approve boolean
    6. At the flowdecision True output add a custom activity to send mail
    7. At the flowdesision False output add a custom activity to send mail to user to as him to adjust the request
    8. Add an Recive an sendreply template to know the end user vacation adjust and a FlowDecision to go to root or end of workflow.

    I hope it's help you ;)


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    Wednesday, August 11, 2010 9:30 AM

All replies

  • Hi Akshaya,

    Do you plan to use Workflow Service (XamlX) or simple hosted workflow (Xaml)?

    It's easn't hard to implement you workflow but you have to choose Xaml or Xamlx...


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    Wednesday, August 11, 2010 7:36 AM
  • Hi Jeremy

     

    Thanks for your reply. This workflow will be called from a silverlight application whenever a user event occurs (which can happen at any moment in time) and once the workflow has started, I also have to show a progress bar in the silverlight application based on the current state of the workflow. So, I think using a Workflow service (XamlX) will be more appropriate in this scenario, what do you think?? Again, please keep in mind that the workflow can stay at a single step for a long time, till it resumes the next steps based on another user event.

    So, please help me in creating the workflow accordingly.

     

    Thanks a lot.


    Akshaya K Sharma
    Wednesday, August 11, 2010 8:16 AM
  • Silverlight + Wf Servcices (Xamlx) = a nice couple ;)

    In WF Services you haven't a really hard job to do.

    1. You'll have to active sql persitence to have a long runing instance.
    2. Use Correlation to have a simple way to correlate Silverlight calls of Receive activities. You Waorkflow will be in idle state on Recieve activities. That all your need for validation.

    That's so simple ;)


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    Wednesday, August 11, 2010 8:41 AM
  • It really sounds simple...but u know its similar to as they say in the armed forces "This is a military operation...Nothing goes as planned" ;)

    Referring to my initial post...can we do all this using just the designer? Or I'll have to put some code as well? The point here is later in my project, I wish to rehost the workflow designer into the product so that the end-user can design the workflows themselves....do you think this will be possible?? Please see, they will be creating workflows very much similar to the vacation example as mentioned here http://activiti.org/userguide/index.html#taskFormExample.

     

    Thanks.


    Akshaya K Sharma
    Wednesday, August 11, 2010 9:10 AM
  • Sorry for my chort response.

    1. Yes you can do all this with the designer.
    2. The only code you could have to do is for cutom activities as write data in a database.
    3. This workflow could be design in a rehosted designer and end-user will be able to design your workflows : but i never tryed to save workflow as Xamlx. Its possible you have custom code to write to.

    To the vacation example you'll need :

    1. A correlation scope to correlate all Receive on same Handle
    2. A flowchart
    3. A Receive and sendreply activity to handle the vacation request and return an Id that will be used for correlation. In this sequence you can add a cutom activity to save request in a database.
    4. An other Receive and sendreplyactivity to receive the approbation of the manager. this receive will wait for the corrlation id and a boolean to approve or note
    5. An flowdecision to eval approve boolean
    6. At the flowdecision True output add a custom activity to send mail
    7. At the flowdesision False output add a custom activity to send mail to user to as him to adjust the request
    8. Add an Recive an sendreply template to know the end user vacation adjust and a FlowDecision to go to root or end of workflow.

    I hope it's help you ;)


    Jérémy Jeanson MCP, MCTS http://blogs.codes-sources.com/JeremyJeanson/ (French or English spoken)
    Wednesday, August 11, 2010 9:30 AM