Search in sources :

Example 11 with CamundaInputParameter

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");
}
Also used : CamundaOutputParameter(org.camunda.bpm.model.bpmn.instance.camunda.CamundaOutputParameter) CamundaInputOutput(org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputOutput) ArrayList(java.util.ArrayList) CamundaInputParameter(org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputParameter)

Example 12 with CamundaInputParameter

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;
}
Also used : CamundaInputOutput(org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputOutput) CamundaInputParameter(org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputParameter)

Aggregations

CamundaInputParameter (org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputParameter)12 Test (org.junit.Test)8 CamundaInputOutput (org.camunda.bpm.model.bpmn.instance.camunda.CamundaInputOutput)4 ArrayList (java.util.ArrayList)2 CamundaOutputParameter (org.camunda.bpm.model.bpmn.instance.camunda.CamundaOutputParameter)2 BpmnModelElementInstance (org.camunda.bpm.model.bpmn.instance.BpmnModelElementInstance)1 CamundaConnector (org.camunda.bpm.model.bpmn.instance.camunda.CamundaConnector)1 CamundaConnectorId (org.camunda.bpm.model.bpmn.instance.camunda.CamundaConnectorId)1 CamundaConstraint (org.camunda.bpm.model.bpmn.instance.camunda.CamundaConstraint)1 CamundaEntry (org.camunda.bpm.model.bpmn.instance.camunda.CamundaEntry)1 CamundaList (org.camunda.bpm.model.bpmn.instance.camunda.CamundaList)1 CamundaMap (org.camunda.bpm.model.bpmn.instance.camunda.CamundaMap)1 CamundaScript (org.camunda.bpm.model.bpmn.instance.camunda.CamundaScript)1 CamundaValue (org.camunda.bpm.model.bpmn.instance.camunda.CamundaValue)1 ModelTypeInstanceContext (org.camunda.bpm.model.xml.impl.instance.ModelTypeInstanceContext)1 ModelElementTypeBuilder (org.camunda.bpm.model.xml.type.ModelElementTypeBuilder)1