File tree Expand file tree Collapse file tree
formbuilder/FormBuilder/Components/Workflow Expand file tree Collapse file tree Original file line number Diff line number Diff line change 442442 private void UpdateLink (WorkflowStep newStep , NodeModel sourceNodeModel , WorkflowLink sourceLink = null )
443443 {
444444 var sourceWorkflowStepNode = sourceNodeModel as WorkflowStepNode ;
445- if (sourceWorkflowStepNode != null && sourceLink != null )
445+ var conditionNode = sourceNodeModel as WorkflowConditionNode ;
446+ if (sourceLink != null )
446447 {
447448 var link = Context .Definition .Workflow .Links .SingleOrDefault (l => l .Id == sourceLink .Id );
448449 if (link != null )
449450 {
450- link .Targets .First ().TargetStepId = newStep .Id ;
451+ if (sourceWorkflowStepNode != null )
452+ {
453+ link .Targets .First ().TargetStepId = newStep .Id ;
454+ }
455+ else if (conditionNode != null )
456+ {
457+ link .Targets .Last ().TargetStepId = newStep .Id ;
458+ }
451459 }
452460 }
461+
453462 }
454463
455464 private void RefreshAvailableLayouts ()
You can’t perform that action at this time.
0 commit comments