/// <summary>
        ///     Spawns a single room and its walls
        /// </summary>
        /// <param name="position">The position of the room on the grid</param>
        /// <param name="roomType">The type of the room</param>
        /// <returns>The new room</returns>
        private GameObject SpawnRoom(Vector2Int position, RoomType roomType)
        {
            GameObject newRoom = MonoBehaviour.Instantiate(this.typeToPrefabs[roomType].GetRandomItem(), this.roomParent);

            // Set room position
            newRoom.transform.position = new Vector3(
                position.x * this.roomSize.x,
                0.0f,
                position.y * this.roomSize.y);

            List <GameObject> walls = this.AddWalls(newRoom, position);

            // Define the floor transition position
            if (roomType == RoomType.Boss)
            {
                this.floorTransitionBlockingWall = walls.GetRandomItem();

                // Unparent it, so it doesn't cause any trouble later on
                this.floorTransitionBlockingWall.transform.parent = this.roomParent;
            }

            ActivityHandler.Add(newRoom.GetComponentsInChildren <Light>());

            return(newRoom);
        }
 private void Loaded(object sender, RoutedEventArgs e)
 {
     ViewModel = ((ActivityVm)(MainGrid.DataContext));
     handler   = ViewModel.handler;
     CreateView();
     BottomBarSaveItem.ButtonSaveEvent += new EventHandler(SaveActivity);
 }
Ejemplo n.º 3
0
        public static void ActivitySchedule(HeContext heContext, int activityId, DateTime startDate)
        {
            string SSKey;
            string url;
            int    tenantId;

            bool   success;
            string failureMessage;

            int          processId;
            ActivityKind activityKind;
            string       activityName;

            BPMRuntime.GetActivityDataForWS(activityId, out processId, out activityKind, out activityName, out SSKey, out url, out tenantId, out string espaceSSKey);

            int userId = tenantId == heContext.Session.TenantId ? heContext.Session.UserId : 0;

            using (ActivityHandler activityHandler = new ActivityHandler(url, tenantId, userId, heContext.AppInfo.eSpaceUID, espaceSSKey)) {
                //ToDo: activityHandler.Timeout = (int)(1.2 * TimeoutInSec) * 1000;
                success = activityHandler.ExecuteActivitySchedule(SSKey, activityId, processId, startDate, tenantId, userId, BuiltInFunction.GetCurrentLocale(), out failureMessage);
                if (!success)
                {
                    ProcessBase.ThrowSpecificException(failureMessage);
                }
            }
        }
Ejemplo n.º 4
0
 public ActivityViewModel()
 {
     ActivityList = ActivitySingleton.Instance;
     CalendarOverviewSingleton = CalendarOverviewSingleton.Instance;
     Handler = new ActivityHandler(this);
     //ActivityDate._id = "0";
 }
        private static int InnerActivityClose(HeContext heContext, int activityId, bool advanceProcess, bool skip, bool skipAll, Action </*id*/ int, /*name*/ string, ActivityKind, /*key*/ string> activityChecks, List <Pair <string, object> > inputs)
        {
            int    userId = heContext.Session.UserId;
            string SSKey;
            string url;
            int    tenantId;
            List <Pair <int, ActivityKind> > nextActIds;

            ActivityKind activityKind;
            string       activityName;
            int          processId;

            BPMRuntime.GetActivityDataForWS(activityId, out processId, out activityKind, out activityName, out SSKey, out url, out tenantId);

            activityChecks(activityId, activityName, activityKind, SSKey);

            using (ActivityHandler activityHandler = new ActivityHandler(url)) {
                string failureMessage;
                bool   success = activityHandler.ExecuteOnClose(SSKey, activityId, processId, tenantId, userId, BuiltInFunction.GetCurrentLocale(), advanceProcess, skip, skipAll, inputs, out failureMessage, out nextActIds);

                if (!success)
                {
                    ProcessBase.ThrowSpecificException(failureMessage);
                }
            }

            if (advanceProcess)
            {
                using (Transaction tran = DatabaseAccess.ForSystemDatabase.GetReadOnlyTransaction()) {
                    return(BPMRuntime.GetNextHumanActivity(heContext, tran, nextActIds, userId));
                }
            }

            return(BuiltInFunction.NullIdentifier());
        }
        public void Initialization()
        {
            _activityHandler = new ActivityHandler();
            Activity test = new Activity()
            {
                ActivityId      = "1",
                ActivityName    = "test",
                ActivityNote    = "This is a test",
                ActivityDate    = "2020/05/12",
                NumberOfPeople  = "10",
                ParticipantList = new List <string>()
                {
                    "tester1", "tester2"
                },
                HomeOwnerId = "tester1"
            };

            _activityHandler.ActivityList.Add(test);

            Activity test2 = new Activity()
            {
                ActivityId      = "2",
                ActivityName    = "test2",
                ActivityNote    = "This is a test2",
                ActivityDate    = "2020/05/15",
                NumberOfPeople  = "20",
                ParticipantList = new List <string>()
                {
                    "tester2"
                },
                HomeOwnerId = "tester2"
            };

            _activityHandler.ActivityList.Add(test2);
        }
