" /> Triggering SCXML from REST request - Genesys CTI User Forum

Author Topic: Triggering SCXML from REST request  (Read 2926 times)

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Triggering SCXML from REST request
« on: August 07, 2017, 10:45:45 AM »
Advertisement
Hi Experts,
I have a solution for GMS call back. GMS call back out of box works fine.
I have a requirement where whenever any customer submits the request for a call back from Mobile client or web client we want to verify if this number is blacklisted or not. If it's not blacklisted then we can take the request and schedule a call back.

In order to achieve the above scenario i found from ORS documentation that i can start the scxml session or trigger any scxml from the REST request :

https://docs.genesys.com/Documentation/OS/8.1.3/Developer/ExternalIntf


Now in order to do so , i have created a Service in GMS wiith name "blacklist" and in that service. From the REST request I am just trying to trigger my SCXML code. In service i have this section which points to my SCXML:

_service= http://192.168.21.128:8090/GMS_Basic/src-gen/IPD_default_defaultWorkflow.scxml

my request looks like this:

http://192.168.21.128:8111/genesys/1/service/blacklist?_phone=9005

I am passing this value in _phone paramter but GMS logs says timed out and ORS logs stops at and particular point always and nothing happens and i get below error:

{"message":"ORS request failed: cannot connect to ORS. IO issue.","exception":"com.genesyslab.gsg.services.ors.OrsServiceException"}


The issue here which i see is that ORS is finding the SCXML but not at all going inside the ENTRY block. Not sure if i need to handle some variables or expressions?

Any pointers?

Offline 47245

  • Newbie
  • *
  • Posts: 11
  • Karma: 0
Re: Triggering SCXML from REST request
« Reply #1 on: August 30, 2017, 05:38:03 PM »
You need to set the IPD as interaction-less or create a custom IPD to start the workflow.


Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Re: Triggering SCXML from REST request
« Reply #2 on: September 04, 2017, 05:07:37 AM »
Thank you for the response. But I am struggling here to create a Customized IPD. I thought when i create a project it automatically links IPD with Workflow.

Offline Kubig

  • Hero Member
  • *****
  • Posts: 2755
  • Karma: 44
Re: Triggering SCXML from REST request
« Reply #3 on: September 04, 2017, 05:31:06 AM »
No, the IPD has to be created manually - under Interaction Process folder within project.

Offline gen_den

  • Full Member
  • ***
  • Posts: 176
  • Karma: 0
Re: Triggering SCXML from REST request
« Reply #4 on: September 04, 2017, 10:11:24 AM »
I created the same , and even linked the IPD with workflow but somehow , transition doesn't happen from IPD to workflow and  flow fails

Offline eugene

  • Jr. Member
  • **
  • Posts: 85
  • Karma: 2
Re: Triggering SCXML from REST request
« Reply #5 on: September 12, 2017, 03:45:18 AM »
you have to create an interaction less process as the previous poster suggests - this will automatically call the requisite application.start event to trigger or flow instead of hanging there.