The CreatorCon Call for Content is officially open! Get started here.

Hi , I was wondering if there is a way to force a UI action process to run in the backgrounf?

mok
Kilo Contributor

Hi ,

I am trying to force a process to run in the background after clicking a UI action/button on a form, currently the process locks out the screen and this takes time before moving onto the next item

is there a way to do this!?

1 ACCEPTED SOLUTION

Yup it would definitely stop the screen from locking out. Instead you would have a very lightweight AJAX call running in the background checking status while the actual work is done on a worker node, so it will also not take up any user semaphores.



Please do let me know if you get this working!



-Jon


Sent from my iPhone


View solution in original post

13 REPLIES 13

mok
Kilo Contributor

absolutely ...Thankyou ...


mok
Kilo Contributor

Hey Jonathan ,



This definately worked without locking screen , so I called the GlideScriptedHierarchicalWorker from the UI Action and trigerred the script include and function name that actually does the process , however one thing still remains pending is that,   in the function that takes care of the process , there are values that were returned directly from the process function to the GlideAjax call to the UI Action previously.



I guess my confusion is with the new intro of the worker progress , how can I return these different messages(which are based on different conditions) :



from the process function to the GlideScriptedHierarchicalWorker


from the GlideScriptedHierarchicalWorker   to the UI Action (to be displayed on the screen)


The script include / function that does the actual work, will need to update the tracker record with messages, status, percent complete, etc.   The tracker is stored in the sys_execution_tracker table.



if you look at that table, you may see some examples of some of the records there.



And ChangeCheckConflicts script include has some examples in it for updating the tracker record.


mok
Kilo Contributor

Thanks !!