/// <exclude />
        protected sealed override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            FormsWorkflow formsWorkflow = this.GetRoot <FormsWorkflow>();

            IFormMarkupProvider markupProvider = new FormDefinitionFileMarkupProvider(this.FormDefinitionFileName);

            ExternalDataExchangeService   externalDataExchangeService = WorkflowFacade.WorkflowRuntime.GetService <ExternalDataExchangeService>();
            IFormsWorkflowActivityService service = externalDataExchangeService.GetService(typeof(IFormsWorkflowActivityService)) as IFormsWorkflowActivityService;

            service.DeliverFormData(
                WorkflowEnvironment.WorkflowInstanceId,
                this.ContainerLabel,
                StandardUiContainerTypes.Document,
                markupProvider,
                formsWorkflow.Bindings,
                formsWorkflow.BindingsValidationRules
                );

            if (string.IsNullOrEmpty(this.CustomToolbarDefinitionFileName) == false)
            {
                IFormMarkupProvider customToolbarMarkupProvider = new FormDefinitionFileMarkupProvider(this.CustomToolbarDefinitionFileName);
                service.DeliverCustomToolbarDefinition(WorkflowEnvironment.WorkflowInstanceId, customToolbarMarkupProvider);
            }

            return(ActivityExecutionStatus.Closed);
        }
Esempio n. 2
0
        private void OnEventInvoked(object sender, ExternalDataEventArgs e)
        {
            FormEventArgs args = (FormEventArgs)e;

            FormsWorkflow formsWorkflow = this.GetRoot <FormsWorkflow>();

            formsWorkflow.ChildWorkflowResult = args.WorkflowResult;

            base.OnInvoked(e);
        }
        /// <exclude />
        protected sealed override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            FormsWorkflow formsWorkflow = this.GetRoot <FormsWorkflow>();

            FlowControllerServicesContainer container = WorkflowFacade.GetFlowControllerServicesContainer(WorkflowEnvironment.WorkflowInstanceId);

            if (container != null)
            {
                IManagementConsoleMessageService service = container.GetService <IManagementConsoleMessageService>();

                if (service != null)
                {
                    service.CloseCurrentView();
                }
            }

            return(ActivityExecutionStatus.Closed);
        }
Esempio n. 4
0
        /// <exclude />
        protected sealed override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            FormsWorkflow formsWorkflow = this.GetRoot <FormsWorkflow>();

            FlowControllerServicesContainer flowControllerServicesContainer = WorkflowFacade.GetFlowControllerServicesContainer(WorkflowEnvironment.WorkflowInstanceId);

            IActionExecutionService actionExecutionService = flowControllerServicesContainer.GetService <IActionExecutionService>();

            WorkflowActionToken workflowActionToken = new WorkflowActionToken(this.ChildWorkflowType)
            {
                Payload = this.ChildWorkflowPayload,
                ParentWorkflowInstanceId = formsWorkflow.InstanceId
            };

            actionExecutionService.Execute(formsWorkflow.EntityToken, workflowActionToken, null);

            return(ActivityExecutionStatus.Closed);
        }
Esempio n. 5
0
        /// <exclude />
        protected sealed override ActivityExecutionStatus Execute(ActivityExecutionContext executionContext)
        {
            FormsWorkflow formsWorkflow = this.GetRoot <FormsWorkflow>();

            IFormMarkupProvider markupProvider = new FormDefinitionFileMarkupProvider(this.FormDefinitionFileName);

            ExternalDataExchangeService   externalDataExchangeService = WorkflowFacade.WorkflowRuntime.GetService <ExternalDataExchangeService>();
            IFormsWorkflowActivityService service = externalDataExchangeService.GetService(typeof(IFormsWorkflowActivityService)) as IFormsWorkflowActivityService;

            service.DeliverFormData(
                WorkflowEnvironment.WorkflowInstanceId,
                this.ContainerLabel,
                StandardUiContainerTypes.WarningDialog,
                markupProvider,
                formsWorkflow.Bindings,
                formsWorkflow.BindingsValidationRules
                );

            return(ActivityExecutionStatus.Closed);
        }