Click on this icon to open the XML page.Tom Van Gaever - Blog
Search:   

Workflow activities Child Replicator activity in Parent Replicator not working 
Saturday, October 10, 2009, 22:17 - Worklfow Foundation
Posted by Administrator
When binding a replicator from within another replicator, you will discover the following behaviour:

We have 2 replicators:
ParentReplicator & ChildReplicator

We have 4 roles:
role1,role2,role3 and role4

We have 5 users:
user1,user2,user3,user4 and user 5

each user is connected to a role in a dictionnary<Role,list<User>>

role1 has 2 users: user1 & user 2
role2 has 1 user: user 3
role3 has 1 user: user 4
role4 has 1 user: user 5

We want to iterate through each role and create a task for each user in this role.

through the designer we bind the initialchilddata property to List<Roles> Roles property

using code we capture the ParentReplicator_ChildIntialized
event and execute this code:




The result is this:

Role 1
Role 2
- user 1
- user 3
Role 3
- user 2

...

SO it seems like the ChildData is only set the next iteration?...

The reason for this behaviour is because we are settings the InitialChildData on the wrong object, the object we are using is living in another context.


Use:

//use the control in this context
ReplicatorActivity rep = e.Activity.GetActivityByName(PanretReplicator.Name, true) as ReplicatorActivity;
rep.InitialChildData = users.Select(u => u.Sid).ToList();





here we go!


Conclusion: ALWAYS use the sender or e.Activity to get your childactivities to avoid these unhappy behaviour...


read more:
Pro WF: Windows Worklfow Foundation Pages
Very nice post that pushed me in the right direction

Good luck;)
</tom>


add comment ( 2 views )   |  permalink   |   ( 3 / 654 )
Visug report: Brad Abrams 
Tuesday, September 29, 2009, 07:34 - .NET
Posted by Administrator
Yesterday evening I attented an interesting session, with a lot of people, from Brad Abrams (Program Manager at Microsoft and author of the book Framework Design Guidelines ).

Most of the things he told were already known in a technical point of view, but what made it so interesting is the reason why some things are built in the .NET framework.

When to use a property in stead of a method, after all... A property is a method?!

When to use an extention method combined with a namespace and add overload methods to an interface or to manage dependencies?

Why shouldn't I define extension methods on the System.Object? ;)

And my favourite:
Do as little as possible now (but no less) to ensure room for extensibility in the future

How to achive the secret of great productivity?

did I get your attention?

Brad has provided us with the slides which can be downloaded from here

always nice to learn some new things :)
add comment ( 2 views )   |  permalink   |  related link   |   ( 3 / 663 )
SQL Server Security  
Friday, August 28, 2009, 08:16 - SQL
Posted by Administrator
Paul S. Randal has written a very interesting article about SQL Server Security, most of you already know all the things he wrote, not? ;)

http://technet.microsoft.com/en-gb/maga ... #id0100060

Content:

Physical Security
Network Security
Attack Surface Minimization
Service Accounts
Restricting Use of Administrator Privileges
Authentication
Authorization
SQL Injection
Disaster Recovery
Auditing
Summary
add comment ( 2 views )   |  permalink   |  related link   |   ( 3 / 621 )
Windows 7 shortkeys 
Wednesday, August 26, 2009, 10:03
Posted by Administrator
A quick summary of some key combinations in Windows 7:

Win+Home: Clear all but the active window
Win+Space: All windows become transparent so you can see through to the desktop
Win+Up arrow: Maximize the active window
Win+Down arrow: Minimize the window/Restore the window if it's maximized
Win+Left/Right arrows: Dock the window to each side of the monitor (If you've got dual monitors, adding Shift to the mix (e.g., Win+Shift+Right arrow) will move the window to the adjacent monitor.)
Win+T: Focus and scroll through items on the taskbar.
Win+P: Adjust presentation settings for your display
Win+(+/-): Zoom in/out
Shift+Click a taskbar item: Open a new instance of that application

More information about these shortkeys can be found here


1 comment ( 7 views )   |  permalink   |   ( 3 / 639 )
Public Key Token from signed assembly 
Friday, July 17, 2009, 11:46
Posted by Administrator
This is something I stumbled upon recently and most of you already have this option already in their tools menu in VS. this post is especially to those that just like me did not know it.

While developping a custom layouts page, you need to specify the assembly name where the asp page his code behind class can be found.

something like: Namespace, Version=1.0.0.0,Culture=neutral, PublicKeyToken=****************

To retrieve this token you could drag and drop your assembly in the gac and copy the token from there. Sn.exe combined with external tool in visual studio offers you a simple menu that displays the public key token of the current signed assembly in no time.

In Visual Studio 2005, click Tools -> External Tools...
Click Add and enter the following into the different fields as displayed in the following screenshot:
Title: Get Public Key
Command: C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\sn.exe
Arguments: -Tp "$(TargetPath)"
Uncheck all options, except Use Output window\



add comment ( 4 views )   |  permalink   |  related link   |   ( 3 / 703 )

<<First <Back | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | Next> Last>>