Wondering if anyone can shed some light on the order that BF processes operations. If I ran a named action that did this sequentially:
Show wait modal
Run FM Hook
Send back data via $$BF_Model
Run JS function to evaluate data sent back in $$BF_Model
Could I expect for the $$BF_Model data to be available for the JS function?
From what I see, it appears the data from $BF_Model is not available to the site until this named action completed.
Here’s my namedAction:
"loadData": [{ "action": "function", "function": "app.env.waitModal.body = \"Please wait while we copy data from your previous registration\"; app.env.waitModal.titleHeader = \"Please Wait\"" }, { "action": "namedAction", "name": "showWaitModal" }, { "action": "runUtilityHook", "options": { "action": "loadPreviousData", "context": "", "details": "" } }, { "action": "function", "function": "if ( model.state.dataCopied) {\n EventBus.$emit('processNamedAction', {\n \"action\": \"namedAction\",\n \"name\": \"showCopySuccessModal\"\n })\n}\nelse {\n EventBus.$emit('processNamedAction', {\n \"action\": \"namedAction\",\n \"name\": \"showCopyFailModal\"\n })\n}" }],
In the inspector, I see that model.state.dataCopied is undefined, despite it being set to $$BF_Model in the utility hook.
Once the named action completes, the data is available in the inspector, so I’m inferring that the data from $$BF_Model is not available to the site until after the queued actions complete?