I have a handler in my application for processing inbound emails. Is there some way to unit test that functionality? I don't see anything in the documentation.
If your question is about testing handlers in general on GAE you can use the WebTest framework to accomplish this. If your question is about testing the Mail service specifically you can use the Mail service stub provided by TestBed.
Related
I am trying to trigger an apex class on every inbound text message received for messaging session in omni channel tab. But I am not able to find any object that can be used to attach a trigger on it. Have searched online as well, but in most of the guides they use third party services like twilio, Mercury etc. Can someone help me to implement this without any third-party service?
You should try agent work or pending service routing objects I think
I have multiple apps which I would like to speak with each other. Every time I deploy to one, the new version has different IPs. How can I give them proper access to each other via firewall rules?
Check this documentation explaining how to let different services communicate with each other. Basically, since the deployed services run on its own domain, the idea is to issue HTTP requests to a handler in the other service. The service domains have this format:
http://[VERSION_ID].[SERVICE_ID].[MY_PROJECT_ID].appspot.com
Or:
https://[VERSION_ID]-dot-[SERVICE_ID]-dot-[MY_PROJECT_ID].appspot.com
For example, if I want to communicate to my service "website", to the handler "welcome", which is located in "my-project" I would send a request to:
http://website.my-project.appspot.com/welcome
To do so, you can use the request package in Node.js, for example.
Is there any way to integrate Rule Engine (or Rule Engine concept to apply Business Rules) with AngularJS application?
I have heard about Drools. Is there any API provided by Drools which can be used in Angular Project?
My requirement is any input given by the user should first go to match the applicable rules, then it should pass to the angular-controller. Is this possible?
Thanks in advance.!
You just need to write a REST (or other HTTP-based) service to wrap your Drools rules. That way a client-side JavaScript framework such as Angular JS can call your REST operations.
The following is an example of an Angular JS client-side application integrating with Drools on the server: https://github.com/gratiartis/qzr
Although I should warn you that it's a work in progress, so please don't complain about lack of features or documentation. :)
you can also try IBM ODM (Operational Decision Manager), available on-premise or in IBM Cloud Bluemix.
http://bluemixtips.blogspot.co.uk/2014/05/rules-on-bluemix.html
http://www.ibm.com/developerworks/cloud/library/cl-hotel-rules-app/index.html (NodeJS sample)
Cheers
--Yves
#ylecleach
For drools, there are two possibilities:
First solution, as mentioned by Steve, is to write your own REST service to wrap drools engine.
The other solution is to use Drools Camel Server, which provides REST interface out of the box.
In contrary to other drools' document, the document of Camel server is a bit too short.
You can use JavaScript client to talk to a decision-as-a-service platform. Which the business rule/decision server hosts all your related business rules and make them available as a REST API interface. Then you can execute, manage and monitor those business rules via REST API interface.
I have a wpf application which is running on diffrunt clients pc which get data from a wcf web service.
Now when update some data from web service I need to notify that to perticar client.
So I need to push data from web service to client
How can I do this?
Thanks in Advance.
You have to Use Duplex service in WCF
Sample Here
As mentioned by those above, a duplex service in WCF would work for you. There are alternatives though that achieve a similar function, but may not fulfill your needs.
SignalR
WebSockets
and server polling (you can google this for many various articles explaining it).
You can implement the Observer design pattern.
For my surprise, Wikipedia gives a very good definition on the first paragraph about this pattern.
http://en.wikipedia.org/wiki/Observer_pattern
Hope this works for you.
Google App Engine currently limits you to 2,000 emails per day (for free) via their API.
I am trying to find a definitive answer if it is possible to use a third-party system if you need to send more. I know that they disallow raw sockets, so I would assume that there might be trouble with this approach... but surely I'm not the first to see it.
Worst case, I can build a simple offsite web service that my GAE can call... but I'd much rather just be able to send directly through an SMTP server.
Thanks!
Nope.
You're correct: you cannot make raw socket requests, nor any other direct outbound requests except through the urlfetch API. To talk to an external SMTP server, you would need to use a webservice as a proxy.
We use the Postmark mail outsourcing service via the hutools.postmark API. Since the communication is HTTP based, it works like a charm on Google AppEngine. This might be an option for you, although it is also a for-pay service. We use it to get arround GAEs sender restrictions.
I've successfully used third party providers for email services with Google App Engine. I've used both SendGrid and MailGun using their HTTP-API.