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

Script not working from Staging to Production

Solved1.39K views14th July 2023script scripting version diference
3
Catalin Cireasa273 7th April 2022 0 Comments

Dear Dojo,

I have created this part of a script which will scan for duplicates and report the outcome via e-mail. In the staging is working perfectly (DataMiner (10.2.0.0-11517)) and when I transferred it on the production it does no work any more (DataMiner (10.1.0.0-11319-CU11)).

The code is the following:

public class Script
{
public void Run(Engine engine)
{

engine.GenerateInformation(“Collecting duplicate elements: Started”);

Element[] elements = engine.FindElementsInView(-1);

var List = elements.Where(x => x.IsActive);

var duplicateKeys = List.GroupBy(x => x.PollingIP)
.Where(group => group.Count() > 1)
.SelectMany(group => group.Select(gg => gg))
.Where(x => !string.IsNullOrEmpty(x.PollingIP))
.ToList();

}

}

After this I am using a foreach loop to gather the info I need and send-it via email.

This is the part in which I think I have the problem.

The error from the production is the following:

2022/04/06 12:33:13.162|SLAutomation.exe 10.1.2046.9494|29308|38336|CSharp|DBG|-1|(Script Element Duplication Notification Live Test/2) (Code: 0x80131500) Skyline.DataMiner.Net.Exceptions.DataMinerException: Create Dummy Failed: 0x80004005
at CManagedAutomation.RunWrapped(CManagedAutomation* , Int32 iCookie, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* pvarReturn, String scriptName)
at CManagedAutomation.Run(CManagedAutomation* , Int32 iCookie, Char* bstrScriptName, IUnknown* pIAutomation, tagVARIANT* varParameters, tagVARIANT* varEntryPoint, tagVARIANT* pvarReturn) (CSharp; 0x80131500h):
2022/04/06 12:33:13.645|SLAutomation.exe

Can you point me in the right direction ?

Thank you

Catalin

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

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
1
Michiel Vanthuyne [SLC] [DevOps Enabler]4.16K Posted 7th April 2022 6 Comments

Hi Catalin,

“Create Dummy Failed” in the logging could indicate that you need to re-add or re-configure one of the script dummies to reference the correct elements in your production system.

Marieke Goethals [SLC] [DevOps Catalyst] Selected answer as best 14th July 2023
Catalin Cireasa commented 7th April 2022

Well, I did not create any dummy,
Here is all the code so you can have a greater picture.

public class Script
{
public void Run(Engine engine)
{

engine.GenerateInformation(“Collecting duplicate elements: Started”);

Element[] elements = engine.FindElementsInView(-1);

var List = elements.Where(x => x.IsActive);

var duplicateKeys = List.GroupBy(x => x.PollingIP)
.Where(group => group.Count() > 1)
.SelectMany(group => group.Select(gg => gg))
.Where(x => !string.IsNullOrEmpty(x.PollingIP))
.ToList();

//var nbOfItems = duplicateKeys.Count(x => x.PollingIP == x.PollingIP);

string message = “”;
Element lastElement = elements.Last();
foreach (Element element in duplicateKeys)
{

if (element.PollingIP.Equals(lastElement.PollingIP))
{
message += ” ” + ” – ” + element.ElementName + ” – ” + element.GetPropertyValue(“Department”) + ” – ” + element.GetPropertyValue(“JIRA_DeviceObjectKey”) + “”;
}
else
{
message += “”;
message += “——————————————————-” + “”;
message += “There are ” + duplicateKeys.Where(x => x.PollingIP == element.PollingIP).Count() + ” elements with this IP : ” + element.PollingIP.ToString() + “”;
message += “——————————————————-” + “”;
message += “”;
message += ” – ” + element.ElementName + ” – ” + element.GetPropertyValue(“Department”) + ” – ” + “”;

}
lastElement = element;
}

//

EmailOptions emailOptions = new EmailOptions
{
// Note that it is possible to specify multiple destinations by using a semi-colon as separator.
// Also, it’s possible to specify a specific DataMiner user or group with following format “USER:admin” or “GROUP:myGroup”.
// E.g. “Jon@DataMiner.be;USER:administrator;GROUP:operators”
TO = “test@test.com”,
//CC = “”,
//BCC = “”,

Title = “Duplicate Elements in DMS”,
Message = message,

// Uncomment the line below to send a plain text message instead of HTML
//SendAsPlainText = true
};

// Send out the actual mail
engine.SendEmail(emailOptions);
engine.GenerateInformation(“Elements gathering finished, Email sent!”);
}
}

Michiel Vanthuyne [SLC] [DevOps Enabler] commented 7th April 2022

I don’t immediately see a cause for the reported error in your script.
A possible explanation for the difference in behavior between 10.1.0.0 and 10.2.0.0 could be the switch to .Net4.8 (see https://community.dataminer.services/documentation/dataminer-v10-2-0-release-notes/#31120), but then I would expect your script not to run at all. Do you get any errors or warnings when validating the script on the production system?

Catalin Cireasa commented 7th April 2022

I did not get any errors when validating it in DM

Michiel Vanthuyne [SLC] [DevOps Enabler] commented 7th April 2022

Hi Catalin, I was able to successfully run your script on a 10.1.0.0-11655 DMA, so it is possibly due to an issue specific to your setup. I think Wouters’ suggestion to wrap the x.IsActive() call in a try/catch is certainly worth a try to check if this would be caused by a specific element.

Catalin Cireasa commented 7th April 2022

Thank you, I will check it and reply.

Show 1 more comments
4
Wouter Demuynck [SLC] [DevOps Advocate]5.94K Posted 7th April 2022 1 Comment

Hi,

You might be able to find out more info about the error in the Automation log file (Cube > System Center > Logging > DataMiner > Automation. Or SLAutomation.txt on the server)

An error “Create Dummy Failed: 0x80004005” typically indicates that the  automation module doesn’t know about a specific element, which might indicate an incorrect in-memory state of that module. Restarting the DataMiner agent could help if this is the case.

I suspect the internal dummy instance gets created implicitly on the x.IsActive call. Using try/catch around this call could be a workaround.

Catalin Cireasa Posted new comment 7th April 2022
Catalin Cireasa commented 7th April 2022

The above error is directly from SLAutomation.txt

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