Ejemplo n.º 7
0
    /**
     * 活动列表
     * @param activityDataList 活动信息
     */
    public void GC_ACTIVITY_LIST(InputMessage data)
    {
        int       i, size;
        ArrayList activityDataList = new ArrayList();

        size = data.GetShort();
        for (i = 0; i < size; i++)
        {
            ActivityData activityDataList_Datas = new ActivityData();
            activityDataList_Datas.activityId  = data.GetLong();
            activityDataList_Datas.title       = data.GetString();  //标题
            activityDataList_Datas.title_cn    = data.GetString();  //中文标题
            activityDataList_Datas.title_tw    = data.GetString();  //繁体标题
            activityDataList_Datas.desc        = data.GetString();  //描述
            activityDataList_Datas.desc_cn     = data.GetString();  //中文描述
            activityDataList_Datas.desc_tw     = data.GetString();  //繁体描述
            activityDataList_Datas.hall_pic_tw = data.GetString();  //大厅图片,中文繁体
            activityDataList_Datas.hall_pic_cn = data.GetString();  //大厅图片,中文简体
            activityDataList_Datas.hall_pic    = data.GetString();  //大厅图片
            activityDataList_Datas.pic         = data.GetString();  //图片
            activityDataList_Datas.pic_cn      = data.GetString();  //图片描述
            activityDataList_Datas.pic_tw      = data.GetString();  //图片描述
            activityDataList_Datas.link        = data.GetInt();     //跳转链接
            activityDataList_Datas.ruleSre     = data.GetString();  //规则数据
            activityDataList_Datas.startTime   = data.GetLong();
            activityDataList_Datas.endTime     = data.GetLong();
            activityDataList_Datas.fullValue   = data.GetString();          //全服累计金币 或者 次数 或者其他
            activityDataList.Add(activityDataList_Datas);
        }
        ActivityHandler.Instance().GC_ACTIVITY_LIST(activityDataList);
    }
Ejemplo n.º 8
0
    /**
     * 返回    周、月特惠充值活动的时间
     * @param weekLeftTime 秒
     * @param monthLeftTime 秒
     */
    public void GC_MONTH_WEEK_LEFT_TIME(InputMessage data)
    {
        long weekLeftTime  = data.GetLong();
        long monthLeftTime = data.GetLong();

        ActivityHandler.Instance().GC_MONTH_WEEK_LEFT_TIME(weekLeftTime, monthLeftTime);
    }
Ejemplo n.º 9
0
    /**
     * 直接推送的  周、月特惠充值活动
     * @param mwtype 周:0,月:1
     * @param startOrEnd 开始:0,结束:1
     * @param leftTime 周或者月的剩余时间
     */
    public void GC_MONTH_OR_WEEK(InputMessage data)
    {
        int  mwtype     = data.GetInt();
        int  startOrEnd = data.GetInt();
        long leftTime   = data.GetLong();

        ActivityHandler.Instance().GC_MONTH_OR_WEEK(mwtype, startOrEnd, leftTime);
    }
Ejemplo n.º 10
0
    /**
     * 用户领取活动奖励
     * @param result 领取结果 0 失败 1 成功
     * @param activityId 活动id
     * @param indexId 具体小条件Id数组的索引下标
     */
    public void GC_GET_ACTIVITY_REWARD(InputMessage data)
    {
        int  result     = data.GetInt();
        long activityId = data.GetLong();
        int  indexId    = data.GetInt();

        ActivityHandler.Instance().GC_GET_ACTIVITY_REWARD(result, activityId, indexId);
    }
 private void Loaded(object sender, RoutedEventArgs e)
 {
     ViewModel = ((ActivityVm)(MainGrid.DataContext));
     handler   = ViewModel.handler;
     initAnimations();
     BottomBarActivity.ButtonShowEvent += new EventHandler(ShowActivityItem);
     ViewCalendarItem.ButtonCloseEvent += new EventHandler(CloseActivityItem);
 }
