if (bpmnParseFactory == null) {
bpmnParseFactory = new DefaultBpmnParseFactory();
}
if (activityBehaviorFactory == null) {
DefaultActivityBehaviorFactory defaultActivityBehaviorFactory = new DefaultActivityBehaviorFactory();
defaultActivityBehaviorFactory.setExpressionManager(expressionManager);
activityBehaviorFactory = defaultActivityBehaviorFactory;
} else if ((activityBehaviorFactory instanceof AbstractBehaviorFactory)
&& ((AbstractBehaviorFactory) activityBehaviorFactory).getExpressionManager() == null) {
((AbstractBehaviorFactory) activityBehaviorFactory).setExpressionManager(expressionManager);
}