The Zurich release has arrived! Interested in new features and functionalities? Click here for more

What does "setRunEngine()" do, and where do I find this function definition or function documentation?

DirkRedeker
Mega Sage

Hi

Where can I find the meaning (and definition) of the function "setRunEngines(xxx)" (see screenshot below)?

It seems to be a function on a GlideRecord object, but I cannot find any documentation on that, nor can I find the function definition in Service Now. Also, I did not find a matching article in Docs or the Community here..

I guess, that sets the "Approval Engine" for the given table/record - or something like that.

Any concrete advice on this topic?

Thanks a lot

BR

Dirk

 

find_real_file.png

3 REPLIES 3

Jace Benson
Mega Sage

It's not really well shared.

Is a link to the old wiki with what I knew about them;

https://wiki.servicenow.com/index.php?title=Execution_Order_of_Scripts_and_Engines wayback machine l...

 

The order of execution is as follows:

    Before business rules: Scripts configured to execute before the database operation with an order less than 1000.
    Before engines. The following are not executed in any specific order:
        Approval engine (for task and sys_approval_approver tables)
        Assignment rules engine (for task tables)
        Data policy engine
        Escalation engine
        Field normalization engine
        Role engine - keeps role changes in sync with sys_user_has_role table (for sys_user, sys_user_group, sys_user_grmember, and sys_user_role tables)
        Execution plan engine (for task tables)
        Update version engine - creates version entry when sys_update_xml entry is written (for sys_update_xml table)
        Workflow engine (for default workflows)
    Before business rules: Scripts configured to execute before the database operation with an order greater than or equal to 1000.
    The data base operation (insert, update, delete).
    After business rules: Scripts configured to execute after the database operation with an order less than 1000.
    After engines. The following are not executed in any specific order:
        Label engine
        Listener engine
        Table notifications engine
        Role engine - keeps role changes in sync with sys_user_has_role table (for sys_user, sys_user_group, sys_user_grmember and sys_user_role tables)
        Text indexing engine
        Update sync engine
        Data lookup engine inserts or updates
        Workflow engine (for deferred workflows)
    Email notifications. The following are executed based on the weight of the notification record:
        Notifications sent on an insert, update, or delete
        Event-based notifications
    After business rules. Scripts configured to execute after the database operation with an order greater than or equal to 1000.

 

I note this in a visual I refer to for checking things here;

https://workflow.jacebenson.com/?flow=BusinessRuleOrderSequence

Hi jacebenson

Does it mean, that "setRunEngines()" will start the "Engines" in the background with all the "magic" happening in the background?

Do you know, where I can see the status, progress or output, etc. from the different engines inside Service Now?

Can I review somewhere when they run, what they did, etc?

 

Thanks for the Link to the charts.

BR

Dirk

 

 

FYI:

Thanks a lot for your answer. THe documentation about the execution order is still available at the official Service Now Docs page:

https://docs.servicenow.com/bundle/madrid-servicenow-platform/page/administer/service-administration/reference/execution-order-scripts-engines.html

 

 

I don't really know more about it.

I think the setRunEngines is like setWorkflow [default true] but, im guessing at this point.