Пример #1
0
        private async Task <ActivityResponse> ExecuteActivityTask(ActivityHost activityHost)
        {
            var activity     = activityHost.FindBy(_activityTask.ActivityType.Name, _activityTask.ActivityType.Version);
            var activityArgs = new ActivityArgs(_activityTask.Input,
                                                _activityTask.ActivityId,
                                                _activityTask.WorkflowExecution.WorkflowId,
                                                _activityTask.WorkflowExecution.RunId,
                                                _activityTask.TaskToken);

            activityArgs.StartedEventId = _activityTask.StartedEventId;
            activity.SetErrorHandler(_errorHandler);
            activity.SetSwfApi(_heartbeatSwfApi);
            return(await activity.ExecuteAsync(activityArgs));
        }
Пример #2
0
 internal void Set(ActivityHost activityHost)
 {
     _activityHost = activityHost;
 }
Пример #3
0
 public async Task <ActivityResponse> ExecuteFor(ActivityHost activityHost)
 {
     return(await _execute(activityHost));
 }