how to access notification objects(not BO) via custom api

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

how to access notification objects(not BO) via custom api

Post by swiftinitpvtltd »

Support I have Outboundemail notification objects(not Outgoingemail BO mentioned in CRM) and I want to access it via API how do I do that? I see Inotification interface mentioned in programming reference but there is no sample to access it. Also in a process you can not pass Notification objects(only BO's you can pass)
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: how to access notification objects(not BO) via custom ap

Post by aware_support »

Notifications are put in the Context just like business objects. Both business objects and notifications implement the same interface IObject
Aware IM Support Team
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: how to access notification objects(not BO) via custom ap

Post by swiftinitpvtltd »

Thank you! The only issue is then I can not send notification objects to custom wrote plugins. Only BO's are allowed to be passed as parameters. if its not possible to send notification object then I will need to know how to refer to Notification IObject by just referring to text for example IObject outboundemail=(IObject)"MyOutboundEmail"; This throws error saying can not convert string to object.
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: how to access notification objects(not BO) via custom ap

Post by swiftinitpvtltd »

Please let me know on ow to send notification objects to custom wrote plugins. Right now you can not send it and then plugin can not access any object by reference. If you provide any sample in document to access IObject without sending it as Param(as its not available right now) that will be great.
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: how to access notification objects(not BO) via custom ap

Post by BobK »

The following is from the "Programmers Reference" (the BOLD is mine):
3.1.9 INotification interface

The INotification interface extends the IObject interface and therefore shares most methods with the IEntity interface. Some specific methods are described below (these methods are not relevant to process extensions, however, they may be helpful when writing custom channels – see section 4.1)
I assume you are using a Custom Process. You may need to write a Custom Channel.

Unfortunately, I can not be much help on Custom Channels, I am struggling with writing my own first Custom Channel.

Has anyone out there successfully created their own Custom Channel?
Bob
swiftinitpvtltd
Posts: 370
Joined: Sat Apr 28, 2018 3:33 am
Location: India
Contact:

Re: how to access notification objects(not BO) via custom ap

Post by swiftinitpvtltd »

Thanks Bob! Now after reading it carefully I think I can find those objects by weekend-treasure hunt.
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: how to access notification objects(not BO) via custom ap

Post by Jaymer »

BobK wrote: Unfortunately, I can not be much help on Custom Channels, I am struggling with writing my own first Custom Channel.
?
Bob, what are you doing in aware where this is needed? Or helpful?
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: how to access notification objects(not BO) via custom ap

Post by BobK »

Jaymer,

From the User Guide, I see that AwareIM can consume a third party RESTful web service and send JSON in the body of the request. That is great and I will need to do that, but have not gotten that far yet.

Unfortunately, when AwareIM exposes a RESTful web service for some third party to consume, the input parameters must be included in the URL and can not be in the body of the request. I need to be able to receive JSON in the body of the request.

If someone could tell me that I am wrong and AwareIM can receive JSON in the body, I would be red faced but extremely happy.

That is the reason for the Custom Channel, to be able to access the JSON in the body of the incoming request.

My belief of how this type of channel works is that my custom channel would receive the request, access the JSON in the body, create DataObjects and pass those to AwareIM. AwareIM understands DataObjects and would happily process them.

I am currently investigating how to implement the above.
Bob
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: how to access notification objects(not BO) via custom ap

Post by Jaymer »

BobK wrote: Unfortunately, when AwareIM exposes a RESTful web service for some third party to consume, the input parameters must be included in the URL and can not be in the body of the request. I need to be able to receive JSON in the body of the request.
For sake of discussion, is this an accurate restatement:
--> An AwareIM RESTful web service can only receive data with a GET Action, and not a POST action.
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: how to access notification objects(not BO) via custom ap

Post by BobK »

Jaymer wrote:
BobK wrote: Unfortunately, when AwareIM exposes a RESTful web service for some third party to consume, the input parameters must be included in the URL and can not be in the body of the request. I need to be able to receive JSON in the body of the request.
For sake of discussion, is this an accurate restatement:
--> An AwareIM RESTful web service can only receive data with a GET Action, and not a POST action.

The following is from the User Guide and why I made my statement above:
If your REST-ful service is implemented by a process that takes some object as input
(should only be one object) then values of attributes of this object have to be provided as
parameters in the URL
When describing how to expose a RESTful web service, the User Guide does not mention any HTTP Verb, so I assume only a GET Action will work.

EDIT: My assumptions made in the post are incorrect. See https://www.awareim.com/forum/viewtopic ... 488#p51488
Last edited by BobK on Fri Aug 30, 2019 3:40 pm, edited 1 time in total.
Bob
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: how to access notification objects(not BO) via custom ap

Post by Jaymer »

well, you could do a Node.js middleware to parse & repackage it.
Its a pain in any event cause you can't do it in Testing mode, so you have to constantly publish.
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