use of org.camunda.bpm.model.cmmn.instance.CaseRoles in project camunda-cmmn-model by camunda.
the class Cmmn10Test method shouldGetCaseRoles.
@Test
public void shouldGetCaseRoles() {
CmmnModelInstance modelInstance = getCmmnModelInstance();
Case _case = modelInstance.getModelElementsByType(Case.class).iterator().next();
Collection<CaseRole> roles = _case.getCaseRoles();
assertThat(roles).hasSize(2);
CaseRoles caseRole = _case.getRoles();
assertThat(caseRole).isNull();
}
use of org.camunda.bpm.model.cmmn.instance.CaseRoles in project camunda-cmmn-model by camunda.
the class CaseRolesImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CaseRoles.class, CMMN_ELEMENT_CASE_ROLES).namespaceUri(CMMN11_NS).instanceProvider(new ModelElementTypeBuilder.ModelTypeInstanceProvider<CaseRoles>() {
public CaseRoles newInstance(ModelTypeInstanceContext instanceContext) {
return new CaseRolesImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
roleCollection = sequenceBuilder.elementCollection(Role.class).build();
typeBuilder.build();
}
Aggregations