Open zxuanhong opened 1 week ago
What customizations did you do exactly? Adding a custom context pad entry with a custom icon is independent from shape rendering. If you're still creating a service task under the hood a service task will be rendered. If you want your service task to have a custom icon based on some criteria you need a custom renderer: https://github.com/bpmn-io/bpmn-js-example-custom-rendering
@philippfromme I customize is the element template。But the element template icon cannot be displayed in appendPreview
Describe the Bug
For the appendPreview service task, the icon is different from the real situation when it comes out
The template custom icon cannot be previewed appendPreview
Steps to Reproduce
create CustomContextPad add append service task,code:
CustomContextPad.$inject = [ 'bpmnFactory', 'commandStack', 'config', 'contextPad', 'create', 'elementFactory', 'injector', 'translate', 'appendPreview', ];
function isEventType(eventBo, type, definition) { var isType = eventBo.$instanceOf(type); var isDefinition = false;
var definitions = eventBo.eventDefinitions || []; forEach(definitions, function (def) { if (def.$type === definition) { isDefinition = true; } });
return isType && isDefinition; }