public NodeInstanceFactoryRegistry() {
this.registry = new HashMap<Class< ? extends Node>, NodeInstanceFactory>();
// hard wired nodes:
register( RuleSetNode.class,
new CreateNewNodeFactory( RuleSetNodeInstance.class ) );
register( Split.class,
new CreateNewNodeFactory( SplitInstance.class ) );
register( Join.class,
new ReuseNodeFactory( JoinInstance.class ) );
register( StartNode.class,
new CreateNewNodeFactory( StartNodeInstance.class ) );
register( EndNode.class,
new CreateNewNodeFactory( EndNodeInstance.class ) );
register( MilestoneNode.class,
new CreateNewNodeFactory( MilestoneNodeInstance.class ) );
register( SubProcessNode.class,
new CreateNewNodeFactory( SubProcessNodeInstance.class ) );
register( ActionNode.class,
new CreateNewNodeFactory( ActionNodeInstance.class ) );
register( WorkItemNode.class,
new CreateNewNodeFactory( WorkItemNodeInstance.class ) );
register( TimerNode.class,
new CreateNewNodeFactory( TimerNodeInstance.class ) );
register( FaultNode.class,
new CreateNewNodeFactory( FaultNodeInstance.class ) );
register( CompositeNode.class,
new CreateNewNodeFactory( CompositeNodeInstance.class ) );
register( CompositeContextNode.class,
new CreateNewNodeFactory( CompositeContextNodeInstance.class ) );
register( HumanTaskNode.class,
new CreateNewNodeFactory( HumanTaskNodeInstance.class ) );
register( ForEachNode.class,
new CreateNewNodeFactory( ForEachNodeInstance.class ) );
register( EventNode.class,
new CreateNewNodeFactory( EventNodeInstance.class ) );
register( StateNode.class,
new CreateNewNodeFactory( StateNodeInstance.class ) );
register( DynamicNode.class,
new CreateNewNodeFactory( DynamicNodeInstance.class ) );
}