I am trying to work out a scenario where a mail should get triggered for every ListItem in a SharePoint List.
Sharepoint List as follows
ID Name Email
1 JimC Jim#gmail.com
2 KimJ Kim#gmail.com
3 SimK Sim#gmail.com
I have created a Power Automate workflow, which gets triggered based on a recurrence schedule.
When it does get triggered, it checks a SharePoint list, that contains a list of individuals. Flow is suppose to process each individual,
trigger mail using "Send email with options".
wait for response (Approve / Reject / Need some details)
log the response received from the individual
But issue here is if a person doesn't respond, the flow gets stuck & doesn't send mail to next individual. Seems, that's how "Send email with options" behave.
Is there a way, where we can wait for few hours / days for response to arrive? Else process the next individual in the SharePoint list by sending an email using "Send email with options"?
You can set the timeout period and by
Add try scope and add the "send email with options" step inside this scope.
Click 3 dots at the "send email with options" step.
Click Settings
In the Timeout, enter the timeout period in ISO 8601 format e.g. PT3H means that this step will be timeout in 3 hours.
Add the catch scope and set the configure run after.
Select timed out and failed and add any step that you would like to do after timed out inside the catch scope.
Hope this help.
I have homepage with multiple listItem each item send a request to a server to get the latest update for the specific item (building tracking packages app) so for example you have 10 packages when you enter the app it will send 10 request to the server to get the updated location for them , what i am looking is when the user click in the item itself if the request didn't finish receiving data from the server it will keep that current request even it's in the detail page of that package . so it won't cancel the request and send another one in the detail page if the first request is still active . i hope i am making sense in this question .
I am using Dio for the request
I am getting your point you want when the first request in progress I don't want to send a new request to at this time. you need to do few things when you are doing a request the first time then set a flag true until you do not get response and use the same flag check on your detail page before API call next time.
I have been using
Net::SSLeay
for 20 years to post data to authorize.net and receive the reply, as shown below:
($reply_data, $reply_type, %reply_headers) =
post_https($host, $port, $script, '', $form_data);
#data = split (/\,/, $reply_data);
$FORM{'x_response_code'} = $data[0];
$FORM{'x_response_reason_text'} = $data[3];
$FORM{'x_auth_code'} = $data[4];
$FORM{'x_amount'} = $data[9];
if ($FORM{'x_response_code'} != 1) {...
authorize.net received the data and processed the payment, but my system did not receive a reply. The user got a server error, and tried submitting the form several more times, all which resulted in payment processing, but no reply from authorize.net. When comparing my logs with authorize.net's processing time, I see that there's about a fifteen minute lag time between when the call was sent, and when authorize.net processed the payment. All four attempts were completed before the first processing occurred. Authorize.net says there were no problems or changes on their end.
How can I suppress the server error and instead return a custom error message?
As I understand it, your problem is that your local server is timing out before receiving a response from authorize.net, and from your log files, it seems that the response does arrive, but after a long delay. Although it is probably possible to configure your server to wait for longer before timing out (assuming you have control of the server config, etc.), 15 minutes is too long for a user to wait and would provide very poor user experience. Therefore, I'd suggest one of the following strategies:
submit the form by AJAX and wait for a response -- i.e. translate your form processing logic into javascript and perform the transaction asynchronously. Looks like there's an existing authorize.net JS API.
the old school method: when the form is submitted, fork a new process that posts the form data (e.g. using curl) and saves the response to a file. The UI would return an intermediate page informing the user that their payment is being processed, and would periodically check whether the response has arrived, either through a link the user clicks to trigger a test for the presence of the response file, or through automatically refreshing the page (but see these accessibility guidelines).
Whatever strategy you use, I would get in touch with authorize.net and see if you can find out why the response is taking so long. Adding a note to users that indicates that there have been delays recently and preventing them from submitting the same payment four times in a row would also definitely be good!
I am using GWT 2.5.1.
In my GWT web app I have a ComplexPanel object which contains a set of fields(widgets). There are a suggested field (on panel) which gives me the opportunity to find object and info about it. Fields (10-15 of them) contain info about that object.
The problem is when user (client side) has a slow internet connection, fields on form are updated with a delay. And if in moment of delay user click 'Save' button (AsyncCallback), old data (which is not updated) posted to the server.
How it works:
1. Server receive callback from the form and start to processing the data.
2. Server refresh all the fields with new data and end the works.
3. Javascript updating the data on form using about 10 requests.
But: internet is slow and one part of data is refreshed and other no.
4. User click SAVE and mixed data goes to the server.
I need to know (from server side) when all the field are refreshed on client side and server can proceed with a next post request.
Thanks in any advice.
Perform a validation check on click of the save button. There are several things you can do as per your requirement. I have listed one way to validate it.
Set a flag before making the async call as false. For instance, isLoaded = false
Once you have all the fields just update it to true, i.e. isLoaded = true
On save button handler check for isLoaded flag. If false, prompt a message, else save.
Update:
You can count the number of response received. You know that you will get 10 response. So for every response received increment a counter. Activate save only if you have all 10 response recieved.
For a clean way to do this, use gwt-async-future.
My Magento Verison is - 1.4.1.1
I am having two problems:
1) When I am going through various steps of Onepage checkout (registration, billing, shipping, and payment tabs), sometimes during this process I am redirected to the cart page. There is no error, no exception, no report gets generated in var/report. I dont know how to debug it. Aren’t there any logs I can look for?
2) In same Onepage Checkout process after clicking on place the order (last step) , some times it redirects to the cart page, sends an email saying that the order failed with the message:
Quote totals must be collected before this operation.
To resolve it I commented this line in prepareRecurringPaymentProfiles in the file magento/app/code/core/Mage/Sales/Model/Quote.php, which solved the problem:
throw new Exception("Quote totals must be collected before this operation.");
I dont know if these 2 problems are related or not. But I am not having the 2nd problem now but having 1st one quite frequent. What could be the reason and how to resolve it?
further update-I checked the firebug trace, It is 500 internal server error which comes sometimes in any of the step in one page checkout. I was able to dig down into savebillingaction, saveshippingaction functions in onepagecontroller.php and found that error comes when $this->getRequest()->isPost() is blank , If it is 1 then it goes ahead, and goes to the next step else it redirects to cart, No I dont know why this is not 1 or is it because ajax is not able to send post data but I checked XHR request, Ajax send the post data every time (checked with firebug extension). Can Someone tell me What I could do next to troubleshoot. Where I can look for these Ajax Calls?
Shipping.phtml (any step.phtml) has JS at the bottom , How does it call OnePagecontroller saveshippingaction function ?
Since it's internal server error, try to access the error log of the server. Will tell you where is the problem. I' ve had the same problem in 1.7.0. In my example the problem was at /app/code/core/Mage/Usa/Model/Shipping/Carrier/Fedex.php
For anyone else coming across the "Quote totals must be collected before this operation." error, check your Apache logs for the reason of the 500 internal server error. If it's something like this:
mod_fcgid: read data timeout in 40 seconds
Premature end of script headers: index.php
process 26126 graceful kill fail, sending SIGKILL
..PHP is taking too long to respond. Usually its the onepage/checkout saveOrder action because it's quite heavy and often needs to connect to third party services (payment gateways, newsletter services like mailchimp, etc.). These calls to third party services can take a while, depending on the network state and might be the reason of PHP timing out.
You can start by increasing the timeout, but it's not a good permanent solution because you want to find out why this is happening in the first place.
New Relic is a good tool to monitor these calls (and a good tool to monitor your Magento store in general).
Firstly, commenting an error message is almost never the way to solve a problem, as you are just covering up some issue that may have severe consequences for your system.
Nailing down errors like this can be hard, but there are a few places to look first:
Did you install this system on a lower version and then upgrade? If so, how?
Are you using any extensions that modify the sales/checkout portion of the site?
Have you overridden any of the models concerned with this part of the site?
Have you changed the JS or HTML for the checkout?
If one of those is the case, you should review those changes for bugs. If not, try turning on the default theme for the site and checking out again. If the bug disappears, there is a problem with the theme that you are using. If it still appears, the problem is in code.
In that latter case, use Firebug to verify that the offending page requests result in Magento sending back "redirect" commands to the frontend. If that isn't the case, it may be some kind of JS error, but more likely you are ending up with invalid data in the system somewhere that causes Magento to choke during checkout.
Also (just thought of this, haven't tried it), try the multi-address checkout. As I recall, it uses regular page posts, and may even have more useful messaging than the OnePage checkout. Please edit your post with your findings from the above so that we can help more if that doesn't do it.
Hope that helps!
Just in case someone gets the "Quote totals must be collected before this operation." error, and none of these solutions fixes their particular problem, I'll mention that mine was an issue with this:
skin/frontend/base/default/js/opcheckout.js
var params = Form.serialize(payment.form);
There was a JS error unique to this site which was clearing the Payment form and preventing JS from reading it's contents. The module or theme that you use will differ, but check to make sure that the payment form can serialize correctly. If not, then that could be your problem.
I had the very same problem on my store Princessly:
It takes about 20 to 130 seconds or even longer for "Submitting order information ..." to go through and redirect to the payment gateway such as PayPal, if at all, after clicking the Place Order button, last step of one page checkout.
If it doesn't go through, very probably because something timed out since it took too long, it will redirect back to shopping cart, leaving the customer an empty cart and a Pending Payment order, OR, it will give the exception of:
Quote totals must be collected before this operation.
Since obviously, well, something timed out and the script ends before quote totals are collected (which is just my theory), thus sending the Payment Transaction Failed Reminder email.
After 12 hours of research and debug, I finally found the culprit and the solution.
Magento enables RSS stock and new order notification by default, so every time Place Order is pressed ('sales/order' resources are then saved), cache is refreshed so RSS will be published. Cache cleaning can be very time-expensive for Magento. Therefore the solution is simple. Just disable RSS notification for save of 'sales/order' resources.
Find /app/code/core/Mage/Rss/etc/config.xml and locate this block:
<sales_order_item_save_after>
<observers>
<notifystock>
<class>rss/observer</class>
<method>salesOrderItemSaveAfterNotifyStock</method>
</notifystock>
</observers>
</sales_order_item_save_after>
<sales_order_item_save_after>
<observers>
<ordernew>
<class>rss/observer</class>
<method>salesOrderItemSaveAfterOrderNew</method>
</ordernew>
</observers>
</sales_order_item_save_after>
Simply remove or comment it out and refresh Magento cache in System => Cache Management => Select All => Submit.
Now it only takes 1 second or even less for my store to go through Place Order and redirect to payment gateway.