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
    • 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
    • YouTube Videos
    • Solutions & Use Cases
      • Solutions
      • Use Case Library
    • Agility
      • Learn more about 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)
      • Book your Agile Fundamentals training
      • Book you Kanban workshop
    • >> Go to DataMiner Docs
  • DevOps
    • About the DevOps Program
    • Sign up for the DevOps Program
    • DataMiner DevOps Support
    • Feature Suggestions
  • Downloads
  • Swag Shop
  • PARTNERS
    • Business Partners
    • Technology Partners
  • Contact
    • Sales, Training & Certification
    • DataMiner Support
    • Global Feedback Survey
  • >> Go to dataminer.services

SRM – How to check if a completed reservation succeeded or failed?

Solved115 views3 days agoSRM
6
Jason Wan [SLC] [DevOps Advocate]350 3 days ago 0 Comments

Hi All,

I am trying to check whether a reservation runs successfully or encounters an error after it has completed. For example, I would like to use the GetAllReservations() method and loop through the reservations to determine whether each one succeeded or failed.

May I know if there is a way to achieve this?

Thanks!

Jason Wan [SLC] [DevOps Advocate] Selected answer as best 3 days ago

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
5
Jorge Dias [SLC] [DevOps Enabler]5.30K Posted 3 days ago 2 Comments

Hi Jason,

You should use the Booking Life Cycle to determine that, if your reservation should have already ended and it failed that property should have either the value 'Failed' (if it failed to be setup correctly, e.g. elements are stopped at the booking start time) or 'FailedCompleted' (if the orchestration failed). Bellow you can find an example.

var allEndedReservations = SrmManagers.ResourceManager.GetReservationInstances(ReservationInstanceExposers.Status.Equal((int)ReservationStatus.Ended));

foreach (var endedReservation in allEndedReservations)
{
var bookingLifeCycle = endedReservation.GetBookingLifeCycle();
var isFailed = bookingLifeCycle == GeneralStatus.FailedCompleted /* Orchestration failed */ || bookingLifeCycle == GeneralStatus.Failed /* Booking failed to be setup correctly */;
}

Note: Please don't do GetReservations without any filter, I've put a filter only for Ended, but you should try to filter more. Getting a lot of reservations at once can take a significant amount of time.

Jorge Dias [SLC] [DevOps Enabler] Posted new comment 3 days ago
Jason Wan [SLC] [DevOps Advocate] commented 3 days ago

Thanks, Jorge. I tested, and it works. I also applied the filter to ensure it does not select all the reservations.

Jorge Dias [SLC] [DevOps Enabler] commented 3 days ago

Depending on your logic, try to make the filter even more strict.
E.g.: If this script run every hour, you only need to get reservation that are ended and the the end date is bigger than now minus one hour.

-1
José Silva [SLC] [DevOps Catalyst]1.78K Posted 3 days ago 0 Comments

Hi Jason,

If I’m not mistaken, the property you’re looking for in the reservation is “Service State.”

You can access it like this:

Kind regards,

José Silva [SLC] [DevOps Catalyst] Answered question 3 days ago
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

[ Placeholder content for popup link ] WordPress Download Manager - Best Download Management Plugin