Hi team,
The goal of my thesis work is to extend the BPMN with IoT elements, according to your example on the data model extension. The IoT task is an extension of the Service Task. I extended the Palette according to the example Custom Controls. how do I draw the shape of my Iot task when I click on Palette? I also modified the PathMap.js,BaseRenderer and created a CustomRenderer to call the drawShape function but the debug indicates error “unknown type bpmn:IoTTask” in registry.js
How do I proceed?
best regards
Hi @Lory76,
did you see our full custom element example ? It also shows how to extend the Model and adding your custom shapes to the palette.
Additionally, I’m very interested in your thesis if it belongs to our modeling libraries, that’s very cool! Do you mind to share when it’s finished?
yes I’ve seen it, but the custom rendering creates a rectangle with different color with a basic instruction:
const rect = drawRect(parentNode, 100, 80, TASK_BORDER_RADIUS, ‘#52B415’);
instead, I would like to use a new image for the task (similar to the User task or Manual, etc.) … what steps should I follow?
I created the icon svg, I transformed it with fontello and I got the path that I inserted in the PathMap.js, but how do I call it from the custom renderer? unfortunately I’m blocked and I can’t progress on
Check out how we render our existing elements in the BpmnRenderer
.
Thanks for your support…I have been able to draw a task with a new icon (not standard) in custom rendering ( the new icon will represent the IoT Task for me). now I will proceed with the extension of the data model. I hope I’m on the right path…suggestions are welcome
Hello (it’s my first topic here),
I know that post is a bit old however still helpful.
I’ve used custom elements example with extend model type:
{
"name": "DbConnector",
"uri": "http://some-company/schema/bpmn/dbc",
"prefix": "dbc",
"xml": {
"tagAlias": "lowerCase"
},
"types": [
{
"name": "DbConnector",
"superClass": [ "bpmn:Task" ],
"properties": [
{
"name": "dsn",
"isAttr": true,
"type": "String"
}
]
}
],
"emumerations": [],
"associations": []
}
when I save XML new <dbc:dbConnector />
is added properly.
When rendered nice icon is showing up - I’m happy with that.
So far so good.
However - and please forgive me if I don’t understand something - my element is still of type bpmn:Task
- when I open it on the properties panel and try to access it in various places. I need to extract businessObject.type
and compare as strings instead is(element, 'dbc:DbConnector')
.
Am I missing something or misunderstood some internals?
Hello @fgorczynski
Please do not necrobump old topics. Instead link to this thread from new topic.