/// <summary> /// Get Workflow /// </summary> /// <returns>workflow</returns> private MWorkflow GetWorkflow() { if (_wf == null) { _wf = MWorkflow.Get(GetCtx(), GetAD_Workflow_ID()); } if (_wf.Get_ID() == 0) { //throw new IllegalStateException("Not found - AD_Workflow_ID=" + getAD_Workflow_ID()); throw new Exception("Not found - AD_Workflow_ID=" + GetAD_Workflow_ID()); } return(_wf); }
/// <summary> /// Process /// </summary> /// <returns>info</returns> protected override String DoIt() { MWorkflow WF = MWorkflow.Get(GetCtx(), p_AD_Worlflow_ID); log.Info("WF=" + WF); String msg = WF.Validate(); WF.Save(); if (msg.Length > 0) { throw new Exception(Utility.Msg.ParseTranslation(GetCtx(), "WorflowNotValid") + " - " + msg); } return(WF.IsValid() ? "@OK@" : "@Error@"); }
/// <summary> ///Get Workflow /// </summary> /// <returns>workflow</returns> public MWorkflow GetWorkflow() { return(MWorkflow.Get(GetCtx(), GetAD_Workflow_ID())); }