code: public void enterInitState(Event event) {
  		logger.debug(String.format("Entered state %s", fsm.current()));
  		ChaincodeMessage message = messageHelper(event);
  		logger.debug(String.format("[%s]Received %s, initializing chaincode",
  				shortID(message), message.getType().toString()));
  		if (message.getType() == INIT) {
  			// Call the chaincode's Run function to initialize
              try {
                  handleInit(message);
              } catch (InvalidTransactionException e) {
                  e.printStackTrace();
              }
          }
  	}
docs: enterInitState will initialize the chaincode if entering init from established.