Skip to main content
Version: 3.7

BusinessLogic 业务组件逻辑

1. 结构声明

class BusinessLogic extends Logic {
isPublic: boolean;
}

2. 节点示例

(1) 示例

AST 如下:

{
"concept": "BusinessLogic",
"isPublic": true,
"name": "reset",
"description": "重置状态",
"params": [],
"returns": [],
"variables": [],
"body": [
{
"concept": "Start",
"label": "开始"
},
{
"concept": "CallLogic",
"uuid": "c223c0c29a2b41f48e7d17b9ea1c076c",
"calleeNamespace": "nasl.ui",
"calleeName": "showMessage",
"shortcut": true,
"arguments": [
{
"concept": "Argument",
"keyword": "text",
"expression": {
"concept": "StringLiteral",
"value": "重置状态"
}
}
],
"label": "弹出消息"
},
{
"concept": "End",
"label": "结束"
}
],
"playground": []
}

对应的代码如下:

public @(
description = "重置状态",
)
logic reset() {
nasl::ui::showMessage('重置状态')
end
}