REST Service not reponse

If you think that something doesn't work in Aware IM post your message here
Post Reply
Aoddy10
Posts: 1
Joined: Fri Jul 02, 2021 3:37 am

REST Service not reponse

Post by Aoddy10 »

Hi Guys, could you please help me with REST service.

I have create service and set REST that call the process.
if the process is "CREATE Application WITH .......", the service was working perfectly. Application object was created and service return application data back to requestor completely.

But if the process just need to update status like
- FIND Application WHERE Application.ID=REST_Inputparameter.ApplicationId
- Applicaiton.Status='Approved'

The process was working perfectly as well. Application status has been change to 'Approved' but the issue is service didn't return application data back to requestor. Requestor keep waiting for reply back. I have test by send request from another BO and test by POSTMAN. The result were the same. Requestor keep waiting for response.

I'm much appreciated or helping me.
Rennur
Posts: 1191
Joined: Thu Mar 01, 2012 5:13 am
Location: Sydney, Australia

Re: REST Service not reponse

Post by Rennur »

Welcome to the forum!

Try adding This prefix:
FIND Application WHERE Application.ID=REST_Inputparameter.ApplicationId
ThisApplication.Status='Approved'

Code: Select all

FIND Application WHERE Application.ID=REST_Inputparameter.ApplicationId
ThisApplication.Status='Approved'
Also, should the REST_Inputparameter.ApplicationId above include the ID? As in Application.ID=REST_Inputparameter.ApplicationId.ID
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: REST Service not reponse

Post by BobK »

Are you using the same REST Service for the CREATE Application and the FIND Application?

Would it be possible to show your complete Process.
Bob
himanshu
Posts: 722
Joined: Thu Jun 19, 2008 6:24 am
Location: India
Contact:

Re: REST Service not reponse

Post by himanshu »

Hi,

Try this below

Create a new process and put your line into
Applicaiton.Status='Approved'

make sure you have input object selected as Application, final flow looks like this

RESTProcess
FIND Application
-- UpdateApplicationStatusProcess
--- Applicaiton.Status='Approved'
From,
Himanshu Jain


AwareIM Consultant (since version 4.0)
OS: Windows 10.0, Mac
DB: MYSQL, MSSQL
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: REST Service not reponse

Post by Jaymer »

normally, the service is checked (*) Service will return object: _________

So after the create, Application is in CONTEXT, and gets returned.
Same should happen with the FIND unless 0 records were found.
I'd check the Production Log to inspect the FIND

Additionally,
If you are using the same process, then you'd check if an ID was submitted:

IF REST_Inputparameter.ApplicationId > 0 THEN
FIND Application WHERE Application.ID = REST_Inputparameter.ApplicationId
ELSE
CREATE Application WITH...

In either case, some instances of Application should be in CONTEXT and would be returned.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: REST Service not reponse

Post by BobK »

The OP claims that the Application.Status is being changed to 'Approved' as expected, but the REST Service is not returning anything.

I suspect that the FIND and update is occurring in a sub-process. If that is true, Application is not in Context of the main process and the REST Service has nothing to return.

That is why I asked if the full process could be posted.
Bob
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: REST Service not reponse

Post by Jaymer »

agree
something is odd
hard to see what he doing with no pics
just supplying more info for him. no need for subprocess this way
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply