Skip to main content

Hello,


I want to consume web service in my workflow. I have few questions around this.


 


1.       Configuring a web service endpoint – I want to set the Web Service end point as configurable. At design time, I will specify the endpoint from Dev instance and I want to keep this URL configurable as it will change when I move the workflow to QA, PPE, and Production machine. Can you please let me know how we can set the web service endpoint configurable?


2.       API call impersonation – By default, web service call from the workflow runs under K2 service account, but I would like to run this under specific user who is invoking the action on the workflow. Can we have this impersonation in the workflow?


3.       As per my understanding, if we change the API method signature, we need to change the update the workflow with the new signature and re-deploy the workflow. What will happen to inflight workflow which has old API method signatures?


 


Thanks

I would recommend looking into using the EndPoint Service Broker for this scenario.

 

1) The broker is configured per environment so your DEV, QA, PPE and Production will all have it's own personal configuration as to which web service you need to consume for that particular environment.

 

2) Any calls that you make from inside a K2 Workflow is always excuted as the K2 Service account EXCEPT if you configure the Run As option for your event. This is found by right clicking an event and choosing properties. It should be listed on the general panel if that event supports Run As. This is supported by the Smartobject event, which could call your web service.

 

13508i47423848BDD0B201.png

 

3) Yes, you will need to be careful about changing signatures of your API as these could potentially be breaking changes and your APIs would be shared by all running instances of the workflow. One way to control this risk is you could use the Live Instance Management API to move currently running instances to the new version of your workflow that supports the new API signatures. This is not without its own considerations, but could proivde a means to handle the scenario you asked about.

 

 


Reply