Thank you for your answer philipp.
I read many examples/plugins/readme-files on github, installed them, looked how they work and so on.
As well as in the bpmn.io-forum.
The people are always linking to the examples on github.
What I want to achieve is:
Add some custom tasks, events and one dataobject.
Custom means here: they have their own name and their own image/icon.
They can appear either in the palette or context pad - it doesnt matter.
So the plugin which is near to that is that one:
Lets talk about the first one:
Here is shown how to add an existing task the “ServiceTask” to the palette.
But how I can add my own tasks, events and object?
Also this example doesn’t work after “npm install” - there are errors which can’t be fixed with “npm audit fix”.
In the second one there are like I understand new elements “QualityAssurance” and “AnaylisDetails” made in the qa.js-file.
But that one works after “npm install” and “npm run”
My problem is I don’t exactly understand in which files I have to change/add code and sometimes how this code has to look like:
I tried to add code in the file “CustomPalette.js” in the directory /app/custom (to extend the palette) and in qa.js in /resources to add my own elements
qa.js was like this:
{
“name”: “QualityAssurance”,
“uri”: “http://some-company/schema/bpmn/qa”,
“prefix”: “qa”,
“xml”: {
“tagAlias”: “lowerCase”
},
“types”: [
{
“name”: “AnalyzedNode”,
“extends”: [
“bpmn:FlowNode”
],
“properties”: [
{
“name”: “suitable”,
“isAttr”: true,
“type”: “Integer”
}
]
}
And I changed it to:
{
“name”: “ReaderTask”,
“superClass”: [ “Element” ],
“properties”: []
},
{
“name”: “ReaderEvent1”,
“superClass”: [ “Element” ],
“properties”: []
},
CustomPalette.js was this:
getPaletteEntries(element) {
const {
create,
elementFactory,
translate
} = this;
function createServiceTask(event) {
const shape = elementFactory.createShape({ type: 'bpmn:ServiceTask' });
create.start(event, shape);
}
return {
'create.service-task': {
group: 'activity',
className: 'bpmn-icon-service-task',
title: translate('Create ServiceTask'),
action: {
dragstart: createServiceTask,
click: createServiceTask
}
}
}
}
And I changed it to:
getPaletteEntries(element) {
const {
create,
elementFactory,
translate
} = this;
function createReaderTask(event) {
const shape = elementFactory.createShape({ type: 'bpmn:ReaderTask' });
create.start(event, shape);
}
function createReaderEvent(task) {
const shape = elementFactory.createShape({ type: 'bpmn:ReaderEvent1' });
create.start(task, shape);
}
return {
'create.reader-task': {
group: 'activity',
className: 'bpmn-icon-reader-task',
title: translate('Create ReaderTask'),
action: {
dragstart: createReaderTask,
click: createReaderTask
}
},
'create.reader-event': {
group: 'activity',
className: 'bpmn-icon-reader-event',
title: translate('Create ReaderEvent'),
action: {
dragstart: createReaderEvent,
click: createReaderEvent
}
}
}
}
I added CSS-classes to the css-file in /app/css with a background-image to add a custom icon to this task and event.
But I don’t know if its the right way to add icons to the tasks. And it also didn’t work.
After adding code and execute “npm install” there are always errors which can not be fixed with “npm audit fix”.
And also I mentioned that this plugin-examples on github above are different to for example the linter-plugin.
When I install linter I can see what the plugin is doing in the camunda-modeler.exe itself.
The others need “npm run” and after that I can open my browser with localhost:5000 and kind of modelling there.
So after 2 weeks I get more and more confused. I really want to use the modeler but I’m getting hopeless about this custom stuff.
Like I said I’m ready to pay for help or donate to camunda. Whatever it takes.