Implementing process instance API