Skip to content
Discussion options

You must be logged in to vote

Hi,

It seems that I have finally achieved. Here is the typescript code if anyone is interested:

import { ZenEngine, ZenDecisionContent, ZenEngineResponse, ZenEngineHandlerRequest, ZenEngineHandlerResponse } from '@gorules/zen-engine';
import * as fs from 'fs/promises';

// Define the structure of custom node handlers
type CustomNodeRequest = {
    input?: Record<string, any>;
    node: {
        kind: string;
    };
};

type CustomNodeResponse = {
    output: any;
    traceData?: Record<string, any>;
};

type CustomNodeHandler = {
    handle: (request: CustomNodeRequest) => CustomNodeResponse;
};

// Define custom nodes
const customNodes: Record<string, CustomNodeHandler> = {
    add: {

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by antback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant