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
    • Courses
    • Certification
      • DataMiner Operator
      • DataMiner Administrator
      • DataMiner Automation
      • Scripts & Connectors Developer: HTTP Basics
      • Scripts & Connectors Developer: SNMP Basics
      • Visual Overview – Level 1
    • Video Library
    • Books We Like
    • Third-party Courses
    • DevOps Enablement Services
    • Quizzes
  • RESOURCES
  • 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)
  • Expert Hubs
    • DataMiner DevOps Professional Program
    • DataMiner
      • DataMiner Releases & Updates
      • System Architecture
      • Integration Studio
      • Visual Overview
      • Security
    • Technologies
      • CI/CD
      • Converged Interconnect Networks
      • DOCSIS 3.1 / DAA
      • Elasticsearch
      • Kubernetes
      • Telemetry / Flow Monitoring
      • PTP
      • SDN / ST2110 / NMOS
    • Business
      • Software Business models
      • Perpetual Use or Usage-based Services
  • Discover
    • Markets
      • Media production
      • Government & defense
      • Content distribution
      • Service providers
      • Partners
      • OSS/BSS
    • Solutions
    • Use Case Library
    • DataMiner Dashboards
    • DataMiner Downloads
    • DataMiner Modules
      • Core features
      • SRM features
    • DataMiner Apps
    • Professional Services
  • PARTNERS
    • All Partners
    • Technology Partners
    • Strategic Partner Program
    • Deal Registration
  • Pricing
  • More
    • Feature Suggestions
    • Online DataMiner Systems
    • Leaderboard
    • Swag Shop
    • Contact
      • General Inquiries
      • DataMiner DevOps Support
      • Commercial Requests
    • Global Feedback Survey
    • Verify a certificate
  • >> Go to dataminer.services

Init QAction 6 failed with Invalid data. (hr = 0x80040221)

Solved201 views30th June 2023QActions
1
Tyler Brown [DevOps Advocate]184 20th June 2023 0 Comments

Hi there,

I am unable to initialize a QAction in a driver that I am building with an error message stating that the data is invalid. I am simply trying to log an error message with a button press as I am just figuring out how to use this functionality.

Here is the quick action in question:

using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;

using Skyline.DataMiner.Scripting;

/// <summary>
/// DataMiner QAction Class: Test Button.
/// </summary>
public static class QAction
{
/// <summary>
/// The QAction entry point.
/// </summary>
/// <param name="protocol">Link with SLProtocol process.</param>
public static void Run(SLProtocol protocol)
{
try
{
protocol.Log("Testing button click");
}
catch (Exception ex)
{
protocol.Log("QA" + protocol.QActionID + "|" + protocol.GetTriggerParameter() + "|Run|Exception thrown:" + Environment.NewLine + ex, LogType.Error, LogLevel.NoLogging);
}
}
}

</QAction>
<QAction id="6" name="Test Button" encoding="csharp" triggers="55">
</QAction>

And here is the parameter that is triggering it:

<Param id="55">
<Name>Update Table</Name>
<Type>write</Type>
<Information>
<Subtext>Manually send out the request.</Subtext>
</Information>
<Interprete>
<RawType>other</RawType>
<Type>string</Type>
<LengthType>next param</LengthType>
</Interprete>
<Display>
<RTDisplay>true</RTDisplay>
<Positions>
<Position>
<Page>Schedule</Page>
<Column>0</Column>
<Row>0</Row>
</Position>
</Positions>
</Display>
<Measurement>
<Type width="110">button</Type>
<Discreets>
<Discreet>
<Display>Generate Table</Display>
<Value>Generate Table</Value>
</Discreet>
</Discreets>
</Measurement>
</Param>

Any help with this would be much appreciated as I am very new to this functionality.

Thank you

Marieke Goethals [SLC] [DevOps Enabler] Selected answer as best 30th June 2023

2 Answers

  • Active
  • Voted
  • Newest
  • Oldest
0
Floris Cockaerts [SLC] [DevOps Enabler]1.62K Posted 21st June 2023 2 Comments

Hi Tyler,

I recreated the setup you provided in your post, but didn't get the error. I've pushed my resulting protocol, which was started from the DIS protocol template, to github: FlorisCO/Dojo_QActionLog (github.com)

This was tested on an internal build of 10.3.8, but I see no reason why this would fail on earlier versions.

Do you see any significant difference between my version and yours? Can you share the actual protocol where you encounter this problem? What is your DataMiner version?

Marieke Goethals [SLC] [DevOps Enabler] Selected answer as best 30th June 2023
Tyler Brown [DevOps Advocate] commented 22nd June 2023

Hey Floris,

Thank you for your help, I was able to figure it out. For some reason DIS was not embedding my code for the qaction into the XML. I was able to get around this by doing it manually.

Thank you again
Tyler

Floris Cockaerts [SLC] [DevOps Enabler] commented 23rd June 2023

Hi Tyler,

When using a protocol solution, the QAction code is stored in separate .cs files whereas this used to be part of the XML while editing. With a solution, the protocol needs to be uploaded using the “publish” button, or exported through the File menu. Perhaps the XML without the code was copy-pasted, or uploaded through cube?

1
João Severino [SLC] [DevOps Enabler]4.26K Posted 21st June 2023 1 Comment

Hi Tyler,

Apart from one small thing here

</QAction>
<QAction id="6" name="Test Button" encoding="csharp" triggers="55">
</QAction>

which I am guessing the first line is just the ending of your previous QAction, otherwise you should have something like this

<QActions>
<QAction id="6" name="Test Button" encoding="csharp" triggers="55" >
</QAction>
</QActions>

But other than that I do not see anything wrong with your code.

Could you let us know what is the issue you are experiencing? Is it just that it does not trigger the QAction or do you see any errors in the element log file?

Tyler Brown [DevOps Advocate] Posted new comment 21st June 2023
Tyler Brown [DevOps Advocate] commented 21st June 2023

Hey Joao, thank you for your reply. The Qactions tag is in my code already thanfully. In terms of the error, in the protocol logs It is stating that my QActions have failed to initialize due to invalid data. I’m not sure what would be causing this.

Please login to be able to comment or post an answer.

My Dojo Points

0 Credits
0 Reputation

Question Tag Cloud

adl2099 (54) Alarm Console (53) alarms (70) alarm template (58) API (35) Automation (144) automation scipt (65) Automation script (95) backup (54) Cassandra (142) cloud (37) Connector (44) Correlation (42) Cube (114) Dashboard (134) Dashboards (136) database (64) DataMiner Cube (37) DIS (53) DMS (48) DOM (68) driver (48) DVE (43) Elastic (73) Elasticsearch (99) elements (49) Failover (90) GQI (51) HTTP (45) IDP (55) low code app (70) low code apps (43) MySQL (50) protocol (145) QAction (58) resources (35) security (71) SNMP (56) SRM (267) SRM resources (39) timeout (35) trending (66) upgrade (44) Visio (373) Visual Overview (290)
Privacy Policy • Terms & Conditions • Contact

© 2023 Skyline Communications. All rights reserved.

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