webMethods.io Execute Workflow from API Methods

Product/components used and version/fix level:

webMethods.io Integration

Question related to a free trial, or to a production (customer) instance?

Good day,

I have imported an API definition into my webMethods.io Project.

When I go to the resources and methods I see I can only execute a flow services but not a Workflow. Is it possible to execute a Workflow from the API resource? If so, what will be the best way to accomplish this?

Kind Regards,
Cobus Boshoff

Yes, you can APIfy a workflow. There are three conditions to make it work:

  1. The WF trigger must be of type webhook
  2. The last step of your WF needs to be a “return Data on Sync Webhook”
  3. You must perform a unit test on this step, otherwise the WF won’t be available for selection in the APIs section

Keep in mind workflows are triggered in asynchronous fashion, even if the trigger is a HTTP request.
Also, trigger invocations is limited to 15000 per minute.
If you have strong requirements at latency level, or if you need to expose an API that supports large volumes of calls, then flow services are a better choice

Hi Stephane,

Thank you! I will give it a try.

Kind Regards,
Cobus Boshoff

Yes you can.
Once it is WEBHOOK enabled you can select it for your REST API.
For details see:
https://docs.webmethods.io/integration/apis/rest_api_builder/#gsc.tab=0

@Stephane.TAILLAND_emp – important: For SYNC calls the limit is 1500 per minute. for a TRIAL even only 30.
See: Rate Limiting - webMethods.io Integration

The proposal to use FLOW services is absolutely valid.
For details see also: webmethods-io-integration-guidelines/development-guidelines/development-guidelines.md at main · SoftwareAG/webmethods-io-integration-guidelines · GitHub

@Cobus_Boshoff
What is the use case for your API endpoint? Typically Flow services are recommended for API endpoints. What are you planning for your Workflow to do?