* @param scxml The parent SCXML document (or null)
*/
private static void addInvokeRules(final String xp,
final ExtendedBaseRules scxmlRules, final List customActions,
final PathResolver pr, final SCXML scxml) {
scxmlRules.add(xp, new ObjectCreateRule(Invoke.class));
scxmlRules.add(xp, new SetPropertiesRule());
scxmlRules.add(xp, new SetCurrentNamespacesRule());
scxmlRules.add(xp, new SetPathResolverRule(pr));
scxmlRules.add(xp + XPF_PRM, new ObjectCreateRule(Param.class));
scxmlRules.add(xp + XPF_PRM, new SetPropertiesRule());
scxmlRules.add(xp + XPF_PRM, new SetCurrentNamespacesRule());
scxmlRules.add(xp + XPF_PRM, new SetNextRule("addParam"));
scxmlRules.add(xp + XPF_FIN, new ObjectCreateRule(Finalize.class));
scxmlRules.add(xp + XPF_FIN, new UpdateFinalizeRule());
addActionRules(xp + XPF_FIN, scxmlRules, pr, customActions);
scxmlRules.add(xp + XPF_FIN, new SetNextRule("setFinalize"));
scxmlRules.add(xp, new SetNextRule("setInvoke"));
}