Example #1
0
        public void OnEntry()
        {
            var type = InitInstance.GetType();

            _compensationContext.AddCompensationContext(type.GetMethod(CompensationMethod, BindingFlags.Instance | BindingFlags.NonPublic), type);

            _omegaContext.NewLocalTxId();
            var paramBytes = _messageFormat.Serialize(Args);

            _logger.Debug($"Initialized context {_omegaContext} before execution of method {InitMethod.Name}");
            _recoveryPolicy.BeforeApply(_compensableInterceptor, _omegaContext, _parenttxId, Retries, Timeout, CompensationMethod, paramBytes);
        }