Package org.activiti.bpmn.model

Examples of org.activiti.bpmn.model.DataStore


    return "datastore.bpmn";
  }
 
  private void validateModel(BpmnModel model) {
    assertEquals(1, model.getDataStores().size());
    DataStore dataStore = model.getDataStore("DataStore_1");
    assertNotNull(dataStore);
    assertEquals("DataStore_1", dataStore.getId());
    assertEquals("test", dataStore.getDataState());
    assertEquals("Test Database", dataStore.getName());
    assertEquals("test", dataStore.getItemSubjectRef());
   
    FlowElement refElement = model.getFlowElement("DataStoreReference_1");
    assertNotNull(refElement);
    assertTrue(refElement instanceof DataStoreReference);
   
View Full Code Here


    return "messageflow.bpmn";
  }
 
  private void validateModel(BpmnModel model) {
    assertEquals(1, model.getDataStores().size());
    DataStore dataStore = model.getDataStore("DATASTORE_1");
    assertNotNull(dataStore);
    assertEquals("DATASTORE_1", dataStore.getId());
    assertEquals("test", dataStore.getName());
    assertEquals("ITEM_1", dataStore.getItemSubjectRef());
   
    MessageFlow messageFlow = model.getMessageFlow("MESSAGEFLOW_1");
    assertNotNull(messageFlow);
    assertEquals("test 1", messageFlow.getName());
    assertEquals("task1", messageFlow.getSourceRef());
View Full Code Here

 
  public void parse(XMLStreamReader xtr, BpmnModel model) throws Exception {
    String id = xtr.getAttributeValue(null, ATTRIBUTE_ID);
    if (StringUtils.isNotEmpty(id)) {
     
      DataStore dataStore = new DataStore();
      dataStore.setId(xtr.getAttributeValue(null, ATTRIBUTE_ID));
     
      String name = xtr.getAttributeValue(null, ATTRIBUTE_NAME);
      if (StringUtils.isNotEmpty(name)) {
        dataStore.setName(name);
      }
     
      String itemSubjectRef = xtr.getAttributeValue(null, ATTRIBUTE_ITEM_SUBJECT_REF);
      if (StringUtils.isNotEmpty(itemSubjectRef)) {
        dataStore.setItemSubjectRef(itemSubjectRef);
      }
     
      BpmnXMLUtil.addXMLLocation(dataStore, xtr);
     
      model.addDataStore(dataStore.getId(), dataStore);
     
      BpmnXMLUtil.parseChildElements(ELEMENT_DATA_STORE, dataStore, xtr, model);
    }
  }
View Full Code Here

TOP

Related Classes of org.activiti.bpmn.model.DataStore

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.