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,
As far as I know, custom operators don't expose the OnInit method. You could see this in the life cycle of a custom operator. If you compare against the lifecycle of a ad-hoc data source, you will see that ad-hoc data sources indeed exposes the OnInit method.
Hope it helps.