Action Sequence and Apex timing- anyway to determine when async processes completes?

Arne-Per HeurbergArne-Per Heurberg ✭✭✭✭
edited June 19, 2020 in Questions
Given that the official preference/requirement in Lightning to call APEX is via Data Source Action in action sequence, I  am running into a challenge determining when the async process complete.

I tried using deferred promises on saves. Is there  some resource I am missing in tracking down how to tell when a thread (say the first, second whatever) async process has completed so I can start using the results? Skuid.actionswequences.getByName.run({Inputs) doesn't seem to return anything usable. Thanks for any ideas.

 (The scenario is: mass action, working on group of rows, run action sequence so I can call apex in LEX, apex returns json into another model (all which works great). The challenge is the subsequent code runs before model/data is populated.) Thanks in advance. Hope everyone is well!

Comments

  • edited June 18, 2020
    Not sure if this is what you are looking for, but I use a model based on object AsyncApexJob to track when certain Apex sync jobs have completed. I don't have it built into an action sequence. It just triggers the rendering of a rich text field which I use as an alert if a specific Apex job has not completed.
    There are fields to identify the specific job, the status of that job and whether there are any errors with the job.

  • Thanks Raymond. This was adjacent but an awesome find!

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!