You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

bpmn-xml-parser

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bpmn-xml-parser - npm Package Compare versions

Comparing version

to
1.5.0

2

package.json
{
"name": "bpmn-xml-parser",
"version": "1.4.0",
"version": "1.5.0",
"description": "Tool to easily parse message flows of process models in bpmn",

@@ -5,0 +5,0 @@ "main": "xmlParser.js",

@@ -25,2 +25,8 @@ # BPMN XML Parser focused on message flows.

### **Retrieve id and name of participants/collaborators as object:**
String[{label: name, value: id}]: xmlParser.getParticipantObjects()
Enables unaltered use in select lists like react-select.
### **Retrieve all names of participants/collaborators:**

@@ -27,0 +33,0 @@

@@ -51,2 +51,23 @@ import ReadJson from "./readJson";

//participantObj: { label: participantName, value: participantId }
getParticipantObjects() {
let participantObjects = [];
let participantIds = [];
for (let participant of this.participantObjs) {
if (
!this._isDefined(participant.attributes) ||
!this._isDefined(participant.attributes.name) ||
!this._isDefined(participant.attributes.id)
) {
continue;
}
let { name, id } = participant.attributes;
if (!participantIds.includes(id) && id !== "") {
participantIds.push(id);
participantObjects.push({ label: name, value: id });
}
}
return participantObjects;
}
setRelevantProcesses(processNames) {

@@ -53,0 +74,0 @@ if (processNames.length >= 1) {

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.