Ask a questionAsk a question
 

AnswerTerminate The Workflow

  • Saturday, November 07, 2009 6:33 AMAjeet Nigam Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi All,
              I am using the Terminate control of the Windows Workflow to terminate the workflow based on the condition in the ifElseActivityblock. The problem i am facing is to attach the event to the Terminate control to terminate the workflow.

    Any help will be appreciated


    regards

    Ajeet

Answers

  • Monday, November 09, 2009 8:45 AMRock Wang– MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

     

    The IfElse activity works like a classic If statement in a high-level programming language. It may contain any number of condition-based branches and also a default branch to fall into if no other condition is met.

     

    By default, IfElse activity has two branches, and new branches can be added by right-clicking and selecting Add Branch from the context menu. When the runtime engine reaches an IfElse activity it begins evaluating the condition of the various branches proceeding from the left to right. The condition of each branch is determined and the first branch that evaluates to true is run. You can alter the evaluation order of the branches by moving branches around through the commands in the activity's context menu. To enable a branch, you need to specify a valid condition. You specify a condition in either of two ways—through an expression or through a piece of code.

     

    For more information about Workflow Activities, please refer to the following articles:

     

    A Tour of Windows Workflow Activities

    http://msdn.microsoft.com/en-us/magazine/cc163529.aspx

     

    Building an Expense Report Approval Workflow for SharePoint Server 2007 Using Visual Studio 2008

    http://msdn.microsoft.com/en-us/library/cc627283.aspx

     

    Hope this helps.

     

    Rock Wang


    Rock Wang– MSFT
    • Marked As Answer byAjeet Nigam Tuesday, November 10, 2009 4:07 AM
    •  

All Replies

  • Monday, November 09, 2009 8:45 AMRock Wang– MSFTMSFT, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    Hi,

     

    The IfElse activity works like a classic If statement in a high-level programming language. It may contain any number of condition-based branches and also a default branch to fall into if no other condition is met.

     

    By default, IfElse activity has two branches, and new branches can be added by right-clicking and selecting Add Branch from the context menu. When the runtime engine reaches an IfElse activity it begins evaluating the condition of the various branches proceeding from the left to right. The condition of each branch is determined and the first branch that evaluates to true is run. You can alter the evaluation order of the branches by moving branches around through the commands in the activity's context menu. To enable a branch, you need to specify a valid condition. You specify a condition in either of two ways—through an expression or through a piece of code.

     

    For more information about Workflow Activities, please refer to the following articles:

     

    A Tour of Windows Workflow Activities

    http://msdn.microsoft.com/en-us/magazine/cc163529.aspx

     

    Building an Expense Report Approval Workflow for SharePoint Server 2007 Using Visual Studio 2008

    http://msdn.microsoft.com/en-us/library/cc627283.aspx

     

    Hope this helps.

     

    Rock Wang


    Rock Wang– MSFT
    • Marked As Answer byAjeet Nigam Tuesday, November 10, 2009 4:07 AM
    •  
  • Tuesday, November 10, 2009 4:07 AMAjeet Nigam Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi Rock Wang,
                          This post is really helpfull. Much appreciated.



    Regards
    Ajeet