index.ts 1.4 KB
import { FlowCategoryComponentEnum } from '../../../enum/category';
import { useCreateNodeKey } from '../../../hook/useCreateNodeKey';
import type { NodeItemConfigType } from '../../../types/node';
import { RuleNodeTypeEnum } from '../../index.type';

const keys = useCreateNodeKey(FlowCategoryComponentEnum.OUTPUT);

export interface OutputDataType {
  someConfiguration?: Recordable;
}

export const OutputConfig: NodeItemConfigType = {
  ...keys,
  clazz: 'org.thingsboard.rule.engine.flow.TbRuleChainOutputNode',
  categoryType: RuleNodeTypeEnum.FLOW,
  name: 'output',
  configurationDescriptor: {
    nodeDefinition: {
      details:
        'Produces output of the rule chain processing. The output is forwarded to the caller rule chain, as an output of the corresponding "input" rule node. The output rule node name corresponds to the relation type of the output message, and it is used to forward messages to other rule nodes in the caller rule chain. ',
      description: 'transfers the message to the caller rule chain',
      inEnabled: true,
      outEnabled: false,
      relationTypes: ['Success', 'Failure'],
      customRelations: false,
      ruleChainNode: false,
      defaultConfiguration: {
        version: 0,
      },
      uiResources: ['static/rulenode/rulenode-core-config.js'],
      configDirective: 'tbFlowNodeRuleChainOutputConfig',
      icon: '',
      iconUrl: '',
      docUrl: '',
    },
  },
};