In Workshop(can not use Slate or OSKD), I have a two-step flow:
-
User clicks Save → I persist selections to ontology objects.
-
Immediately after saving, I want to build a derived ontology object based on those saved rows.
Problem
If I call the “build” function at the end of my save actions, I have to click Save twice before the build sees the fresh data. First click writes; second click finally builds with the new state.
What I tried
-
Calling the builder at the end of the save edit:
@OntologyEditFunction() public async saveIrbSelectedDataToOntologies(/* args */): Promise<void> { // …writes/deletes to governanceScreenIrbSelected*… await this.createGroupedDomainsAndFields(release_irb_number); // ← called here }Result: works only on the second click.
How can I make sure the second ontology object will be build in the first click.
Thank you