In WF4, we can use either Bookmarks or Send/Receive Activities for event handling.
Following example shows how to create a custom eventhandler using BookMark.
public class FinishOrder : NativeActivity
{
protected override bool CanInduceIdle
{
get
{
return true;
}
}
protected override void Execute(NativeActivityContext context)
{
context.CreateBookmark(“FinishOrder”);
}
}