Beispiel #1
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);
                }
            }
        }