Forum Academy Marketplace Showcase Pricing Features

Workflow API seems to fail without error

I have a workflow API that I call using “Schedule API Workflow on a list”. Essentially, the workflow api adds a product and a quantity to the Order Details thing then, recursively schedules itself to execute again on a list, this time for all the sub-products.

This traverses the grandparent-parent-child-grandchild relationship of the product catalog structure. It occasionally works well but it is unpredictable. Not all sub-products get added all the time. There seems to be no pattern as to which products are missing. Its never the first or second level but it may be 3rd, 4th or 5th level.

I can watch the RG as the items are added and some items appear then are replaced by a different item. The workflow never deletes.

I would rather use the Server Script functionality and do the whole process in javascript but I can’t seem to find any doc on how to lookup, things, add things and update things in the JS code. I know I can pass things as properties.thing1, thing2, etc… but no doc on structure, objects, available functions.

What could be happening in my Workflow that would cause the unpredictability? No errors are getting thrown.

Does anyone have a source for bubble thing schema docs? How do you make updates inside the server script?

Thanks in advance

@eddie5

Try scheduling a recursive backend workflow, send the list there and make sure to use use custom events when you want to make sure that key actions are executed sequentially

@cmarchan

I wasn’t clear in my post, this is a backend workflow.

Can you elaborate or point me at an example on using a custom events in a backend workflow?

@eddie5

Emphasis on recursive and order of operations :grinning:

@cmarchan

Thanks for the input. I understand custom events, just not sure how a “function” that receives 1 parm and returns nothing helps my situation. If I functionalize my updates to ensure sequential execution, I would have to pass several parms to the custom event.

Truthfully, I haven’t found a scenario where a custom event actually adds any value.