locked
Stop Workflow RRS feed

  • Question

  • hi all,
    i've developed SequenceActivity and  add it to an exist workflow as step, i need through this activity to stop the workflow,
    how can i do that ?


    foreach(object HeartBeat in me.heart.Beats) messageBox.show("I miss u !!")
    Sunday, May 17, 2009 12:13 PM

Answers

All replies

  • I think there are 2 ways to do this:

    1. Use the return vaue of the Execute function - i.e.: return ActivityExecutionStatus.Closed;

    2. Use the CloseActivity() method of the ActivityExecutionContext instance passed to the Execute method.


    Microsoft CRM MVP - http://mscrmuk.blogspot.com/ http://www.excitation.co.uk

    Wednesday, June 3, 2009 6:04 AM
    Moderator
  • Hi Dany,

    Just to add

    ActivityExecutionStatus.Closed indicates to the workflow run time that this activity is complete and the next activity can begin executing.

    Could you give more detail about your  scenario?

    Any running workflow instances if completed successfully/failed would stop with appropriate status!

    Or you could also add stop workflow activity as a next step following your custom workflow activity step !

    Regards,
    Nishant Rana

    http://nishantrana.wordpress.com
    Wednesday, June 3, 2009 6:40 AM
  • hi all,

    i have workflow contains 5 steps
    my scenario is somthing like this :

    do step number 1 then,

    do step number  2  then in step number 3 check datetime and if today is monday stop workflow and do not go to steps number 4 and number 5

     


    foreach(object HeartBeat in me.heart.Beats) messageBox.show("I miss u !!")
    Wednesday, June 3, 2009 6:51 AM
    • Marked as answer by Dany85 Wednesday, June 3, 2009 7:02 AM
    Wednesday, June 3, 2009 6:59 AM
  • helpful post , thanks dear
    Regards,
    Dany
    foreach(object HeartBeat in me.heart.Beats) messageBox.show("I miss u !!")
    Wednesday, June 3, 2009 7:01 AM