Parsing values runtime in ServiceTask from in/out parameters


I want to get the Input/Output values inside the execution of a ServiceTask. I already solved the Extensions:Parameters parsing by:

    public void execute(DelegateExecution execution)  {
        FlowElement currentActivityElement = execution.getBpmnModelElementInstance();
        CamundaProperties camundaProperties = currentActivityElement.getExtensionElements().getElementsQuery().filterByType(CamundaProperties.class)

        Collection<CamundaProperty> properties = camundaProperties.getCamundaProperties();
        for (CamundaProperty property : properties) {
            System.out.println("Property: " + property.getCamundaName() + " - " + property.getCamundaValue());


But I can not find a solution for the same purpose with the above mentioned problem. If I query the inputOutput object, I can only get the implementing type choosed from the “Type” field.

CamundaInputOutput inOuts = currentActivityElement.getExtensionElements().getElementsQuery().filterByType(CamundaInputOutput.class)
        for (CamundaInputParameter in : inOuts.getCamundaInputParameters()) {
            System.out.println("Inputs: " + in.getCamundaName() + " - " + in.getValue());

Other getters on that API are not suitable: getAttributeValue, getRawTextContext, getTextContent

Hi @ezolnbl,

why do you want to use the Model Api to get the input/output elements?

If you use an input parameter then you can access the value inside the delegate by name.


Best regards,

Hi Philipp,

Thanks for the answer.