locked
Where have Designer classes gone? RRS feed

  • Question

  • Hi All,

    I found you just take away one of the coolest feature of WF. i.e. decorating your custom activity with the Microsoft Designer.
    e.g. I have my own Rule Engine and have an activity that says ExecuteRule that takes bunch of parameters. Now i want my end customer use this feature with If/Else activity experience which makes perfect sense. As use can put bunch of activities in the If section and another bunch in the else section.

    There are more of such activities that i want to decorate with Microsoft Designers like Try/ Catch etc...

    I know a prominent arguement that "why do you want to do so?" or "doing this will change the behavior and that is why we are hidding this". please let me know if this is a correct assumption.

    If it is then please let me know an alternate way to achieve similar functionality. I just have to have this feature as this is something that my end customer will be using.

    if the classes are still there and being migrated to different namespace then please let me know the same so that i can move ahead.

    I used to achieve all this with Beta1 and comes Beta2 and booom it stopped working.

    Somebody please help me out with this.


    Thanks
    Ammit

    Tuesday, January 5, 2010 12:19 PM

Answers

  • Ammit,

    Right now, we don't have much sample code, I know that Tim's series of blog posts is moving in that direction of creating a free form designer.  Given where we are at prior to RTM, we've got a lot of basic to intermediate scenarios captured in things like samples and blogs, more advanced scenarios will continue to come out leading up to and after RTM of VS 2010. 

    In an ideal world, we would have been able to ship our internal freeform layout panel as an extensible type that folks like you could use to take care of some more of the infrastructure and plumbing of a free form designer.  We may get to that in a subsequent release.  Even in that case though, writing a free form design is always going to be a fair amount of work (which is what we found out when we built flowchart on top of the freeform infrastructure). 

    Please send me mail (mwinkle @ microsoft) if you have any more questions,

    matt


    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    Thursday, January 21, 2010 5:41 PM

