Re: How to access the processExecutionID of the currently created process.
At a brief level: If you're doing this in Java, there is something called a RuntimeService, that has several methods to start processes. Each of these methods has an overloaded version that allows for a parameter that contains the variable utilized within the process. This blog post has a couple utilization examples of the RuntimeService.
Hope this is a start, but I can help more with a little bit more context, -JEarles