# How to get the ScriptManager inside Gateway Module Java

**URL:** <https://forum.inductiveautomation.com/t/how-to-get-the-scriptmanager-inside-gateway-module-java/56137>\
**Category:** Module Development\
**Created:** [February 14, 2022, 10:07pm UTC](https://forum.inductiveautomation.com/t/how-to-get-the-scriptmanager-inside-gateway-module-java/56137 "2022-02-14T22:07:35Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![victordcq](https://avatars.discourse-cdn.com/v4/letter/v/f6c823/32.png) [@victordcq](https://forum.inductiveautomation.com/u/victordcq)\
**Post date:** [February 16, 2022, 7:39am UTC](https://forum.inductiveautomation.com/t/how-to-get-the-scriptmanager-inside-gateway-module-java/56137/6 "2022-02-16T07:39:32Z")

</div>

> [@paul-griffith](#):
>
> I’m not sure if our example module provides any samples of that:

Nope im pretty sure it doesnt,

You should check out this topic too, when i ran into some troubles on 8.1.12+  
There are some screens of code in there of both versions

> [@\[Bug\] v8.1.12 Error on invoking extension function, NoBlockingWorkAllowedException](https://forum.inductiveautomation.com/t/bug-v8-1-12-error-on-invoking-extension-function-noblockingworkallowedexception/55102/8):
>
> Phew finally got it working again! I created a runnable with a getValue function where i set BlockingWork.setBLockingWarkAllowed(true) (im doing it twice idk which one is needed but it works) Then initialize the runnable, start it in a thread. wait for it to finish running (join) and get the value from the runnable

---

_[View the full topic](https://forum.inductiveautomation.com/t/how-to-get-the-scriptmanager-inside-gateway-module-java/56137)._
