Exemplo n.º 1
0
        /// <summary>
        /// Adds an activity exception to the routing slip
        /// </summary>
        /// <param name="name">The name of the faulted activity</param>
        /// <param name="hostAddress">The host address where the faulted activity executed</param>
        /// <param name="timestamp">The timestamp of the exception</param>
        /// <param name="exception">The exception thrown by the activity</param>
        /// <param name="activityTrackingNumber">The activity tracking number</param>
        /// <returns>The ActivityExceptionInfo that was added</returns>
        public ActivityException AddActivityException(string name, Uri hostAddress, Guid activityTrackingNumber,
                                                      DateTime timestamp, Exception exception)
        {
            ActivityException activityException = new ActivityExceptionImpl(name, hostAddress, activityTrackingNumber,
                                                                            timestamp, exception);

            _activityExceptions.Add(activityException);

            return(activityException);
        }
Exemplo n.º 2
0
        public void Evaluate()
        {
            var activityFaulted = new RoutingSlipActivityFaultedMessage(_trackingNumber, _timestamp, _activity.Name,
                _activityTrackingNumber, _exception, _variables, _activity.Arguments);
            _bus.Publish<RoutingSlipActivityFaulted>(activityFaulted);

            var activityExceptionInfo = new ActivityExceptionImpl(_activity.Name, _bus.Endpoint.Address.Uri,
                _activityTrackingNumber, _timestamp, _exception);

            var routingSlipFaulted = new RoutingSlipFaultedMessage(_trackingNumber, _timestamp, activityExceptionInfo);
            _bus.Publish<RoutingSlipFaulted>(routingSlipFaulted);
        }
Exemplo n.º 3
0
        public void Evaluate()
        {
            var activityFaulted = new RoutingSlipActivityFaultedMessage(_trackingNumber, _timestamp, _activity.Name,
                                                                        _activityTrackingNumber, _exception, _variables, _activity.Arguments);

            _bus.Publish <RoutingSlipActivityFaulted>(activityFaulted);

            var activityExceptionInfo = new ActivityExceptionImpl(_activity.Name, _bus.Endpoint.Address.Uri,
                                                                  _activityTrackingNumber, _timestamp, _exception);

            var routingSlipFaulted = new RoutingSlipFaultedMessage(_trackingNumber, _timestamp, activityExceptionInfo);

            _bus.Publish <RoutingSlipFaulted>(routingSlipFaulted);
        }
Exemplo n.º 4
0
        /// <summary>
        /// Adds an activity exception to the routing slip
        /// </summary>
        /// <param name="host"></param>
        /// <param name="name">The name of the faulted activity</param>
        /// <param name="activityTrackingNumber">The activity tracking number</param>
        /// <param name="timestamp">The timestamp of the exception</param>
        /// <param name="elapsed">The time elapsed from the start of the activity to the exception</param>
        /// <param name="exceptionInfo"></param>
        public void AddActivityException(HostInfo host, string name, Guid activityTrackingNumber, DateTime timestamp, TimeSpan elapsed,
                                         ExceptionInfo exceptionInfo)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (exceptionInfo == null)
            {
                throw new ArgumentNullException(nameof(exceptionInfo));
            }

            ActivityException activityException = new ActivityExceptionImpl(name, host, activityTrackingNumber, timestamp, elapsed, exceptionInfo);

            _activityExceptions.Add(activityException);
        }
        /// <summary>
        /// Adds an activity exception to the routing slip
        /// </summary>
        /// <param name="name">The name of the faulted activity</param>
        /// <param name="hostAddress">The host address where the faulted activity executed</param>
        /// <param name="timestamp">The timestamp of the exception</param>
        /// <param name="exception">The exception thrown by the activity</param>
        /// <param name="activityTrackingNumber">The activity tracking number</param>
        /// <returns>The ActivityExceptionInfo that was added</returns>
        public ActivityException AddActivityException(string name, Uri hostAddress, Guid activityTrackingNumber,
            DateTime timestamp, Exception exception)
        {
            ActivityException activityException = new ActivityExceptionImpl(name, hostAddress, activityTrackingNumber,
                timestamp, exception);
            _activityExceptions.Add(activityException);

            return activityException;
        }
Exemplo n.º 6
0
        /// <summary>
        /// Adds an activity exception to the routing slip
        /// </summary>
        /// <param name="host"></param>
        /// <param name="name">The name of the faulted activity</param>
        /// <param name="activityTrackingNumber">The activity tracking number</param>
        /// <param name="timestamp">The timestamp of the exception</param>
        /// <param name="elapsed">The time elapsed from the start of the activity to the exception</param>
        /// <param name="exceptionInfo"></param>
        public void AddActivityException(HostInfo host, string name, Guid activityTrackingNumber, DateTime timestamp, TimeSpan elapsed,
            ExceptionInfo exceptionInfo)
        {
            if (name == null)
                throw new ArgumentNullException(nameof(name));
            if (exceptionInfo == null)
                throw new ArgumentNullException(nameof(exceptionInfo));

            ActivityException activityException = new ActivityExceptionImpl(name, host, activityTrackingNumber, timestamp, elapsed,
                exceptionInfo);
            _activityExceptions.Add(activityException);
        }