Edit lock in the designer? RRS feed

  • Question

  • I'm a bit confused when comparing behavior of the workflow designer control in different hosting samples:
    (a) in hands-on Lab 10, the user is able to edit the workflow (for example drag an activity to a different place),
    (b) in Applications/Workflow Monitor sample the user can start dragging an activity, he can see the green placeholders (possible drop targets) but he can't really drop an activity in a different place,
    (c) in Technologies/Designer Hosting sample the user can't even start dragging an activity.

    My question is: how can I control the ability of the user to edit a workflow?
    It seems that the reason for edit lock in case (c) is the custom message filter which intercepts most of mouse operations. But I can't find anything that makes (a) and (b) different (of course, they are very different but there is nothing that seems to be related to enabling/disabling of edit operations).

    In our application we plan to use a designer for both editing and viewing workflow execution status (by hosting a free-form designer, pretty much like in the Workflow Monitor). The difference is that I want users to be able to run only a single instance of a workflow - in a sence making an "illusion" that the user is running the workflow "in the designer". The problem begins when the user attempts to edit the workflow while he has a running instance - it is easy to get out of sync between what he sees on the screen and what is being executed.

    What I miss is a possibility to lock a given activity in the designer, i.e. to make it not editable (not movable, connectable, etc.). Well, I can prohibit a user from changing properties of activities (by simply blocking the property grid) but how can I deal with visual stuff (moving, etc.)? There is a property IsLocked on ActivityDesigner but it is not settable and not virtual and seems to have its own logic :-( Disabling the whole designer control does not solve the problem - I still want to let users to scroll, expand/collapse composite activities and so on.

    Any hints/ideas/suggestions? Thx
    Tuesday, February 7, 2006 11:22 AM


  • Take a look at Sergey's Workflow Manager sample found here.
    Tuesday, December 5, 2006 5:57 AM

All replies

  • Take a look at Sergey's Workflow Manager sample found here.
    Tuesday, December 5, 2006 5:57 AM
  • This sample doesn't really lock the workflow designer surface as I can still drag the activities around.  Is there a way to lock the activities so that they can't be dragged at all?  I am trying to use the designer surface to show tracking information, and it seems funny that the activities can be dragged about even after the workflow is completed.




    Jason Bolstad


    Tuesday, October 30, 2007 12:51 AM