private void createSuccessResponse(object[] param, BpmTask bpmTask)
        {
            ServiceResponse Response = new ServiceResponse
            {
                Organization = bpmTask.databaseName,
                InvokerId    = bpmTask.InvokerId,
                status       = "success",
                Type         = bpmTask.type,
                IsBpm        = bpmTask.IsBpm,
                parameters   = param
            };

            _responseQueue.QueueExection(Response);
        }
Beispiel #2
0
        public async Task <ActionResult> RespondToUserTask([FromBody] UserTaskResponseViewModel userTaskResponse)
        {
            var userTask = await _userTaskRepository.GetById(userTaskResponse.id);

            if (userTask != null)
            {
                for (int i = 0; i < userTask.UserTaskParameters.Count; i++)
                {
                    userTask.UserTaskParameters[0].Value = userTaskResponse.userTaskParameters[0].value;
                }
                userTask.IsDone = true;


                ClaimsIdentity identity     = (ClaimsIdentity)User.Identity;
                string         databaseName = identity.FindFirst("organization").Value;

                var response = new ServiceResponse()
                {
                    IsBpm        = userTask.IsBpmEngine,
                    InvokerId    = userTask.InvokerID,
                    status       = "success",
                    Organization = databaseName,
                    parameters   = userTaskResponse.userTaskParameters,
                    Type         = "userTask"
                };
                _resonseQueue.QueueExection(response);
                await _userTaskRepository.Update(userTask);
            }

            return(Ok());
        }