public override Task <object> FulfillAsync() { Dictionary <string, string> MyEntities = new Dictionary <string, string>(); MyEntities.Add("username", this.adusername); //Workflow parameter MyEntities.Add("mobile", this.phonenumber); //Workflow parameter CreateJSON createJSON = new CreateJSON(); //instance created for createjson string aeRequestId; //variable creation for ae call aeRequestId = createJSON.AECall(MyEntities, "Generate OTP"); // ae call GetStatus getStatus = new GetStatus(); //instance created of GetStatus Thread.Sleep(15000); // Wait for workflow execution string response = getStatus.GetStatusAECall(aeRequestId); //Get Status Response - response from ae. var rss = JObject.Parse(response); // JObject.Parse string is converting in json format. username = (string)rss["attribute1"]; // username is stored in attribute1 field of response. phoneno = (string)rss["attribute2"]; // phoneno is stored in attribute2 field of response. otp = (string)rss["attribute3"]; // otp is stored in attribute3 field of response. //return Task.FromResult((object)$"I will reset password for {this.adusername} as soon as possible... Visit me again whenever you need my help. Have a great day :)"); return(Task.FromResult((object)$"{username} OTP is sent on your registered mobile number, please enter otp. Your reference key is - {aeRequestId} (RK). You need to enter reference key<space>OTP eg. (RK) AZ6754")); //Get Status Response from ae }
public override Task <object> FulfillAsync() { Dictionary <string, string> MyEntities = new Dictionary <string, string>(); MyEntities.Add("hostname", this.hostname); CreateJSON createJSON = new CreateJSON(); string aeRequestId; aeRequestId = createJSON.AECall(MyEntities, "ProxyUsecase"); GetStatus getStatus = new GetStatus(); Thread.Sleep(15000); string response = getStatus.GetStatusAECall(aeRequestId); var rss = JObject.Parse(response); string AeRequestStatus = (string)rss["workflowResponse"]; rss = JObject.Parse(AeRequestStatus); string message = (string)rss["message"]; //return Task.FromResult((object)$"Internet is not working for {this.hostname} as soon as possible... Visit me again whenever you need my help. Have a great day :) {response}"); return(Task.FromResult((object)$"{message}Please wait while we work on your request. It typically takes 2 minutes to complete the operation, click after 2 minutes.< input type = 'button' class='button' id='check_status' value='Click here to check status' onclick=\"button_send('Check Status');\"/>")); }
public override Task <object> FulfillAsync() { if (foldername.Equals("hr") && permission.Equals("read")) //validation of foldername & permission { GroupName = "HR_Read"; } else if (foldername.Equals("hr") && permission.Equals("modified")) { GroupName = "HR_Modified"; } else if (foldername.Equals("corporate") && permission.Equals("Read")) { GroupName = "Corporate_Read"; } else if (foldername.Equals("corporate") && permission.Equals("modified")) { GroupName = "Corporate_Modified"; } else if (foldername.Equals("policy") && permission.Equals("read")) { GroupName = "Policy_Read"; } else if (foldername.Equals("policy") && permission.Equals("modified")) { GroupName = "Policy_Modified"; } else { GroupName = "Default"; } Dictionary <string, string> MyEntities = new Dictionary <string, string>(); MyEntities.Add("SamAccountName", this.SamAccountName); //Workflow parameter MyEntities.Add("GroupName", this.GroupName); //Workflow parameter CreateJSON createJSON = new CreateJSON(); //instance created for createjson string aeRequestId; aeRequestId = createJSON.AECall(MyEntities, "SharedFolder"); // ae call GetStatus getStatus = new GetStatus(); //instance created of GetStatus Thread.Sleep(15000); // Wait for workflow execution string response = getStatus.GetStatusAECall(aeRequestId); //Get Status Response(response from ae) var rss = JObject.Parse(response); //Get Status Response(response from ae) string AeRequestStatus = (string)rss["workflowResponse"]; //Get Status Response(response from ae) rss = JObject.Parse(AeRequestStatus); //Get Status Response(response from ae) string message = (string)rss["message"]; //Get Status Response(response from ae) return(Task.FromResult((object)message)); //Get Status Response.(response from ae) }