All replies

  • Hi Ammit,
    Are you asking why all the Designer classes in System.Activities.Core.Presentation have been made internal in Beta2?

    As in this forum post and the linked blog post the decision to make designers internal was a deliberate one, there are costs associated with making any API public. The posts do also mention that it is possible to create the designers yourself, and to get them to look similar to the built-in ones by using styling, if you want to.

    Tim

    Tuesday, January 5, 2010 10:16 PM
  • Hi

    I partially agree with you. I will try out the solution you are proposing for sure.Do i also get the control flow feature with the styling in other words if i have applied style for If/Else activity then how will i be able to connect through control flow in Flowchart designer and on the runtime will it act the similar way?

    I admit i am little reluctant to this change as in Beta1 days the life was much easier as i can just decorate my activity with .NET designer classes and wallah everything is achieved i do not quite need to do anything special.

    Thanks
    Ammit

    Thursday, January 7, 2010 6:39 AM
  • If you're asking whether you need to do anything special to your custom activity or custom activity designer to use it inside a Flowchart, then the answer should be no - it should work inside Flowchart just the same as a framework activity such as 'If' activity does.

    Tim
    Friday, January 8, 2010 12:46 AM
  • Hi Tim,

    Thanks for prompt reply.
    I could create a custom activity designer class and got it implemented over an avcitiy i have. it worked fine. So this will cover one of a few use cases i have for rehosting designer.

    The key activities i would want my end users to drop would look similar to FlowDecision and may be FlowSwitch?? But Flow Decission is must for me. The issue is i want to control flow to be drawn off my activity if this is done the look and feel is really not that important. The one i have lets me fork only one arrow[control flow] off it but Decision executiong activitoes require two control flows. how can i achieve this? I saw someone else on this forum is also looking for this answer and i went to your blog through that post but haven't really found an easy pluggable to way to solve this problem.

     

    Can you please help?

     

    Thanks

    Ammit

    Friday, January 8, 2010 9:58 AM
  • I see.
    I don't think there is an easy pluggable solution to your problem to let you have multiple arrows come out from a custom activity.

    The FlowStep used for wrapping activities (inside of Flowchart) only supports the idea of one outward arrow. You asking to be able to have a custom FlowNode with more arrows but FlowNode is sealed except to internal classes - so you can't customize the control flow.

    Tim
    Friday, January 8, 2010 11:05 PM
  • Hi Tim,

    So is there any other way to solve this problem? I think this would be a prominent requirements for a lot of people. The FlowDecision activity you have is not even near to being a user friendly Rule Writting experience i can not take this activity to my end customer ever. Thats why i ended up writting own Rule Editor and want my end user to drang and drop it on the flowchart WF and fork two different IF-Else branch of it.

    Neither you let me extend the class nor you let me reuse the designer or even styling, i am just stuck here, and stuck very badly.
    You wrap each and every custom activity in a Flow Step by default so i can not do any other worfaround as well except drawing my own FlowChart activity. Which i do not think i would like to do as this will kill the dev productivity. My Dev team will be using the VSTS WF Designer experience and the one I am creating 03ight now is for the end user. I want each and every activity I create to work on both which i think is another rational requirement.
    In other words i would not like to reqrite the Flow Chart activity for various reasons like maintainance, upgrade, and event inter operatability.

    Can you please help me find solution for this problem?


    Thanks
    Ammit
    Saturday, January 9, 2010 6:37 AM
  • Your inputs please?
    Tuesday, January 12, 2010 8:41 AM
  • Making all the designers internal like this is a hard call, especially for flowchart because it seems like a lot of people seem to want different sorts of extensibility in Flowchart, but I still think it was the right call for a number of reasons, and it is not likely to change for release of Dev10/Netfx40. Here are a few justifications:

    -The activity designers are tightly coupled to the framework Activity classes - and flowchart is probably the best and most extreme example of that. Inside of Flowchart Designer, there may be code which deliberately casts to FlowNode, FlowStep, FlowSwitchEditor, and so on.

    -The amount of effort that would have had to go into designing and testing designers which aren't tightly coupled in this way, but are pluggable against any activity would have been huge, and reduced our resources for improving the quality and usability of the user experience in vNow, such as it is. Doubly so considering e.g. external factors which caused us to change the flowchart object model part way through the project.

    -Creating a lot of extensibility points on Flowchart or Flowchart Designer with public API is costly, and also would limit the ways we could make Flowchart better in vNext.

    A decision like this is hard, but cuts like this have to be made. Making these decisions enables us to ship the product.

    I would hate to be leaving you totally unhappy. I hope there is some way to ease the usability pain issues you are writing about. It may be as I continue to write more about the custom layout designers that that will start to look like a workable solution. Or there may be something totally different that can work for you, such as having an Rule activity with a custom designer with a button that would automatically create the flowswitch and branches to placeholder activities, which then morph into whatever activity you drop on them.

    You're also welcome to email me about the problem for further discussion. (tilovell at)

    Tim

    Tuesday, January 12, 2010 6:22 PM
  • Hi Tim,

    Thanks for your inputs.
    You can see I am just having sleepless nights over this problem. Almost always browing this forum since last few days to get a better solution to this problem.
    I agree with your that a few decisions are to be made and you got to do what you got to do but the issue is the business application writters like us suffer big time.
    I really want to take this designer experience to my end user and make him sketch his system the way he wants.

    My requirements around WFs are very tricky, say , i want to jump through the activities in the WF on runtime [user chooses what he wants to do run time as well as design time], some more funky constraints that i want to add on designer for droppoing an activity etc and list is really huge. Beta 1 was out and i could do all these with sequence designer it made my day and beta 2 just started giving me sleepless nights.

    I know a simple rule of writting framework. either i let my adopter extend what i have or i let them plug in [add on] and this WF is not letting me do either of these. If you seal the classes then give me plug ins and vice versa. So that adopters like us can make some customization and make it really work to solve real business problem. As i think to solve real business problem the framework we get may not always be enough.

    Coming back to problem, looks like I will have to create my own Flowchart activity designer class as well as all the pain on making it look reasonably beautiful and workable. I saw in one of the WebCast from PDC 2010, where the presenter showed a sample app that implemented their designer from scratch[some scientific app]. Can we get hold of the source code? Can we get simpler approach to write our own FlowChart Designer , more samples, more help , more session etc???
    I have seen half a dozen people asking for this features and comes RC, there will be more of us asking for similar things.

    Please help early adopter like us and provide more help.

    Thanks
    Ammit
    Tuesday, January 12, 2010 6:47 PM
  • Can someone please provide me with sample code?

    Thanks
    Ammit

    Monday, January 18, 2010 6:26 AM
  • Do you remember who presented the webcast?  I'll see if I can find it.
    Thanks!
    Scott
    MS Developer Support
    Monday, January 18, 2010 11:05 PM
  • Hey Scott
    It was Matt Winkler - FT17 Spice Up Your Applications with WF 4 

    Slide hearder was MS Research Trident.


    Thanks
    Ammit
    Tuesday, January 19, 2010 3:40 AM
  • Hi

    Waiting for some sample code. Help please.

    Thanks
    Ammit
    Wednesday, January 20, 2010 9:55 AM
  • Ammit,

    The MS Research team built a designer from the ground up, and I do not believe they have any sample code available.


    matt
    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    • Proposed as answer by Amadeo Casas - MSFT Wednesday, January 20, 2010 7:08 PM
    • Unproposed as answer by Ammit._ Thursday, January 21, 2010 6:11 AM
    Wednesday, January 20, 2010 6:35 PM
  • Hi Matt,

    Thanks for looking into this.
    But I am running into similar water. I have to create a flow chart designer class that lets me add activities in it which mimics FLow Decision. Flow Switch etc...
    I will have to implement such activity from scratch. I need help in doing the same. I am trying hard to dig in to forums , blogs , internet searches but no help.
    I think only you guys can help me do this. There are others like me asking for similar feature on this forum.

    Can you help with sample code?

    Thanks
    Ammit
    Thursday, January 21, 2010 6:11 AM
  • Ammit,

    Right now, we don't have much sample code, I know that Tim's series of blog posts is moving in that direction of creating a free form designer.  Given where we are at prior to RTM, we've got a lot of basic to intermediate scenarios captured in things like samples and blogs, more advanced scenarios will continue to come out leading up to and after RTM of VS 2010. 

    In an ideal world, we would have been able to ship our internal freeform layout panel as an extensible type that folks like you could use to take care of some more of the infrastructure and plumbing of a free form designer.  We may get to that in a subsequent release.  Even in that case though, writing a free form design is always going to be a fair amount of work (which is what we found out when we built flowchart on top of the freeform infrastructure). 

    Please send me mail (mwinkle @ microsoft) if you have any more questions,

    matt


    Program Manager -- wf designer -- http://blogs.msdn.com/mwinkle
    Thursday, January 21, 2010 5:41 PM