Skip to content

Commit

Permalink
Merge pull request #304 from TIBCOSoftware/300-fail-exec-transform
Browse files Browse the repository at this point in the history
Fix #300 Unexpected input mappings causes flow execution to fail
  • Loading branch information
fcastill authored Jan 31, 2017
2 parents 81fda31 + dc76451 commit 98c95e2
Show file tree
Hide file tree
Showing 5 changed files with 260 additions and 156 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ import {FlogoFormBuilderComponent} from './components/form-builder.component';
TaskDirective,
BranchDirective,
FlogoFormBuilderComponent
],
],
exports: [
FlogoFormBuilderComponent
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,147 +180,3 @@
}

}

/*
@height: 40;
@height-item: 25;
//@color-output: #3498db;
@color-output: #b3e3ff;
@color-input: #e6e7e9;
.flogo-visual-mapper {
margin-top:10px;
.flogo-visual-mapper__item {
display: flex;
flex-direction: row;
height: (@height)*1px;
}
.flogo-visual-mapper__item__name {
font-weight: bold;
margin-left: 5px;
margin-top: 0;
margin-bottom: 5px;
cursor:pointer;
list-style-type: none;
display: inline
}
.flogo-visual-mapper__item__field {
margin-left: 30px
}
.flogo-visual-mapper__item__error {
color: red;
}
.flogo-visual-mapper__item__remove {
left:-5px;
color:dimgray;
cursor:pointer
}
.flogo-visual-mapper__item__action {
color:dimgray;
font-size: 0.8em;
}
.flogo-visual-mapper__item__output {
flex: 0 0 60%;
background: @color-output;
margin: 0 10px 0 0;
}
.flogo-visual-mapper__item__output__text {
width: 94%;background-color: transparent;border:0
}
.flogo-visual-mapper__item__output__list__selector {
cursor: pointer;
color: dimgray;
}
.flogo-visual-mapper__item__output__text:focus {
outline-width: 0;
}
.flogo-visual-mapper__item__input {
flex: 0 0 35%;
background-color: #ccd0d8;
color: #000;
}
.flogo-visual-mapper__item__list {
width: 250px;
background-color: white;
z-index: 900;
position: absolute;
}
.flogo-visual-mapper__item__list__item {
margin-top: 0;
padding-top: 0;
}
.flogo-visual-mapper__item__list li {
cursor: pointer;
}
.flogo-visual-mapper__item__list__field {
cursor:pointer;
list-style-type: none;
margin-bottom: 5px;
//margin-left: 10px
}
.flogo-visual-mapper__item__list__field:hover {
background-color: #ededed;
}
.flogo-visual-mapper__item__output, .flogo-visual-mapper__item__input {
display: block;
float: left;
text-align: center;
padding: 10px;
//padding: 15px 40px 0 40px;
position: relative;
//font-size: 10px;
text-decoration: none;
}
.flogo-visual-mapper__item__output:after {
content: "";
border-top: (@height-item - 5)*1px solid transparent;
border-bottom: (@height-item - 5)*1px solid transparent;
border-left: (@height-item - 5)*1px solid @color-output;
position: absolute;
right: -(@height-item - 5)*1px;
top: 0;
z-index: 1;
}
.flogo-visual-mapper__item__input:before {
content: "";
border-top: (@height-item - 5)*1px solid transparent;
border-bottom: (@height-item - 5)*1px solid transparent;
border-left: (@height-item - 5)*1px solid #fff;
position: absolute;
left: 0;
top: 0
}
.flogo-visual-mapper__item__output--connected {
margin-right: 0;
}
.flogo-visual-mapper__item__input--connected {
background-color: #ccd0d8;
flex: 0 0 30%;
}
}
*/
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,12 @@ export class TransformMapperComponent implements OnChanges {
let nextValue = mappingsChange.currentValue;
let currentEditorValue:any = null;
try {
//##currentEditorValue = JSON.parse(this.editor.value);
currentEditorValue = this.transformationJSON;
} catch (e) { // current val is just not valid json
}

if (!_.isEqual(mappingsChange.previousValue, nextValue) && !_.isEqual(nextValue, currentEditorValue)) {
let stringified = JSON.stringify(nextValue || [], null, 2);
//##this.editor.updateValue(stringified, {onlySelf: true, emitEvent: false});
}
}

Expand Down
Loading

0 comments on commit 98c95e2

Please sign in to comment.