Question

Workflow API - Start Workflow

  • 26 June 2020
  • 1 reply
  • 16 views

Badge +6

Hi Mates,

In our workflow  when workflow intiated we have activity which look into Other system and get destination user and then next setp is where Task assigned to destination users.

 We are calling workflow using Workflow REST API (https://k2.xxx.com/api/workflow/v1) . What we observe is when we initated the workflow till it assign task to Task actitvity it does not retruns us workflowID. it means if our Get Destination API which fetch user take 20 sec. to execute we are getting workflow ID from API after 20 sec, Is there any way or paramter we are pass to Workflow API url to it will return workflowID as soon as workflow is intitaed. 


1 reply

Badge +13

Hi,


 


When you start a workflow, the process instance ID will be returned from in the response body.


 



 


The process instance ID is the ID used by K2 to uniquely identify a workflow instance, not the type of workflow. This method will not return a workflow ID.


 


You can use the get tasks method to retrieve the list of tasks, which should contain a workflow ID for each task.


 

Reply