datakurre/camunda-cockpit-plugins

Plugin breaks when DMN engine is not enabled

Closed this issue · 2 comments

“Could you elaborate more. What do you mean with “decision map” and when it is not available?”

new Map(decisions.map(function (decision) { return [decision.activityInstanceId, decision.id]; }));
It is not available if the DMN engine is not enabled.
I get a HTTP status code 500 for /decision-instance , /decision-definition and /decision-requirements-definition

I found at least 3 places for /decision-instance. Replacing

instance-historic-activities.js line 2051
instance-route-history.js line 29075
tasklist-audit-log.js line 1155

with new Map(); fixed the errors in browser console for me and makes the plugin workable.

I chose the simplest possible fix for now by simply returning empty list from API calls returning something else than 200 OK.

3be194a#diff-005aabee8c8c23534dc0f09ba8842309697d0be3e0d481efcb71d3fd0e6dccc6R28