# Problem with node-red-contrib-actionflows since upgrade to 2.2.0

**URL:** <https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368>\
**Category:** General\
**Created:** [27 January 2022 19:25 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368 "2022-01-27T19:25:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Roland](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Roland](https://discourse.nodered.org/u/Roland)\
**Post date:** [27 January 2022 19:25 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/1 "2022-01-27T19:25:06Z")

</div>

Since upgrade to 2.2.0, the "action in"-process isn't triggered anymore.

Log-Entry  
RED.settings.functionGlobalContext.get is not a function  
/app/node\_modules/node-red-contrib-actionflows/actionflows/actionflows.js:270:51

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [27 January 2022 20:37 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/2 "2022-01-27T20:37:20Z")

</div>

> [@Roland](#):
>
> /app/node\_modules/node-red-contrib-actionflows/actionflows/actionflows.js:270:51

What version are you using because GitHub shows line 270 to be blank:

> <https://github.com/Steveorevo/node-red-contrib-actionflows/blob/master/actionflows/actionflows.js#L270>

Also `RED.settings.functionGlobalContext.get` ISN'T a function I don't believe?

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [27 January 2022 22:39 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/3 "2022-01-27T22:39:35Z")

</div>

To add to that - that line of code ...

> [@Roland](#):
>
> RED.settings.functionGlobalContext.get is not a function

... was present in the previous version: [node-red-contrib-actionflows/actionflows/actionflows.js at 9034544b4e069fe31d0ffc36abaccebf2c5bbe89 · Steveorevo/node-red-contrib-actionflows · GitHub](https://github.com/Steveorevo/node-red-contrib-actionflows/blob/9034544b4e069fe31d0ffc36abaccebf2c5bbe89/actionflows/actionflows.js#L270) from Jan 2021.

@Roland You need to update `node-red-contrib-actionflows`

---

<div class="post-metadata">

**Author:** ![Roland](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Roland](https://discourse.nodered.org/u/Roland)\
**Post date:** [28 January 2022 06:55 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/4 "2022-01-28T06:55:29Z")

</div>

domotics@1.0.0 /home/domotics/app  
├── agentkeepalive@4.2.0  
├── ansicolors@0.3.2  
├── node-red-contrib-actionflows@2.0.4  
├── node-red-contrib-advanced-ping@1.2.0  
├── node-red-contrib-ccu@3.4.2  
├── node-red-contrib-config@1.2.1  
├── node-red-contrib-cron-plus@1.5.6  
├── node-red-contrib-fritz@1.4.5  
├── node-red-contrib-fs-ops@1.6.0  
├── node-red-contrib-fs@1.4.1  
├── node-red-contrib-google-oauth-calendar@0.1.1  
├── node-red-contrib-influxdb@0.6.1  
├── node-red-contrib-moment@4.0.0  
├── node-red-contrib-mongodb4@1.2.3  
├── node-red-contrib-pjlink@1.0.4  
├── node-red-contrib-timerswitch@1.4.0  
├── node-red-contrib-twitter@1.1.3  
├── node-red-contrib-ui\_list@0.1.5  
├── node-red-contrib-ui-contextmenu@2.0.1  
├── node-red-contrib-ui-multistate-switch@1.2.2  
├── node-red-contrib-ui-svg@2.3.1  
├── node-red-contrib-vacation-timer@2.2.8  
├── node-red-contrib-web-worldmap@2.26.1  
├── node-red-dashboard@3.1.5  
├── node-red-node-email@1.14.0  
├── node-red-node-feedparser@0.2.2  
├── node-red-node-markdown@0.1.4  
├── node-red-node-mysql@1.0.0  
├── node-red-node-openweathermap@0.5.1  
├── node-red-node-prowl@0.0.10  
├── node-red-node-tail@0.3.2  
├── node-red-node-ui-iframe@0.2.1  
├── node-red-node-ui-table@0.3.11  
├── node-red@2.1.6  
├── pm2@5.1.2  
└── uuid@8.3.2

As you can see - I'am using "node-red-contrib-actionflows@2.0.4".  
I send you some code-lines from my actionflow.js

```auto
   // Init mapping variables right away
    function map() {
      //var af = node.context().global.get('actionflows');
      var af = RED.settings.functionGlobalContext.get("actionflows");
      if (typeof af == "undefined") {
        af = new Object();

```

Thx for your help Regards Roland

---

<div class="post-metadata">

**Author:** ![Roland](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Roland](https://discourse.nodered.org/u/Roland)\
**Post date:** [28 January 2022 07:08 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/5 "2022-01-28T07:08:51Z")

</div>

At the moment, I don't understand. I clean npm cache and install it again but I get the old version. I copy the js-source from git and will test it.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [28 January 2022 08:19 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/6 "2022-01-28T08:19:57Z")

</div>

> [@Roland](#):
>
> As you can see - I'am using "node-red-contrib-actionflows@2.0.4".

2.0.4 does not work.

Latest version is `2.1.1`

> [@Roland](#):
>
> I clean npm cache and install it again but I get the old version

You are possibly installing in wrong place. Ensure you are in the correct .node-red directory. Look at your node-red startup log - what does `User directory` say?

 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/d/8/d89c4571b9e99998c79507dfbc34e3d1ef846d2a.png)

Then do something like...

```auto
cd c:\users\stephen\.node-red
npm i node-red-contrib-actionflows@2.1.1

```

Then restart node-red.

---

<div class="post-metadata">

**Author:** ![Roland](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Roland](https://discourse.nodered.org/u/Roland)\
**Post date:** [28 January 2022 11:54 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/7 "2022-01-28T11:54:33Z")

</div>

again thx for your help Steve, pleas help me. When I search in flows "[node-red-contrib-actionflows (node) - Node-RED](https://flows.nodered.org/node/node-red-contrib-actionflows)" I get 2.0.4 as current version.  
When i try to install 2.1.1 I get

```auto
npm i node-red-contrib-actionflows@2.1.1
npm ERR! code ETARGET
npm ERR! notarget No matching version found for node-red-contrib-actionflows@2.1.1.

```

What went wrong, from where can I get your specified version. Do i use a wrong repository ?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [28 January 2022 11:54 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/8 "2022-01-28T11:54:37Z")

</div>

Unfortunately, the author of this node hasn't published v2.1.1 - you will need to raise an issue on GitHub.

I you want to, you can manually install this version:

```bash
cd ~/.node-red
npm install Steveorevo/node-red-contrib-actionflows

```

That will install the version from GitHub. Couldn't say whether it will work though.

---

<div class="post-metadata">

**Author:** ![Roland](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@Roland](https://discourse.nodered.org/u/Roland)\
**Post date:** [30 January 2022 12:17 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/9 "2022-01-30T12:17:44Z")

</div>

I try this version without success. I switch (many) nodes from actionflows to "link call". I think this is the best way for the future. Again thx.  
ps now all is fine with 2.2.0

---

<div class="post-metadata">

**Author:** ![Edo78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edo78/32/19682_2.png) [@Edo78](https://discourse.nodered.org/u/Edo78)\
**Post date:** [30 January 2022 16:58 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/10 "2022-01-30T16:58:15Z")

</div>

As soon as I updated to 2.2.0 another package started to throw the same error

```auto
30 Jan 17:29:00 - [error] [chatbot-telegram-node:2cc35ee2a852bc9f] TypeError: RED.settings.functionGlobalContext.get is not a function

```

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [30 January 2022 17:00 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/11 "2022-01-30T17:00:54Z")

</div>

Have you raised an issue with the author of that node?

There appear to be several chatbot nodes so it isn't clear from the error msg which one you are using:

[Library - Node-RED (nodered.org)](https://flows.nodered.org/search?term=chatbot&type=node)

---

<div class="post-metadata">

**Author:** ![Edo78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edo78/32/19682_2.png) [@Edo78](https://discourse.nodered.org/u/Edo78)\
**Post date:** [30 January 2022 17:02 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/12 "2022-01-30T17:02:32Z")

</div>

Not yet, this is the first result for searchig such error and I want to contrib specifying that it isn't related just to actionflows

---

<div class="post-metadata">

**Author:** ![Edo78](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/edo78/32/19682_2.png) [@Edo78](https://discourse.nodered.org/u/Edo78)\
**Post date:** [30 January 2022 17:04 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/13 "2022-01-30T17:04:32Z")

</div>

It looks like someone already opened [Chatbot broken with node-red 2.2.0? · Issue #520 · guidone/node-red-contrib-chatbot · GitHub](https://github.com/guidone/node-red-contrib-chatbot/issues/520)

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 January 2022 20:34 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/14 "2022-01-30T20:34:21Z")

</div>

We made some internal changes in Node-RED with how global context is managed - and this error is a side-effect of that.

Using `RED.settings.functionGlobalContext` as way to access global context was never documented as a suitable way of doing it. The fact these nodes are broken because they took that approach, isn't ideal, but nor have we changed a published API.

We need to think about what to do here - should we revert our change to keep things working, or encourage these nodes to use proper APIs.

---

<div class="post-metadata">

**Author:** ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)\
**Post date:** [30 January 2022 21:08 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/15 "2022-01-30T21:08:46Z")

</div>

> [@knolleary](#):
>
> We need to think about what to do here - should we revert our change to keep things working, or encourage these nodes to use proper APIs.

Is it only the action node and chatbot node we know of Nick?

Is there an equivalent/usable published API we can request the Devs to use instead?

Also, we have the link call & other telegram nodes, is it not a case of pointing users to the alternatives?

---

<div class="post-metadata">

**Author:** ![cymplecy](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/cymplecy/32/2773_2.png) [@cymplecy](https://discourse.nodered.org/u/cymplecy)\
**Post date:** [30 January 2022 21:21 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/16 "2022-01-30T21:21:58Z")

</div>

> [@knolleary](#):
>
> We need to think about what to do here - should we revert our change to keep things working, or encourage these nodes to use proper APIs.

I really don't think you should revert because someone has used undocumented calls.

They've taken a risk- it hasn't worked #Life

---

<div class="post-metadata">

**Author:** ![dceejay](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dceejay/32/38_2.png) [@dceejay](https://discourse.nodered.org/u/dceejay)\
**Post date:** [30 January 2022 21:25 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/17 "2022-01-30T21:25:56Z")

</div>

I agree don’t revert. and if we do “fix” it do we then have to add it to the api and maintain it ? Or immediately deprecate it again. Messy

---

<div class="post-metadata">

**Author:** ![knolleary](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/knolleary/32/3_2.png) [@knolleary](https://discourse.nodered.org/u/knolleary)\
**Post date:** [30 January 2022 21:33 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/18 "2022-01-30T21:33:43Z")

</div>

I think what we need is insight as to why this API was being used in this way.

Nodes have full access to global context - they have no need to use this API. Code outside of a node doesn't have a way to access context - so this would be one way to get around that.

Need to do some digging into those nodes to see how/why they use that API.

---

<div class="post-metadata">

**Author:** ![SandeepA](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/sandeepa/32/63225_2.png) [@SandeepA](https://discourse.nodered.org/u/SandeepA)\
**Post date:** [1 February 2022 22:13 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/19 "2022-02-01T22:13:59Z")

</div>

My flows are broken as well . We are using node-red-contrib-actionflows extensively.

The provide an excellent mechanism to have a dynamically pluggable/extensible flows.  
We have upgraded only 1 environment to 2.2 for test. But its starting to raise concerns if we need to change now all our flows (close to 70-80 flows) to something not as dynamic.

The main challenge would be to be able to find something as dynamic and useful.

Appreciate if this change can be made in some way backward compatible.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [1 February 2022 22:21 UTC](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368/20 "2022-02-01T22:21:12Z")

</div>

> [@knolleary](#):
>
> I think what we need is insight as to why this API was being used in this way.

Looking at the code in actionflows, there are just 2 references and it appears to me as though it is just an odd way of calling get/set.

I can see that nobody has yet raised an issue against that repo which is the first step. It looks like the fix is a very simple change of just 2 lines so it wouldn't be hard to fix it and issue a PR.

[Next page](https://discourse.nodered.org/t/problem-with-node-red-contrib-actionflows-since-upgrade-to-2-2-0/57368.md?page=2)
