Beispiel #1
0
        // Variables related history

        /// <summary>
        ///
        /// </summary>
        /// <param name="variable"></param>
        public virtual void RecordVariableCreate(IVariableInstanceEntity variable)
        {
            // Historic variables
            if (IsHistoryLevelAtLeast(HistoryLevel.ACTIVITY))
            {
                HistoricVariableInstanceEntityManager.CopyAndInsert(variable);
            }
        }
Beispiel #2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="variable"></param>
        public virtual void RecordVariableUpdate(IVariableInstanceEntity variable)
        {
            if (variable != null && IsHistoryLevelAtLeast(HistoryLevel.ACTIVITY))
            {
                if (!(EntityCache.FindInCache(variable.GetType(), variable.Id) is IHistoricVariableInstanceEntity historicProcessVariable))
                {
                    historicProcessVariable = HistoricVariableInstanceEntityManager.FindHistoricVariableInstanceByVariableInstanceId(variable.Id);
                }

                if (historicProcessVariable != null)
                {
                    HistoricVariableInstanceEntityManager.CopyVariableValue(historicProcessVariable, variable);
                }
                else
                {
                    HistoricVariableInstanceEntityManager.CopyAndInsert(variable);
                }
            }
        }