message: fixed issue with dangling trigger input mappings when params are modified.
diff: @@ -439,15 +439,12 @@ export class FlowComponent implements OnInit, OnDestroy {
  this.flowState.metadata.input = this.mergeFlowInputMetadata(newMetadata.input);
  this.flowState.metadata.output = newMetadata.output;
  - const propCollectionToRegistry = from =>
  - new Map(<Array<[string, boolean]>>from.map((o: any) => [o.name, true]));
  - //TODO: Make the following cleaning much simpler as the mappings are now key value pairs
  const getAllProps = from => from.map(o => o.name);
  const outputNames = getAllProps(newMetadata.output);
  - const inputRegistry = propCollectionToRegistry(newMetadata.input);
  + const inputNames = getAllProps(newMetadata.input);
  this.cleanDanglingTaskOutputMappings(outputNames);
  - this.cleanDanglingTriggerMappingsToFlow(inputRegistry);
  + this.cleanDanglingTriggerMappingsToFlow(inputNames);
  this._updateFlow();
  }
  @@ -466,8 +463,7 @@ export class FlowComponent implements OnInit, OnDestroy {
  }
  // when flow schema's input change we need to remove the trigger mappings that were referencing them
  - private cleanDanglingTriggerMappingsToFlow(inputRegistry: Map<string, boolean>) {
  - const isApplicableMapping = mapping => inputRegistry.has(mapping.mapTo);
  + private cleanDanglingTriggerMappingsToFlow(inputNames: string[]) {
  const handlersToUpdate = this.triggersList.reduce((result, trigger) => {
  const handlersToUpdateInTrigger = trigger.handlers
  .filter(handler => handler.actionId === this.flowId)
  @@ -489,12 +485,8 @@ export class FlowComponent implements OnInit, OnDestroy {
  return Promise.resolve();
  function reduceToUpdatableHandlers(result, handler) {
  - const actionInputMappings = get(handler, 'actionMappings.input', []);
  - const applicableMappings = actionInputMappings.filter(isApplicableMapping);
  - if (applicableMappings.length !== actionInputMappings.length) {
  - handler.actionMappings.input = applicableMappings;
  + handler.actionMappings.input = pick(handler.actionMappings.input, inputNames);
  result.push(handler);
  - }
  return result;
  }
  }
  