...
Re: Let me politely offer a dissenting view
...
Last edited by BenHayat on Sat Jan 19, 2019 10:46 am, edited 1 time in total.
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: Has anyone tried Google's "Flutter"?
Code: Select all
Support claims that it already does, but I can't find any docs to show how to go about it and program it accordingly.
Aware IM Support Team
Re: Has anyone tried Google's "Flutter"?
...
Last edited by BenHayat on Sat Jan 19, 2019 10:46 am, edited 1 time in total.
Re: Has anyone tried Google's "Flutter"?
W.R.T. Documentation
Well, there is a tony section in the User Guide that says exactly whats in the video.
Either of those will help you get the format for a REST URL to publish some of your own Aware data.
This is VERY easy.
BUT, there's not one hint of how to use a parameter.
Sure, I can put it on my URL
.../REST/mytestbsv/offices?lic=00818176
but there's no mention or idea anywhere how to use that passed in parm to lookup JUST that office specified ("00818176")
Without a parm, my REST service would use the process "All_Offices" to respond to this:
.../REST/mytestbsv/offices ..... (this works fine)
That process has 1 rule: FIND ALL Office
How am I supposed to modify this FIND to incorporate the requested parm?
I guess once I have this info, I might be able to do a POST? and update data?
or is that not supported?
Well, there is a tony section in the User Guide that says exactly whats in the video.
Either of those will help you get the format for a REST URL to publish some of your own Aware data.
This is VERY easy.
BUT, there's not one hint of how to use a parameter.
Sure, I can put it on my URL
.../REST/mytestbsv/offices?lic=00818176
but there's no mention or idea anywhere how to use that passed in parm to lookup JUST that office specified ("00818176")
Without a parm, my REST service would use the process "All_Offices" to respond to this:
.../REST/mytestbsv/offices ..... (this works fine)
That process has 1 rule: FIND ALL Office
How am I supposed to modify this FIND to incorporate the requested parm?
I guess once I have this info, I might be able to do a POST? and update data?
or is that not supported?
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Has anyone tried Google's "Flutter"?
...
Last edited by BenHayat on Sat Jan 19, 2019 10:46 am, edited 1 time in total.
Re: Has anyone tried Google's "Flutter"?
yes, i realize that.
i'm using Postman.
Aware seems oblivious to any parm data coming in, AND
does not seem to do anything different if I do a GET or POST.
How am I supposed to get to that "request body" info?
I don't see any indicators in either Server or Tomcat window, or in Logging.
AND, I notice that it just sends back all attributes for my BO.
This is where you, in a post a while back, said you need to make another View (or something) of the BO and only have the attributes in the BO that you want to make available to the Service.
How am I supposed to do that here - I need to go to SQL Server and make a View? What if I don't want to involve a DBA to make changes to the database? Is there no way inside Aware to limit the columns that are exposed?
i'm using Postman.
Aware seems oblivious to any parm data coming in, AND
does not seem to do anything different if I do a GET or POST.
How am I supposed to get to that "request body" info?
I don't see any indicators in either Server or Tomcat window, or in Logging.
AND, I notice that it just sends back all attributes for my BO.
This is where you, in a post a while back, said you need to make another View (or something) of the BO and only have the attributes in the BO that you want to make available to the Service.
How am I supposed to do that here - I need to go to SQL Server and make a View? What if I don't want to involve a DBA to make changes to the database? Is there no way inside Aware to limit the columns that are exposed?
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Has anyone tried Google's "Flutter"?
...
Last edited by BenHayat on Sat Jan 19, 2019 10:47 am, edited 1 time in total.
-
- Posts: 7525
- Joined: Sun Apr 24, 2005 12:36 am
- Contact:
Re: Has anyone tried Google's "Flutter"?
Code: Select all
BUT, there's not one hint of how to use a parameter.
"The default URL where Aware IM will listen to REST-ful requests has the following format:
http://ServerName:ServerPort/AwareIM/REST/BusinessSpace/ServiceName?parameters"
I guess, the document should be clearer on this, but it is quite obvious. Parameters are specified as paramName1=paramValue1¶mName2=paramValue2&...
Where paramName1, paramName2 etc are names of the attributes of a business object that is specified as input to the process implementing the service.
For POST requests these parameters must be in the body of the request.
Aware IM Support Team
Re: Has anyone tried Google's "Flutter"?
It's just like the other incoming services. Add a reference to a BO and then that BO is created when the REST request is received. For example, I have a service that sends out an approval request email with email body containing the REST URL (like url../task_response?taskId=######&taskResponse=####) to approve the task. AwareIM receives that REST request, parses the URL parameters, finds the correct task from the taskID and then approves/rejects based on the other parameters.Jaymer wrote:W.R.T. Documentation
BUT, there's not one hint of how to use a parameter.
Sure, I can put it on my URL
.../REST/mytestbsv/offices?lic=00818176
The actual ID is a random UUID that is generated when the task IS NEW, prior to sending out the approval notice.
Re: Has anyone tried Google's "Flutter"?
This doesn't need to "be obvious"... becauseaware_support wrote: I guess, the document should be clearer on this, but it is quite obvious. Parameters are specified as paramName1=paramValue1¶mName2=paramValue2&...
its clearly defined in BOTH the video and manual.
But thats not what I asked... "How to specify a parm", I wrote:
Let me try again.Sure, I can put it on my URL
.../REST/mytestbsv/offices?lic=00818176
but there's no mention or idea anywhere how to use that passed in parm to lookup JUST that office specified ("00818176")
Here is my REST URL #1:
https://myurl.com/AA/REST/s1/offices
The "offices" service is tied to a process "all_offices" which is "FIND ALL OFFICE"
So, when I run it, I get a reply page back with a bunch of offices listed, showing all the attributes from OFFICE.
THIS IS EASY.
My 1st Question Mark in my post was:
How am I supposed to modify this FIND to incorporate the requested parm?
I do not understand HOW A URL PARAMETER gets "into" aware and how its referenced in aware.
Using THIS URL:
https://myurl.com/AA/REST/mytestbsv/off ... c=00818176
-> I'm still using the "offices" service
-> The service still has the same process defined to implement the service.
-> The process uses FIND ALL OFFICE, so how is that supposed to use the passed in parm "00818176"?
This is in NO WAY obvious, or documented, or shown in any example, printed or video.
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
Jaymer
Aware Programming & Consulting - Tampa FL
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Has anyone tried Google's "Flutter"?
That seems like a completely different service.Jaymer wrote:Using THIS URL:
https://myurl.com/AA/REST/mytestbsv/off ... c=00818176
-> I'm still using the "offices" service
-> The service still has the same process defined to implement the service.
-> The process uses FIND ALL OFFICE, so how is that supposed to use the passed in parm "00818176"?
This is in NO WAY obvious, or documented, or shown in any example, printed or video.
If you consider a query within AIM (ignoring the rest side) if you want to find OFFICE=xyz then that query is different from FIND ALL OFFICE.
Re: Has anyone tried Google's "Flutter"?
YES, DTO is what I remember.BenHayat wrote: I think I said "ViewModel or DTO", NOT an SQL View.
A DTO or ViewModel is a temporary BO Model you create in order to get data from client or send data. This is critical, because during POST (from client), you want to examine all the data BEFORE you put it into BO and during a GET call by client, you ONLY want to send a subset or even a flatted (two BOs combined as a new temp model) to Client.
After reading that, I created a physical SQL table (maybe a view, but I don't think so).
But w.r.t. THIS discussion, and only a GET, how are you supposed to do this in Aware?
Create a NP BO (based on incoming parms), and write data into it, before it gets sent out? (seems like extra work)
Without a way to specify attributes to return to the REST caller, this seems like a major shortcoming.
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Has anyone tried Google's "Flutter"?
1) OK, you'd have to assume by now I know nothing of "other incoming services".craigd wrote: It's just like the other incoming services. Add a reference to a BO and then that BO is created when the REST request is received. For example, I have a service that sends out an approval request email with email body containing the REST URL (like url../task_response?taskId=######&taskResponse=####) to approve the task. AwareIM receives that REST request, parses the URL parameters, finds the correct task from the taskID and then approves/rejects based on the other parameters.
The actual ID is a random UUID that is generated when the task IS NEW, prior to sending out the approval notice.
Where is this documented?
2) I've sent plenty of links via emails, but not to just send a yes/no response back into Aware. Usually to log in and see or enter data. This is a great idea you have, because one of the things brought up in another thread was the overhead created by the logging in, and that context hanging around (and using resources) until it timed out.
3) HOWEVER, your use, great as it is, still didn't answer for me how your process "parses the URL parameters", which is my main issue right now.
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
Jaymer
Aware Programming & Consulting - Tampa FL
Re: Has anyone tried Google's "Flutter"?
my use case is: I want to accept task responses via REST (from links in an email but that's not relevant for the example)
1. I create a BO (called REST_TaskUpdate) with two attributes: UUID (plain text), and Response (plain text choices)
2. I create a REST service - documented somewhere in docs 8.2 or video with default URL and no special JSON mappings
3. I create a process to handle in the incoming REST 'GET' request. I add an input for REST_TaskUpdate with the first rule below
Then next rule
1. I create a BO (called REST_TaskUpdate) with two attributes: UUID (plain text), and Response (plain text choices)
2. I create a REST service - documented somewhere in docs 8.2 or video with default URL and no special JSON mappings
3. I create a process to handle in the incoming REST 'GET' request. I add an input for REST_TaskUpdate with the first rule below
Code: Select all
If REST_TaskUpdate.Response IN 'Approved', 'Rejected' AND EXISTS Task WHERE (Task.UUID=REST_TaskUpdate.UUID) Then
FIND Task WHERE Task.UUID=REST_TaskUpdate.UUID
Code: Select all
If Task.State='Pending' Then
Task.State=REST_TaskUpdate.Response
Task.ApprovedBy='Email Link'
Task.ResponseSource='REST'
Task.CompletedDate=CURRENT_TIMESTAMP
Re: Has anyone tried Google's "Flutter"?
Its certainly a different Query statement, but not necc. a different SERVICE.PointsWell wrote: If you consider a query within AIM (ignoring the rest side) if you want to find OFFICE=xyz then that query is different from FIND ALL OFFICE.
The Service Name is in the REST URL: Per the MailChimp API, here are two calls:
#1: GET /lists Get information about all lists
curl --request GET \
--url 'https://usX.api.mailchimp.com/3.0/[b]lists[/b]' \
--user 'anystring:apikey' \
--include
#2: GET /lists/{list_id} Get information about a specific list
curl --request GET \
--url 'https://usX.api.mailchimp.com/3.0/[b]lists/57afe96172[/b]' \
--user 'anystring:apikey' \
--include
To me, this is identical to what I've presented in my question.
Here, the service is "lists", only 1 has a parm and the other doesn't.
I would have an Aware process implementing the "lists" service,
and it would check for 0 or 1 Parm and adjust the FIND statement appropriately.
IF {parm1_name} = "lic" AND {parm1_value} IS DEFINED THEN
FIND OFFICE WHERE Office.LicNum = parm1.value
ELSE
FIND ALL OFFICE
Why would I want to have TWO services?
... and duplicate logic in 2 processes - 1 place when its ALL Office and the other when its only 1.
Must I have a 3rd service when I want all Offices in a State and a 4th for City.
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
Jaymer
Aware Programming & Consulting - Tampa FL