I was wondering why do you choose to use java node ? the java node don't have the property of assign-handler
Try to use the state replace your java node , and add a start event listener
<on event="start">
<event-listener class="org.jbpm.examples.eventlistener.LogListener">
<field name="msg"><string value="start on activity wait"/></field>
</event-listener>
</on>
public void notify(EventListenerExecution execution) {
ExecutionImpl e = (ExecutionImpl) execution;
e.getVariable("starInMiddle").toString().equals(true){
e.execution).end();
}