@@ -48,6 +48,7 @@ import {
4848} from '../types' ;
4949import { LocalizationProviderService } from '../services/localization-provider.service' ;
5050import { LocalizationPipe } from '../pipes/localization.pipe' ;
51+ import { ConditionInput } from '../services' ;
5152@Component ( {
5253 selector : 'workflow-builder' ,
5354 templateUrl : './builder.component.html' ,
@@ -460,19 +461,29 @@ export class BuilderComponent<E> implements OnInit, OnChanges {
460461 case EventTypes . OnValueEvent :
461462 case ActionTypes . ChangeColumnValueAction :
462463 const columnExists = ! ! node . node . state . get ( 'column' ) ;
463- let valueExists = false ;
464- if ( typeof node . node . state . get ( 'value' ) !== 'undefined' ) {
465- valueExists = true ;
466- } else if (
467- node . node . state . get ( 'condition' ) === ConditionTypes . PastToday
468- ) {
469- valueExists = true ;
470- } else {
471- valueExists = ! ! node . node . state . get ( 'value' ) ;
472- }
464+ let valueExists = false ;
473465 const valueTypeIsAnyValue =
474466 node . node . state . get ( 'valueType' ) === ValueTypes . AnyValue ;
475- isValid = columnExists && ( valueExists || valueTypeIsAnyValue ) ;
467+ let conditionExist = false ;
468+ if ( node . node . prompts . includes ( ConditionInput . identifier ) ) {
469+ conditionExist = ! ! node . node . state . get ( 'condition' ) ;
470+ } else {
471+ conditionExist = true ;
472+ }
473+ if ( typeof node . node . state . get ( 'value' ) !== 'undefined' ) {
474+ valueExists = true ;
475+ } else if (
476+ node . node . state . get ( 'condition' ) === ConditionTypes . PastToday
477+ ) {
478+ valueExists = true ;
479+ } else {
480+ valueExists = ! ! node . node . state . get ( 'value' ) ;
481+ }
482+
483+ isValid =
484+ columnExists &&
485+ ( valueExists || valueTypeIsAnyValue ) &&
486+ conditionExist ;
476487 break ;
477488 case EventTypes . OnIntervalEvent :
478489 const intervalExists = ! ! node . node . state . get ( 'interval' ) ;
0 commit comments