@emaarco/bpmn-js-data-simulation 0.2.0 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -601,11 +601,11 @@ class Camunda7Engine {
601
601
  writeVariable(variables, target, value) {
602
602
  return { ...variables, [target]: value };
603
603
  }
604
- readInputMappings(element) {
605
- return this.readMappings(element, "inputParameters");
606
- }
607
- readOutputMappings(element) {
608
- return this.readMappings(element, "outputParameters");
604
+ readIoMappings(element) {
605
+ return {
606
+ inputs: this.readMappings(element, "inputParameters"),
607
+ outputs: this.readMappings(element, "outputParameters")
608
+ };
609
609
  }
610
610
  readCondition(sequenceFlow) {
611
611
  const condition = readConditionExpression(sequenceFlow);
@@ -657,11 +657,11 @@ class ZeebeEngine {
657
657
  writeVariable(variables, target, value) {
658
658
  return setVariable(variables, target, value);
659
659
  }
660
- readInputMappings(element) {
661
- return this.readMappings(element, "inputParameters");
662
- }
663
- readOutputMappings(element) {
664
- return this.readMappings(element, "outputParameters");
660
+ readIoMappings(element) {
661
+ return {
662
+ inputs: this.readMappings(element, "inputParameters"),
663
+ outputs: this.readMappings(element, "outputParameters")
664
+ };
665
665
  }
666
666
  readCondition(sequenceFlow) {
667
667
  return readConditionExpression(sequenceFlow)?.body?.trim() || void 0;
@@ -1147,8 +1147,7 @@ class IoMappings {
1147
1147
  this.store = store;
1148
1148
  }
1149
1149
  apply(element, instanceId) {
1150
- const inputs = this.engine.readInputMappings(element.businessObject);
1151
- const outputs = this.engine.readOutputMappings(element.businessObject);
1150
+ const { inputs, outputs } = this.engine.readIoMappings(element.businessObject);
1152
1151
  const taskResult = this.store.getTaskResult(instanceId, element.id);
1153
1152
  if (!inputs.length && !outputs.length && !taskResult) return;
1154
1153
  const processVariables = this.store.getVariables(instanceId);
@@ -1986,8 +1985,7 @@ class VariableUsageCollector {
1986
1985
  return this.usage(element.source ?? element, { conditionReads: this.engine.readVariableNames(condition) });
1987
1986
  }
1988
1987
  if (!is(element, "bpmn:FlowNode")) return void 0;
1989
- const inputs = this.engine.readInputMappings(businessObject);
1990
- const outputs = this.engine.readOutputMappings(businessObject);
1988
+ const { inputs, outputs } = this.engine.readIoMappings(businessObject);
1991
1989
  return this.usage(element, {
1992
1990
  inputReads: inputs.flatMap((mapping) => this.engine.readVariableNames(mapping.source)),
1993
1991
  inputTargets: inputs.map((mapping) => mapping.target),