Are you using JBPM or Activity? You can configure Listeners (TaskListener) in your processdefinition.xml as required (for example, on creation of a task etc) which is basically java class to perform some logic as per your requirement. In order to identify how to do it syntactically in your processdefinition, you may want to go through the JBPM/Activity tutorials or user guides.