Triggering a K2 Workflow


I have a rest service which performs a business functionality. Data is updated in the database.

 

Whenever data is updated/saved it is available through a Rest service. Whenever there is a change, a K2 workflow is supposed to start and carry that data to different teams/systems for further action.

 

Since this does not involve a smartform, I am looking at an option to start the workflow. Polling doesnt look too elegant either.

 

Any suggestions.

 

Thanks in Advance.


2 replies

Badge +15

Hi,


 


You can use the K2 API to start your workflow using codes. However, you will need to have a event trigger to run the code to start the K2 API. Since you are using a REST service, I am not sure if there is a better way to achieve this other than polling.  


 


The other alternative to polling is to create some kind of push channel that will push some sort of notification to your application whenever there is an update, so that it knows when to trigger the workflow. However, I am not sure if this method can be done with a REST service.

Badge +9

Hi Upendra,

 

       You can start workflow using trigger or SP. Refer below link for more on this.

 

start k2 workflow from sql

 

 

Let me know if this helps you.

Reply