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


Login to post a comment