use of org.camunda.bpm.model.bpmn.instance.Expression 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);
}
use of org.camunda.bpm.model.bpmn.instance.Expression in project camunda-bpmn-model by camunda.
the class ExpressionImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(Expression.class, BPMN_ELEMENT_EXPRESSION).namespaceUri(BPMN20_NS).extendsType(BaseElement.class).instanceProvider(new ModelTypeInstanceProvider<Expression>() {
public Expression newInstance(ModelTypeInstanceContext instanceContext) {
return new ExpressionImpl(instanceContext);
}
});
typeBuilder.build();
}
Aggregations