{"id":61439,"date":"2024-10-13T11:07:13","date_gmt":"2024-10-13T03:07:13","guid":{"rendered":"https:\/\/server.hk\/cnblog\/61439\/"},"modified":"2024-10-13T11:07:13","modified_gmt":"2024-10-13T03:07:13","slug":"flowable-%e6%b5%81%e7%a8%8b%e9%83%a8%e7%bd%b2%e8%88%87%e5%88%aa%e9%99%a4","status":"publish","type":"post","link":"https:\/\/server.hk\/cnblog\/61439\/","title":{"rendered":"Flowable \u6d41\u7a0b\u90e8\u7f72\u8207\u522a\u9664"},"content":{"rendered":"<h1 id=\"flowable-%e6%b5%81%e7%a8%8b%e9%83%a8%e7%bd%b2%e8%88%87%e5%88%aa%e9%99%a4-ngOfvUFXfD\">Flowable \u6d41\u7a0b\u90e8\u7f72\u8207\u522a\u9664<\/h1>\n<p>\u5728\u7576\u4eca\u7684\u5546\u696d\u74b0\u5883\u4e2d\uff0c\u6d41\u7a0b\u7ba1\u7406\u7cfb\u7d71\u7684\u9700\u6c42\u65e5\u76ca\u589e\u52a0\u3002Flowable \u4f5c\u70ba\u4e00\u500b\u958b\u6e90\u7684\u6d41\u7a0b\u5f15\u64ce\uff0c\u63d0\u4f9b\u4e86\u9748\u6d3b\u4e14\u5f37\u5927\u7684\u5de5\u5177\u4f86\u8a2d\u8a08\u3001\u57f7\u884c\u548c\u7ba1\u7406\u696d\u52d9\u6d41\u7a0b\u3002\u672c\u6587\u5c07\u6df1\u5165\u63a2\u8a0e Flowable \u7684\u6d41\u7a0b\u90e8\u7f72\u8207\u522a\u9664\uff0c\u5e6b\u52a9\u8b80\u8005\u66f4\u597d\u5730\u7406\u89e3\u5982\u4f55\u6709\u6548\u5730\u7ba1\u7406\u6d41\u7a0b\u3002<\/p>\n<h2 id=\"%e4%bb%80%e9%ba%bc%e6%98%af-flowable%ef%bc%9f-ngOfvUFXfD\">\u4ec0\u9ebc\u662f Flowable\uff1f<\/h2>\n<p>Flowable \u662f\u4e00\u500b\u57fa\u65bc Java \u7684\u696d\u52d9\u6d41\u7a0b\u7ba1\u7406\uff08BPM\uff09\u5f15\u64ce\uff0c\u652f\u6301 BPMN 2.0\u3001CMMN 1.1 \u548c DMN 1.1 \u6a19\u6e96\u3002\u5b83\u7684\u8a2d\u8a08\u65e8\u5728\u63d0\u4f9b\u9ad8\u6548\u7684\u6d41\u7a0b\u57f7\u884c\u548c\u9748\u6d3b\u7684\u64f4\u5c55\u6027\uff0c\u9069\u5408\u5404\u7a2e\u898f\u6a21\u7684\u4f01\u696d\u4f7f\u7528\u3002<\/p>\n<h2 id=\"%e6%b5%81%e7%a8%8b%e9%83%a8%e7%bd%b2-ngOfvUFXfD\">\u6d41\u7a0b\u90e8\u7f72<\/h2>\n<p>\u5728 Flowable \u4e2d\uff0c\u6d41\u7a0b\u7684\u90e8\u7f72\u662f\u5c07\u8a2d\u8a08\u597d\u7684\u6d41\u7a0b\u6a21\u578b\u4e0a\u50b3\u5230\u5f15\u64ce\u4e2d\uff0c\u4f7f\u5176\u80fd\u5920\u88ab\u57f7\u884c\u3002\u4ee5\u4e0b\u662f\u6d41\u7a0b\u90e8\u7f72\u7684\u57fa\u672c\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e6%ba%96%e5%82%99%e6%b5%81%e7%a8%8b%e6%a8%a1%e5%9e%8b-ngOfvUFXfD\">1. \u6e96\u5099\u6d41\u7a0b\u6a21\u578b<\/h3>\n<p>\u9996\u5148\uff0c\u60a8\u9700\u8981\u4f7f\u7528 Flowable Modeler \u6216\u5176\u4ed6 BPMN \u7de8\u8f2f\u5de5\u5177\u8a2d\u8a08\u6d41\u7a0b\u6a21\u578b\u3002\u6a21\u578b\u61c9\u7b26\u5408 BPMN 2.0 \u6a19\u6e96\uff0c\u4e26\u5305\u542b\u5fc5\u8981\u7684\u5143\u7d20\uff0c\u5982\u4efb\u52d9\u3001\u4e8b\u4ef6\u548c\u9598\u9053\u3002<\/p>\n<h3 id=\"2-%e5%b0%87%e6%b5%81%e7%a8%8b%e6%a8%a1%e5%9e%8b%e5%b0%8e%e5%87%ba%e7%82%ba-xml-ngOfvUFXfD\">2. \u5c07\u6d41\u7a0b\u6a21\u578b\u5c0e\u51fa\u70ba XML<\/h3>\n<p>\u5b8c\u6210\u6a21\u578b\u8a2d\u8a08\u5f8c\uff0c\u5c07\u5176\u5c0e\u51fa\u70ba XML \u683c\u5f0f\u3002\u9019\u662f Flowable \u5f15\u64ce\u6240\u9700\u7684\u683c\u5f0f\uff0c\u901a\u5e38\u4ee5 .bpmn20.xml \u70ba\u64f4\u5c55\u540d\u3002<\/p>\n<h3 id=\"3-%e4%bd%bf%e7%94%a8-flowable-api-%e9%83%a8%e7%bd%b2%e6%b5%81%e7%a8%8b-ngOfvUFXfD\">3. \u4f7f\u7528 Flowable API \u90e8\u7f72\u6d41\u7a0b<\/h3>\n<p>\u53ef\u4ee5\u901a\u904e Flowable \u63d0\u4f9b\u7684 API \u9032\u884c\u6d41\u7a0b\u90e8\u7f72\u3002\u4ee5\u4e0b\u662f\u4e00\u500b\u7c21\u55ae\u7684 Java \u4ee3\u78bc\u793a\u4f8b\uff1a<\/p>\n<pre><code>\nimport org.flowable.engine.ProcessEngine;\nimport org.flowable.engine.ProcessEngineConfiguration;\nimport org.flowable.engine.repository.Deployment;\nimport org.flowable.engine.repository.DeploymentBuilder;\n\npublic class DeployProcess {\n    public static void main(String[] args) {\n        ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration()\n                .buildProcessEngine();\n\n        Deployment deployment = processEngine.getRepositoryService()\n                .createDeployment()\n                .addClasspathResource(\"path\/to\/your\/process.bpmn20.xml\")\n                .deploy();\n\n        System.out.println(\"Process deployed: \" + deployment.getId());\n    }\n}\n<\/code><\/pre>\n<h2 id=\"%e6%b5%81%e7%a8%8b%e5%88%aa%e9%99%a4-ngOfvUFXfD\">\u6d41\u7a0b\u522a\u9664<\/h2>\n<p>\u5728\u67d0\u4e9b\u60c5\u6cc1\u4e0b\uff0c\u60a8\u53ef\u80fd\u9700\u8981\u522a\u9664\u5df2\u90e8\u7f72\u7684\u6d41\u7a0b\u3002Flowable \u63d0\u4f9b\u4e86\u7c21\u55ae\u7684 API \u4f86\u5be6\u73fe\u9019\u4e00\u9ede\u3002\u4ee5\u4e0b\u662f\u522a\u9664\u6d41\u7a0b\u7684\u6b65\u9a5f\uff1a<\/p>\n<h3 id=\"1-%e7%a2%ba%e8%aa%8d%e6%b5%81%e7%a8%8b%e6%98%af%e5%90%a6%e6%ad%a3%e5%9c%a8%e9%81%8b%e8%a1%8c-ngOfvUFXfD\">1. \u78ba\u8a8d\u6d41\u7a0b\u662f\u5426\u6b63\u5728\u904b\u884c<\/h3>\n<p>\u5728\u522a\u9664\u6d41\u7a0b\u4e4b\u524d\uff0c\u9996\u5148\u9700\u8981\u78ba\u8a8d\u8a72\u6d41\u7a0b\u662f\u5426\u6709\u6b63\u5728\u904b\u884c\u7684\u5be6\u4f8b\u3002\u5982\u679c\u6709\uff0c\u5247\u9700\u8981\u5148\u7d42\u6b62\u9019\u4e9b\u5be6\u4f8b\u3002<\/p>\n<h3 id=\"2-%e4%bd%bf%e7%94%a8-flowable-api-%e5%88%aa%e9%99%a4%e6%b5%81%e7%a8%8b-ngOfvUFXfD\">2. \u4f7f\u7528 Flowable API \u522a\u9664\u6d41\u7a0b<\/h3>\n<p>\u53ef\u4ee5\u901a\u904e\u4ee5\u4e0b\u4ee3\u78bc\u4f86\u522a\u9664\u5df2\u90e8\u7f72\u7684\u6d41\u7a0b\uff1a<\/p>\n<pre><code>\nimport org.flowable.engine.ProcessEngine;\nimport org.flowable.engine.ProcessEngineConfiguration;\n\npublic class DeleteProcess {\n    public static void main(String[] args) {\n        ProcessEngine processEngine = ProcessEngineConfiguration.createStandaloneProcessEngineConfiguration()\n                .buildProcessEngine();\n\n        String deploymentId = \"your_deployment_id\"; \/\/ \u66ff\u63db\u70ba\u5be6\u969b\u7684\u90e8\u7f72 ID\n        processEngine.getRepositoryService().deleteDeployment(deploymentId, true);\n        System.out.println(\"Process deleted: \" + deploymentId);\n    }\n}\n<\/code><\/pre>\n<h2 id=\"%e7%b8%bd%e7%b5%90-ngOfvUFXfD\">\u7e3d\u7d50<\/h2>\n<p>Flowable \u63d0\u4f9b\u4e86\u4e00\u500b\u9748\u6d3b\u4e14\u5f37\u5927\u7684\u5e73\u53f0\u4f86\u7ba1\u7406\u696d\u52d9\u6d41\u7a0b\u3002\u901a\u904e\u7c21\u55ae\u7684 API\uff0c\u60a8\u53ef\u4ee5\u8f15\u9b06\u5730\u90e8\u7f72\u548c\u522a\u9664\u6d41\u7a0b\uff0c\u5f9e\u800c\u63d0\u9ad8\u696d\u52d9\u904b\u71df\u7684\u6548\u7387\u3002\u7121\u8ad6\u662f\u5c0f\u578b\u4f01\u696d\u9084\u662f\u5927\u578b\u4f01\u696d\uff0cFlowable \u90fd\u80fd\u6eff\u8db3\u5176\u6d41\u7a0b\u7ba1\u7406\u7684\u9700\u6c42\u3002\u5982\u679c\u60a8\u6b63\u5728\u5c0b\u627e\u9ad8\u6548\u7684 <a href=\"https:\/\/server.hk\">VPS<\/a> \u89e3\u6c7a\u65b9\u6848\u4f86\u904b\u884c Flowable\uff0cServer.HK \u63d0\u4f9b\u4e86\u591a\u7a2e\u9078\u64c7\uff0c\u9069\u5408\u4e0d\u540c\u7684\u696d\u52d9\u9700\u6c42\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4e86\u89e3Flowable\u6d41\u7a0b\u7684\u90e8\u7f72\u8207\u522a\u9664\u65b9\u6cd5\uff0c\u7c21\u5316\u5de5\u4f5c\u6d41\u7a0b\u7ba1\u7406\uff0c\u63d0\u5347\u6548\u7387\uff0c\u78ba\u4fdd\u7cfb\u7d71\u904b\u884c\u9806\u66a2\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[101],"tags":[],"class_list":["post-61439","post","type-post","status-publish","format-standard","hentry","category-database"],"_links":{"self":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/61439","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/comments?post=61439"}],"version-history":[{"count":1,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/61439\/revisions"}],"predecessor-version":[{"id":61440,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/posts\/61439\/revisions\/61440"}],"wp:attachment":[{"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/media?parent=61439"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/categories?post=61439"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/server.hk\/cnblog\/wp-json\/wp\/v2\/tags?post=61439"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}