we want to edit a data table and save the changes. Thereupon, we want to trigger a workflow that creates (based on that data) an aggregated table.
We save the changes via a microservice (config.editing.saveToMicroservice). After that we want to trigger the second workflow. Any ideas how I could first trigger the microservice, save the changes, and then trigger the workflow?
(We already thought about using config.editing.saveToFunction and use the function to trigger a WF/PL but then we canāt use the built-in functionality to save data table changes)
In the workflow where you save a table from the app via āsaveToMicroserviceā, you could trigger a WF via Flexible REST API Processor (POST with endpoint āworkflows/{wf_id}/jobs?target-project={project_id}ā), which loads the data set saved in the first WF and performs further transformations.
That was the other idea we also had in mind Do you have a suggestion how I could ensure that the data table is saved first before the second WF is triggered via the REST API?
You could put both workflows into the same isolation group to make sure that the second workflow waits until the first one has finished. But Iām not exactly sure if this could cause some kind of deadlock if the REST API Processor waits for the response that the second workflow has started and the second workflow waits for the first workflow to finish (but I would guess it is not the case)
There is also a new feature in development called āevent-based schedulerā that allows you to trigger workflows from changes on a datatable.
Depending on how soon you need to solve your challenge, this might be an option
One more option (I am not sure if youāve thought about that in your āfunction ideaā) would be to use saveToFunction and just save the datatable changes there via the API (there is a nice SDK function for that by now) and call the workflow(s) or production line(s) afterwards
We are currently testing the approach with the REST API call and isolation groups (we are just having some issues with the API in general so that i canāt tell you yet whether it worked).
We will take the āevent-based schedulerā feature into our backlog so that we can apply it when it is available, that is a very clean solution