Define additional parameters of objects (e.g. conditions)


#1

Hello all,

I’d like to know is it possible to manipulate bpmn standard properties of the node trough jQuery.

I have an access to “active” node, using some example with eventBus, and according to its type (bpmn:Task, bpmn:ExclusiveGateway) I am displaying different menus with inputs to fill details of object (Script tasks script, flow’s condition etc). But i have no idea how to ‘inject’ those fields values into xml in a nice way. Is there special attribute where I can put childen of node. For example instead of having just

<bpmn:sequenceFlow id="SequenceFlow_1cw87ch" sourceRef="ExclusiveGateway_1v9oxuj" targetRef="Task_1hes742" />

I’d like to have

<bpmn:sequenceFlow id="SequenceFlow_1cw87ch" sourceRef="ExclusiveGateway_1v9oxuj" targetRef="Task_1hes742">  <bpmn2:conditionExpression xsi:type="bpmn2:tFormalExpression"><![CDATA[ a > 10 ]]>/bpmn2:conditionExpression></bpmn:sequenceFlow>

I found an information that you are actually working on this funcionality, but unfortunately I cannot wait and have to deliver simple solution myself pretty soon, even though I an JS noob :slight_smile:

I’d be really grateful for any hints, ideas, examples, posts or even keywords to google for.

Kind regards,
Adam


#2

Did you check out this post? It should give you enough context to solve your issue.

This is not a forum to get started learning JavaScript, unfortunately.