Ejemplo n.º 12
0
        private ActivityHandler GetActivityHandler()
        {
            ActivityHandler activityHandler = UtilTest.GetActivityHandler(MockLogger, DeviceUtil);

            MockLogger.Reset();

            return(activityHandler);
        }
Ejemplo n.º 13
0
        public static ActivityPackage CreateClickPackage(ActivityHandler activityHandler, string suffix)
        {
            var clickPackage = activityHandler.GetDeeplinkClickPackage(null, null);

            clickPackage.Suffix = suffix;

            return(clickPackage);
        }
Ejemplo n.º 14
0
        public async Task InitializationModel()
        {
            List <Activity> activityData = await _databaseSystem.InitializationActivityData();

            _activityHandler = new ActivityHandler(activityData);
            List <Member> memberData = await _databaseSystem.InitializationMemberData();

            _memberHandler = new MemberHandler(memberData);
        }
        private static InvokeResponse PrepareInvokeResponse(Attachment card)
        {
            var newCardResponse = new AdaptiveCardInvokeResponse()
            {
                StatusCode = 200,
                Type       = card.ContentType,
                Value      = card.Content
            };

            return(ActivityHandler.CreateInvokeResponse(newCardResponse));
        }
        public async Task TestHealthCheckWithConnectorAsync()
        {
            // Arrange
            var activity = new Activity
            {
                Type = ActivityTypes.Invoke,
                Name = "healthCheck"
            };

            Activity[] activitiesToSend = null;
            void CaptureSend(Activity[] arg)
            {
                activitiesToSend = arg;
            }

            var turnContext = new TurnContext(new SimpleAdapter(CaptureSend), activity);

            IConnectorClient connector = new MockConnectorClient();

            turnContext.TurnState.Add(connector);

            // Act
            var bot = new ActivityHandler();

            await((IBot)bot).OnTurnAsync(turnContext);

            // Assert
            Assert.NotNull(activitiesToSend);
            Assert.Single(activitiesToSend);
            Assert.IsType <InvokeResponse>(activitiesToSend[0].Value);
            Assert.Equal(200, ((InvokeResponse)activitiesToSend[0].Value).Status);

            using (var writer = new StringWriter())
            {
                using (var jsonWriter = new JsonTextWriter(writer))
                {
                    var settings = new JsonSerializerSettings {
                        NullValueHandling = NullValueHandling.Ignore
                    };
                    var serializer = JsonSerializer.Create(settings);

                    serializer.Serialize(jsonWriter, ((InvokeResponse)activitiesToSend[0].Value).Body);
                }

                await writer.FlushAsync();

                var obj = JObject.Parse(writer.ToString());

                Assert.True(obj["healthResults"]["success"].Value <bool>());
                Assert.Equal("awesome", obj["healthResults"]["authorization"].ToString());
                Assert.Equal("Windows/3.1", obj["healthResults"]["user-agent"].ToString());
                Assert.Equal("Health check succeeded.", obj["healthResults"]["messages"][0].ToString());
            }
        }
        protected override async Task <InvokeResponse> OnInvokeActivityAsync(ITurnContext <IInvokeActivity> turnContext, CancellationToken cancellationToken)
        {
            // Note: Make sure that the incoming invoke actions are processed <10 seconds to avoid timeouts in Teams clients.
            if (turnContext.Activity.Name == "adaptiveCard/action")
            {
                var actionData = JsonConvert.DeserializeObject <RefreshActionData>(turnContext.Activity.Value.ToString());

                // Increase the refresh count.
                actionData.action.data.RefreshCount++;
                switch (actionData.action.verb)
                {
                case "me":
                    // Send an auto refresh user specific view card for the `sender`.
                    var card = this.cardFactory.GetAutoRefreshForSpecificUserBaseCard(turnContext.Activity.From.Id, MeCardType);
                    await turnContext.SendActivityAsync(MessageFactory.Attachment(card), cancellationToken);

                    break;

                case "allusers":
                    // Send an auto refresh user specific card for `all users` in the chat.
                    card = this.cardFactory.GetAutoRefreshForAllUsersBaseCard(AllUsersCardType);
                    await turnContext.SendActivityAsync(MessageFactory.Attachment(card), cancellationToken);

                    break;

                case "UpdateBaseCard":
                    // Update the base card for `all users`.
                    // Note: We remove the refresh section from the updated base card in this sample. No further refresh invoke actions will be fired for any user.
                    // You may decide to keep the refresh section and trigger auto-refresh for either all / list of users if required.
                    card = this.cardFactory.GetFinalBaseCard(actionData);
                    var activity = MessageFactory.Attachment(card);
                    activity.Id = turnContext.Activity.ReplyToId;
                    await turnContext.UpdateActivityAsync(activity, cancellationToken);

                    break;

                case "RefreshUserSpecificView":
                    // Update the card for the `user` for whom this invoke action was triggered.
                    card = this.cardFactory.GetUpdatedCardForUser(turnContext.Activity.From.Id, actionData);
                    return(PrepareInvokeResponse(card));
                }
            }

            var adaptiveCardResponse = new AdaptiveCardInvokeResponse()
            {
                StatusCode = 200,
                Type       = "application/vnd.microsoft.activity.message",
                Value      = "Success!" // Optional message to be shown to the user.
            };

            return(ActivityHandler.CreateInvokeResponse(adaptiveCardResponse));
        }
