Comparing version 7.2.0 to 7.2.1
@@ -9,2 +9,6 @@ # Changelog | ||
## 7.2.1 | ||
* `FIX`: exclude compensation boundary and activity in `no-disconnected` check ([#https://github.com/bpmn-io/bpmnlint/pull/60](https://github.com/bpmn-io/bpmnlint/pull/60)) | ||
## 7.2.0 | ||
@@ -11,0 +15,0 @@ |
{ | ||
"name": "bpmnlint", | ||
"description": "Validate your BPMN diagrams based on configurable lint rules", | ||
"version": "7.2.0", | ||
"version": "7.2.1", | ||
"main": "lib/index.js", | ||
@@ -6,0 +6,0 @@ "keywords": [ |
# bpmnlint | ||
[![Build Status](https://travis-ci.com/bpmn-io/bpmnlint.svg?branch=master)](https://travis-ci.com/bpmn-io/bpmnlint) | ||
[![CI](https://github.com/bpmn-io/bpmnlint/workflows/CI/badge.svg)](https://github.com/bpmn-io/bpmnlint/actions?query=workflow%3ACI) | ||
@@ -5,0 +5,0 @@ Validate your BPMN diagrams based on configurable lint rules. |
const { | ||
isAny | ||
isAny, | ||
is | ||
} = require('bpmnlint-utils'); | ||
@@ -24,2 +25,9 @@ | ||
// compensation activity and boundary events are | ||
// linked visually via associations. If these associations | ||
// exist we are fine, too | ||
if (isCompensationLinked(node)) { | ||
return; | ||
} | ||
const incoming = node.incoming || []; | ||
@@ -36,3 +44,32 @@ const outgoing = node.outgoing || []; | ||
}; | ||
}; | ||
}; | ||
// helpers ///////////////// | ||
function isCompensationBoundary(node) { | ||
var eventDefinitions = node.eventDefinitions; | ||
if (!is(node, 'bpmn:BoundaryEvent')) { | ||
return false; | ||
} | ||
if (!eventDefinitions || eventDefinitions.length !== 1) { | ||
return false; | ||
} | ||
return is(eventDefinitions[0], 'bpmn:CompensateEventDefinition'); | ||
} | ||
function isCompensationActivity(node) { | ||
return node.isForCompensation; | ||
} | ||
function isCompensationLinked(node) { | ||
var source = isCompensationBoundary(node); | ||
var target = isCompensationActivity(node); | ||
// TODO(nikku): check, whether compensation association exists | ||
return source || target; | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
53151
1551
0