class CaseGraphFactoryImpl extends BPMNGraphFactoryImpl {

    @Override
    public Graph<DefinitionSet, Node> build(String uuid, String definition, Metadata metadata) {
        //before build it is necessary to load the WorkDefinitions to get the Milestone
        workItemDefinitionService.execute(metadata);
        return super.build(uuid, definition);
    }

    public  CaseGraphFactoryImpl();
    @Inject public  CaseGraphFactoryImpl(DefinitionManager definitionManager, FactoryManager factoryManager,
                                RuleManager ruleManager, GraphCommandManager graphCommandManager,
                                GraphCommandFactory graphCommandFactory, GraphIndexBuilder<?> indexBuilder,
                                CustomTaskFactory customTaskFactory,
                                WorkItemDefinitionLookupService workItemDefinitionService);

}