Author Message
HoraciMacias
Joined: Nov 8, 2013
Messages: 36
Offline
I'm trying to find the documentation around how to invoke an ED workflow from an external application, by using a REST / HTTPS interface.

I'd like to send variables as well, if possible.
Can somebody please point me to the relevant documentation? So far couldn't find it on ED or Breeze documentation.

thanks,

H
RajeshChandrashekar
Joined: Oct 27, 2016
Messages: 60
Offline
Hi,
Could you please let us know the EngagementDesigner and Breeze version ?
possible way is , you can instantiate a workflow using the Eventing connector Rest API's.

The process follows as below:
1) Open EngagementDesigner Administration console, navigate to Event catalog tab
2) Create a Event Catalog and based on your requirement of payload create a schema accordingly, submit the event, which would get stored in database.
3) Now open designer, on start chose the Event created above, now from the payload you can access the data to your tasks.
4) Fire a REST request to EventingConnector, with payload matching the schema.

For firing the REST request to EventingConnector, please refer the breeze SDK, extract the breeze sdk and navigate to
Avaya-Breeze-SDK-<version>\Avaya-Breeze-SDK\REST-API-Docs, this has information on how to use the REST API's.
HoraciMacias
Joined: Nov 8, 2013
Messages: 36
Offline
thank you Rajesh.
Answering your questions, I'm targetting the latest versions of Breeze and ED; 3.5.

I'll go through the Breeze REST API docs.

thanks,

H
ValerieH
Joined: Feb 17, 2015
Messages: 23
Offline
The event catalog entry is the key: once you deploy a workflow using a cataloged event schema, that workflow can be invoked quite simply with a web service post. The sample schema below receives variables as inputs: the contact phone number, channel type, the message to play (if channel = voice) or text (if channel = sms), and a payload variable.


{"title":"NotifySchema","type":"object","properties":{"contactPhone":{"type":"string"},"channel":{"type":"string"},"message":{"type":"string"},"payload":{"type":"string"}}}


The behavior of the workflow is to call or sms the contactPhone and play or sms the message provided. The POST should be directed to the breeze server event framework url like this: https://<Breeze_Server_Address>/services/EventingConnector/events

It would be triggered by a REST POST in application/json format with a Body like the one below:


{
"family": "Notification",
"type": "OnePartyNotify",
"version": "1",
"eventBody":
{
"contactPhone":"YourPhoneNumber",
"channel":"voice_or_sms",
"message":"your_message",
"payload":"user_variable_future"
}
}


You should see a 200 OK response from the Breeze server when you post an event trigger, and an instance of the matching workflow will start to run right away. Feel free to send me a direct message if you would like the actual URL of the lab on which this workflow is hosted.
HoraciMacias
Joined: Nov 8, 2013
Messages: 36
Offline
great! thank you Valerie.

H
Go to:   
Mobile view