Ejemplo n.º 18
0
        static void Main(string[] args)
        {
            //CustomConsoleExample();

            var encoded = GetCodePoint('S');

            BinaryFormatterTest.Test();

            Console.ReadKey();

            ActivityHandler activityHandler = new ActivityHandler();

            activityHandler.WriteActivityStateInternal();

            activityHandler.ReadActivityState();

            Console.ReadKey();

            int intVal1 = 1;
            int intVal2 = 2;

            Console.WriteLine("Integers before regular swap method: {0} & {1}", intVal1, intVal2);
            SwapIntegers(intVal1, intVal2);
            Console.WriteLine("Integers after regular swap method: {0} & {1}", intVal1, intVal2);
            SwapIntegersByRef(ref intVal1, ref intVal2);
            Console.WriteLine("Integers after ref swap method: {0} & {1}", intVal1, intVal2);
            Console.ReadKey();

            PrintRedLine();

            SimplePoint sp1 = new SimplePoint();
            SimplePoint sp2 = new SimplePoint();

            Console.WriteLine("Points before swap method: {0} & {1}", sp1, sp2);
            SwapPoints(sp1, sp2);
            Console.WriteLine("Points after swap method: {0} & {1}", sp1, sp2);
            SwapPoints(ref sp1, ref sp2);
            Console.WriteLine("Points after ref swap method: {0} & {1}", sp1, sp2);

            PrintRedLine();

            Type intListType    = typeof(List <int>);
            Type stringListType = typeof(List <string>);

            Console.WriteLine("intList type = " + intListType.ToString());
            Console.WriteLine("stringList type = " + stringListType.FullName);

            Console.WriteLine();
            Console.WriteLine("Press any key to quit...");
            Console.ReadKey();
        }
        private static void ActivityPushFromCreated(int processId, string activityssKey, int activityId)
        {
            ActivityKind activityKind;
            string       activityName;
            string       ssKey;
            string       url;
            int          tenantId;

            BPMRuntime.GetActivityDataForWS(activityId, out processId, out activityKind, out activityName, out ssKey, out url, out tenantId);

            using (ActivityHandler activityHandler = new ActivityHandler(url)) {
                activityHandler.ExecuteActivityAction(activityssKey, activityId, processId, tenantId, ActivityStatus.Created);
            }
        }
Ejemplo n.º 20
0
        /// <summary>
        ///     Spawns a boss at all a Boss spawn point
        /// </summary>
        private void SpawnBoss()
        {
            GameObject bossSpawnPoint = GameObject.FindGameObjectWithTag(DungeonGenerator.BossSpawnPointTag);

            EnemyDriver boss = MonoBehaviour.Instantiate(this.bossPrefabs.GetRandomItem(), this.entityParent);

            boss.transform.position = bossSpawnPoint.transform.position;

            boss.battleDriver.Level = Mathf.FloorToInt(this.EntityLevel * DungeonGenerator.BossLevelMultiplier);

            ActivityHandler.Add(boss.gameObject);

            MonoBehaviour.Destroy(bossSpawnPoint);
        }
