Implementing an Amazon Dash Button workflow

If the order is successfully paid for, either because we issued a charge using the customer saved payment information or because the customer provided new valid payment information within 14 days, then we can send the invoice and deliver the order..Otherwise, it means the customer failed to provide valid payment information in time: the order is canceled.Writing this workflow class is all it takes to have:A fully functional workflow holding some state without the need for a database, being able to wait for a time or for external events to happen without the need for CRON jobs.Scalability: the workflow and tasks are all distributed on available Zenaton Agents..No queuing system needed, no need to think about messages, we take care of everything..You just write PHP code.Parallelism: tasks SendOrderInvoiceTask and SendOrderToShippingTask are able to run at the same time because we don’t need to return the value of the first one to execute the second one.Conditions: You can use the workflow state or values returned from tasks to change the execution of the workflow using if statements.Try it!If you want to play with this example, you can check out the full implementation in a real Laravel project..You will need a Zenaton account to run it..You can register for free, no credit card required.You can also try the tutorial to discover the features of Zenaton..It will give you a good insight into what is possible..Then you can start experimenting with your own workflows.If you have any questions, feedback, or if you need a little help to implement your workflows, feel free to get in touch with us in the comments below, on Twitter, or using the chat on our website..We will be happy to help.. More details

Leave a Reply