ELMAH noYsod attribute when emailing? - elmah

I am new to ELMAH and am configuring it to send email. I cannot find any documentation on what the noYsod attribute means. I have omitted it and am getting email sent successfully, but I'd just like to know what this mystery attribute does.
Extra points...unclear on the priority attribute as well. Prioritizes sending from ELMAH, or tags the sent email with a priority?
<errorMail
from="elmah#example.com"
to="admin#example.com"
subject="..."
priority="Low|Normal|High"
async="true|false"
smtpPort="25"
smtpServer="smtp.example.com"
useSsl="true|false"
userName="johndoe"
password="secret"
noYsod="true|false" />

For those who don't want to browse through source code:
noYsod: Indicates whether YSOD is attached to the e-mail or not. If true, the YSOD is not attached. Default is false.
priority: Sets the MailPriority of the email message. Default is Normal.

Related

AWS SNS filtered subscription with exists = false for messages without attributes set

I am setting up subscriptions to a topic that a number of different apps publish to. I want to filter the subscription of one particular app so that it doesn't receive back messages that it sends.
I tried adding an attribute with a value identifying the app, eg x-forwarded-by=myapp and set the filter policy as:
{
"x-forwarded-by": [{"anything-but": ["myapp"]}]
}
That correctly prevented the app receiving these however it also didn't receive any messages where there was no x-forwarded-by attribute, nor did it receive any messages whether there were either no attributes or there was an empty attribute object, eg, I would have expected to see messages with:
"MessageAttributes": null
"MessageAttributes": {}
"MessageAttributes": {"someOtherAttribute":{"DataType":"string", "StringValue": "SomeValue"}}
I also tried using an exists filter so that if the app set that attribute, it could filter it out later, eg:
{
"x-forwarded-by-my-app": [{"exists":false}]
}
This only worked if there was at least one other attribute set, and this would require me updating every app that publishes to include a dummy attribute.
I tried combining them, as in:
{
"x-forwarded-by": [
{"exists":false},
{"anything-but":["myapp"]}
}
And this worked slightly better as it handled the case of the x-forwarded-by header either not being present or having a different value. It doesn't however handle the case of no attributes being set.
Is there a way to achieve this with a filtered subscription or do I have to just have the app receive these notifications and have the app check for and ignore them?
It seems there is some issue with "anything-but", I tried this with { {"exists":false},"anything-but":["myapp", ""]} and it works.
In my case I went ahead with: {{"exists":false},"positiveCase"}.

AWS IoT: When to use thing attribute over Shadow

I saw that there was an question already, but I receive a page not found error when accessing it: https://stackoverflow.com/questions/57284026/aws-iot-thing-attrubite-vs-shadow-property?S_TACT=
So I've got the same question.
I've got some fields which could definitely be an attribute as they're not changing: DeviceId, SerialNumber and some others.
But I also want to store/update :
rather seldomly updated fields: e.g. the status from (Created -> Registered -> Unregistered)
frequently updated fields: e.g. lastSeen timestamp when the last message was sent
Should I now use Device Shadow for everything, Thing Attributes for everything or mix it?

c++ quickfix failure to send

I'm having an unexpected issue with a c++ quickfix client application using FIX 4.4. I form marketdatarequest and populate it and then call send which returns true. The message is not found in the message or event log files.
No error seems to be reported - what could be happening?
FIX44::MarketDataRequest request(FIX::MDReqID(tmp)
, FIX::SubscriptionRequestType('1')
, FIX::MarketDepth(depth)); // 0 is full depth
FIX::SubscriptionRequestType subType(FIX::SubscriptionRequestType_SNAPSHOT);
FIX44::MarketDataRequest::NoRelatedSym symbolGroup;
symbolGroup.set(FIX::Symbol(I.subID));
request.addGroup(symbolGroup);
FIX::Header &header = request.getHeader();
header.setField(FIX::SenderCompID(sessionSenderID));
header.setField(FIX::TargetCompID(sessionTargetID));
if (FIX::Session::sendToTarget(request) == false)
return false;
My FixConfig looks like:
[DEFAULT]
HeartBtInt=30
ResetOnLogout=Y
ResetOnLogon=Y
ResetOnDisconnect=Y
ConnectionType=initiator
UseDataDictionary=Y
FileLogPath=logs
[SESSION]
FileLogPath=logs
BeginString=FIX.4.4
DataDictionary=XXXXX
ConnectionType=initiator
ReconnectInterval=60
TargetCompID=tCompID
SenderCompID=sCompID
SocketConnectPort=123456
SocketConnectHost=XX.XX.XXX.XX
SocketConnectProtocol=TCP
StartTime=01:05:00
EndTime=23:05:30
FileLogPath=logs
FileStorePath=logs
SocketUseSSL=N
thanks for any help,
Mark
Mark, just couple of notes not really related to your question but which you may found useful:
you dont have to explicitly set TargetCompId/SenderCompId for each message, engine will do it for you.
Do not place logic into callbacks(like you did with market data subscription in onLogon). Better create additional thread which will consume events from you listener, make decisions and take an action.

OTRS Webservice as Requestor Test

I'm new to OTRS (3.2) and also new to PERL but I have been given the task of setting up OTRS so that it will make a call to our remote webservice so a record can be created on our end when a ticket is set as "Closed".
I set up various dynamic fields so the customer service rep can fill in additional data that will be passed into the webservice call along with ticket details.
I couldn't get the webservice call to trigger when the ticket was "Closed" but I did get it to trigger when the "priority" was changed so I'm just using that now to test the webservice.
I'm just using the Test.pm and TestSimple.pm files that were included with OTRS.
When I look at the Debugger for the Webserice, I can see that the calls were being made:
$VAR1 = {
'TicketID' => '6'
};
My webservice currently just has one method "create" which just returns true for testing.
however I get the following from the Test.pm
"Got no TicketNumber (2014-09-02 09:20:42, error)"
and the following from the TestSimple.pm
"Error in SOAP call: 404 Not Found at /TARGET/SHARE/var/otrs/Kernel/GenericInterface/Transport/HTTP/SOAP.pm line 578 (2014-09-02 09:20:43, error)
I've spent countless hours on Google but couldn't find anything on this. All I could find is code for the Test.pm and TestSimple.pm but nothing really helpful to help me create a custom invoker for my needs and configure the webservice in OTRS to get it to work.
Does anyone have any sample invokers that I can look at to see how to set it up?
Basically I need to pass the ticket information along with my custom dynamic fields to my webservice. From there I can create the record on my end and do whatever processing.
I'm not sure how to setup the Invoker to pass the necessary ticket fields and dynamic fields and how to make it call a specific method in my remote webservice.
I guess getting the Test.pm and TestSimple.pm to work is the first step then I can modify those for my needs. I have not used PERL at all so any help is greatly appreciated.
I'm also struggling with similar set of requirements too. I've also never programmed in PERL, but I can tell you at least that the "Got no TicketNumber" in the Test.pm is right from the PrepareRequest method, there you can see this block of code:
# we need a TicketNumber
if ( !IsStringWithData( $Param{Data}->{TicketNumber} ) ) {
return $Self->{DebuggerObject}->Error( Summary => 'Got no TicketNumber' );
}
You should change all references to TicketNumber to TicketID, or remove the validation whatsoever (also there is mapping to ReturnedData variable).
Invoking specific methods on your WS interface is quite simple (but poorly documented). The Invoker name that you specify in the "OTRS as requester" section of web service configuration corresponds to the WS method that will be called. So if you have WS interface with a method called "create" just name the Invoker "create" too.
As far as the gathering of dynamic field goes, can't help you on that one yet, sorry.
Cheers

Error with Flex HTTPService and Django, even though POST is successful

(This is the first time I've done this actually.)
<mx:HTTPService id="post_update" method="POST" result="{Dumper.info('bye')}"/>
The result handler above is just for debugging purposes, but its never hit, even though what I'm uploading via POST...
post_update.url = getPath(parentDocument.url)+"update";
post_update.send(new_sel);
...is received and handled successfully by my Django view:
def wc_post(request) :
request.session['wc'] = request.POST
return http.HttpResponse("<ok/>", mimetype="text/xml")
As far as what I'm sending back from Django, I'm following the guidelines here:
Sending Images From Flex to a Server
I just don't want it to generate an error on the Flex side considering Django is actually receiving and processing the data. Any help appreciated. Can't remember the text of the error in Flex at the moment.
UPDATE: new_sel (what I'm posting from Flex) is just a Flex Object, with various text fields.
UPDATE: various error messages from event.message (in fault handler):
faultCode = "Server.Error.Request"
faultString = "HTTP request error"; DSStatusCode = 500; errorID = 2032; type = "ioError"
This is more grasping at straws than answers, but do I have to send a particular type of header back from Django- the default sent by Django includes a 200 success status code, and the response I was sending of "<ok/>" with mime type of "text/xml" was following the example exactly that I provided from that other source.
And also the url I'm sending the POST to is localhost:8000/wr_view1/wr_webcube/update, and I previously successfully did a GET to localhost:8000/wr_view1/wr_webcube/webcube.xml, and despite the .xml extension in the case of GET, it was still being handled by Django (and without errors in Flex). In the case of this POST, once again, the data is actually succesfully sent and handled by Django, but Flex is returning Error 2032, which I found out can mean numerous different things including cross domain issues, but don't see how that's the case here.
Just had to return HttpResponse("ok") Didn't like it being sent as xml for some reason. So much ado about nothing I guess.