public Decision WithScheduleActivityTaskDecisionAttributes(ScheduleActivityTaskDecisionAttributes scheduleActivityTaskDecisionAttributes) { this.scheduleActivityTaskDecisionAttributes = scheduleActivityTaskDecisionAttributes; return this; }
/// <summary> /// Sets the ScheduleActivityTaskDecisionAttributes property /// </summary> /// <param name="scheduleActivityTaskDecisionAttributes">The value to set for the ScheduleActivityTaskDecisionAttributes property </param> /// <returns>this instance</returns> public Decision WithScheduleActivityTaskDecisionAttributes(ScheduleActivityTaskDecisionAttributes scheduleActivityTaskDecisionAttributes) { this.scheduleActivityTaskDecisionAttributes = scheduleActivityTaskDecisionAttributes; return(this); }
/// <summary> /// Helper method to schedule an activity task /// </summary> /// <param name="activityContext">Activity setup context.</param> /// <returns>Properly set up decision completed request.</returns> protected RespondDecisionTaskCompletedRequest ScheduleActivityTask(WorkflowActivitySetupContext activityContext) { var attributes = new ScheduleActivityTaskDecisionAttributes { ActivityId = activityContext.ActivityId, ActivityType = new ActivityType { Name = activityContext.ActivityName, Version = activityContext.ActivityVersion }, Control = activityContext.Control, HeartbeatTimeout = activityContext.HeartbeatTimeout, Input = activityContext.Input, ScheduleToCloseTimeout = activityContext.ScheduleToCloseTimeout, ScheduleToStartTimeout = activityContext.ScheduleToStartTimeout, StartToCloseTimeout = activityContext.StartToCloseTimeout, TaskList = new TaskList { Name = activityContext.TaskList } }; var decisionRequest = new RespondDecisionTaskCompletedRequest { Decisions = new List<Decision> { new Decision { DecisionType = "ScheduleActivityTask", ScheduleActivityTaskDecisionAttributes = attributes } } }; Debug.WriteLine(">>> Decision: ScheduleActivityTask " + attributes.ActivityType.Name + " (" + attributes.ActivityType.Version + ")"); return decisionRequest; }