RoutingSlipBuilder CreateRoutingSlipBuilder <TLog>(TLog log, out ActivityLog activityLog) where TLog : class { if (_compensationAddress == null) { throw new RoutingSlipException("The activity does not have a compensation address"); } RoutingSlipBuilder builder = CreateRoutingSlipBuilder(); activityLog = builder.AddActivityLog(_activity.Name, _activityTrackingNumber, _compensationAddress, log); return(builder); }
public ExecutionResult ReviseItinerary <TLog>(TLog log, Action <ItineraryBuilder> itineraryBuilder) where TLog : class { if (_compensationAddress == null) { throw new RoutingSlipException("The activity does not have a compensation address"); } RoutingSlipBuilder builder = CreateReviseRoutingSlipBuilder(); ActivityLog activityLog = builder.AddActivityLog(_activity.Name, _activityTrackingNumber, _compensationAddress, log); return(ReviseItinerary(builder, activityLog.Results, itineraryBuilder)); }
public ExecutionResult ReviseItinerary <TLog>(TLog log, IEnumerable <KeyValuePair <string, object> > variables, Action <ItineraryBuilder> buildItinerary) where TLog : class { if (_compensationAddress == null) { throw new RoutingSlipException("The activity does not have a compensation address"); } RoutingSlipBuilder builder = CreateReviseRoutingSlipBuilder(); ActivityLog activityLog = builder.AddActivityLog(_activity.Name, _activityTrackingNumber, _compensationAddress, log); builder.SetVariables(variables); return(ReviseItinerary(builder, activityLog.Results, buildItinerary)); }
protected virtual void Build(RoutingSlipBuilder builder) { builder.AddActivityLog(Context.Host, Activity.Name, Context.ExecutionId, Context.Timestamp, Duration); }