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.