I am stuck on a weird issue.
I set up an api endpoint that creates charged items to a booking (room, breakfast, etc.).
I give as params the booking id
and the first step of the api is to search for that booking. Once found it runs the next step.
To create the charged items it is a recursive workflow.
The issue is that I cannot find anything that is associated to the booking. The item get created, and the booking is well associated to the item, but not the references to the booking fields.
So for instance, when I do booking’s ext_room or booking’s ext_client, it remains empty.
I initially though it was because the api workflow was running before the first step (searching for the booking) was done, but the booking is actually well registered when I check the record on the database the item entry is linked to the booking as excepted, which means it found it.
Plus, since step 2 (schedule api workflow) is dependent of step 1 (search for db_booking), it should not run before it ends. And I even migrated the step 1 to custom event to ensure it finishes before step 2 starts, but no results.
I removed the privacy rules associated to the data types booking and items. And Checked the ignore privacy rules (even though there aren’t, but just to be sure i did not use any restriction on the booking data).
I am completely out of answers right now. Anyone with ideas on where this could come from?!
[Note] I was previously using just a recursive workflow, without the intern api, and it was working fine. But I wanted the api so that I can update the UI one the request is done. So I am guessing the issue is really due to the first step when it tries to find the booking from its id.