I have multiple workflows that have returns in them and all of them have conditions since a condition is “Do this when…”. Why do we need to have an unconditional return Data action in the workflow? Seems like I need to manufacture errors already accounted for.
Can you click on an error for us and show us the workflow? Hope we can assist.
That is the error - won’t allow deployment because there is a no unconditional return at the end of the workflows. The way the workflows are designed they always have to return something, In this instance, we are creating a shopping cart record based on whether or not the cart token is already in use.
We return any updated information from the cart and that can include an updated date on the cart so there is always something to return.
I see, that is irritating for sure. As a workaround for now, maybe try for the last steps to have a ‘terminate workflow’ then after that put a return data workflow with no conditions so the error goes away?
I would report it to Bubble so they can fix that, seems sort of dumb.
Seems unnecessary but I have to do something or the app won’t publish. Always something with Bubble.
Yeah, definitely worth mentioning it to them so you don’t have to waste WUs on that. At least you can publish it for now though.
Have you tried setting the return data as optional?
The data being returned is used in another part of the workflow. Workflow is build like this:
Get JSON Data
Get/Create Customer Record - passes customer id
Get/Create Customer Cart - passes cart token
Create Customer Offer - passes offer token
Process Offer - passes decision on offer
Create Discounts - passes discount code
Post to Cart - post back to cart - customer id, offer token, cart token, offer status, discount code
An empty return would either break the subsequent events or pass an error back to the user that is not there.
You could add another conditional return data action and have it return an error value instead of a blank value.
Will that work for you?
The error is that all of the returns have conditions on them. So I would have to force the app to throw an error by leaving a condition off of it and returning a piece of data that could conflict with what is already working. Either way, to satisfy bubble, I now have to go back through a day and half testing to make sure the app throws an error.