Add Type of Task on General Panel Properties

Hi, im new to bpm.io and the properties-panel example works just fine.

I try to use the general tab panel to add information to a task so I can export/import that data into another app.

So, what I want to do is add a select/option on that General Panel (See Image)

.

Investigating on the code came to the file CamudaPropertiesProvider.js , there configure the tabs and the elements.
(When the task is a Business Rule, it have a “implementation” element , but I cant reproduce the code on the general tab )

How can I add elements to this tabs.

Anyone can help me or give a clue?

Thanks in advance

Hey @guiles,

please take a look at this example: https://github.com/bpmn-io/bpmn-js-examples/tree/master/properties-panel-extension

1 Like

Hi! I was able to get it work. Now I need the tab “magic” on all task elements.

What I did was in SpellProps.js code commented the if so when i clicked on every element shows the properties:
//if (is(element, ‘bpmn:StartEvent’)) {
group.entries.push(entryFactory.textField({
id : ‘spell’,
description : ‘Apply a black magic spell’,
label : ‘Spell’,
modelProperty : ‘spell’
}));
//}

Whay i wasnt able to do was when it exports only the startEvent tag get the magic spell attribute.

Two question:

  1. Anyone knows the name of the task Event?
    like bpmn:StartEvent i tried bpmn:task and bpmn:TaskEvent and does not work.

  2. How can I add the attribute spell when exports to xml, i know that have to change these file:
    {
    “name”: “Magic”,
    “prefix”: “magic”,
    “uri”: “http://magic”,
    “xml”: {
    “tagAlias”: “lowerCase”
    },
    “associations”: [],
    “types”: [
    {
    “name”: “BewitchedStartEvent”,
    “extends”: [
    “bpmn:StartEvent”
    ],
    “properties”: [
    {
    “name”: “spell”,
    “isAttr”: true,
    “type”: “String”
    },
    ]
    },
    ]
    }

Add the task event here ==> “extends”: [
“bpmn:StartEvent”
]

But when I do everything goes wrong :(.

Hope someone can get me directions.

Thanks.

The exports works with “Task” ( Sorry didn’t try the capital T). So the code goes like this.

“extends”: [
“bpmn:StartEvent”,
“bpmn:Task”
],

Regards.