How to make arduino call processing code function

You make the arduino send a message through the serial port when it is time to run the processing function.
Processing looks at the serial port and calls the function when it sees the message.