Getting the current process instance

The current process instance can be retrieved through the TWProcessInstance variable called tw.system.currentProcessInstance.