private object GetParameterDateTimeValue(ProcessSchemaParameter parameter) { object value = GetParameterValue(parameter); if (value == null) { return(null); } var dateTime = (DateTime)value; if (dateTime == DateTime.MinValue) { return(null); } if (dateTime.Kind == DateTimeKind.Local) { value = DateTime.SpecifyKind(dateTime, DateTimeKind.Unspecified); } var dataValueType = (DateTimeDataValueType)parameter.DataValueType; return(new { dataValueType = (int)dataValueType.ToEnum(), value = DateTimeDataValueType.Serialize(value, TimeZoneInfo.Utc) }); }
protected virtual void InitializeStartSignal1Parameters(IParametrizedProcessSchemaElement parametrizedElement) { var recordIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("36f4dbcc-6d57-4748-9968-0246e02c237a"), ContainerUId = new Guid("1c01f230-4666-435f-8da3-235234c5161f"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("12ed463d-51aa-4d38-a7ff-929a9bc8beee"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("12ed463d-51aa-4d38-a7ff-929a9bc8beee"), Name = @"RecordId", DataValueType = DataValueTypeManager.GetInstanceByName("Guid") }; recordIdParameter.SourceValue = new ProcessSchemaParameterValue(recordIdParameter) { Source = ProcessSchemaParameterValueSource.ConstValue, Value = @"", MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(recordIdParameter); }
private static Dictionary <string, object> GetSchemaParameterValues(UserConnection userConnection, BaseProcessSchemaElement baseSchemaElement, IEnumerable <CompleteParameter> completeParameters) { var schemaParameterValues = new Dictionary <string, object>(); var schemaElement = (IProcessParametersMetaInfo)baseSchemaElement; ProcessSchemaParameterCollection schemaElementParameters = schemaElement.ForceGetParameters(); foreach (CompleteParameter parameter in completeParameters) { ProcessSchemaParameter userTaskParameter = schemaElementParameters.FindByName(parameter.key); if (userTaskParameter == null) { continue; } var dataParameter = new Parameter { Value = parameter.value }; Terrasoft.Core.DataValueType dataValueType = userTaskParameter.DataValueType; if (dataValueType is DateTimeDataValueType && dataParameter.Value == null) { dataParameter.Value = "null"; } object parameterValue = dataParameter.GetValue(userConnection, userTaskParameter.DataValueType); schemaParameterValues[userTaskParameter.Name] = parameterValue; } return(schemaParameterValues); }
protected virtual void InitializeStartSignal2Parameters(IParametrizedProcessSchemaElement parametrizedElement) { var recordIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("39910edb-c399-4a13-885f-46917fb764cf"), ContainerUId = new Guid("8b7c37ff-f3d2-4834-907b-952c0d815039"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("12ed463d-51aa-4d38-a7ff-929a9bc8beee"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("12ed463d-51aa-4d38-a7ff-929a9bc8beee"), Name = @"RecordId", DataValueType = DataValueTypeManager.GetInstanceByName("Guid") }; recordIdParameter.SourceValue = new ProcessSchemaParameterValue(recordIdParameter) { Source = ProcessSchemaParameterValueSource.ConstValue, Value = @"", MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(recordIdParameter); }
private object GetParameterLookupValue(ProcessSchemaParameter parameter) { var value = GetParameterValue(parameter); var primaryColumnValue = (Guid?)value; if (primaryColumnValue?.IsEmpty() != false) { return null; } var displayValue = string.Empty; if (parameter.ParentMetaSchema == null) { parameter.ParentMetaSchema = Owner.Schema; Log.Warn("[PreconfiguredPageUserTask]. Parameter metadata modified at runtime."); } EntitySchema referenceSchema = parameter.ReferenceSchema; if (referenceSchema.PrimaryDisplayColumn != null) { Entity entity = referenceSchema.CreateEntity(UserConnection); entity.UseAdminRights = false; var columns = new Collection<CoreEntitySchemaColumn>() { referenceSchema.PrimaryDisplayColumn }; entity.FetchFromDB(referenceSchema.PrimaryColumn, primaryColumnValue.Value, columns); displayValue = entity.PrimaryDisplayColumnValue; } return new LookupColumnValue { Value = primaryColumnValue.Value.ToString(), DisplayValue = displayValue }; }
protected Dictionary <string, string> GetMacrosValues(EmailTemplateUserTask userTask, IEnumerable <MacrosInfo> macrosInfoCollection) { ProcessSchemaUserTask userTaskSchema = GetProcessSchemaUserTask(userTask); var macrosValues = new Dictionary <string, string>(); var lookupParameters = new List <ProcessSchemaParameter>(); foreach (MacrosInfo macrosInfo in macrosInfoCollection) { ProcessSchemaParameter parameter = GetParameterByName(userTaskSchema, macrosInfo.Alias); if (parameter == null) { _logger.Log("Parameter for macros {0} is not found", macrosInfo.Alias); continue; } object propertyValue = GetParameterValue(userTask, parameter); if (propertyValue != null) { _logger.Log("Property value is {0}", propertyValue); macrosValues.Add(macrosInfo.Alias, propertyValue.ToString()); lookupParameters.Add(parameter); } } foreach (ProcessSchemaParameter parameter in lookupParameters) { string entityDisplayName = GetEntityPrimaryColumnDisplayName(userTask, macrosValues[parameter.Name], parameter); if (!string.IsNullOrEmpty(entityDisplayName)) { _logger.Log("Entity display value is {0}", entityDisplayName); macrosValues[parameter.Name] = entityDisplayName; } } return(macrosValues); }
public void set(string parameterName, object parameterValue) { var schema = (BaseProcessSchema)_process.Schema; ProcessSchemaParameter parameter = schema.Parameters.GetByName(parameterName); Type valueType = parameter.DataValueType.ValueType; object value = DataTypeUtilities.ValueAsType(parameterValue, valueType); MethodInfo method = GetSetValueMethod(valueType); method.Invoke(_process, new[] { parameterName, value }); }
private EntitySchema FindSourceEntitySchema() { EntitySchemaManager entitySchemaManager = UserTask.UserConnection.EntitySchemaManager; BaseProcessSchemaElement userTaskSchema = UserTask.GetSchemaElement(); var parametersMetaInfo = userTaskSchema as IProcessParametersMetaInfo; EntitySchema schema = null; if (parametersMetaInfo != null) { ProcessSchemaParameterCollection parameters = parametersMetaInfo.ForceGetParameters(); ProcessSchemaParameter parameter = parameters.GetByName("EmailTemplateEntityId"); schema = entitySchemaManager.FindInstanceByUId(parameter.ReferenceSchemaUId); } return(schema); }
private object GetParameterLookupValue(ProcessSchemaParameter parameter, IReadOnlyDictionary <Guid, Guid> sysModuleEntityPageType) { object value = GetParameterValue(parameter); var primaryColumnValue = (Guid?)value; if (primaryColumnValue?.IsEmpty() != false) { return(null); } if (parameter.ParentMetaSchema == null) { parameter.ParentMetaSchema = Owner.Schema; Log.Warn("[PreconfiguredPageUserTask]. Parameter metadata modified at runtime."); } EntitySchema referenceSchema = parameter.ReferenceSchema; if (referenceSchema.PrimaryDisplayColumn == null) { return(new { value = primaryColumnValue.Value.ToString() }); } Entity entity = referenceSchema.CreateEntity(UserConnection); entity.UseAdminRights = false; var columnsToFetch = new Collection <CoreEntitySchemaColumn>() { referenceSchema.PrimaryColumn, referenceSchema.PrimaryDisplayColumn, }; var hasPageTypeColumn = sysModuleEntityPageType.ContainsKey(referenceSchema.UId); CoreEntitySchemaColumn pageTypeColumn = null; if (hasPageTypeColumn) { Guid typeColumnUId = sysModuleEntityPageType[referenceSchema.UId]; pageTypeColumn = referenceSchema.Columns.FindByUId(typeColumnUId); if (pageTypeColumn != null) { columnsToFetch.Add(pageTypeColumn); } } entity.FetchFromDB(referenceSchema.PrimaryColumn, primaryColumnValue.Value, columnsToFetch, false); ExpandoObject lookupValue = GetClientLookupLinkValue(entity, pageTypeColumn); return(lookupValue); }
/// <summary> /// Returns list email addresses. /// </summary> /// <param name="userConnection">User's connection.</param> /// <param name="propertyValue">Parameter property value.</param> /// <param name="parameter">Process parameter</param> /// <returns></returns> public static List <string> GetParameterEmailAddresses(UserConnection userConnection, object propertyValue, ProcessSchemaParameter parameter) { List <string> emailAddresses = new List <string>(); var value = parameter.DataValueType.IsLookup ? GetParameterLookupValue(userConnection, propertyValue, parameter) : (String)propertyValue; if (value.IsNotNullOrEmpty()) { var separators = new char[] { ';', ',' }; var parameterAddresses = value.Split(separators) .Select(x => x.Trim()) .Where(x => !string.IsNullOrEmpty(x)) .ToList(); emailAddresses.AddRange(parameterAddresses); } return(emailAddresses); }
private static string GetParameterLookupValue(UserConnection userConnection, object propertyValue, ProcessSchemaParameter parameter) { var email = string.Empty; EntitySchema schema = userConnection.EntitySchemaManager.FindInstanceByUId(parameter.ReferenceSchemaUId); if (schema != null) { string schemaName = schema.Name; switch (schemaName) { case "Contact": email = GetContactEmailValue(userConnection, propertyValue); break; case "Account": email = GetAcountEmailValue(userConnection, propertyValue); break; } } return(email); }
protected virtual void InitializeSysSettingsOpenUserTaskParameters(IParametrizedProcessSchemaElement parametrizedElement) { var pageUIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("7a9b86b3-3c9d-4523-81fb-2ab7b762c378"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"PageUId", DataValueType = DataValueTypeManager.GetInstanceByName("Guid") }; pageUIdParameter.SourceValue = new ProcessSchemaParameterValue(pageUIdParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(pageUIdParameter); var pageUrlParameter = new ProcessSchemaParameter(this) { UId = new Guid("df643ec9-ce73-4096-ac1c-adcc32440d6a"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"PageUrl", DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; pageUrlParameter.SourceValue = new ProcessSchemaParameterValue(pageUrlParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(pageUrlParameter); var openerInstanceIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("1a273fce-94fd-4059-b460-148387c7710e"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"OpenerInstanceId", DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; openerInstanceIdParameter.SourceValue = new ProcessSchemaParameterValue(openerInstanceIdParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(openerInstanceIdParameter); var closeOpenerOnLoadParameter = new ProcessSchemaParameter(this) { UId = new Guid("3dae73c0-bad1-4471-adb0-2f97eecc6bc3"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"CloseOpenerOnLoad", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; closeOpenerOnLoadParameter.SourceValue = new ProcessSchemaParameterValue(closeOpenerOnLoadParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(closeOpenerOnLoadParameter); var pageParametersParameter = new ProcessSchemaParameter(this) { UId = new Guid("054bc5ba-2785-471c-a8e4-f9bc4f19b6cc"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"PageParameters", DataValueType = DataValueTypeManager.GetInstanceByName("Object") }; pageParametersParameter.SourceValue = new ProcessSchemaParameterValue(pageParametersParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(pageParametersParameter); var widthParameter = new ProcessSchemaParameter(this) { UId = new Guid("0fde36d6-5bfb-4def-853c-d8f653233244"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"Width", DataValueType = DataValueTypeManager.GetInstanceByName("Integer") }; widthParameter.SourceValue = new ProcessSchemaParameterValue(widthParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(widthParameter); var closeMessageParameter = new ProcessSchemaParameter(this) { UId = new Guid("f0b1c67a-5ce1-4145-a621-328dcfe0b4e6"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"CloseMessage", DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; closeMessageParameter.SourceValue = new ProcessSchemaParameterValue(closeMessageParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(closeMessageParameter); var heightParameter = new ProcessSchemaParameter(this) { UId = new Guid("a82e4419-2fec-466d-9927-e96174f3bb6c"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"Height", DataValueType = DataValueTypeManager.GetInstanceByName("Integer") }; heightParameter.SourceValue = new ProcessSchemaParameterValue(heightParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(heightParameter); var centeredParameter = new ProcessSchemaParameter(this) { UId = new Guid("a8b58e62-b40b-4152-8926-421d6a2c7499"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"Centered", DataValueType = DataValueTypeManager.GetInstanceByName("Object") }; centeredParameter.SourceValue = new ProcessSchemaParameterValue(centeredParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(centeredParameter); var useOpenerRegisterScriptParameter = new ProcessSchemaParameter(this) { UId = new Guid("fc673fa7-8175-439e-a4ec-5ec1434df461"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"UseOpenerRegisterScript", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; useOpenerRegisterScriptParameter.SourceValue = new ProcessSchemaParameterValue(useOpenerRegisterScriptParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(useOpenerRegisterScriptParameter); var useCurrentActivePageParameter = new ProcessSchemaParameter(this) { UId = new Guid("4b95bb10-2333-4130-a972-a1b33a3289aa"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"UseCurrentActivePage", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; useCurrentActivePageParameter.SourceValue = new ProcessSchemaParameterValue(useCurrentActivePageParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(useCurrentActivePageParameter); var ignoreProfileParameter = new ProcessSchemaParameter(this) { UId = new Guid("60abb004-abfc-43d4-8089-73389364f970"), ContainerUId = new Guid("d5ed6d4e-5255-4e08-a8cc-9ad7f9f524b1"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"IgnoreProfile", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; ignoreProfileParameter.SourceValue = new ProcessSchemaParameterValue(ignoreProfileParameter) { Source = ProcessSchemaParameterValueSource.None, Value = @"", MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(ignoreProfileParameter); }
private string GetEntityParameterDisplayValue(ProcessSchemaParameter parameter, object parameterValue, ProcessParameterMapInfo parameterMapInfo) { EntitySchemaColumn entityColumn = parameter.ReferenceSchema.GetSchemaColumnByMetaPath(parameterMapInfo.SubParameterMetaPath); return(entityColumn.DataValueType.GetDisplayValue(parameterValue)); }
protected object GetParameterValue(EmailTemplateUserTask userTask, ProcessSchemaParameter parameter) { return(userTask.GetParameterValue(parameter)); }
protected virtual string GetEntityPrimaryColumnDisplayName(EmailTemplateUserTask userTask, object parameterValue, ProcessSchemaParameter parameter) { string result = null; EntitySchema referenceSchema = parameter.ReferenceSchema; Entity entity = referenceSchema.CreateEntity(userTask.UserConnection); if (entity.FetchPrimaryInfoFromDB(referenceSchema.GetPrimaryColumnName(), parameterValue)) { result = entity.PrimaryDisplayColumnValue; } return(result); }
protected virtual void InitializeOpenLicPageParameters(IParametrizedProcessSchemaElement parametrizedElement) { var pageUIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("5341fba7-6d71-4149-a0bc-fa75d8d27bda"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"PageUId", DataValueType = DataValueTypeManager.GetInstanceByName("Guid") }; pageUIdParameter.SourceValue = new ProcessSchemaParameterValue(pageUIdParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(pageUIdParameter); var pageUrlParameter = new ProcessSchemaParameter(this) { UId = new Guid("0bb86e55-b4a9-46d3-8deb-2594ce2e75e7"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"PageUrl", DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; pageUrlParameter.SourceValue = new ProcessSchemaParameterValue(pageUrlParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(pageUrlParameter); var openerInstanceIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("442201fe-454f-4aea-8510-d64e55dbd7f6"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"OpenerInstanceId", DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; openerInstanceIdParameter.SourceValue = new ProcessSchemaParameterValue(openerInstanceIdParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(openerInstanceIdParameter); var closeOpenerOnLoadParameter = new ProcessSchemaParameter(this) { UId = new Guid("d26a1b61-d6c5-4583-ba8c-bf695a9bf30c"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"CloseOpenerOnLoad", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; closeOpenerOnLoadParameter.SourceValue = new ProcessSchemaParameterValue(closeOpenerOnLoadParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(closeOpenerOnLoadParameter); var pageParametersParameter = new ProcessSchemaParameter(this) { UId = new Guid("4e44205c-61e7-46cf-a4a6-83b0e0bb6c77"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"PageParameters", DataValueType = DataValueTypeManager.GetInstanceByName("Object") }; pageParametersParameter.SourceValue = new ProcessSchemaParameterValue(pageParametersParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(pageParametersParameter); var widthParameter = new ProcessSchemaParameter(this) { UId = new Guid("68a5c8d1-ec41-49d6-bb6a-073d043275c7"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"Width", DataValueType = DataValueTypeManager.GetInstanceByName("Integer") }; widthParameter.SourceValue = new ProcessSchemaParameterValue(widthParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(widthParameter); var closeMessageParameter = new ProcessSchemaParameter(this) { UId = new Guid("831ae2cf-834f-4490-af8e-28930c348eb4"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"CloseMessage", DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; closeMessageParameter.SourceValue = new ProcessSchemaParameterValue(closeMessageParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(closeMessageParameter); var heightParameter = new ProcessSchemaParameter(this) { UId = new Guid("e3b57d49-14ea-4931-b552-9ab78ce67feb"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"Height", DataValueType = DataValueTypeManager.GetInstanceByName("Integer") }; heightParameter.SourceValue = new ProcessSchemaParameterValue(heightParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(heightParameter); var centeredParameter = new ProcessSchemaParameter(this) { UId = new Guid("6a282d5c-4c23-4eea-b519-3dfb7e1300b6"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"Centered", DataValueType = DataValueTypeManager.GetInstanceByName("Object") }; centeredParameter.SourceValue = new ProcessSchemaParameterValue(centeredParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(centeredParameter); var useOpenerRegisterScriptParameter = new ProcessSchemaParameter(this) { UId = new Guid("da247012-d5ee-45a0-b3d7-ae297e7ae52c"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"UseOpenerRegisterScript", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; useOpenerRegisterScriptParameter.SourceValue = new ProcessSchemaParameterValue(useOpenerRegisterScriptParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(useOpenerRegisterScriptParameter); var useCurrentActivePageParameter = new ProcessSchemaParameter(this) { UId = new Guid("189c6bcc-bdee-452c-9afc-33ab516afbbf"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"UseCurrentActivePage", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; useCurrentActivePageParameter.SourceValue = new ProcessSchemaParameterValue(useCurrentActivePageParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(useCurrentActivePageParameter); var ignoreProfileParameter = new ProcessSchemaParameter(this) { UId = new Guid("00bcc186-39e1-4769-b345-dc81b3e81425"), ContainerUId = new Guid("29165a53-d86a-4982-8f19-7575c83caf88"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("b7042ef4-f468-443e-b3ea-39ebbda1c828"), Name = @"IgnoreProfile", DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; ignoreProfileParameter.SourceValue = new ProcessSchemaParameterValue(ignoreProfileParameter) { Source = ProcessSchemaParameterValueSource.None, Value = @"", MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(ignoreProfileParameter); }
protected virtual void InitializeStartSignal1Parameters(IParametrizedProcessSchemaElement parametrizedElement) { var recordIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("5984f6fb-289e-4980-aea6-b57aa1779872"), ContainerUId = new Guid("73da230b-c3b0-4648-b931-60aef0bc046c"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("4898f7ea-06ca-401a-9cd3-bbb193f916c1"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("4898f7ea-06ca-401a-9cd3-bbb193f916c1"), Name = @"RecordId", SourceParameterUId = Guid.Empty, Tag = @"", UseBackgroundMode = false, DataValueType = DataValueTypeManager.GetInstanceByName("Guid") }; recordIdParameter.SourceValue = new ProcessSchemaParameterValue(recordIdParameter) { Source = ProcessSchemaParameterValueSource.ConstValue, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(recordIdParameter); var entitySchemaUIdParameter = new ProcessSchemaParameter(this) { UId = new Guid("e9f654a3-168a-4e03-958d-43d8e77b1431"), ContainerUId = new Guid("73da230b-c3b0-4648-b931-60aef0bc046c"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("73da230b-c3b0-4648-b931-60aef0bc046c"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("4898f7ea-06ca-401a-9cd3-bbb193f916c1"), Name = @"EntitySchemaUId", SourceParameterUId = Guid.Empty, Tag = @"", UseBackgroundMode = false, DataValueType = DataValueTypeManager.GetInstanceByName("Guid") }; entitySchemaUIdParameter.SourceValue = new ProcessSchemaParameterValue(entitySchemaUIdParameter) { Source = ProcessSchemaParameterValueSource.ConstValue, Value = @"117d32f9-8275-4534-8411-1c66115ce9cd", MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(entitySchemaUIdParameter); }
protected virtual void InitializeSayHiToAllConnectedUsersUserTaskParameters(IParametrizedProcessSchemaElement parametrizedElement) { var sendForAllParameter = new ProcessSchemaParameter(this) { UId = new Guid("f1e72eb5-f171-4b5c-967b-4aeeada71896"), ContainerUId = new Guid("8373d1ca-61b4-4119-929b-e52ef624f718"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Name = @"SendForAll", UseBackgroundMode = false, DataValueType = DataValueTypeManager.GetInstanceByName("Boolean") }; sendForAllParameter.SourceValue = new ProcessSchemaParameterValue(sendForAllParameter) { Source = ProcessSchemaParameterValueSource.ConstValue, Value = @"True", MetaPath = null, ModifiedInSchemaUId = new Guid("b469eddc-e461-48b7-a02a-0131706ea155") }; parametrizedElement.Parameters.Add(sendForAllParameter); var targetUserIdsKeyParameter = new ProcessSchemaParameter(this) { UId = new Guid("37ef9b0a-e392-47a7-ad6a-4dacf134f636"), ContainerUId = new Guid("8373d1ca-61b4-4119-929b-e52ef624f718"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Name = @"TargetUserIdsKey", UseBackgroundMode = false, DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; targetUserIdsKeyParameter.SourceValue = new ProcessSchemaParameterValue(targetUserIdsKeyParameter) { Source = ProcessSchemaParameterValueSource.None, Value = null, MetaPath = null, ModifiedInSchemaUId = Guid.Empty }; parametrizedElement.Parameters.Add(targetUserIdsKeyParameter); var senderNameParameter = new ProcessSchemaParameter(this) { UId = new Guid("c526d4de-f583-4991-9958-36c1b4a80141"), ContainerUId = new Guid("8373d1ca-61b4-4119-929b-e52ef624f718"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Name = @"SenderName", UseBackgroundMode = false, DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; senderNameParameter.SourceValue = new ProcessSchemaParameterValue(senderNameParameter) { Source = ProcessSchemaParameterValueSource.ConstValue, Value = @"NotificationTestProcess", MetaPath = null, ModifiedInSchemaUId = new Guid("b469eddc-e461-48b7-a02a-0131706ea155") }; parametrizedElement.Parameters.Add(senderNameParameter); var messageTextParameter = new ProcessSchemaParameter(this) { UId = new Guid("077529b0-043e-458b-acaf-8dcb10bc6db4"), ContainerUId = new Guid("8373d1ca-61b4-4119-929b-e52ef624f718"), CreatedInOwnerSchemaUId = Guid.Empty, CreatedInPackageId = Guid.Empty, CreatedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Direction = ProcessSchemaParameterDirection.Variable, IsCopyValue = false, IsLazy = false, IsPerformer = false, IsRequired = false, IsResult = false, IsValueSerializable = true, ModifiedInSchemaUId = new Guid("4b1606b8-26b2-466b-9135-1167317fea23"), Name = @"MessageText", UseBackgroundMode = false, DataValueType = DataValueTypeManager.GetInstanceByName("Text") }; messageTextParameter.SourceValue = new ProcessSchemaParameterValue(messageTextParameter) { Source = ProcessSchemaParameterValueSource.ConstValue, Value = @"Everybody, say HI!", MetaPath = null, ModifiedInSchemaUId = new Guid("b469eddc-e461-48b7-a02a-0131706ea155") }; parametrizedElement.Parameters.Add(messageTextParameter); }