Unable to have 2 communication channels on 1 BO

If you think that something doesn't work in Aware IM post your message here
Post Reply
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Unable to have 2 communication channels on 1 BO

Post by BobK »

I am trying to setup a BO that exposes 2 communication channels (E-mail and REST). Unfortunately, I have been unable to get the second communication channel to work.

Questions: 1) On the "Communication Channels" setup window, is the Channel at the top of the list the default channel? 2) is there any way to make a different channel the default?

When E-mail is the top Channel and REST is below it,
"SEND OutgoingEmail TO MyRecipient" works
"REQUEST SERVICE TestRest OF MyRecipient VIA REST" does not work.
It looks like the system is trying to send an email because the following error is in the Tomcat log:
"ERROR -No body in the email. Email will not be sent."

If REST is the top Channel and E-mail is below it,
"REQUEST SERVICE TestRest OF MyRecipient VIA REST" works.
"SEND OutgoingEmail TO MyRecipient VIA Email" does not work with the following error in the Tomcat log
ERROR -Unable to send notification to recipient MyRecipient
com.bas.shared.domain.configuration.DomainException: Unknown communication channel Email is defined for business object MyRecipient is invalid

FYI: For sending the email, I also tried:
"SEND OutgoingEmail TO MyRecipient VIA E-mail"
But when trying to save the rule I got error
Syntax error at token "-"

I am using the latest build (2819).
Bob
aware_support
Posts: 7523
Joined: Sun Apr 24, 2005 12:36 am
Contact:

Re: Unable to have 2 communication channels on 1 BO

Post by aware_support »

Having e-mail and REST channels on the same object does not make much sense. An object exposing REST services should represent an external software system and is always a singleton. Email, on the other hand, is usually sent to a person.

And also you don't need to use VIA keyword in your rules. The channel is determined implicitly here as Email and REST are activated by different actions (SEND and REQUEST SERVICE)
Aware IM Support Team
BobK
Posts: 544
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Unable to have 2 communication channels on 1 BO

Post by BobK »

aware_support wrote:Having e-mail and REST channels on the same object does not make much sense.
That may be true in the normal world, but in my world it makes sense to have both e-mail and REST on this one object.

If it does not make sense in the normal world, does that mean that having 1 object with both e-mail and REST will not work in my world?
If it should still work, then there is a bug somewhere because it does not work. Whichever Channel is second in the Channel list on the Communication Channels window, that channel does not work. It does not work with or without the VIA keyword.

Since the work around (create another BO for the e-mail) is fairly simple, I will just do that.
Bob
hpl123
Posts: 2579
Joined: Fri Feb 01, 2013 1:13 pm
Location: Scandinavia

Re: Unable to have 2 communication channels on 1 BO

Post by hpl123 »

aware_support wrote:Having e-mail and REST channels on the same object does not make much sense. An object exposing REST services should represent an external software system and is always a singleton. Email, on the other hand, is usually sent to a person.

And also you don't need to use VIA keyword in your rules. The channel is determined implicitly here as Email and REST are activated by different actions (SEND and REQUEST SERVICE)
Just FYI, there are some issues with this and is the same problem if you have email and a custom channel e.g for SMS. Aware confuses the channels and the VIA keyword do not work and same thing if you try to use explicit actions (i.e doesn't work). I have worked around it using multiple BO's as well.

I have previously suggested an overhaul of the channel solution to something like a communication object or something like that + also some view where we can see all channels, where they are used etc. as today if you have many many objects like I typically do, it' s next to impossible keeping track of all communication channels, updating things related to a channel etc.. Thought I'd mention it here if you intend to change things in this area in the future.
Henrik (V8 Developer Ed. - Windows)
Jaymer
Posts: 2430
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Unable to have 2 communication channels on 1 BO

Post by Jaymer »

Weird. I have never used VIA FYI
I don’t fully understand the multiple channel issue.

But I have this Q.
How do I send an email to a random address (ie. Not someone who is an Intelligent BO)?
… like a guest user who comes in via logonGuest.aw, and has no data saved anywhere.
Fills out a form for info. And gives his email address.

I can’t use SEND notif TO <intelligentBO> cause there is no record for the user.
A notification MUST have to TO part. So SEND is out.

Don’t need a record of it, per se, so wasn’t thinking about going the
“CREATE EmailBO WITH xxx,yyy,zzz etc” route.

I want to use a document so it’s a nice HTML email.
Also, I need to use “USING outgoingEmailAccount
I’m missing (and forgetting) something simple.
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