Beispiel #1
0
        public override void OnEntry(Message message)
        {
            Console.WriteLine("Assign a user state entered" + ", message: " + message.MessageId);
            Logger.Current.Informational("Request received for assigning a user for a contact" + ", message: " + message.ToString());
            AssignUserResponse response = workflowService.AssignUser(new AssignUserRequest()
            {
                ContactId = message.ContactId, AccountId = message.AccountId, userAssignmentActionID = EntityId, ScheduledID = ScheduledID
            });

            if (response.Exception == null)
            {
                workflowService.InsertContactWorkflowAudit(new InsertContactWorkflowAuditRequest()
                {
                    WorkflowId = WorkflowId, WorkflowActionId = StateId, ContactId = message.ContactId, MessageId = message.MessageId
                });
            }
        }