BPMN editor sample does not work

I came across GoJS as I was looking for a UI diagramming library. Before I explore it further to learn, I wanted to explore the sample projects for a quick look at the library capabilities. I wanted to explore the BPMN sample present under projects folder. Launching the BPMN.html file in a browser does not load the editor to create a new workflow diagram. Same issue exists with the online demo as well GoJS BPMN Editor.

Examining the browser console shows up JS errors:

Could someone help me to get this error fixed so that I could explore a working demo of BPMN sample?

Thanks in advance.

I have already answered the GitHub issue that you entered.

Basically, all of the import statements need to be consistent with having (or not having) the “.js” file extension in the “from” string. This is fixed in 2.1.9, but until that comes out in a few days, you can just modify all of your copies of the files that are used or imported by the BPMN sample source files.

Thanks @walter. I was able tor run the BPMN editor sample in my local after doing the changes you suggested in my local source file(details are mentioned in GitHub issue).

I understand that the samples (clonedGitHubRepoFolder/samples) are provided for us to understand various implementations and make our own custom implementations, if needed, by referring the demo code.

Does the same hold good for projects as well(clonedGitHubRepoFolder/samples)? I mean, looking at the BPMN editor example, I see it has these two JS files: BPMNScript.js (imported in BPMN.html file using require) and BPMNClasses.js(imported in BPMNScript.jsfile using require). Which of these files should we be modifying when making customization?

BPMNClasses.js file defines 3 classes: PoolLink, and BPMNLinkingTool and BPMNRelinkingTool. When we create the diagram in BPMNScript.js(line#802), BPMNLinkingTool and BPMNRelinkingTool are instantiated for linkingTool/relinkingTool. How do we know that such properties can be passed in the configuration object? Are these properties specific to BPMN diagrams? Similarly, usage of PoolLink class is referred for messageFlowLinkTemplate(line#777). Why not for dataAssociationLinkTemplate/annotationAssociationLinkTemplate/annotationAssociationLinkTemplate?

It would be great if you could clarify my concerns above as then I would then have a fair understanding and can evaluate it better. This would help me in considering the option to purchase the licence for GoJS.

The first answer is that you can customize whatever you want. The source files in the BPMN project are the complete implementation of BPMN-specific functionality. The classes in the extensions or extensionsJSM or extensionsTS directories are extensions of the base library, go.js, that have general use in many apps but do not need to be in the base library.

Each of the custom classes in the BPMN project extends one of the GoJS classes, whether a Tool or a Layout or the Link class. The API for those classes are described at https://gojs.net/latest/api/index.html. In addition some of those BPMN classes have their own properties and methods, which I hope are documented in the code.