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 – Can I go back from a confirmed reservation to a pending one?

Solved842 views18th December 2023SRM
0
Jens Vandewalle [SLC] [DevOps Enabler]9.44K 15th December 2023 0 Comments

Hi Dojo,

When confirming a job I need to confirm all reservations belonging to that job. In case one of the reservations can’t be confirmed, I need to go back to the previous state.

I’m using the SRM framework to confirm my reservations, but I don’t see a method to go back to pending state. Will below approach work where I clone my original reservation, confirm the reservation by using the framework and revert back using the ResourceManagerHelper? Or are some specific SRM related properties not covered by this?

var reverseActions = false;
StringBuilder sb = null;
var originalReservations = new List<ReservationInstance>();

var jobReservations = GetJobReservations();
try
{
foreach (var reservation in jobReservations)
{
var originalReservation = reservation.Clone() as ReservationInstance;

var bookingManager = reservation.FindBookingManager();
bookingManager.ChangeStateToConfirmed((Engine)engine, reservation);

originalReservations.Add(originalReservation);
}
}
catch (Exception ex)
{
reverseActions = true;

sb = new StringBuilder();
sb.AppendLine(“Failed to confirm all reservations.”);
sb.AppendLine(ex.ToString());
}

if (reverseActions && originalReservations.Count > 0)
{
SrmHelpers.ResourceManagerHelper.AddOrUpdateReservationInstances(originalReservations.ToArray());
}

Jens Vandewalle [SLC] [DevOps Enabler] Selected answer as best 18th December 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Jorge Dias [SLC] [DevOps Enabler]4.78K Posted 18th December 2023 0 Comments

Hi Jens,

Your code snippet should work without problems.

Jens Vandewalle [SLC] [DevOps Enabler] Selected answer as best 18th December 2023
3
André Rodrigues [SLC] [DevOps Member]709 Posted 15th December 2023 0 Comments

Hi Jens,

You can use the “BookingManager.ChangeStateToOnHold()” method to move a booking from the confirmed state to the partial state.

André Rodrigues [SLC] [DevOps Member] Answered question 15th December 2023
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