I need to interact with DOM from a custom operator.
For this I wanted to use the OnInit to init the DomHelper to my module, but this method is never triggered.
How can I make sure it is triggered?
[GQIMetaData(Name = "ConvertTicketIdToTicketInstanceId")] public class UosaConvertTicketIdToTicketInstanceId : IGQIColumnOperator, IGQIRowOperator, IGQIInputArguments, IGQIOnInit
{
private GQIColumnDropdownArgument _firstColumnArg = new GQIColumnDropdownArgument("Ticket Id column") { IsRequired = true, Types = new GQIColumnType[] { GQIColumnType.String } };
private GQIStringArgument _nameArg = new GQIStringArgument("Ticket Instance column") { IsRequired = true };private GQIColumn _firstColumn;
private GQIStringColumn _newColumn;
private DomHelper _domHelper;
private Guid defaultGuid = Guid.Empty;public OnInitOutputArgs OnInit(OnInitInputArgs args)
{
defaultGuid = Guid.NewGuid();
_domHelper = new DomHelper(args.DMS.SendMessages, "my_app");
return new OnInitOutputArgs();
}
...
Hi Mieke,
The OnInit lifecycle hook is currently not called for custom operatos (see docs). However, we have a task on our backlog to support it.
That’s incorrect, we’ll make sure to rectify it.
Documentation has been updated.
This was not clear for me due to this documentation:
https://docs.dataminer.services/user-guide/Advanced_Modules/Dashboards_and_Low_Code_Apps/GQI/Extensions/API_Reference/IGQIOnInit.html#definition
It states:
The IGQIOnInit interface can be implemented for an ad hoc data source or custom operator to get notified,…