Skip to content

Rule Node Development Guide - TbContext.getPeContext() #774

@jernejcvek

Description

@jernejcvek

This is a...

  • Feature Request
  • Bug Report
  • Enhancement

Problem:
In the Rule Node Development Guide inside subchapter Using ThingsBoard services is written:

ThingsBoard PE users may get access to additional services using TbContext.getPeContext() method.

However, if property <thingsboard.version></thingsboard.version> inside custom rule engine node's pom.xml is not *PE, the PE context is (obviously) not available.

I had a problem when using ThingsBoard 3.2.1PE, which was not listed in the repository, so I had to type the version as <thingsboard.version>3.2.1</thingsboard.version>, which didn't contain the TbContext.getPeContext() method.

tb-pe-v321
artifacts-tb

I've changed to the next available version (<thingsboard.version>3.2.2PE</thingsboard.version>), and it worked.

I know this problem is not related to documentation (but is rather a problem with the repo). However, it may save developers' time if they are alerted.

Proposed Solution:
Inside docs explicitly write that developers must use *PE version if they want to use TbContext.getPeContext() method. In case of trouble (ex., if no PE edition is found for a specified version in the repo), they may change it to an older/newer *PE version.

Page to Update:
https://thingsboard.io/docs/pe/user-guide/contribution/rule-node-development/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions