Sharing the Shared Model

Back when 8.x was 6.x and the developers worked in a garage somewhere, all you had to do was right-click to get hold of an image for a process diagram. Nowadays the images are used here and there in the platform but it's neither obvious nor easy to get hold of an image you can use elsewhere.

I strongly encourage you to make your process diagrams part of the shared model in BPM. They should be an integral part of communication with stakeholders. This means it's likely that you'll want some raw images to play with. You can get these from the REST API...

To start with you need some information so find an instance (for the process you want) and query it:

GET /rest/bpm/wle/v1/process/{instanceId}[?parts={string}]
e.g. https://myserver/rest/bpm/wle/v1/process/123?parts=all

This will give you the Snapshot ID (starts with 2064), Branch ID (starts with 2063) and Project ID (starts with 2066).

It should also give you a bunch of BPD IDs (that start with 25.). If you look inside the diagram section of the results you should be able to find the one that corresponds to the process/sub-process that you are interested in.

Now you can ask for the diagram:
GET /rest/bpm/wle/v1/visual/processModel/{bpdId}[?snapshotId={string}][&branchId={string}][&projectId={string}][&image={boolean}]
e.g. https://myserver/rest/bpm/wle/v1/visual/processModel/25.eb24dd09-1a08-4cf2-ac84-7c4b2134d1c5?snapshotId=2064.f5b027bb-604b-43c8-8bd9-ba5cf41e6cd8&branchId=2063.8f87387e-da1b-427c-aa51-88a993634213&projectId=2066.f0e78d4c-30b6-44aa-b5ce-60419df051cbaa&image=true

This will give you a raw image that you can use wherever you want.

Happy Sharing!

comments powered by Disqus