Best practice for creating process programmatically