Samrt Notification for Parent & Child

Sort:
You are not authorized to post a reply.
Author
Messages
Ruma Malhotra
Veteran Member
Posts: 412
Veteran Member
    I am creating a smart notification which works like a parent-child but both parent and child are derived from 2 different infosets instead of the same.

    The parent notification is delivered and the child is not delivered as the case would be.

    I am trying to schedule both the parent and child infosets to update and wondering whether they should be scheduled at the same time or whether the child before the parent.

    The logic for this is if the parent and child infosets update on the same time the parent notification is kicked off and if the child infoset is still updating then clicking on the parent may give inaccurate information.

    Has anybody come across this ? what is best practice to avoid a situation like this ?

    tia.
    Matthew Nye
    Veteran Member
    Posts: 514
    Veteran Member
      Ruma,

      SmartNotes is a single threaded application so there is really no way to update two infosets (or display two notication) at the same time. However this shouldn't be an issue since you are linking two disparate data sets. Your issue could be mitigated by scheduking the update at off hours or making the infoset non-cached as long as the sql is highly perforkmanced tuned. If this really is a go-no-go decision you could combine the two statements using UNION and a derived field but I think its a bit overkill for this somewhat minor issue.

      Hth
      Matt
      If any of my answers were helpful an endorsement on LinkedIn would be much appriciated! www.linkedin.com/pub/matthew-nye/1a/886/760/
      Ruma Malhotra
      Veteran Member
      Posts: 412
      Veteran Member
        Hi Matt,

        Thanks for replying since it helps understand more clearly, but I am not delivering the child notification. What I am doing is I am delivering the parent notification and when I click on one of the fields of the parent notification it displays the child notification.

        The reason I had to go this way is because the parent infoset displays the header and the child displays the detail lines for the header which belongs to the child infoset different from the parent infoset.

        Since both parent and child infosets are 2 different infosets, if I schedule the parent infoset to update the parent notification is kicked off and if the child infoset is still updating clicking on the parent notification may give inaccurate info. My question is should I schedule both infosets to update at the same time or schedule the child before the parent infoset to update ?

        I hope I am explaining this more clearly and the above is not too confusing. Let me know otherwise.

        Thanks for your help,
        Ruma.
        Matthew Nye
        Veteran Member
        Posts: 514
        Veteran Member
          It doesnt matter how the notification is retrieved, whether via a dashboard or sent to email, SmartNotes is single threaded. There is no way physically to update two infosets at the same time. Even if you could there would still be a marginal (albeit, in milliseconds perhaps) difference between the two infosets updating because of the SQL execution time.

          What youve explained doesnt change the options I see:
          1. Set the two infosets to be cached and understand the implications this will have on your database and the delay it will have to your end users
          2. Using SQL UNION and some placeholder fields, create a single infoset for both notifications

          Other than that, theres really no great argument for doing the parent first or the child first. One or the other is always going to be out of synch when the other is being updated.

          If any of my answers were helpful an endorsement on LinkedIn would be much appriciated! www.linkedin.com/pub/matthew-nye/1a/886/760/
          Ruma Malhotra
          Veteran Member
          Posts: 412
          Veteran Member
            Thanks Matt for your reply. I was able to creat a union with placeholders for fields that existed in the union query and hid some fields in the parent notification and some in the child notification.
            This helped me in removing the parent and child refresh time issue.

            Thanks again for your help.
            You are not authorized to post a reply.