Mocks for Unit Testing

This post is not exactly related to Designer, but something I am looking closely into nowadays. Recently a customer asked, how can he replace one of his long running activities with a different mock activity so that he can still unit test his workflow/composite activity logic. Another scenario would be, how to replace an activity…

2

Base Designer with additional adornments II

Couple of customers reported an issue with applying additional adornments on the designer discussed in this post. The issue was for out of box activities which didn’t have a custom designer(were using the ActivityDesigner) itself, the adornments were not working. An example would be the Delay activity. Currently, we don’t have a clean solution to…

4

Storing your information into activities during design time

Continuing with the theme of questions we get from customers: How can we store some specific information into activity. One of the cases might be since we don’t provide a unique identifier for an activity, the developer wants to store the unique ids per activity. This way he can differentiate between two activities of the…


Hiding the Breadcrumb

We continue to get requests from customers we didnt anticipate. And we continue to solve those problems – some way or the other. This one is that “some way”. I dont love it. But hey, if it helps the customer, it works. The customer wanted a way to hide the breadcrumb. Since we didnt have…

1

Icons for the Designer

We have already seen how to have icons for the toolbox items. However, unfortunately, it is not the same way for the icons on the designer surface. Good news though, it is not that difficult. As we create our ActivityDesigner, we essentially need to add the following property:<sap:ActivityDesigner.Icon> <DrawingBrush> <DrawingBrush.Drawing> <ImageDrawing> <ImageDrawing.Rect> <Rect Location=”0,0″ Size=”25,25″…

1

Binding activity properties to a custom control

Today, for a re-hosted application, generally users have the Designer, Toolbox and the Property Grid. The property grid provided has been hooked up pretty well with the designer. Thus any changes to the properties of an activity on the designer surface are bound pretty tightly with the property grid properties. However, what if you have…


Designer in View

Recently, a customer asked how can we get the designer in focus if we know the Model Item for that activity. This can specifically be of value as you are working with large workflows and huge scrolling for going from top to the bottom. This can now be achieved pretty simple: modelItem.Focus(); Thus, once you…


Observing Model Item changes

One of the customers, recently reported an issue where he was not observing the changes he had just made through the model item on the activity. This is what he was trying:void modelService_ModelChanged(object sender, ModelChangedEventArgs e) { activity.Properties[“Id”].SetValue(1); int i = (int)activity.Properties[“Id”].Value; if (i!=1) { throw new BuggerException(); } } …and this was throwing the…


Adding activities out of box to the VS toolbox

In the previous posts, we have already see as to how we can get the custom activities shown up in the toolbox. Either the activity is part of your solution or we use the Choose Toolbox Item dialog. However, some of our customers want to deliver their custom activities out of box. Their user shouldn’t…

4