public function convert($graphmlFile)
{
$this->_dom = new \DOMDocument();
$this->_dom->load($graphmlFile);
$this->_xp = new \DOMXPath($this->_dom);
$this->_xp->registerNamespace('ns', 'http://graphml.graphdrawing.org/xmlns');
$this->_xp->registerNamespace('y', 'http://www.yworks.com/xml/graphml');
$this->extractYedProperties();
if (!isset($this->_yedProperties['w-intial-node-id'])) {
throw new WorkflowException("Missing custom workflow property : 'initialStatusId'");
}
$workflow = $this->collectWorkflowProperties();
$nodes = $this->collectNodes();
$edges = $this->collectTransitions();
//return ['nodes'=> $nodes, 'edges' => $edges];
return $this->createWorkflowDefinition($workflow, $nodes, $edges);
}