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
  • Blog
  • 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
    • DataMiner Insights
      • Security
      • System Architecture
      • DataMiner Releases & Updates
    • 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
  • Downloads
  • More
    • Feature Suggestions
    • Climb the leaderboard!
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • >> Go to dataminer.services

Method of running a Service Template in Automation

Solved529 views7th June 2024#ServiceTemplate Automation
0
Ross Elliott [DevOps Advocate]819 5th June 2024 0 Comments

Hi,

I need to automate running a Service Template on an Element. What ways can I achieve this? Ideally, I would give the automation engine an element, a template name and the input data and have the template run. Is that possible? If not, is there another way I can achieve the same goal?

For background, I have a script that configures services on a device. For the solution to really save us a lot of time I want it to also build the View and Visio mimic. I have a View template with placeholders that are filled with pages of the Visio assigned to the service but at the moment the service generation is manual. The service template runs on 1 Element with 4 or 5 pieces of input data.

Ross Elliott [DevOps Advocate] Selected answer as best 7th June 2024

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
0
Wouter Demuynck [SLC] [DevOps Advocate]5.93K Posted 6th June 2024 2 Comments

Hi Ross,

You are looking for the TryCreateServiceMessage, which takes a service template name along with input data. This same type of request is being used when applying service templates from Cube.

Without going into too much detail, here are some references to previous questions from which the examples could help you to get started:

  • Dojo: TryCreateServiceMessage -> ElementsToConsider (dataminer.services)
  • Dojo: Service creation from QAction (dataminer.services)
  • Dojo: Automation: how to provision a new service based on a service template on a specific DMA? (dataminer.services)

Hope this helps!

Ross Elliott [DevOps Advocate] Selected answer as best 7th June 2024
Ross Elliott [DevOps Advocate] commented 7th June 2024

Thanks this is exactly what I’m looking for. I can’t find any documentation on it in dataminer.services so struggling a little bit with how to send the message. I currently have…
public class Script
{
///
/// The script entry point.
///
/// Link with SLAutomation process.
public void Run(IEngine engine)
{
IDms dms = engine.GetDms();

int[] views = new int[1];
views[0] = 237;

TryCreateServiceMessage serviceMessage = new TryCreateServiceMessage
{
ServiceTemplateID = “76699”,
HostingDataMinerID = -1,
DataMinerID = -1,
CreateAll = false,
ViewIDs = views,
ExtraData = new TCSExtraData[3],
};
serviceMessage.ExtraData[0].Name = “data:serviceName”;
serviceMessage.ExtraData[0].Value = “Ross”;
serviceMessage.ExtraData[1].Name = “data:elmentName”;
serviceMessage.ExtraData[1].Value = “CHF-LAB-A07-APC-01B-SDI04”;
serviceMessage.ExtraData[2].Name = “data:deviceID”;
serviceMessage.ExtraData[2].Value = “1”;

TryCreateServiceResult result = (TryCreateServiceResult)engine.SendSLNetMessage(serviceMessage);
}

the bottom line obviously isn’t right but not sure how to send the message properly.

Wouter Demuynck [SLC] [DevOps Advocate] commented 7th June 2024

There is no official documentation on these messages indeed.

To send the message:

TryCreateServiceResult result = engine.SendSLNetSingleResponseMessage(serviceMessage) as TryCreateServiceResult;

Also note that ServiceTemplateID will have to be something like “123/76699”

You are viewing 1 out of 1 answers, click here to view all answers.
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