protected override void Execute(CodeActivityContext context) { // TODO: VALIDATE ENTITY OR THROW EXCEPTION Mercury.Server.Workflows.UserInteractions.Request.PromptUserRequest request; request = new Mercury.Server.Workflows.UserInteractions.Request.PromptUserRequest( PromptType.Get(context), PromptImage.Get(context), PromptTitle.Get(context), PromptMessage.Get(context) ); request.AllowCancel = AllowCancel.Get(context); if (PromptSelectionItems.Get(context) != null) { request.SelectionItems = PromptSelectionItems.Get(context); } UserInteractionRequest.Set(context, request); return; }
protected override void Execute(CodeActivityContext context) { // TODO: VALIDATE ENTITY OR THROW EXCEPTION Workflows.UserInteractions.Request.ContactEntityRequest request = new UserInteractions.Request.ContactEntityRequest( Entity.Get(context), RelatedEntity.Get(context), RegardingMessage.Get(context), IntroductionScript.Get(context) ); request.AllowEditRelatedEntity = AllowEditRelatedEntity.Get(context); request.AllowEditContactDateTime = AllowEditContactDateTime.Get(context); request.AllowEditRegarding = AllowEditRegarding.Get(context); request.AllowCancel = AllowCancel.Get(context); UserInteractionRequest.Set(context, request); return; }
protected override void Execute(CodeActivityContext context) { // TODO: VALIDATE ENTITY OR THROW EXCEPTION Workflows.UserInteractions.Request.RequireFormRequest request = new UserInteractions.Request.RequireFormRequest(); request.EntityType = Entity.Get(context).EntityType; request.EntityObjectId = WorkflowManager.Get(context).Application.EntityObjectIdGet(Entity.Get(context)); if (Form.Get(context) == null) { // LOAD FORM BY NAME (NO FORM WAS PASSED FROM PARENT ACTIVITY) request.Form = new Core.Forms.Form(WorkflowManager.Get(context).Application, FormName.Get(context)); if (request.Form == null) { CommonFunctions.RaiseActivityException( // THROW EXCEPTION WorkflowManager.Get(context).Application, 1, WorkQueueItemId.Get(context), WorkflowSteps.Get(context), "Unable to load form for " + FormName.Get(context) + "." ); } request.Form.EntityType = request.EntityType; request.Form.EntityObjectId = request.EntityObjectId; } else { request.Form = Form.Get(context); } // USE FORM PASSED IN FROM PARENT ACTIVITY request.Form.FormType = Core.Forms.Enumerations.FormType.Instance; request.Message = "Form Required: " + request.Form.Name + " (Last Modified: " + request.Form.ModifiedAccountInfo.ActionDate.ToString("MM/dd/yyyy") + ")"; request.AllowSaveAsDraft = AllowSaveAsDraft.Get(context); request.AllowCancel = AllowCancel.Get(context); UserInteractionRequest.Set(context, request); return; }
public SelectNReqResult(int seatId, AllowCancel allowCancel, IReadOnlyCollection <int> ids, OptionType optionType, IdType idType, int minTake, int maxTake) { SeatId = seatId; AllowCancel = allowCancel; Ids = ids; OptionType = optionType; IdType = idType; MinTake = minTake; MaxTake = maxTake; }
public GroupReqResult(int seatId, AllowCancel allowCancel, IReadOnlyCollection <int> instanceIds, GroupType groupType, GroupingContext context, int maxToTopLibrary, int maxToBottomLibrary) { SeatId = seatId; AllowCancel = allowCancel; InstanceIds = instanceIds; GroupType = groupType; Context = context; MaxToTopLibrary = maxToTopLibrary; MaxToBottomLibrary = maxToBottomLibrary; }
protected override void Execute(CodeActivityContext context) { // TODO: VALIDATE ENTITY OR THROW EXCEPTION Workflows.UserInteractions.Request.SendCorrespondenceRequest request = new UserInteractions.Request.SendCorrespondenceRequest( Entity.Get(context), RelatedEntity.Get(context), WorkflowManager.Get(context).Application.CorrespondenceGetIdByName(CorrespondenceName.Get(context)), AllowUserSelection.Get(context), AllowAlternateAddress.Get(context) ); request.AllowCancel = AllowCancel.Get(context); request.Attention = Attention.Get(context); request.AllowEditRelatedEntity = AllowEditRelatedEntity.Get(context); request.AllowHistoricalSendDate = AllowHistoricalSendDate.Get(context); request.AllowFutureSendDate = AllowFutureSendDate.Get(context); request.AllowSendByFacsimile = AllowSendByFacsimile.Get(context); request.AllowSendByEmail = AllowSendByEmail.Get(context); request.AllowSendByInPerson = AllowSendByInPerson.Get(context); request.SendDate = SendDate.Get(context); request.AlternateAddress = AlternateAddress.Get(context); request.AlternateFaxNumber = AlternateFaxNumber.Get(context); request.AlternateEmail = AlternateEmail.Get(context); UserInteractionRequest.Set(context, request); return; }
protected override void Execute(CodeActivityContext context) { ActivityCompleted.Set(context, false); ActivityCanceled.Set(context, false); if (UserInteractionResponse.Get(context).UserInteractionType == UserInteractions.Enumerations.UserInteractionType.Prompt) { Workflows.UserInteractions.Response.PromptUserResponse response = (UserInteractions.Response.PromptUserResponse)UserInteractionResponse.Get(context); if (response.ButtonClicked != UserInteractions.Enumerations.UserPromptButtonClicked.None) { ButtonClicked.Set(context, response.ButtonClicked); if (response.InputText == null) { response.InputText = String.Empty; } InputText.Set(context, response.InputText); if (response.SelectedValue == null) { response.SelectedValue = String.Empty; } SelectedValue.Set(context, response.SelectedValue); if (response.SelectedText == null) { response.SelectedText = String.Empty; } SelectedText.Set(context, response.SelectedText); Activities.CommonFunctions.WorkflowStepsAdd( WorkflowManager.Get(context).Application, 1, WorkQueueItemId.Get(context), WorkflowSteps.Get(context), "Button Clicked: " + ButtonClicked.Get(context).ToString() + " | Selected Text = " + SelectedText.Get(context).ToString() ); // IF USER DID NOT CANCEL, OR THEY DID CANCEL AND CANCEL ALLOWED, MARK COMPLETED if ((response.ButtonClicked != UserInteractions.Enumerations.UserPromptButtonClicked.Cancel) || ((response.ButtonClicked == UserInteractions.Enumerations.UserPromptButtonClicked.Cancel) && (AllowCancel.Get(context)))) { ActivityCompleted.Set(context, true); } } } }
protected override void Execute(CodeActivityContext context) { if (UserInteractionResponse.Get(context) == null) { return; } // VALIDATE RESPONSE WAS RECEIVED, OTHERWISE LOOP REQUEST ActivityCompleted.Set(context, false); ActivityCanceled.Set(context, false); if (UserInteractionResponse.Get(context).UserInteractionType == UserInteractions.Enumerations.UserInteractionType.ContactEntity) { Workflows.UserInteractions.Response.ContactEntityResponse response = (UserInteractions.Response.ContactEntityResponse)UserInteractionResponse.Get(context); if ((!response.Cancel) || (!AllowCancel.Get(context))) { //if ((response.ContactType != Mercury.Server.Core.Enumerations.EntityContactType.NotSpecified) && // (response.ContactOutcome != Mercury.Server.Core.Enumerations.ContactOutcome.NotSpecified)) { if ((response.EntityContact.ContactType != Mercury.Server.Core.Enumerations.EntityContactType.NotSpecified) && (response.EntityContact.ContactOutcome != Mercury.Server.Core.Enumerations.ContactOutcome.NotSpecified)) { #region Contact Received // Core.Entity.EntityContact entityContact = new Mercury.Server.Core.Entity.EntityContact (WorkflowManager.Get (context).Application); Core.Entity.EntityContact entityContact = response.EntityContact; entityContact.Application = WorkflowManager.Get(context).Application; if (!AllowEditContactDateTime.Get(context)) { entityContact.ContactDate = DateTime.Now; } //else { // entityContact.ContactDate = response.EntityContact.ContactDate; //} //entityContact.EntityId = (response.Entity != null) ? response.Entity.Id : 0; //entityContact.RelatedEntityId = (response.RelatedEntity != null) ? response.RelatedEntity.Id : 0; //entityContact.EntityContactInformationId = response.EntityContactInformationId; //entityContact.Direction = response.Direction; //entityContact.ContactType = response.ContactType; //entityContact.ContactOutcome = response.ContactOutcome; //entityContact.Successful = (response.ContactOutcome == Mercury.Server.Core.Enumerations.ContactOutcome.Success); //entityContact.Regarding = response.Regarding; //entityContact.Remarks = response.Remarks; entityContact.ContactedByName = WorkflowManager.Get(context).Application.Session.UserDisplayName; if (AutoSaveContact.Get(context)) { ActivityCompleted.Set(context, entityContact.Save()); } else { ActivityCompleted.Set(context, true); } EntityContact.Set(context, entityContact); if (ActivityCompleted.Get(context)) { ContactAttempts.Set(context, ContactAttempts.Get(context) + 1); ContactSuccess.Set(context, entityContact.Successful); ContactOutcome.Set(context, entityContact.ContactOutcome); Activities.CommonFunctions.WorkflowStepsAdd( WorkflowManager.Get(context).Application, 1, WorkQueueItemId.Get(context), WorkflowSteps.Get(context), "Contact Outcome: " + ContactOutcome.Get(context).ToString() + " | # of Attempts = " + ContactAttempts.Get(context).ToString() ); } else { Activities.CommonFunctions.RaiseActivityException( WorkflowManager.Get(context).Application, 1, WorkQueueItemId.Get(context), WorkflowSteps.Get(context), "Unable to save contact information." ); } #endregion } } else { // CONTACT CANCELED EntityContact.Set(context, null); ActivityCanceled.Set(context, true); ActivityCompleted.Set(context, true); } } }