Class BaseProcessSchemaManager<TBaseProcessSchema>
Represents base class for the process manager.
Inheritance
Implements
Inherited Members
Namespace: Terrasoft.Core.Process
Assembly: Terrasoft.Core.dll
Syntax
public abstract class BaseProcessSchemaManager<TBaseProcessSchema> : FileSystemEnabledSchemaManager<TBaseProcessSchema>, IManager<ISchemaManagerItem<TBaseProcessSchema>, TBaseProcessSchema>, ISourceCodeSchemaManager, IBaseProcessSchemaManager, ISchemaManager, IManager where TBaseProcessSchema : BaseProcessSchema, ISchemaManagerSchema<TBaseProcessSchema>, IManagerItemInstance, ICloneable
Type Parameters
Name | Description |
---|---|
TBaseProcessSchema | The value of any type. |
Fields
VersionPropertyName
The version property name
Declaration
protected const string VersionPropertyName = "Version"
Field Value
Type | Description |
---|---|
System.String |
Properties
Log
Returns the logger.
Declaration
protected virtual ILog Log { get; }
Property Value
Type | Description |
---|---|
ILog | The logger. |
Methods
ActualizeSchemaInfo(TBaseProcessSchema, Guid, UserConnection)
Actualizes the flow data for the given schema.
Declaration
protected virtual void ActualizeSchemaInfo(TBaseProcessSchema schema, Guid schemaId, UserConnection connection)
Parameters
Type | Name | Description |
---|---|---|
TBaseProcessSchema | schema | The schema. |
System.Guid | schemaId | The schema identifier. |
UserConnection | connection | The user connection. |
AssignSysSchemaProperties(SysSchema, ISchemaManagerItem<TBaseProcessSchema>, Guid)
Assigned properties of the SysSchema object.
Declaration
protected void AssignSysSchemaProperties(SysSchema sysSchema, ISchemaManagerItem<TBaseProcessSchema> managerItem, Guid packageId)
Parameters
Type | Name | Description |
---|---|---|
SysSchema | sysSchema | Instance of the SysSchema. |
ISchemaManagerItem<TBaseProcessSchema> | managerItem | Manager item. |
System.Guid | packageId | Package identifier. |
CreateInterpretationValidator(UserConnection)
Gets the interpretation validator for process schema.
Declaration
protected abstract IInterpretationValidator<TBaseProcessSchema> CreateInterpretationValidator(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
Returns
Type | Description |
---|---|
IInterpretationValidator<TBaseProcessSchema> | Interpretation validator instance. |
CreateItem()
Creates the item.
Declaration
protected override ISchemaManagerItem<TBaseProcessSchema> CreateItem()
Returns
Type | Description |
---|---|
ISchemaManagerItem<TBaseProcessSchema> |
Overrides
CreateSchemaCopy(UserConnection, Guid, String, String, Guid)
Creates copy of the schema.
Declaration
protected TBaseProcessSchema CreateSchemaCopy(UserConnection userConnection, Guid sourceSchemaUId, string name, string caption, Guid packageUId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | sourceSchemaUId | The unique identifier of the source schema. |
System.String | name | The name of the new schema. |
System.String | caption | The caption of the new schema. |
System.Guid | packageUId | The package identifier of the new schema. |
Returns
Type | Description |
---|---|
TBaseProcessSchema | The new schema instance. |
CreateSchemaInstance(ISchemaManagerItem, Assembly)
Creates the schema instance.
Declaration
protected override TBaseProcessSchema CreateSchemaInstance(ISchemaManagerItem schemaManagerItem, Assembly assembly)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem | schemaManagerItem | The schema manager item. |
System.Reflection.Assembly | assembly | Assembly contains instance type. |
Returns
Type | Description |
---|---|
TBaseProcessSchema | Created instance. |
Overrides
DeriveSchemaManagerItem(UserConnection, EntityCollection)
Declaration
protected override ISchemaManagerItem<TBaseProcessSchema> DeriveSchemaManagerItem(UserConnection userConnection, EntityCollection schemas)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
EntityCollection | schemas |
Returns
Type | Description |
---|---|
ISchemaManagerItem<TBaseProcessSchema> |
Overrides
DisableProcess(UserConnection, Guid)
Disables the process.
Declaration
public virtual void DisableProcess(UserConnection userConnection, Guid schemaId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | schemaId | The process schema identifier. |
EnableProcess(UserConnection, Guid)
Enables the process.
Declaration
public virtual void EnableProcess(UserConnection userConnection, Guid schemaId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | schemaId | The process schema identifier. |
FindDesignItem(UserConnection, Guid)
Declaration
public override ISchemaManagerItem FindDesignItem(UserConnection userConnection, Guid uid)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | |
System.Guid | uid |
Returns
Type | Description |
---|---|
ISchemaManagerItem |
Overrides
GetActiveVersionItem(ISchemaManagerItem<TBaseProcessSchema>)
Gets active version item.
Declaration
public virtual ISchemaManagerItem<TBaseProcessSchema> GetActiveVersionItem(ISchemaManagerItem<TBaseProcessSchema> currentItem)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem<TBaseProcessSchema> | currentItem | Current version item. |
Returns
Type | Description |
---|---|
ISchemaManagerItem<TBaseProcessSchema> | Active version item. |
GetActiveVersionItemByUId(Guid)
Gets active version item by UId.
Declaration
public ISchemaManagerItem<TBaseProcessSchema> GetActiveVersionItemByUId(Guid uId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | uId | Unique identifier of process. |
Returns
Type | Description |
---|---|
ISchemaManagerItem<TBaseProcessSchema> | Active version item. |
GetAllVersionItems(Guid)
Gets all version items by schema UId.
Declaration
public virtual IEnumerable<ISchemaManagerItem> GetAllVersionItems(Guid schemaUId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | The schema UId. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ISchemaManagerItem> | The list of schema items. |
GetIsActiveVersion(Guid)
Gets the is active version of the process schema.
Declaration
public bool GetIsActiveVersion(Guid schemaId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaId | The process schema identifier. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetIsProcessEnabled(Guid)
Gets the is process enabled.
Declaration
public virtual bool GetIsProcessEnabled(Guid schemaId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaId | The process schema identifier. |
Returns
Type | Description |
---|---|
System.Boolean |
|
GetItemFromMetaData(Guid, UserConnection)
Returns item of the schema manager, using the specified identifier and user connection.
Declaration
public ISchemaManagerItem<TBaseProcessSchema> GetItemFromMetaData(Guid schemaUId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | Schema Id. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
ISchemaManagerItem<TBaseProcessSchema> | Item of the schema manager. |
GetMaxProcessVersionInPackage(UserConnection, Guid, Guid)
Returns max version for the schema in a package.
Declaration
public int GetMaxProcessVersionInPackage(UserConnection userConnection, Guid parentSchemaId, Guid packageUId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | parentSchemaId | The parent process schema identifier. |
System.Guid | packageUId | The package unique identifier. |
Returns
Type | Description |
---|---|
System.Int32 | The version number. |
GetMetaDataSerializer(UserConnection)
Gets serializer for the meta data.
Declaration
public override IMetaDataSerializer GetMetaDataSerializer(UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
IMetaDataSerializer | Instance that implements the IMetaDataSerializer interface. |
Overrides
GetParentSchemaLocalizableValues(TBaseProcessSchema)
Gets the parent schema localizable values.
Declaration
protected override LocalizableValueCollection GetParentSchemaLocalizableValues(TBaseProcessSchema schema)
Parameters
Type | Name | Description |
---|---|---|
TBaseProcessSchema | schema | The schema. |
Returns
Type | Description |
---|---|
LocalizableValueCollection | The localizable data. |
Overrides
GetProcessStatisticInfo(Guid, UserConnection)
Gets the information for the each process schema element execution count.
Declaration
public virtual Dictionary<Guid, int> GetProcessStatisticInfo(Guid processLogRecordId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | processLogRecordId | The process log record identifier. |
UserConnection | userConnection | The user connection. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Guid, System.Int32> | The set of the pairs "element unique identifier" -> "execution count". |
GetProcessStatisticInfoQuery(Guid, UserConnection)
Gets the process statistic information query.
Declaration
protected virtual EntitySchemaQuery GetProcessStatisticInfoQuery(Guid sysProcessLogId, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | sysProcessLogId | The system process log record identifier. |
UserConnection | userConnection | The user connection. |
Returns
Type | Description |
---|---|
EntitySchemaQuery | The statistic information query. |
GetProcessValidationResult(TBaseProcessSchema, UserConnection)
Validates schema for ability to interpretation.
Declaration
public virtual ProcessValidationResult GetProcessValidationResult(TBaseProcessSchema process, UserConnection userConnection)
Parameters
Type | Name | Description |
---|---|---|
TBaseProcessSchema | process | Base process schema. |
UserConnection | userConnection | User connection. |
Returns
Type | Description |
---|---|
ProcessValidationResult | Results of analyzes for ability to interpretation. |
GetSchemaMetaData(UserConnection, TBaseProcessSchema)
Extracts schema meta data.
Declaration
protected byte[] GetSchemaMetaData(UserConnection userConnection, TBaseProcessSchema schema)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
TBaseProcessSchema | schema | Schema. |
Returns
Type | Description |
---|---|
System.Byte[] | Byte array, which represent schema meta data. |
GetSchemaSources(TBaseProcessSchema, Guid, UserConnection)
Gets the schema sources.
Declaration
protected override EntityCollection GetSchemaSources(TBaseProcessSchema schema, Guid schemaId, UserConnection connection)
Parameters
Type | Name | Description |
---|---|---|
TBaseProcessSchema | schema | The schema. |
System.Guid | schemaId | The schema identifier. |
UserConnection | connection | The connection. |
Returns
Type | Description |
---|---|
EntityCollection | The schema sources. |
Overrides
Initialize(SchemaManagerProvider, SchemaManagerProviderConfigurationElement)
Performs manager initialization, using the specified schema manager provider and information from application configuration.
Declaration
public override void Initialize(SchemaManagerProvider provider, SchemaManagerProviderConfigurationElement configuration)
Parameters
Type | Name | Description |
---|---|---|
SchemaManagerProvider | provider | Schema manager provider. |
SchemaManagerProviderConfigurationElement | configuration | Configuration information. |
Overrides
InitializeItems()
Declaration
protected override bool InitializeItems()
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
OnProcessDisabled(BaseProcessItemModificationEventArgs<TBaseProcessSchema>)
Process disabling event handler.
Declaration
protected virtual void OnProcessDisabled(BaseProcessItemModificationEventArgs<TBaseProcessSchema> e)
Parameters
Type | Name | Description |
---|---|---|
BaseProcessItemModificationEventArgs<TBaseProcessSchema> | e | Process disabling arguments. |
OnProcessEnabled(BaseProcessItemModificationEventArgs<TBaseProcessSchema>)
Process enabling event handler.
Declaration
protected virtual void OnProcessEnabled(BaseProcessItemModificationEventArgs<TBaseProcessSchema> e)
Parameters
Type | Name | Description |
---|---|---|
BaseProcessItemModificationEventArgs<TBaseProcessSchema> | e | Process enabling arguments. |
OnProcessInfoActualized(BaseProcessSchemaModificationEventArgs<TBaseProcessSchema>)
Process version changed event handler.
Declaration
protected virtual void OnProcessInfoActualized(BaseProcessSchemaModificationEventArgs<TBaseProcessSchema> e)
Parameters
Type | Name | Description |
---|---|---|
BaseProcessSchemaModificationEventArgs<TBaseProcessSchema> | e | Process version changing arguments. |
OnProcessVersionChanged(BaseProcessItemModificationEventArgs<TBaseProcessSchema>)
Process version changed event handler.
Declaration
protected virtual void OnProcessVersionChanged(BaseProcessItemModificationEventArgs<TBaseProcessSchema> e)
Parameters
Type | Name | Description |
---|---|---|
BaseProcessItemModificationEventArgs<TBaseProcessSchema> | e | Process version changing arguments. |
RemoveProcessRights(Guid)
Removes the process schema rights by process schema identifier.
Declaration
protected virtual void RemoveProcessRights(Guid processSchemaId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | processSchemaId | Process schema identifier. |
RemoveRunningProcessData(UserConnection, Guid)
Removes the running process data by process schema identifier.
Declaration
[Obsolete("7.13.4 | Method will be removed in upcoming releases")]
public virtual void RemoveRunningProcessData(UserConnection userConnection, Guid processSchemaId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | processSchemaId | The process schema identifier. |
RemoveRunningProcessDataByUId(UserConnection, Guid)
Removes the running process data by process schema identifier.
Declaration
public virtual void RemoveRunningProcessDataByUId(UserConnection userConnection, Guid processSchemaUId)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
System.Guid | processSchemaUId | The process schema identifier. |
SaveClonedSchema(UserConnection, ISchemaManagerItem<TBaseProcessSchema>, ISchemaManagerItem<TBaseProcessSchema>)
Creates the cloned schema.
Declaration
protected virtual ISchemaManagerItem<TBaseProcessSchema> SaveClonedSchema(UserConnection userConnection, ISchemaManagerItem<TBaseProcessSchema> sourceItem, ISchemaManagerItem<TBaseProcessSchema> designItem)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | The user connection. |
ISchemaManagerItem<TBaseProcessSchema> | sourceItem | The source manager item. |
ISchemaManagerItem<TBaseProcessSchema> | designItem | The manager item. |
Returns
Type | Description |
---|---|
ISchemaManagerItem<TBaseProcessSchema> |
SaveFlowSchema(TBaseProcessSchema, UserConnection)
Saves the flow schema for the given process schema.
Declaration
protected virtual void SaveFlowSchema(TBaseProcessSchema schema, UserConnection connection)
Parameters
Type | Name | Description |
---|---|---|
TBaseProcessSchema | schema | The process schema. |
UserConnection | connection | The user connection. |
SaveMetaDataDifferencePackage(TBaseProcessSchema, SysSchema, String, UserConnection, Boolean)
The method is empty: the meta data difference package does not apply for process schemas.
Declaration
protected override void SaveMetaDataDifferencePackage(TBaseProcessSchema schema, SysSchema sysSchema, string schemaMetaData, UserConnection userConnection, bool isNew)
Parameters
Type | Name | Description |
---|---|---|
TBaseProcessSchema | schema | |
SysSchema | sysSchema | |
System.String | schemaMetaData | |
UserConnection | userConnection | |
System.Boolean | isNew |
Overrides
SaveSysSchemaResources(UserConnection, TBaseProcessSchema, ISchemaManagerItem<TBaseProcessSchema>)
Saves resources of the schema.
Declaration
protected void SaveSysSchemaResources(UserConnection userConnection, TBaseProcessSchema schema, ISchemaManagerItem<TBaseProcessSchema> managerItem)
Parameters
Type | Name | Description |
---|---|---|
UserConnection | userConnection | User connection. |
TBaseProcessSchema | schema | Instance of the schema. |
ISchemaManagerItem<TBaseProcessSchema> | managerItem | Manager item. |
SetActiveVersionItem(ISchemaManagerItem<TBaseProcessSchema>)
Sets active version item.
Declaration
public virtual void SetActiveVersionItem(ISchemaManagerItem<TBaseProcessSchema> managerItem)
Parameters
Type | Name | Description |
---|---|---|
ISchemaManagerItem<TBaseProcessSchema> | managerItem | Manager item. |
SetIsDeliveredPropertyValue(Guid, Boolean)
Sets is delivered property value.
Declaration
public virtual void SetIsDeliveredPropertyValue(Guid schemaUId, bool value)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaUId | Schema UId. |
System.Boolean | value | Value to set. |
Events
ProcessDisabled
Event of process disabling.
Declaration
public event EventHandler<BaseProcessItemModificationEventArgs<TBaseProcessSchema>> ProcessDisabled
Event Type
Type | Description |
---|---|
System.EventHandler<BaseProcessItemModificationEventArgs<TBaseProcessSchema>> |
ProcessEnabled
Event of process enabling.
Declaration
public event EventHandler<BaseProcessItemModificationEventArgs<TBaseProcessSchema>> ProcessEnabled
Event Type
Type | Description |
---|---|
System.EventHandler<BaseProcessItemModificationEventArgs<TBaseProcessSchema>> |
ProcessInfoActualized
Event of process version changing.
Declaration
public event EventHandler<BaseProcessSchemaModificationEventArgs<TBaseProcessSchema>> ProcessInfoActualized
Event Type
Type | Description |
---|---|
System.EventHandler<BaseProcessSchemaModificationEventArgs<TBaseProcessSchema>> |
ProcessVersionChanged
Event of process version changing.
Declaration
public event EventHandler<BaseProcessItemModificationEventArgs<TBaseProcessSchema>> ProcessVersionChanged
Event Type
Type | Description |
---|---|
System.EventHandler<BaseProcessItemModificationEventArgs<TBaseProcessSchema>> |
Explicit Interface Implementations
IBaseProcessSchemaManager.FindParentSchema(BaseProcessSchema)
Declaration
BaseProcessSchema IBaseProcessSchemaManager.FindParentSchema(BaseProcessSchema schema)
Parameters
Type | Name | Description |
---|---|---|
BaseProcessSchema | schema |
Returns
Type | Description |
---|---|
BaseProcessSchema |
IBaseProcessSchemaManager.GetItemById(Guid)
Returns the base process schema item with specified identifier.
Declaration
IBaseProcessSchemaManagerItem IBaseProcessSchemaManager.GetItemById(Guid schemaId)
Parameters
Type | Name | Description |
---|---|---|
System.Guid | schemaId | The schema identifier. |
Returns
Type | Description |
---|---|
IBaseProcessSchemaManagerItem |