1. process instance id is available in the Camel context by default when sending a message to a Camel queue. That's implemented in the Activiti Camel module
2. so you have a couple of service tasks executing in parallel and next a parallel gateway join? You can set the service tasks to run exclusive, but then they don't run in parallel anymore. Another solution is not available to my knowledge.
3. Activiti uses optimistic locking, and pessimistic locking is not really considered a good practice in general anymore.
4. It solves the potential optimistic lock exception for parallel join gateways and multi instance activities.
Best regards,