Ejemplo n.º 21
0
        private static void SetProcessSuspension(HeContext heContext, int processId, bool suspend)
        {
            BPMRuntime.GetProcessDataForWS(processId, out string SSKey, out string url, out int tenantId, out string consumerKey);

            int userId = tenantId == heContext.Session.TenantId ? heContext.Session.UserId : 0;

            using (ActivityHandler activityHandler = new ActivityHandler(url, tenantId, userId, heContext.AppInfo.eSpaceUID, consumerKey)) {
                bool success = activityHandler.ExecuteSetProcessSuspension(SSKey, processId, suspend, tenantId, userId, out string failureMessage);
                if (!success)
                {
                    ProcessBase.ThrowSpecificException(failureMessage);
                }
            }
        }
Ejemplo n.º 22
0
        private static void ActivityPushFromCreated(HeContext heContext, int processId, string activityssKey, int activityId)
        {
            ActivityKind activityKind;
            string       activityName;
            string       ssKey;
            string       url;
            int          tenantId;

            BPMRuntime.GetActivityDataForWS(activityId, out processId, out activityKind, out activityName, out ssKey, out url, out tenantId, out string espaceSSKey);

            using (ActivityHandler activityHandler = new ActivityHandler(url, tenantId, heContext.Session.UserId, heContext.AppInfo.eSpaceUID, espaceSSKey)) {
                activityHandler.ExecuteActivityAction(activityssKey, activityId, processId, tenantId, ActivityStatus.Created);
            }
        }
Ejemplo n.º 23
0
        public static int ProcessLaunch(HeContext heContext, ObjectKey SSKey, ObjectKey espaceSSKey, int parentActivityId, int parentProcessId, List <Pair <string, object> > inputs, out List <Pair <int, ActivityKind> > nextActIds)
        {
            string ssKey = ObjectKeyUtils.DatabaseValue(SSKey);

            BPMRuntime.GetProcessDataForWS(heContext, SSKey, espaceSSKey, out string url);

            using (ActivityHandler activityHandler = new ActivityHandler(url, heContext.Session.TenantId, heContext.Session.UserId, heContext.AppInfo.eSpaceUID, ObjectKeyUtils.DatabaseValue(espaceSSKey))) {
                int newProcessId = activityHandler.ExecuteProcessLaunch(ssKey, heContext.Session.TenantId, heContext.Session.UserId, parentActivityId, parentProcessId, inputs, out nextActIds, out string failureMessage);
                if (!failureMessage.IsEmpty() || newProcessId == 0)
                {
                    ProcessBase.ThrowSpecificException(failureMessage);
                }
                return(newProcessId);
            }
        }
Ejemplo n.º 24
0
    /**
     * 功能
     * @param img 图片
     * @param leftTime 剩余时间
     * @param functionType 类型  1 筹码   2 物品  3 礼包  4 功能性付费
     */
    public void GC_FUNCTION_LEFT_TIME(InputMessage data)
    {
        int       i, size;
        string    img          = data.GetString();
        long      leftTime     = data.GetLong();
        ArrayList functionType = new ArrayList();

        size = data.GetShort();
        for (i = 0; i < size; i++)
        {
            int functionType_Datas = data.GetInt();
            functionType.Add(functionType_Datas);
        }
        ActivityHandler.Instance().GC_FUNCTION_LEFT_TIME(img, leftTime, functionType);
    }
Ejemplo n.º 25
0
        public override void SetUp()
        {
            base.SetUp();

            MockRequestHandler  = new MockRequestHandler(MockLogger);
            MockActivityHandler = new MockActivityHandler(MockLogger);

            AdjustFactory.Logger = MockLogger;
            AdjustFactory.SetRequestHandler(MockRequestHandler);
            AdjustFactory.SetActivityHandler(MockActivityHandler);

            ActivityHandler = GetActivityHandler();

            PackageHandler = StartPackageHandler();
        }
