/// <summary> /// Execute /// </summary> /// <returns></returns> protected override bool Execute() { //only if the WorkflowRequest is AwaitingResponse Workflow_ADO wfAdo = new Workflow_ADO(); ADO_readerOutput output = wfAdo.ReadAwaitingResponse(Ado, SamAccountName, DTO.RlsCode, Configuration_BSO.GetCustomConfig("language.iso.code")); if (!output.hasData) { Log.Instance.Debug("No valid AwaitingResponse workflow found for RlsCode " + DTO.RlsCode); return(false); } WorkflowRequest_ADO wfReqAdo = new WorkflowRequest_ADO(); int deleted = wfReqAdo.Delete(Ado, DTO.RlsCode, SamAccountName); if (deleted == 0) { Log.Instance.Debug("Can't delete the workflow for RlsCode " + DTO.RlsCode); return(false); } Response.data = JSONRPC.success; return(true); }
/// <summary> /// Execute /// </summary> /// <returns></returns> protected override bool Execute() { //Validation of parameters and user have been successful. We may now proceed to read from the database var adoWorkflow = new Workflow_ADO(); ADO_readerOutput result = adoWorkflow.ReadAwaitingResponse(Ado, SamAccountName, DTO.RlsCode, DTO.LngIsoCode); if (!result.hasData) { return(false); } var adoAd = new ActiveDirectory_ADO(); adoAd.MergeAdToUsers(ref result); Response.data = result.data; return(true); }