FileOutputStream error while using Utility spoke


Description

Servicenow utility spoke fails to generate a zip file when configured as part of script steps in flow designer

Cause

When Servicenow utility spoke in integration hub is used to zip the files, as part of script step, below error is observed :

 

Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d SEVERE *** ERROR *** Operation(ACN Catalog options export.65ef8b591b23fc14fa7f7d55464bcbed.6946312a0f9950107b75001ea8767ec4) failed with error: com.snc.process_flow.exception.OpException: Error:
FileOutputStream(java.io.FileDescriptor)
FileOutputStream(java.io.File)
FileOutputStream(java.lang.String) (script_include:ZipManagementUtil; line 30)
at com.snc.process_flow.operation.script.ScriptOperationBase.handleScriptResult(ScriptOperationBase.java:63)
at com.snc.process_flow.operation.script.ScriptOperationBase.runScript(ScriptOperationBase.java:51)
at com.snc.process_flow.operation.script.ScriptOperation.run(ScriptOperation.java:71)
at com.snc.process_flow.engine.Operation.execute(Operation.java:198)
at com.snc.process_flow.engine.ProcessEngine.executeOps(ProcessEngine.java:501)
at com.snc.process_flow.engine.ProcessEngine.run(ProcessEngine.java:411)
at com.snc.process_flow.engine.ProcessAutomation.run(ProcessAutomation.java:66)
at com.snc.process_flow.engine.MidProcessAutomation.messageFlow(MidProcessAutomation.java:55)
at com.service_now.mid.probe.IPaaSActionProbe.probe(IPaaSActionProbe.java:106)
at com.service_now.mid.probe.AProbe.process(AProbe.java:102)
at com.service_now.mid.queue_worker.AWorker.runWorker(AWorker.java:122)
at com.service_now.mid.queue_worker.AWorkerThread.run(AWorkerThread.java:20)
at com.service_now.mid.threadpool.ResourceUserQueue$RunnableProxy.run(ResourceUserQueue.java:649)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:834)

 

The error is noticed in MID server, as the zip functionality is implemented by MID server.

 

This is caused due to the lack of required roles, and below specific error can be noticed in MID server logs :

 

10/31/21 12:32:34 (076) Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d Worker starting: IPaaSActionProbe source: fdefcb599123fc146e2b4c9b23a54c8d
10/31/21 12:32:35 (669) Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d Getting instance ACLs for table: sn_utility_spoke_file_set
10/31/21 12:32:35 (857) Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d WARNING *** WARNING *** Can't read because table ACL denies it: sn_utility_spoke_file_set
10/31/21 12:32:35 (857) Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d WARNING *** WARNING *** Can't read because table ACL denies it: sn_utility_spoke_file_set
10/31/21 12:32:35 (857) Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d Getting instance ACLs for table: ecc_agent_script_include
10/31/21 12:32:36 (169) Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d WARNING *** WARNING *** Can't read because table ACL denies it: sn_utility_spoke_file_set
10/31/21 12:32:36 (169) Worker-Expedited:IPaaSActionProbe-ebef8f591b23fc14fa7f7d55464bcb6d WARNING *** WARNING *** Can't read because table ACL denies it: sn_utility_spoke_file_set

Resolution

Add the role 'sn_utility_spoke.utility_actions_admin' for the MID server user used for the flow execution