index.ts 1.55 KB
/**
 *规则链 变换 英文配置文件
  目前共有3个,分类按名称进行配置
 */
export default {
  title: 'Transform',
  description: 'Change message Payload and metadata',
  changeOriginator: {
    name: 'change originator',
    details: `Related Entity found using configured relation direction and Relation Type. If multiple Related Entities are found, only first Entity is used as new Originator, other entities are discarded.<br/>Alarm Originator found only in case original Originator is <code>Alarm</code> entity.`,
    description: 'Change Message Originator To Tenant/Customer/Related Entity/Alarm Originator',
  },
  script: {
    name: 'script',
    details: `JavaScript function receive 3 input parameters <br/> <code>metadata</code> - is a Message metadata.<br/><code>msg</code> - is a Message payload.<br/><code>msgType</code> - is a Message type.<br/>Should return the following structure:<br/><code>{ msg: <i style="color: #666;">new payload</i>,<br/>&nbsp&nbsp&nbspmetadata: <i style="color: #666;">new metadata</i>,<br/>&nbsp&nbsp&nbspmsgType: <i style="color: #666;">new msgType</i> }</code><br/>All fields in resulting object are optional and will be taken from original message if not specified.`,
    description: 'Change Message payload, Metadata or Message type using JavaScript',
  },
  toEmail: {
    name: 'to email',
    details: `Transforms message to email message by populating email fields using values derived from message metadata. Set 'SEND_EMAIL' output message type.`,
    description: 'Transforms message to email message',
  },
};