use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaConnectorId in project camunda-bpmn-model by camunda.
the class CamundaConnectorIdImpl method registerType.
public static void registerType(ModelBuilder modelBuilder) {
ModelElementTypeBuilder typeBuilder = modelBuilder.defineType(CamundaConnectorId.class, CAMUNDA_ELEMENT_CONNECTOR_ID).namespaceUri(CAMUNDA_NS).instanceProvider(new ModelTypeInstanceProvider<CamundaConnectorId>() {
public CamundaConnectorId newInstance(ModelTypeInstanceContext instanceContext) {
return new CamundaConnectorIdImpl(instanceContext);
}
});
typeBuilder.build();
}
use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaConnectorId in project camunda-bpmn-model by camunda.
the class CamundaExtensionsTest method testCamundaConnector.
@Test
public void testCamundaConnector() {
CamundaConnector camundaConnector = serviceTask.getExtensionElements().getElementsQuery().filterByType(CamundaConnector.class).singleResult();
assertThat(camundaConnector).isNotNull();
CamundaConnectorId camundaConnectorId = camundaConnector.getCamundaConnectorId();
assertThat(camundaConnectorId).isNotNull();
assertThat(camundaConnectorId.getTextContent()).isEqualTo("soap-http-connector");
CamundaInputOutput camundaInputOutput = camundaConnector.getCamundaInputOutput();
Collection<CamundaInputParameter> inputParameters = camundaInputOutput.getCamundaInputParameters();
assertThat(inputParameters).hasSize(1);
CamundaInputParameter inputParameter = inputParameters.iterator().next();
assertThat(inputParameter.getCamundaName()).isEqualTo("endpointUrl");
assertThat(inputParameter.getTextContent()).isEqualTo("http://example.com/webservice");
Collection<CamundaOutputParameter> outputParameters = camundaInputOutput.getCamundaOutputParameters();
assertThat(outputParameters).hasSize(1);
CamundaOutputParameter outputParameter = outputParameters.iterator().next();
assertThat(outputParameter.getCamundaName()).isEqualTo("result");
assertThat(outputParameter.getTextContent()).isEqualTo("output");
}
Aggregations