I am trying to achieve Dynamic Form Binding for that i need the camunda:formKey on bussinessObject
Lets say i have to attached Each task with different Dynamic Form
If i set on initial.bpmn for the StartEvent_1 Object i can able to bind Form Dynamically But how i can set for UserTask Object since there xml is dynamic generating
I also have tried this https://github.com/bpmn-io/bpmn-js-examples/tree/master/bpmn-properties
But not update XML
so, what i want is
<bpmn:userTask id=āTask_077xpifā name=āApproveTaskā camunda:formKey=āapproveTaskā>
bpmn:incoming SequenceFlow_1g078nz</bpmn:incoming>
bpmn:outgoing SequenceFlow_109q686</bpmn:outgoing>
</bpmn:userTask>
Dynamically
Are you using the Camunda BPMN model extension ? Otherwise this property will be unknown and not be serialized.
can you please send one example where we can attached above property on userTask Object
1 Like
nikku
September 7, 2018, 6:02am
4
@vikashsingh009 How did you attempt to set the property? What did you try? Where did you get stuck?
Here is my finding code
var BpmnJS = require(ābpmn-js/lib/Modelerā),
camundaExtensionModule = require(ācamunda-bpmn-moddle/libā),
camundaModdle = require(ācamunda-bpmn-moddle/resources/camunda.jsonā);
var BpmnModdle = require('bpmn-moddle');
additionalModules: [
PropertiesPanelModule,
camundaExtensionModule
],
moddleExtension: {
//custom: customModdle,
camunda: camundaModdle
}
var moddle = new BpmnModdle({ camunda: camundaModdle });
if (isAny(element, [ābpmn:StartEventā])) {
var formKey = moddle.create(ācamunda:formKeyā, {
$body: āapproveTaskā
});
}
please help me on set camunda:formKey on startEvent Object