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.

This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Write job-details while adding a task

Hello,

I've got a Background Task Queue, where I add tasks dynamically. During processing the task, I do a job.update for writing details to the task to the table of the queue in the dashboard of the vault app.

But I want to write these details after adding the task to the queue using TaskManager.AddTask. Otherwise the text of the details appear after completing the task... 

Does anybody know how to solve this problem?

Greetings from germany

Michael

Parents
  • Depending on factors such as the transaction processing mode, updates made via "job.update" may not be immediately visible.  In some situations they may not be visible at all until the transaction completes.  There's no real way to update the job data before the job starts processing.

    An alternate approach may be to use the task name.  If you are using the VAF Extensions library then you may want to consider using a task directive class that inherits from TaskDirectiveWithDisplayName (the task directives in the extensions library already do).  You can use this to set a "name" on the task which will be displayed in the table instead of the task ID.  This would give you somewhere to put some content that the user can see before - and whilst - the job is processed.

  • Another question...

    is there any possibility to change the width of the boxes with the information about the background tasks in the dashboard?

    I found the Dashboard class inside the vaf... it seems that I can change these things there. But I do not know how to identify the elements I want to modify.

  • I seem to recall that the section on the right has a fixed maximum width. I am on holiday so can't easily check that though. 

    You could take apart how the extensions library renders the dashboard and do your own implementation if you wanted. It's not especially easy to override, unfortunately (I've been meaning to refractor it, but it's not top of my list of priorities). 

  • Okay. Thank you for the quick answer. 

    Now relax and enjoy your holidays Sun with face

Reply Children
No Data