LifecycleStateBean[] states = bean.getStates();
for(LifecycleStateBean lifecycleState:states) {
OMElement state = factory.createOMElement("state", null);
state.addAttribute(factory.createOMAttribute("name", null, lifecycleState.getStateName()));
if (lifecycleState.getLocation() != null)
state.addAttribute(factory.createOMAttribute("location", null, lifecycleState.getLocation()));
ChecklistBean checklistBean = lifecycleState.getChecklist();
if (checklistBean != null) {
String[] items = checklistBean.getItems();
for (String item:items) {