Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

zeebe-bpmn-moddle

Package Overview
Dependencies
Maintainers
8
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zeebe-bpmn-moddle - npm Package Compare versions

Comparing version 0.7.1 to 0.8.0

36

lib/extension.js

@@ -9,2 +9,3 @@ 'use strict';

const zeebeServiceTaskProperties = [ 'zeebe:TaskDefinition', 'zeebe:Subscription', 'zeebe:TaskHeaders','zeebe:LoopCharacteristics','zeebe:Input' ];

@@ -27,5 +28,9 @@ function ZeebeModdleExtension(eventBus) {

// check if property is allowed in parent
// (1) check if property is allowed in parent
if (isObject(property) && !isAllowedInParent(property, parent)) {
return false;
}
// (2) check for specific scenarios
if (!this.canHostServiceTaskLikeProperties(property, parent)) {
return false;

@@ -35,2 +40,16 @@ }

ZeebeModdleExtension.prototype.canHostServiceTaskLikeProperties = function(property, parent) {
if (isAllowedInZeebeServiceTask(property)) {
var serviceTaskLike = getParent(parent, 'bpmn:IntermediateThrowEvent') || getParent(parent, 'bpmn:EndEvent');
if (serviceTaskLike) {
return isMessageEvent(serviceTaskLike);
}
}
return true;
};
module.exports = ZeebeModdleExtension;

@@ -79,2 +98,17 @@

return allowedIn.indexOf(WILDCARD) !== -1;
}
function isMessageEvent(event) {
const eventDefinitions = event.get('eventDefinitions');
return eventDefinitions.some(function(def) {
return is(def, 'bpmn:MessageEventDefinition');
});
}
// check if property is allowed in ZeebeServiceTask but not for none events
function isAllowedInZeebeServiceTask(property) {
return zeebeServiceTaskProperties.some(function(propertyType) {
return is(property, propertyType);
});
}

2

package.json
{
"name": "zeebe-bpmn-moddle",
"version": "0.7.1",
"version": "0.8.0",
"description": "Zeebe moddle extensions for BPMN 2.0",

@@ -5,0 +5,0 @@ "scripts": {

@@ -16,3 +16,5 @@ {

"bpmn:ScriptTask",
"bpmn:SendTask"
"bpmn:SendTask",
"bpmn:EndEvent",
"bpmn:IntermediateThrowEvent"
],

@@ -160,2 +162,7 @@ "properties": [

],
"meta": {
"allowedIn": [
"zeebe:ZeebeServiceTask"
]
},
"properties": [

@@ -162,0 +169,0 @@ {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc