ARTICLE DETAIL

建站实战干货

来自一线的建站与推广经验沉淀,每一条都经过真实交付验证。

基于 Dify 工作流生成 SAA 工程

2026/8/15 9:46:22 拓冰建站 浏览量
基于 Dify 工作流生成 SAA 工程

1、导出操作说明,请参考 spring-ai-alibaba-graph-studio 模块,快速生成 Spring AI Alibaba 工程。

在启动 Graph Studio 后,当前可以调用如下 HTTP 请求生成,该请求将自动生成 Spring AI Alibaba 工程的 zip 包。

基于 Spring Initializr 扩展的 Graph Studio 模块,提供从自定义 DSL → Java 源码 → 可运行 CompiledGraph 的一站式解决方案。 开发者只需编写或从dify等平台导出一段 YAML/JSON DSL,就能一键生成包含文档抽取、HTTP 调用、RAG 检索、LLM 推理等节点的 Spring Boot + Spring AI Alibaba Graph项目。

2、DSL

事例

app:description: ''icon: 💭icon_background: '#D1E9FF'mode: workflowname: 客户评价处理工作流use_icon_as_answer_icon: false
dependencies:
- current_identifier: nulltype: marketplacevalue:marketplace_plugin_unique_identifier: langgenius/openai:0.0.26@c1e643ac6a7732f6333a783320b4d3026fa5e31d8e7026375b98d44418d33f26
kind: app
version: 0.3.0
workflow:conversation_variables: []environment_variables: []features:file_upload:allowed_file_extensions:- .JPG- .JPEG- .PNG- .GIF- .WEBP- .SVGallowed_file_types:- imageallowed_file_upload_methods:- local_file- remote_urlenabled: falsefileUploadConfig:audio_file_size_limit: 50batch_count_limit: 5file_size_limit: 15image_file_size_limit: 10video_file_size_limit: 100workflow_file_upload_limit: 10image:enabled: falsenumber_limits: 3transfer_methods:- local_file- remote_urlnumber_limits: 3VariableAggregatorNodeDatacariopening_statement: ''retriever_resource:enabled: falsesensitive_word_avoidance:enabled: falsespeech_to_text:enabled: falsesuggested_questions: []suggested_questions_after_answer:enabled: falsetext_to_speech:enabled: falselanguage: ''voice: ''graph:edges:- data:sourceType: starttargetType: question-classifierid: 1711529033302-1711529036587source: '1711529033302'sourceHandle: sourcetarget: '1711529036587'targetHandle: targettype: custom- data:sourceType: question-classifiertargetType: http-requestid: 1711529036587-1711529059204source: '1711529036587'sourceHandle: '1711529038361'target: '1711529059204'targetHandle: targettype: custom- data:sourceType: question-classifiertargetType: question-classifierid: 1711529036587-1711529066687source: '1711529036587'sourceHandle: '1711529041725'target: '1711529066687'targetHandle: targettype: custom- data:sourceType: question-classifiertargetType: http-requestid: 1711529066687-1711529077513source: '1711529066687'sourceHandle: '1711529068175'target: '1711529077513'targetHandle: targettype: custom- data:sourceType: question-classifiertargetType: http-requestid: 1711529066687-1711529078719source: '1711529066687'sourceHandle: '1711529068956'target: '1711529078719'targetHandle: targettype: custom- data:isInIteration: falsesourceType: http-requesttargetType: variable-aggregatorid: 1711529059204-source-1718995432944-targetsource: '1711529059204'sourceHandle: sourcetarget: '1718995432944'targetHandle: targettype: customzIndex: 0- data:isInIteration: falsesourceType: http-requesttargetType: variable-aggregatorid: 1711529077513-source-1718995432944-targetsource: '1711529077513'sourceHandle: sourcetarget: '1718995432944'targetHandle: targettype: customzIndex: 0- data:isInIteration: falsesourceType: http-requesttargetType: variable-aggregatorid: 1711529078719-source-1718995432944-targetsource: '1711529078719'sourceHandle: sourcetarget: '1718995432944'targetHandle: targettype: customzIndex: 0- data:isInIteration: falsesourceType: variable-aggregatortargetType: endid: 1718995432944-source-1718995448481-targetsource: '1718995432944'sourceHandle: sourcetarget: '1718995448481'targetHandle: targettype: customzIndex: 0nodes:- data:desc: ''selected: falsetitle: Starttype: startvariables:- label: Customer Reviewmax_length: 48options: []required: truetype: paragraphvariable: reviewdragging: falseheight: 90id: '1711529033302'position:x: 80y: 282positionAbsolute:x: 80y: 282selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 244- data:classes:- id: '1711529038361'name: 正面评价- id: '1711529041725'name: 负面评价desc: 定义一个用户问题的主题分类,主题定义了对话的进展方式instructions: ''model:completion_params:frequency_penalty: 0max_tokens: 512presence_penalty: 0temperature: 0.7top_p: 1mode: chatname: gpt-3.5-turboprovider: langgenius/openai/openaiquery_variable_selector:- '1711529033302'- reviewselected: falsetitle: Question Classifiertopics: []type: question-classifierdragging: falseheight: 216id: '1711529036587'position:x: 364y: 282positionAbsolute:x: 364y: 282selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 244- data:authorization:config: nulltype: no-authbody:data: ''type: nonedesc: 发送正面评价至公司品牌宣传部门的系统headers: ''method: getparams: ''retry_config:max_retries: 3retry_enabled: trueretry_interval: 100selected: falsetimeout:connect: 10max_connect_timeout: 300max_read_timeout: 600max_write_timeout: 600read: 60write: 20title: HTTP Requesttype: http-requesturl: https://www.example.comvariables: []height: 167id: '1711529059204'position:x: 648y: 282positionAbsolute:x: 648y: 282selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 244- data:classes:- id: '1711529068175'name: 售后问题- id: '1711529068956'name: 运输问题desc: 定义一个用户问题的主题分类,主题定义了对话的进展方式instructions: ''model:completion_params:frequency_penalty: 0max_tokens: 512presence_penalty: 0temperature: 0.7top_p: 1mode: chatname: gpt-3.5-turboprovider: langgenius/openai/openaiquery_variable_selector:- '1711529033302'- reviewselected: falsetitle: Question Classifier 2topics: []type: question-classifierdragging: falseheight: 216id: '1711529066687'position:x: 648y: 422positionAbsolute:x: 648y: 422selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 244- data:authorization:config: nulltype: no-authbody:data: ''type: nonedesc: 发送运输类负面评价至运输部门headers: ''method: getparams: ''retry_config:max_retries: 3retry_enabled: trueretry_interval: 100selected: falsetimeout:connect: 10max_connect_timeout: 300max_read_timeout: 600max_write_timeout: 600read: 60write: 20title: HTTP Request 2type: http-requesturl: https://www.example.comvariables: []height: 151id: '1711529077513'position:x: 932y: 422positionAbsolute:x: 932y: 422selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 244- data:authorization:config: nulltype: no-authbody:data: ''type: nonedesc: 发送运输类负面评价至产品体验部门headers: ''method: getparams: ''retry_config:max_retries: 3retry_enabled: trueretry_interval: 100selected: falsetimeout:connect: 10max_connect_timeout: 300max_read_timeout: 600max_write_timeout: 600read: 60write: 20title: HTTP Request 3type: http-requesturl: https://www.example.comvariables: []height: 151id: '1711529078719'position:x: 932y: 562positionAbsolute:x: 932y: 562selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 244- data:author: Difydesc: ''height: 236selected: falseshowAuthor: truetext: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"这个工作流利用大型语言模型(LLM)对客户评论进行分类,并将其转发到内部系统。","type":"text","version":1}],"direction":"ltr","format":"start","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[],"direction":"ltr","format":"start","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"开始节点: ","type":"text","version":1}],"direction":"ltr","format":"start","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"       ","type":"text","version":1},{"detail":0,"format":1,"mode":"normal","style":"","text":"功能:","type":"text","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"收集用户输入的客户评论。","type":"text","version":1}],"direction":"ltr","format":"start","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"       ","type":"text","version":1},{"detail":0,"format":1,"mode":"normal","style":"","text":"变量:","type":"text","version":1},{"detail":0,"format":0,"mode":"normal","style":"","text":"review 是客户评论文本","type":"text","version":1}],"direction":"ltr","format":"start","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'theme: bluetitle: ''type: ''width: 380height: 236id: '1718995401679'position:x: -40y: 407positionAbsolute:x: -40y: 407selected: falsesourcePosition: righttargetPosition: lefttype: custom-notewidth: 380- data:desc: ''output_type: stringselected: falsetitle: Variable Aggregatortype: variable-aggregatorvariables:- - '1711529059204'- body- - '1711529077513'- body- - '1711529078719'- bodyheight: 153id: '1718995432944'position:x: 1256y: 280positionAbsolute:x: 1256y: 280selected: falsesourcePosition: righttargetPosition: lefttype: customwidth: 244- data:desc: ''outputs:- value_selector:- '1718995432944'- outputvariable: outputselected: falsetitle: Endtype: endheight: 90id: '1718995448481'position:x: 1560y: 280positionAbsolute:x: 1560y: 280sourcePosition: righttargetPosition: lefttype: customwidth: 244- data:author: Difydesc: ''height: 88selected: falseshowAuthor: truetext: '{"root":{"children":[{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"使用HTTP 请求将反馈发送至公司内部系统。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'theme: bluetitle: ''type: ''width: 240height: 88id: '1718995540857'position:x: 1229y: 539positionAbsolute:x: 1229y: 539selected: falsesourcePosition: righttargetPosition: lefttype: custom-notewidth: 240- data:author: Difydesc: ''height: 435selected: falseshowAuthor: truetext: '{"root":{"children":[{"children":[{"detail":0,"format":11,"mode":"normal","style":"font-size:16px;","text":"详细流程","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":11},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"用户输入:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"       用户在开始节点输入客户评论。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"初步分类:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"        评论被分类为正面评论或负面评论。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"正面评论处理:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"        正面评论被发送到品牌营销部门。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"负面评论处理:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"        负面评论进一步分类为售后问题或运输问题。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"售后问题处理:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"        负面售后反馈被发送到售后部门。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"运输问题处理:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"        负面运输反馈被发送到运输部门和产品体验部门。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"变量聚合器:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"        HTTP请求的响应被分配到变量中。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0},{"children":[{"detail":0,"format":1,"mode":"normal","style":"font-size:16px;","text":"工作流完成:","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":1},{"children":[{"detail":0,"format":0,"mode":"normal","style":"","text":"        工作流标记为完成,并生成最终输出。","type":"text","version":1}],"direction":"ltr","format":"","indent":0,"type":"paragraph","version":1,"textFormat":0}],"direction":"ltr","format":"","indent":0,"type":"root","version":1}}'theme: bluetitle: ''type: ''width: 398height: 435id: '1718995570152'position:x: 443.1489102726852y: 705.1650449303348positionAbsolute:x: 443.1489102726852y: 705.1650449303348selected: truesourcePosition: righttargetPosition: lefttype: custom-notewidth: 398viewport:x: -137.7061529600045y: 393.0799644994046zoom: 0.6597539553864473

http://localhost:8080/starter.zip

 DIFY导出dsl