示例#1
0
        public static string[][] GetDecisionOptions(string taskId)
        {
            var accessToken  = AADAuthHelper.EnsureValidAccessToken(HttpContext.Current);
            var decisionList = DataGetter.GetDecisionOptions("http://gwmblr.cloudapp.net:8080/TestAppForOffice/sap/opu/odata/iwpgw/TASKPROCESSING;v=0002/DecisionOptions?InstanceID='" + taskId + "'", accessToken);

            return(decisionList);
        }
示例#2
0
        public static ResponseToClient RequestDecisionOptions(string id)
        {
            bool             hasOrigin        = bool.Parse(ConfigurationManager.AppSettings["HasMultipleSapOrigin"].ToString());
            ResponseToClient responseToClient = new ResponseToClient();

            try
            {
                responseToClient.decisionOptions = DataGetter.GetDecisionOptions(GetResourceUrl("descionOptions", id, hasOrigin));
                responseToClient.statusMsg       = "OK";
            }
            catch (WebException ex)
            {
                HttpWebResponse res        = (HttpWebResponse)ex.Response;
                int             statusCode = (int)res.StatusCode;
                responseToClient.statusCode  = statusCode;
                responseToClient.statusMsg   = "Exception";
                responseToClient.response    = new string[1];
                responseToClient.response[0] = ex.Message;
            }
            return(responseToClient);
        }
示例#3
0
        public static ResponseToClient GetDecisionOptions(string taskId)
        {
            ResponseToClient responseToClient = new ResponseToClient();

            try
            {
                var accessToken = AADAuthHelper.EnsureValidAccessToken(HttpContext.Current);
                responseToClient.decisionOptions = DataGetter.GetDecisionOptions(ConfigurationManager.AppSettings["AzureServiceUrl"] + "DecisionOptions?InstanceID='" + taskId + "'", accessToken);
                responseToClient.statusMsg       = "OK";
            }
            catch (WebException ex)
            {
                HttpWebResponse res        = (HttpWebResponse)ex.Response;
                int             statusCode = (int)res.StatusCode;
                responseToClient.statusCode  = statusCode;
                responseToClient.statusMsg   = "Exception";
                responseToClient.response    = new string[1];
                responseToClient.response[0] = ex.Message;
            }
            return(responseToClient);
        }