Customize ActivityBehavior

How to customize ActivityBehavior or rewrite ParallelMultiInstanceActivityBehavior