use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaPotentialStarter in project camunda-bpmn-model by camunda.
the class CamundaPotentialStarterImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaPotentialStarter.class, CAMUNDA_ELEMENT_POTENTIAL_STARTER).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaPotentialStarter>() {
public CamundaPotentialStarter newInstance(ModelTypeInstanceContext instanceContext) {
return new CamundaPotentialStarterImpl(instanceContext);
}
});
SequenceBuilder sequenceBuilder = typeBuilder.sequence();
resourceAssignmentExpressionChild = sequenceBuilder.element(ResourceAssignmentExpression.class).build();
typeBuilder.build();
}
use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaPotentialStarter in project camunda-bpmn-model by camunda.
the class CamundaExtensionsTest method testPotentialStarter.
@Test
public void testPotentialStarter() {
CamundaPotentialStarter potentialStarter = startEvent.getExtensionElements().getElementsQuery().filterByType(CamundaPotentialStarter.class).singleResult();
Expression expression = potentialStarter.getResourceAssignmentExpression().getExpression();
assertThat(expression.getTextContent()).isEqualTo(TEST_GROUPS_XML);
expression.setTextContent(TEST_GROUPS_API);
assertThat(expression.getTextContent()).isEqualTo(TEST_GROUPS_API);
}
Aggregations