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

TryCreateServiceMessage -> ElementsToConsider

Solved1.07K views18th July 2023
1
Pedro Sánchez [DevOps Advocate]239 25th April 2021 0 Comments

Hi all! in order to avoid adding too much elements into a service, we want to use "ElementsToConsider" when trying to create a service under a QAction.

Our code:

string[] aElements = elementlist.ToArray(); //list of elements to be consider 
TryCreateServiceMessage myServiceMessage = new TryCreateServiceMessage();
myServiceMessage.HostingDataMinerID = -1;
myServiceMessage.CreateAll = false;
myServiceMessage.DataMinerID = -1;
myServiceMessage.Options = TryCreateServiceOptions.None;
myServiceMessage.ServiceTemplateID = sServiceDMATemplateID;
myServiceMessage.EditInputDataOnUpdate = true; //UPDATE
myServiceMessage.IsReApply = true; // UPDATE
myServiceMessage.ElementsToConsider = aElements;
myServiceMessage.ExtraData = new TCSExtraData[3];
for (int i = 0; i < myServiceMessage.ExtraData.Length; i++)
{
myServiceMessage.ExtraData[i] = new TCSExtraData();
myServiceMessage.ExtraData[i].Options = TCSExtraData.TCSExtraDataOptions.None;
myServiceMessage.ExtraData[i].IsFromOriginalService = false;
}

myServiceMessage.ExtraData[0].Name = "serviceID";
myServiceMessage.ExtraData[0].Value = sServiceDMAServiceID;
myServiceMessage.ExtraData[1].Name = "serviceName";
myServiceMessage.ExtraData[1].Value = sServicename;
myServiceMessage.ExtraData[2].Name = "data:Service";
myServiceMessage.ExtraData[2].Value = sServiceIndex;

TryCreateServiceResult response = (TryCreateServiceResult)protocol.SLNet.SendMessage(myServiceMessage)[0];

We have tried to use the above code but seems to be not working (response = success but all the elements still included)

Could someone help us in order to know how ElementsToConsider should be used?

Thanks in advance!

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2023

1 Answer

  • Active
  • Voted
  • Newest
  • Oldest
2
Wouter Demuynck [SLC] [DevOps Advocate]5.93K Posted 26th April 2021 2 Comments

Hi Pedro,

The ElementsToConsider property only supports filtering to the list of elements below a certain view. It cannot be used to filter to specific elements.

The syntax of the entries is "view:123" where 123 is the ID of the view (right-click in Cube Surveyor to see the view properties window, which also shows the ID).

Other options for limiting the list of included elements could be to filter on protocol or on element name from the child element configuration.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 18th July 2023
Pedro Sánchez [DevOps Advocate] commented 26th April 2021

Thanks Wouter! This feature will help us in the future but right now it is not the best solution because all the elements filtered by protocol and name are already included in the same view (called “[Site]-elements”).
In that QAction we tried to filter down by an specific property of the elements checking it before to create the array but seems that it’s not possible.
Do you have an idea about how to filter them in that way?

Wouter Demuynck [SLC] [DevOps Advocate] commented 27th April 2021

Hi Pedro,

I did some quick experiments which showed that the options to filter on element properties are rather limited.

In case it can be of any help: I could get something to work with the config below:
– a child element is configured without the “Include all matching elements”
– in the conditions section, a condition was added where value1 refers to a property of that element and value2 defines the requested property value
When I then run the service template and have it “create all options” for the child element, the template only gets applied for elements that have a matching property name (and each generated service contains just one of those elements).

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