protected override IAsyncResult BeginExecute(AsyncCodeActivityContext context, AsyncCallback callback, object state) { INotificationCallback callBack = context.GetExtension <INotificationCallback>(); if (callBack != null) { callBack.SendClientNotification(new ComponentProcessMessage().CreateServerMessage( Batch.Get(context).Id, Group.Get(context).Id, new Guid(), "Group Started")); } Thread thread = new Thread(DoProcess) { IsBackground = true }; var result = new AsyncGroupResult(callback, state) { ComponentList = ComponentList.Get(context), GroupNode = GroupNode.Get(context), Batch = Batch.Get(context), Group = Group.Get(context), RunningThread = thread, GroupCallback = context.GetExtension <INotificationCallback>() }; context.UserState = result; thread.Start(result); return(result); }