Flow Runner Quick() Method

kdurg
Kilo Guru

Hey all, 

I have a scripted REST message that kicks off a subflow and ran into some major performance issues. I believe these issues can be solved by using the quick() method within the getRunner API.


Without the .quick() portion added, the subflow kicks off without issues. When I add the .quick() in, I get a slew of errors mentioning the following error (shortened):

"stackTrace": [
                {
                    "methodName": "executeInternalQuick",
                    "fileName": "FlowObjectExecutor.java",
                    "lineNumber": 156,
                    "className": "com.glide.plan.runners.FlowObjectExecutor",
                    "nativeMethod": false
                },
                {
                    "methodName": "lambda$executeQuick$1",
                    "fileName": "FlowObjectExecutor.java",
                    "lineNumber": 63,
                    "className": "com.glide.plan.runners.FlowObjectExecutor",
                    "nativeMethod": false
                },
                {
                    "methodName": "executeWithTimeout",
                    "fileName": "Transaction.java",
                    "lineNumber": 3096,
                    "className": "com.glide.sys.Transaction",
                    "nativeMethod": false
                },
                {
                    "methodName": "executeQuick",
                    "fileName": "FlowObjectExecutor.java",
                    "lineNumber": 63,
                    "className": "com.glide.plan.runners.FlowObjectExecutor",
                    "nativeMethod": false
                },
                {
                    "methodName": "executeQuick",
                    "fileName": "FlowObjectAPI.java",
                    "lineNumber": 105,
                    "className": "com.glide.plan.runners.FlowObjectAPI",
                    "nativeMethod": false
                },
                {
                    "methodName": "jsFunction_run",
                    "fileName": "ScriptableFlowRunner.java",
                    "lineNumber": 253,
                    "className": "com.glide.plan.runners.scriptable.ScriptableFlowRunner",
                    "nativeMethod": false
                }
]

 
Here is the chunk of code responsible:

var newCase = sn_fd.FlowAPI.getRunner()
                    .subflow(subflowName)
                    .inForeground()
		    .quick()
                    .withInputs(input)
                    .run();



Any thoughts on how to deal with this? Thanks in advance! 

3 REPLIES 3

Tony Chatfield1
Kilo Patron

Hi, I would suspect the issue is with the triggered flow, not with the triggering code.
Does your flow meet the requirements for 'quick' method?

 

Wait condition support
This method does not support pausing an action or flow to wait for conditions. Actions, flow logic, and steps that pause for wait conditions such as Ask for Approval, Wait for Condition, or Wait for a duration are not supported.
MID Server support
This method does not support pausing an action or flow to run from a MID Server.

Thanks for the response! The only "wait" conditions are look ups, so I believe I should be in the clear on that. No MID server in our setup. 

If the flow meets the documented requirements, then other than working through your flow to validate the cause; I would recommend logging to ServiceNow Support team as unexpected behavior\something is broken.