The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

Could not render GetAsynchronousOperationDashboardContent

Trying to create a custom task directive derived from ObjIDTaskDirective called ObjIDWithParameterTaskDirective.

public ObjIDWithParameterTaskDirective(ObjID objID, string parameter) : base(objID)
    {
      Parameter = parameter; 
      DisplayName = parameter;
      
    }

Problem is that the ObjIDWithParameterTaskDirective constructor is called at various times, like during a refresh, and objID = null.  Update: The constructor is getting called every 30 seconds with the parameter  objID == null. 

Could something be getting requeued from a prior task? If so, is there a way to purge the task queue?

My task function initially started out taking ObjIDTaskDirective as the parameter and everything worked. 

public void ScheduleNextObjectCreation(ITaskProcessingJob<ObjIDWithParameterTaskDirective> job)
// public void ScheduleNextObjectCreation(ITaskProcessingJob<ObjIDTaskDirective> job)

Now, even if I change it all back it still fails. 

Could not render GetAsynchronousOperationDashboardContent

Value cannot be null. Parameter name: objID

   at MFiles.VAF.Extensions.ObjIDTaskDirective..ctor(ObjID objID, String displayName)
   at ScheduledTasksVAF.ObjIDWithParameterTaskDirective..ctor(ObjID objID, String parameter) in D:\.NET2\Test\MFiles\VAFs\ScheduledTasksVAF\ObjIDWithParameterTaskDirective.cs:line 18
   at Void .ctor(MFilesAPI.ObjID, System.String)(Object[] )
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObjectUsingCreatorWithParameters(JsonReader reader, JsonObjectContract contract, JsonProperty containerProperty, ObjectConstructor`1 creator, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at Newtonsoft.Json.JsonConvert.DeserializeObject(String value, Type type, JsonSerializerSettings settings)
   at MFiles.VAF.AppTasks.TaskDirective.Parse(Byte[] data, Type directiveType)
   at MFiles.VAF.AppTasks.TaskInfo`1.SetDirectiveData(Byte[] data)
   at MFiles.VAF.AppTasks.TaskInfo`1..ctor(ApplicationTaskInfo appTaskInfo, Type directiveType)
   at MFiles.VAF.AppTasks.TaskInfo.Factory[TDirective](ApplicationTaskInfo appTaskInfo, Type directiveType)
   at MFiles.VAF.AppTasks.TaskQuery.FindFromQueue[TDirective](ITaskQueueProcessor queue, List`1 results)
   at MFiles.VAF.AppTasks.TaskQuery.FindTasks[TDirective](TaskManager manager)
   at MFiles.VAF.Extensions.TaskManagerEx`1.GetAllExecutions[TDirective](String queueId, String taskType)
   at MFiles.VAF.Extensions.Dashboards.AsynchronousDashboardContent.TaskManagerExAsynchronousDashboardContentProvider`1.<GetAsynchronousDashboardContent>d__20.MoveNext()
   at System.Linq.Enumerable.<SelectManyIterator>d__17`2.MoveNext()
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
   at MFiles.VAF.Extensions.Dashboards.AsynchronousDashboardContent.DashboardListAsynchronousDashboardContentRenderer.GetDashboardContent(IEnumerable`1 data)
   at MFiles.VAF.Extensions.ConfigurableVaultApplicationBase`1.<GetStatusDashboardRootItems>d__39.MoveNext()

Library versions:

Thanks,

Scott

Parents Reply Children