hi ,
maybe its a silly question but i need help
how can i reference the conditionExpression to the modelProperty from the sequenceFlow businessObject
for exemple if open the diagram in my designer, select the sequencFlow in which the value is ${a == 2 && b == 3} and write ${foo == “bar”} in the textBox area the result i get is ${a == 2 && b == 3}=${foo == bar}
i set the model property to => modelProperty: element.businessObject.conditionExpression.body so i’m getting the value of the condition as a reference
any help please
best regards
Can you share some code? I’m not entirely sure I understand what you’re doing.
if (element.businessObject.$type === 'bpmn:SequenceFlow' ) {
return tabs.concat({
id: 'extensionElements',
label: this.translate('extensions'),
groups: [
{
id: 'condition',
label: this.translate('condition'),
entries: [
EntryFactory.textBox({
id: 'expression',
label: this.translate('expression'),
modelProperty: element.businessObject.conditionExpression.body
}),
]
}
]
});
}```
<sequenceFlow
id="flow18"
sourceRef="startEvent1"
targetRef="parallelgateway5"
${bar == foo}="${foo == bar}">
<conditionExpression xsi:type="tFormalExpression">
${bar == foo}
</conditionExpression>
</sequenceFlow>
when i type foo == bar in the textBox area i get the result as shown below
So you’re trying to edit the condition expression of conditional sequence flows using the properties panel?
yap and after that edit the mail task attributes such as sender reciever cc and usertask form property so i need to find a mechanism
You can already edit the condition expression using the properties panel, right?
According to the BPMN 2.0 specification the following elements can be sources of conditional sequence flows:
- activity
- exclusive gateway
- inclusive gateway
- complex gateway
A start event is not one of them.
i got this for other flows
You’re probably not including the CamundaPropertiesProvider when creating the bpmn-js instance.
import propertiesPanelModule from 'bpmn-js-properties-panel';
import propertiesProviderModule from 'bpmn-js-properties-panel/lib/provider/camunda';
import camundaModdlePackage from 'camunda-bpmn-moddle/resources/camunda';
import camundaModdleExtension from 'camunda-bpmn-moddle/lib';
new BpmnJS({
additionalModules: [
camundaModdleExtension,
propertiesPanelModule,
propertiesProviderModule
],
moddleExtensions: {
camunda: camundaModdlePackage
}
});
thank you for the response, but i i don’t want to use camunda properties provider because i’m using activiti, so i want to customize the properties panel to deal with activiti properties and and namespace, cause i tried to test camunda modeler (the desktop app) and it doesn’t detect activiti attributes ,
best regards
You’d do this in the same manner the properties panel was extended in order to work with Camunda properties.