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 🙏

© 2026 – Pkg Stats / Ryan Hefner

udm-rules-vue

v0.0.1

Published

UDM规则引擎开发套件Vue3版本

Readme

UDM 规则引擎 开发套件

简介

UDM 全称为 Unify Decision Manager,是一款由上海锐道信息技术有限公司开发的规则引擎产品,它包含规则集、决策表、决策流等规则工具;UDM 中采用自然语言的规则编写方式,提供完善的代码提示以及错误诊断机制,使得非技术人员也可以快速上手编写业务规则。

UDM 规则引擎完全兼容IBM ODM规则引擎(原 iLog)中规则集、决策表、决策流语法及业务模型,可直接打开并运行IBM ODM业务规则项目,实现 iLog 项目的快速迁移。

UDM 主要由三个部分组成,分别是一个由 java 实现的基于 Rete 算法的核心计算引擎,一个由 java 编写的服务端,一个基于 vscode 插件的开发套件以及一个发布在 npm 上可以在 web 环境中使用的包含各种编辑器在内的组件库。

在 web 开发中使用 npm 组件库

我们除了可以直接使用基于 vscode 插件来进行 UDM 规则开发外,还可以通过引用发布在 npm 上的 udm 组件库,在纯 web 环境中定义自己的规则编辑器,以将 UDM 规则引擎无缝嵌入到我们的 web 项目中。

安装组件库

npm i udm

UDM 的 web 中的组件采用 vue3 开发,所以我们安装好 UDM 组件库后就可以在标准的 vue3 开发环境中引用相关编辑器及相关 api。

依赖说明

UDM 组件库将以下依赖声明为 peerDependencies,使用时需要确保项目中已安装:

  • konva: ^10.0.12 - 用于图形渲染(规则流编辑器等)

安装 UDM 后,请确保项目中安装了所需的 peerDependencies:

npm install konva@^10.0.12

规则编辑器

import {RuleEditor} from 'udm'

RuleEditor 组件需要一个加载数据的名为load-file-callback方法属性,需要方法签名如下:

() => Promise<any>

我们需要在方法中加载文件对应的内容,然后通过返回一个 Promise 将加载后的内容返回给编辑器使用。

文件内容发生变化后,会触发名为FILE_CHANGE的事件,我们可以通过下面方法监听并使用:

import {event} from 'udm';
event.EventBus.on(event.FILE_CHANGE,(data)=>{
	......
});

如果需要获取当前文件内容,可以通过 window 对象的 postMessage 实现:

import {event} from 'udm';
window.postMessage({command:event.REQUEST_EDITOR_DATA});

发出要获取编辑器内容的消息后通过下面的方式接收编辑器传递过来的数据:

import {event} from 'udm';
event.EventBus.on(event.THE_EDITOR_DATA,(data)=>{
	......
}})

决策表编辑器

import {DecisionTableEditor} from 'udm'

和规则编辑器一样,决策表编辑器也需要一个名为load-file-callback方法属性用来加载数据,签名和使用方法与规则编辑器相同。

文件内容变化监听以及获取当前文件内容方式也与规则编辑器相同,这里不再赘述。

规则流编辑器

import {FlowEditor} from 'udm'

和规则编辑器一样,决策表编辑器也需要一个名为load-file-callback方法属性用来加载数据,签名和使用方法与规则编辑器相同。

文件内容变化监听以及获取当前文件内容方式也与规则编辑器相同,这里不再赘述。