Using BPMN shapes with Angular 7

When I try to integrate some shapes of BPMN in my Angular app I got this message

ERROR Error: Unknown Shape.figure: BpmnActivityParallel

I’ve integrated Figures.js in my angular.json

        "scripts": [
          "./node_modules/gojs/extensions/Figures.js"
        ]

is there any solution for this … and please is there any link where I will find all BPMN shapes

That figure, “BpmnActivityParallel”, is definitely defined in that file, so you should check to make sure that file actually got loaded.

All of the old Shape figures are defined in that file.

it’s loaded very well , I see this error in my consol I don’t know what to do in this case :

Figures.js:91 Uncaught ReferenceError: go is not defined
at Figures.js:91

when i look what’s going on in this line i found :

91: go.Shape._FigureParameters = {};

when i comment it the same error apears in another line

Figures.js:99 Uncaught ReferenceError: go is not defined
at Figures.js:99

which is :

99 : go.Shape.getFigureParameter = function(figurename, index) {

Any help please ???

Well, clearly you haven’t loaded go.js or go-debug.js yet.

well for peaple who use Angular just inject figures.js in your components directly to avoid all this muchibichi and don’t try to inject it in scripts in angular.json

import ‘…/…/node_modules/gojs/extensions/Figures.js’

this line is very enough .

thank you walter for you help

Also, you could use the extensionsTS/Figures.ts file in your project.

1 Like