Coder Social home page Coder Social logo

Comments (7)

andyqier88 avatar andyqier88 commented on May 12, 2024

对比bpmn-moddle里的json文件,貌似在package\designer\plugins\descriptor\camundaDescriptor.json少了对TimerEventDefinition的描述(下边的JSON代码),加上之后window.bpmnInstances.modeling.updateModdleProperties更新属性XML没有变化

{ "name": "TimerEventDefinition", "superClass": [ "EventDefinition" ], "properties": [ { "name": "timeDate", "type": "Expression", "xml": { "serialize": "xsi:type" } }, { "name": "timeCycle", "type": "Expression", "xml": { "serialize": "xsi:type" } }, { "name": "timeDuration", "type": "Expression", "xml": { "serialize": "xsi:type" } } ] }

from bpmn-process-designer.

andyqier88 avatar andyqier88 commented on May 12, 2024

论坛里有一个类似场景的,但是没解决问题
https://forum.bpmn.io/t/cannot-create-bpmn-timedate-within-intermediatecatchevent/3132

from bpmn-process-designer.

miyuesc avatar miyuesc commented on May 12, 2024

我曾尝试通过window.bpmnInstances.moddle.create("bpmn:boundaryEvent") 或者window.bpmnInstances.moddle.create("bpmn:timerEventDefinition")这种方式创建

创建新元素或者属性时,传递的类型名参数应该是大写驼峰形式,比如 moddle.create("bpmn:BoundaryEvent")

另外,如果属性与该项目中的 descriptor.json 内的描述不一致,可以更新为你需要的格式,或者重新添加新的描述文件来对原有类型进行补充说明。

from bpmn-process-designer.

andyqier88 avatar andyqier88 commented on May 12, 2024

我曾尝试通过window.bpmnInstances.moddle.create("bpmn:boundaryEvent") 或者window.bpmnInstances.moddle.create("bpmn:timerEventDefinition")这种方式创建

创建新元素或者属性时,传递的类型名参数应该是大写驼峰形式,比如 moddle.create("bpmn:BoundaryEvent")

另外,如果属性与该项目中的 descriptor.json 内的描述不一致,可以更新为你需要的格式,或者重新添加新的描述文件来对原有类型进行补充说明。

对descriptor.json描述感觉跟bpmn-camunda-moddle里的一样,尝试加了报错,目前也不太清楚descriptor.json的规则,已经求助官方社区了,求助地址

from bpmn-process-designer.

miyuesc avatar miyuesc commented on May 12, 2024

xml 描述文件规则可以看这个 https://juejin.cn/post/6912331982701592590 。你可以通过原生的 camunda 侧边栏编辑对应属性,之后查看元素的 businessObject 属性对象。对内部的每一个原型为 ModdleElement 的属性,都需要通过 moddle.create 进行创建,之后再更新到目标元素上

from bpmn-process-designer.

andyqier88 avatar andyqier88 commented on May 12, 2024

谢谢大兄弟,已赞赏~

from bpmn-process-designer.

miyuesc avatar miyuesc commented on May 12, 2024

😊谢谢

from bpmn-process-designer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.