use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputParameter in project camunda-bpmn-model by camunda.
the class ProcessBuilderTest method assertCamundaInputOutputParameter.
protected void assertCamundaInputOutputParameter(BaseElement element) {
CamundaInputOutput camundaInputOutput = element.getExtensionElements().getElementsQuery().filterByType(CamundaInputOutput.class).singleResult();
assertThat(camundaInputOutput).isNotNull();
List<CamundaInputParameter> camundaInputParameters = new ArrayList<CamundaInputParameter>(camundaInputOutput.getCamundaInputParameters());
assertThat(camundaInputParameters).hasSize(2);
CamundaInputParameter camundaInputParameter = camundaInputParameters.get(0);
assertThat(camundaInputParameter.getCamundaName()).isEqualTo("foo");
assertThat(camundaInputParameter.getTextContent()).isEqualTo("bar");
camundaInputParameter = camundaInputParameters.get(1);
assertThat(camundaInputParameter.getCamundaName()).isEqualTo("yoo");
assertThat(camundaInputParameter.getTextContent()).isEqualTo("hoo");
List<CamundaOutputParameter> camundaOutputParameters = new ArrayList<CamundaOutputParameter>(camundaInputOutput.getCamundaOutputParameters());
assertThat(camundaOutputParameters).hasSize(2);
CamundaOutputParameter camundaOutputParameter = camundaOutputParameters.get(0);
assertThat(camundaOutputParameter.getCamundaName()).isEqualTo("one");
assertThat(camundaOutputParameter.getTextContent()).isEqualTo("two");
camundaOutputParameter = camundaOutputParameters.get(1);
assertThat(camundaOutputParameter.getCamundaName()).isEqualTo("three");
assertThat(camundaOutputParameter.getTextContent()).isEqualTo("four");
}
use of org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputParameter in project camunda-bpmn-model by camunda.
the class AbstractActivityBuilder method camundaInputParameter.
/**
* Creates a new camunda input parameter extension element with the
* given name and value.
*
* @param name the name of the input parameter
* @param value the value of the input parameter
* @return the builder object
*/
public B camundaInputParameter(String name, String value) {
CamundaInputOutput camundaInputOutput = getCreateSingleExtensionElement(CamundaInputOutput.class);
CamundaInputParameter camundaInputParameter = createChild(camundaInputOutput, CamundaInputParameter.class);
camundaInputParameter.setCamundaName(name);
camundaInputParameter.setTextContent(value);
return myself;
}
Aggregations