private Map < String , String > fillInitialVariables ( ) { Map < String , TransitionTarget > targets = model . getChildren ( ) ; Set < String > variables = new HashSet <> ( ) ; for ( TransitionTarget target : targets . values ( ) ) { OnEntry entry = target . getOnEntry ( ) ; List < Action > actions = entry . getActions ( ) ; for ( Action action : actions ) { if ( action instanceof Assign ) { String variable = ( ( Assign ) action ) . getName ( ) ; variables . add ( variable ) ; } else if ( action instanceof SetAssignExtension . SetAssignTag ) { String variable = ( ( SetAssignExtension . SetAssignTag ) action ) . getName ( ) ; variables . add ( variable ) ; } } } Map < String , String > result = new HashMap <> ( ) ; for ( String variable : variables ) { result . put ( variable , "" ) ; } return result ; }
Searches the model for all variable assignments and makes a default map of those variables setting them to