Ejemplo n.º 26
0
        public async Task TestHealthCheckAsync()
        {
            // Arrange
            var activity = new Activity
            {
                Type = ActivityTypes.Invoke,
                Name = "healthCheck"
            };

            Activity[] activitiesToSend = null;
            void CaptureSend(Activity[] arg)
            {
                activitiesToSend = arg;
            }

            var turnContext = new TurnContext(new SimpleAdapter(CaptureSend), activity);

            // Act
            var bot = new ActivityHandler();

            await((IBot)bot).OnTurnAsync(turnContext);

            // Assert
            Assert.IsNotNull(activitiesToSend);
            Assert.AreEqual(1, activitiesToSend.Length);
            Assert.IsInstanceOfType(activitiesToSend[0].Value, typeof(InvokeResponse));
            Assert.AreEqual(200, ((InvokeResponse)activitiesToSend[0].Value).Status);

            using (var writer = new StringWriter())
            {
                using (var jsonWriter = new JsonTextWriter(writer))
                {
                    var settings = new JsonSerializerSettings {
                        NullValueHandling = NullValueHandling.Ignore
                    };
                    var serializer = JsonSerializer.Create(settings);

                    serializer.Serialize(jsonWriter, ((InvokeResponse)activitiesToSend[0].Value).Body);
                }

                await writer.FlushAsync();

                var obj = JObject.Parse(writer.ToString());

                Assert.IsTrue(obj["healthResults"]["success"].Value <bool>());
                Assert.AreEqual("Health check succeeded.", obj["healthResults"]["messages"][0].ToString());
            }
        }
Ejemplo n.º 27
0
    /**
     * 用户活动奖励列表更新
     * @param humanSimpleRewardInfoData 活动奖励信息
     */
    public void GC_UPDATE_HUMAN_ACTIVITY_REWARD(InputMessage data)
    {
        HumanSimpleRewardInfoData humanSimpleRewardInfoData = new HumanSimpleRewardInfoData();
        int j;

        humanSimpleRewardInfoData.activityId = data.GetLong();        //活动id
        ArrayList stateListist     = new ArrayList();
        int       stateLististSize = data.GetShort();

        for (j = 0; j < stateLististSize; j++)
        {
            int stateListist_Datas = data.GetInt();            //活动领取状态数据
            stateListist.Add(stateListist_Datas);
        }
        humanSimpleRewardInfoData.stateListist = stateListist;
        ActivityHandler.Instance().GC_UPDATE_HUMAN_ACTIVITY_REWARD(humanSimpleRewardInfoData);
    }
Ejemplo n.º 28
0
    /**
     * 活动进度数据
     * @param humanActivitySmallData 活动进度数据
     */
    public void GC_HUNAMN_PROGRESS_SINGLE(InputMessage data)
    {
        HumanActivitySmallData humanActivitySmallData = new HumanActivitySmallData();
        int j;

        humanActivitySmallData.activityId = data.GetLong();        //活动id
        ArrayList smallValue     = new ArrayList();
        int       smallValueSize = data.GetShort();

        for (j = 0; j < smallValueSize; j++)
        {
            int smallValue_Datas = data.GetInt();            //活动完成进度数据
            smallValue.Add(smallValue_Datas);
        }
        humanActivitySmallData.smallValue = smallValue;
        ActivityHandler.Instance().GC_HUNAMN_PROGRESS_SINGLE(humanActivitySmallData);
    }
Ejemplo n.º 29
0
        public static ActivityHandler GetActivityHandler(MockLogger mocklogger, DeviceUtil deviceUtil)
        {
            MockAttributionHandler mockAttributionHandler = new MockAttributionHandler(mocklogger);
            MockPackageHandler     mockPackageHandler     = new MockPackageHandler(mocklogger);

            AdjustFactory.SetAttributionHandler(mockAttributionHandler);
            AdjustFactory.SetPackageHandler(mockPackageHandler);

            // create the config to start the session
            AdjustConfig config = new AdjustConfig(appToken: "123456789012", environment: AdjustConfig.EnvironmentSandbox);

            // start activity handler with config
            ActivityHandler activityHandler = ActivityHandler.GetInstance(config, deviceUtil);

            deviceUtil.Sleep(3000);

            return(activityHandler);
        }
        private static void SetProcessSuspension(HeContext heContext, int processId, bool suspend)
        {
            string SSKey;
            string url;
            int    tenantId;

            bool   success;
            string failureMessage;

            BPMRuntime.GetProcessDataForWS(processId, out SSKey, out url, out tenantId);

            using (ActivityHandler activityHandler = new ActivityHandler(url)) {
                success = activityHandler.ExecuteSetProcessSuspension(SSKey, processId, suspend, tenantId, heContext.Session.UserId, out failureMessage);
                if (!success)
                {
                    ProcessBase.ThrowSpecificException(failureMessage);
                }
            }
        }