protected override bool Execute(CodeActivityContext context)
        {
            try
            {
                var res = ARM_Service.BPS_GetBalansPSResultAndHtmlDocument2(BalanceId.Get(context),
                                                                            StartDateTime.Get(context),
                                                                            EndDateTime.Get(context),
                                                                            DiscreteType,                     //.Get(context),
                                                                            DataSourceType,                   //.Get(context),
                                                                            isPower,                          //.Get(context),
                                                                            isOffsetFromMoscowEnbledForDrums, //.Get(context),
                                                                            IsPowerEquipmentEnabled, 7, null, false);

                if (res.Errors != null)
                {
                    Error.Set(context, res.Errors.ToString());
                }

                var ms = CompressUtility.DecompressGZip(res.HTMLDocument);

                if (ms != null)
                {
                    ms.Position = 0;
                    Document.Set(context, ms);
                }

                IsHasUnbalanceValue.Set(context, !res.IsHasUnbalanceValue);
            }

            catch (Exception ex)
            {
                if (!HideException.Get(context))
                {
                    throw ex;
                }
            }

            return(true);
        }