Error in a subflow while calling another subflow : Error While fetching Process plan for the subflow

kulbhusanazad
Tera Contributor

hi ,

In Tokyo Release,

Getting below error in a subflow which calls another subflow , the subflow being called does exist and is in published state , but not sure why the calling subflow fails with below error.

Please help or pointer or any Workaround to resolve this ?

 

failed with error: com.snc.process_flow.exception.OpException: Error While fetching Process plan for the subflow 150b2a31970415100efbb05e6253af82
at com.snc.process_flow.engine.subflow.StartFlowOperation.getSubflowPlanById(StartFlowOperation.java:136)
at com.snc.process_flow.engine.subflow.StartFlowOperation.getSubflowPlan(StartFlowOperation.java:212)
at com.snc.process_flow.engine.subflow.StartFlowOperation.run(StartFlowOperation.java:279)
at com.snc.process_flow.engine.Operation.execute(Operation.java:208)
at com.snc.process_flow.engine.restricted_caller_access.ExecuteWithCallerAccessTracking.executeWithMetaStack(ExecuteWithCallerAccessTracking.java:21)
at com.snc.process_flow.engine.ProcessEngine.executeOps(ProcessEngine.java:560)
at com.snc.process_flow.engine.ProcessEngine.runInternal(ProcessEngine.java:466)
at com.snc.process_flow.engine.ProcessEngine.run(ProcessEngine.java:452)
at com.snc.process_flow.engine.ProcessAutomation.run(ProcessAutomation.java:79)
at com.snc.process_flow.engine.GlideProcessAutomation.runSync(GlideProcessAutomation.java:137)
at com.snc.process_flow.engine.GlideProcessAutomation.runWithDomain(GlideProcessAutomation.java:252)
at com.snc.process_flow.engine.GlideProcessAutomation.lambda$runAsUserSync$1(GlideProcessAutomation.java:219)
at com.snc.process_flow.engine.PFSessionClone.run(PFSessionClone.java:70)
at com.snc.process_flow.engine.GlidePFSession.runPlanAsUserSession(GlidePFSession.java:42)
at com.snc.process_flow.engine.GlideProcessAutomation.runAsUserSync(GlideProcessAutomation.java:217)
at com.snc.process_flow.engine.GlideProcessAutomation.messageFlow(GlideProcessAutomation.java:312)
at com.snc.process_flow.engine.GlideProcessAutomation.messageFlow(GlideProcessAutomation.java:277)

10 REPLIES 10

richelle_pivec
Mega Guru

I am experiencing this same error with a Flow that is calling two subflows. Did you ever figure out what was causing the error?

Thanks,

Richelle 

Elijah Aromola
Mega Sage

Have you attempted to republish all flows/subflows being used in this functionality? 

Aaron Loughran
Tera Expert

I am receiving this same error when calling a single subflow to generate catalog tasks from a flow.  I have republished the subflow and activated the flow, which resulted in the same error.  Has anyone determined a solution for this?  I am thinking about rebuilding my subflow to see if that solves the issue, but have not started down that path yet.

The answer to my issue was unrelated to the error message itself. One of my subflows said that it was "Published" after I clicked on the button to publish it but, when I looked at the list of subflows, it was still in the "draft" state. There was an error in one of the fields that I was pulling into a data pills. Once I fixed that and published it (and got the actual state to say "published" on the List View of Subflows), the error went away when I ran the Test.
So, you may want to check for that. Is the subflow actually published in the List View.

Richelle

sw099y
Tera Contributor

I know this is a very old post. But I found it while facing the same error. I didn't see a solution here, so I thought I'd put mine down - maybe somebody in the future will find it helpful.

Our problem was occurring in one of our higher environments, but our dev environment was fine. I looked up what a Process Plan is in ServiceNow by checking the Flow Designer architecture documentation. A process plan is basically the plan of everything that's going to get done when a flow or subflow is called. Then there was a note saying that process plans are cached and only updated if there's a change in the flow/subflow.

So I went into dev and made a small change to the problematic subflow - I copied a flow step and then deleted the original, but I think any small change will work. I saved it and pushed the changes to our higher environment. The error went away.

My guess is that there was a cached process plan that got removed somehow in the higher environment. But since no changes had been made to the subflow, the parent flow was trying to call the cached process plan instead of trying to re-calculate a new process plan.
That's just my theory anyway. If there's a subflow throwing this error when being called by a parent flow, try to modify the subflow and save it. Maybe that will trigger the calculation of a new process plan.