npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@bp3/node-red-contrib-ibm-odm-make-decision

v1.0.12

Published

Node for calling IBM ODM decision services

Downloads

5

Readme

Introduction

This Node-RED node allows IBM ODM decision services to be configured and executed from within a single node without having to resort to configuring a series of nodes within a flow.

The purpose is to hide away the complexities of calling decision services and extracting the various parts of the response such as execution trace information, whilst providing easy to use configuration options that deal with the specifics of ODM.

Usage

The Make Decision node can be found in the IBM ODM palette. Simply drag onto the canvas to start configuring and using it. It can be found in the IBM ODM section of the node palette as shown below.

When the decision service is called, the status of the service is displayed on the flow, as shown below.

The configuration of the node is split into two parts using configuration nodes. The first is the target decision server configuration including the host and authentication details, and the second is the configuration of the rule app and rule set path. This allows a mixture of configurations per node, for example if you want to call the same rule app/rule set but on different target decision servers. Examples can be seen below.

You can also set the decision service configuration dynamically by setting properties on the msg object, which can be mixed and matched with the defined configuration nodes. An example can be seen below.

There is full documentation on how to configure the node within the node help info. There is also an example flow which can be imported from the file tests/make-decision-test-flow.json.

Testing

To run the unit tests, use the following command from the root of the project: npm test.

There is also a Docker Compose YML file node-red/docker-compose.yml that will create a basic Node-RED server. Once started you can then see the test flow with described earlier. To run the Node-RED container you will need to first install Docker, and then run the following command: docker-compose up.

Limitations

The component currently only works with JSON/REST services. This decision was made due to the fact that JSON/REST is the most popular method of communicating with ODM decision services, and that natively Node-RED works with JSON and Javascript Objects. If there is a demand for SOAP or XML/REST, then we will look to build it into the component.

The execution trace currently only returns the following information. Again of more trace data is required then we will look into building it into the component:

  • Decision Id
  • Requested ruleset path
  • Executed ruleset path
  • Execution date
  • Execution duration
  • List of the rules fired

Compatability

This component has been tested with the following ODM versions:

  • ODM 8.9.2 & 8.10
  • ODM On Cloud

However given the stable nature of the HTDS functionality in ODM, this should work OK with past versions of ODM that support JSON over REST.