From 01d09b5e812dca0578e9ae8523c7edc952a53316 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Fri, 19 May 2017 14:28:05 +0200 Subject: Model: Support custom extra transitions by state (e.g. VCOM toggle in ENABLED) --- lib/Kratos/DFADriver/Model.pm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'lib/Kratos/DFADriver') diff --git a/lib/Kratos/DFADriver/Model.pm b/lib/Kratos/DFADriver/Model.pm index db428e0..ba3855f 100644 --- a/lib/Kratos/DFADriver/Model.pm +++ b/lib/Kratos/DFADriver/Model.pm @@ -81,6 +81,14 @@ sub new_from_repo { push( @states, $attrib ); push( @{ $transition{ $function->{name} }{dst} }, $attrib ); } + elsif ( $attrib =~ s{ ^ required_in_ }{}x ) { + push( + @{ + $self->{custom_code}{after_transition_by_state}{$attrib} + }, + $function->{name} + ); + } elsif ( $attrib =~ m{ ^ epilogue $ }x ) { $transition{ $function->{name} }{level} = 'epilogue'; } -- cgit v1.2.3