Skip to content
DataMiner DoJo

More results...

Generic selectors
Exact matches only
Search in title
Search in content
Post Type Selectors
Search in posts
Search in pages
Search in posts
Search in pages
Log in
Menu
  • Updates & Insights
  • Questions
  • Learning
    • E-learning Courses
    • Empower Replay: Limited Edition
    • Tutorials
    • Open Classroom Training
    • Certification
      • DataMiner Fundamentals
      • DataMiner Configurator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
      • Verify a certificate
    • Video Library
    • Books We Like
    • >> Go to DataMiner Docs
  • Expert Center
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Markets & Industries
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Agile
      • Agile Webspace
      • Everything Agile
        • The Agile Manifesto
        • Best Practices
        • Retro Recipes
      • Methodologies
        • The Scrum Framework
        • Kanban
        • Extreme Programming
      • Roles
        • The Product Owner
        • The Agile Coach
        • The Quality & UX Coach (QX)
    • DataMiner DevOps Professional Program
      • About the DevOps Program
      • DataMiner DevOps Support
  • Downloads
  • More
    • DataMiner Releases & Updates
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

SRM – Pop-up notification to alert users on an upcoming booking.

Solved1.87K views30th June 2022Automation script pop-up
2
MAXIMILIANO FILHO [DevOps Member]918 30th June 2022 0 Comments

Hello!

I’ve made an automation script that is triggered by a booking event to alert about an upcoming booking. But, can I display a pop-up message to specific users or user groups to alert them? The only way I’ve found to do this is using the FindInteractiveClient method, but it only allows me to display a simple message.

Thanks in advance

MAXIMILIANO FILHO [DevOps Member] Selected answer as best 30th June 2022

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
3
Ruben Vandepitte [SLC] [DevOps Advocate]2.32K Posted 30th June 2022 1 Comment

Hi, you can do so by letting the script send a ‘BroadCastPopupRequestMessage’, in which you can specify the users and/or user groups that need to be notified.

Code example below, including a countdown timer.

Note that in this script, the users/user groups are passed via input parameters. Of course you could also hard-code those.

For domain users the username should be in the format “domain\user name”, for local users the names should be in the format “user name”.

using Skyline.DataMiner.Automation;
using Skyline.DataMiner.Net;
using Skyline.DataMiner.Net.Broadcast;
using Skyline.DataMiner.Net.Messages;
using Skyline.DataMiner.Net.ResourceManager.Objects;
using Skyline.DataMiner.Library.Solutions.SRM;
using System;
using System.Collections.Generic;
using System.Linq;

public class Script
{
public Engine engine;

public ResourceManagerHelper resourceHelper;

public BroadcastPopupRequestMessage popup;

public void Run(Engine engine)
{
this.engine = engine;
popup = new BroadcastPopupRequestMessage();
resourceHelper = new ResourceManagerHelper();
resourceHelper.RequestResponseEvent += (sender, e) => e.responseMessage = engine.SendSLNetSingleResponseMessage(e.requestMessage);

string reservationGuid = engine.GetScriptParam(“ReservationGuid”).Value;
string userNames = engine.GetScriptParam(“UserNames”).Value;
string groupNames = engine.GetScriptParam(“GroupNames”).Value;

ReservationInstance reservationInstance = GetReservationInstanceFromGuid(reservationGuid);

List<string> usersToNotify = userNames.ToLower() == “all” ? null : userNames.Split(‘,’).ToList();
List<string> groupsToNotify = groupNames.ToLower() == “all” ? null : groupNames.Split(‘,’).ToList();
InitPopup(reservationInstance, usersToNotify, groupsToNotify);

LaunchPopup();
}

public ReservationInstance GetReservationInstanceFromGuid(string guidString)
{
Guid reservationGuid;
if (String.IsNullOrEmpty(guidString) || !Guid.TryParse(guidString, out reservationGuid))
{
return null;
}

return resourceHelper.GetReservationInstance(reservationGuid);
}

public void InitPopup(ReservationInstance reservationInstance, List<string> userNames, List<string> groupNames)
{
string format = “u”;

popup.PopupInfo = new PopupInfo
{
Expiration = reservationInstance.Start.ToLocalTime() + reservationInstance.GetPreRoll(),
Message = String.Format(“Booking ‘” + reservationInstance.Name + “‘ will start in [Subtract:{0},[DataMinerTime:Format={1}]]”, (reservationInstance.Start.ToLocalTime() + reservationInstance.GetPreRoll()).ToString(format), format),
Source = reservationInstance.ID,
Title = reservationInstance.Name + ” about to start”
};

if (userNames != null || !userNames.Equals(“none”)) popup.PopupInfo.UserNames = userNames;
if (groupNames != null || !groupNames.Equals(“none”)) popup.PopupInfo.GroupNames = groupNames;

engine.GenerateInformation(“Users=” + userNames[0]);
engine.GenerateInformation(“Groups=” + groupNames[0]);
}

public void LaunchPopup()
{
engine.GenerateInformation(“Generating Popup”);
engine.SendSLNetMessage(popup);
}
}

MAXIMILIANO FILHO [DevOps Member] Posted new comment 30th June 2022
MAXIMILIANO FILHO [DevOps Member] commented 30th June 2022

Hello Ruben,

Thank you so much!

Best Regards

Please login to be able to comment or post an answer.

My DevOps rank

DevOps Members get more insights on their profile page.

My user earnings

0 Dojo credits

Spend your credits in our swag shop.

0 Reputation points

Boost your reputation, climb the leaderboard.

Promo banner DataMiner DevOps Professiona Program
DataMiner Integration Studio (DIS)
Empower Katas
Privacy Policy • Terms & Conditions • Contact

© 2025 Skyline Communications. All rights reserved.

DOJO Q&A widget

Can't find what you need?

? Explore the Q&A DataMiner Docs