/// <summary> /// Activity Constructor /// </summary> /// <param name="activity">activity</param> public MWFEventAudit(MWFActivity activity) : base(activity.GetCtx(), 0, activity.Get_TrxName()) { SetAD_WF_Process_ID(activity.GetAD_WF_Process_ID()); SetAD_WF_Node_ID(activity.GetAD_WF_Node_ID()); SetAD_Table_ID(activity.GetAD_Table_ID()); SetRecord_ID(activity.GetRecord_ID()); SetAD_WF_Responsible_ID(activity.GetAD_WF_Responsible_ID()); SetAD_User_ID(activity.GetAD_User_ID()); SetWFState(activity.GetWFState()); SetEventType(EVENTTYPE_ProcessCreated); SetElapsedTimeMS(Utility.Env.ZERO); MWFNode node = activity.GetNode(); if (node != null && node.Get_ID() != 0) { String action = node.GetAction(); if (MWFNode.ACTION_SetVariable.Equals(action) || MWFNode.ACTION_UserChoice.Equals(action)) { SetAttributeName(node.GetAttributeName()); //SetOldValue(String.valueOf(activity.getAttributeValue())); SetOldValue(Util.GetValueOfString(activity.GetAttributeValue())); if (MWFNode.ACTION_SetVariable.Equals(action)) { SetNewValue(node.GetAttributeValue()); } } } }