This is what we use in the UI to find about the available roles of a proposal:
```
  def all_elements
    @item.raw_data['deployment'][self.barclamp]["element_order"].flatten.uniq
  end
```