Beispiel #1
0
        /// <inheritdoc/>
        public override string GetExecutionData()
        {
            var    page                    = ClientUnitSchemaManager.GetItemByUId(ClientUnitSchemaUId);
            var    processSchema           = (ProcessSchema)Owner.Schema;
            bool   isInheritedFromTemplate = ClientUnitSchemaManager.IsInheritedFrom(ClientUnitSchemaUId, Template);
            string recommendation          = LocalizableString.IsNullOrEmpty(Recommendation)
                                ? GetParameterValue("Recommendation")?.ToString() ?? string.Empty
                                : Recommendation.Value;
            string informationOnStep = LocalizableString.IsNullOrEmpty(InformationOnStep)
                                ? GetParameterValue("InformationOnStep")?.ToString() ?? string.Empty
                                : InformationOnStep.Value;
            var executionData = new {
                procElUId = UId,
                name      = Name,
                processId = Utilities.GetParentProcessId(Owner),
                isProcessExecutedBySignal = Utilities.GetIsProcessExecutedBySignal(Owner),
                processName = Owner.Name,
                header      = Title.Value,
                recommendation,
                informationOnStep,
                pageCaption       = page.Caption.ToString(),
                nextProcElUId     = "nextProcElUIdValue",
                urlToken          = GetUrlToken(page.Name),
                recordId          = EntityId,
                parameters        = GetPageParameters(processSchema, isInheritedFromTemplate),
                attributes        = isInheritedFromTemplate ? GetAttributes() : null,
                preconfiguredPage = true,
                action            = Action
            };
            string jsonData = JsonConvert.SerializeObject(executionData, Formatting.None, GetSerializeJsonSettings());

            jsonData = GetUserContextExecutionData(jsonData);
            return(jsonData);
        }
		/// <inheritdoc/>
		protected override bool InternalExecute(ProcessExecutingContext context) {
			if (EntryPointId.IsEmpty()) {
				EntryPointId = Utilities.AddProcessEntryPoint(UserConnection, EntitySchemaUId, EntityId, UId);
			}
			InteractWithUser(context, IsRunning, ShowExecutionPage);
			IsRunning = true;
			return false;
		}
Beispiel #3
0
 /// <inheritdoc/>
 public override void CancelExecuting(params object[] parameters)
 {
     Utilities.DeactivateProcessEntryPoint(UserConnection, EntryPointId, EntitySchemaUId, EntityId);
     base.CancelExecuting(parameters);
 }
Beispiel #4
0
 /// <inheritdoc/>
 public override bool CompleteExecuting(params object[] parameters)
 {
     Utilities.DeactivateProcessEntryPoint(UserConnection, EntryPointId, EntitySchemaUId, EntityId);
     GenerateSignal();
     return(base.CompleteExecuting(parameters));
 }