Leave feedback
  • Question

    Status Messenger

Enter a new topic
  • Roberto Avalos Roberto Avalos StreamServe Employee
    0 likes 1981 views

    Hi,

    I am using EP1 version and i am setting up status messenger to obtain a report on Job and Process, Successes and Failures.

    My client wants me to create different files, one for successes and one for failures. I tried to read the Status of each message using &Status and $STATUS but they are blank(so that i can create two different outputs based on status). I wonder if this is possible or if i should just create two status messenger connectors, one with successes and another one with failures.

    Also, does any one know what LogID field should report? I get the value NONE in success events. I wonder if this field will report an error on failures.

    Thanks,

    Roberto

    Tuesday 20 December, 2011
  • Best Answer
    Shashi Prakash Shashi Prakash
    1 likes

    I have used single status messenger connector by reading Status field in Message before script to decide if the notification is for failure or success and thus was able to split the notification.

    //Checking for any failure notification $failureFlag="false"; $totalCountBlk=MsgCountId("Notification"); for ($counter=0; num($counter) < num($totalCountBlk); $counter++) { $fieldValue=MsgGetValue("Notification:" + $counter +"/Status"); log(4,"Status = "+$fieldValue); if($fieldValue = "fail") $failureFlag="true"; }

    Tuesday 03 January, 2012
  • Magnus &#214;stling Magnus Östling
    0 likes

    Hi Roberto,

    I would recommend to create two separate Status Messenger input connectors to split successful or failed notifications into different files, but you should think twice if this really is desireable. Depending on how your project is configured (retries on queues, when to report job status etc.) you can have some failures for a specific job even if the end result is successful.

    LogID is the four digit number you see preceeding each log line. Not all notifications are connected to a log message and such notifications will have this field empty.

    //Magnus

     

    Monday 02 January, 2012
  • Shashi Prakash Shashi Prakash
    1 likes

    I have used single status messenger connector by reading Status field in Message before script to decide if the notification is for failure or success and thus was able to split the notification.

    //Checking for any failure notification $failureFlag="false"; $totalCountBlk=MsgCountId("Notification"); for ($counter=0; num($counter) < num($totalCountBlk); $counter++) { $fieldValue=MsgGetValue("Notification:" + $counter +"/Status"); log(4,"Status = "+$fieldValue); if($fieldValue = "fail") $failureFlag="true"; }

    Tuesday 03 January, 2012
  • Roberto Avalos Roberto Avalos StreamServe Employee
    0 likes

    Thank you Shashi. that is exactly what i was looking for.

    Thursday 12 January, 2012

 

Latest from the blogs

Read more