Start a new topic

How to start a workflow from an API

Can a workflow be initiated via an API. I need to be able to Automatically create a workflow approval on new data been loaded via the SA table and Submit Job action. The record should not become a golden record until it has been approved.


I see there is an option of "Start from Completed Batch" in the startup context of a workflow but I cant find any documentation on it.


Hello Gavin,


If you are looking for starting a workflow instance from REST API, then this feature is available since v2023.4.0:

> https://www.semarchy.com/doc/semarchy-xdm/xdm/latest/Install/release-notes/2023.4.html#_workflow_startup_from_restapi


This can be achieved thanks to our endpoint "Start workflow instance(s)" present in Workflow Administration > Workflow Definitions >  Start workflow instance(s):


Please let me know if that could work for you or if I missed something. 


Have a good day

Alexia

Yes sort of, I dont know how i missed that, but I'm assuming the record should be ain the GD table already based on this :


SemQL expression to filter the records to include in the workflow instance's dataset. This filter is required for start events with 'Start from Selection' context type and is executed in the context of the authored entity set on the start event.

I'm looking to be able to do it as a "Start from empty selection" but would have provided the data for it.


I see there is now a "Start from completed Batch" startup context but I cant find any documentation on it. This would be my first option to try as we would be loading data into a batch and  it cannot become a golden record until it has been approved

Hello Gavin,


Here is the documentation link pointing to the different start events properties:

https://www.semarchy.com/doc/semarchy-xdm/xdm/latest/Design/workflows/workflow-start-end.html#:~:text=Description-,Context%20Type,-Required


Let us know if you have more questions on the topic.

Have a good day.

Alexia


Hello,


I have the same question. Is it possible to insert data via APIs and trigger a workflow to validate the data before it is saved as the golden record? The record should not be marked as the golden record until it has been approved.


Could you please let me know how we can achieve this?


Thank you!

Regards, 


Sandra

Hello!


Any update regarding this ticket?


Thank you!

Sandra

Hello Sandra,


I'm not really sure to understand the use case.

Because if you initiate a creation but don't submit it, the only way to then achieve a user validation is to handle this use case with a workflow in the first place, meaning that the creation step would also be handled via workflow, no?

Hello Alexia, 


We need to insert data via APIs and validate this data through a workflow. The data should not be saved as golden record until validated.

That's the use case basically. 


Thank you!

Sandra

Hello Sandra,


As this is not currently doable, it will need an enhancement request.

Let me convert this topic in a ticket, so that I can take all the needed information and create the enhancement request.


Thank you

Login to post a comment