locked
IfElse Activity in a While Activity RRS feed

  • Question

  • Is there any reason that I shouldn't be able to drag an IfElse activity into a While activity?  I'm unable to do so.

    I'm running Workflow Foundation beta 2.

    Thank you in advance...
    Wednesday, March 29, 2006 4:44 PM

Answers

  • While activity can have only one child activity. You can add Ifelse directly to while or add a sequence and then add other activities to that sequence
    Wednesday, March 29, 2006 6:59 PM
  • Hi Senfo,

    I was able to drag and drop IfElse activity into while activity.

    You can drop only one child activity into while activity.

    Are you sure you do not have other child activities in while activity when you are attempting to drop IfElse?

    Thanks,

    Chethan

    Wednesday, March 29, 2006 7:05 PM

All replies

  • While activity can have only one child activity. You can add Ifelse directly to while or add a sequence and then add other activities to that sequence
    Wednesday, March 29, 2006 6:59 PM
  • Hi Senfo,

    I was able to drag and drop IfElse activity into while activity.

    You can drop only one child activity into while activity.

    Are you sure you do not have other child activities in while activity when you are attempting to drop IfElse?

    Thanks,

    Chethan

    Wednesday, March 29, 2006 7:05 PM
  • erg..my mistake!  Thank you very much for clearing that up!
    Wednesday, March 29, 2006 8:04 PM
  • That's exactly the problem, which means that I think I actually found a bug.  Some how, I was able to drag two activities into a While activity, although the compiler did flag an error.  As a result, I removed the two activities and attempted to add them one at a time, which is when I had issues with adding an IfElse activity to the While activity.  Had I added the IfElse first, it may have been more obvious to me that the While activity could have only one child activity.

    By the way, I'll check into it, but I think the way I was able to add two activities to the While activity was that I had selected more than one activity in the workflow and then dragged the group into the While activity.

    Thank you very much for your help!
    Wednesday, March 29, 2006 8:08 PM
  • Yes. There seems to be a problem there. Thanks for bringing it to our attention.

    Investigating into the cause.

    Thanks,

    Kushal.

    Wednesday, March 29, 2006 8:31 PM
  • Hi Senfo,

    In the designer we try to prevent users from dropping more than one child activities (separately).

    However users can get around it by adding multiple activities in the XOML or designer.cs file or by using multi select drag and drop (like you have mentioned above). Under such circumstances we flag the error using smart tags (red exclamation) on top of while activity and compilation errors.

    Thanks,

    Chethan

     

    Thursday, March 30, 2006 7:57 PM