REST Activity Feature

Hi @tijs, I do a lot of changes, maybe Im nod doing the things correctly, I think the most important thibg that I do in my latest commit to my repo was add the next class:

/**

  • @author Alfredo Suarez
    */
    public class RestTaskJsonConverter extends BaseBpmnJsonConverter {

    public static void fillTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap, Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap) {

     fillJsonTypes(convertersToBpmnMap);
     fillBpmnTypes(convertersToJsonMap);
    

    }

    public static void fillJsonTypes(Map<String, Class<? extends BaseBpmnJsonConverter>> convertersToBpmnMap) {
    convertersToBpmnMap.put(STENCIL_TASK_RESTCALL, RestTaskJsonConverter.class);
    }

    public static void fillBpmnTypes(Map<Class<? extends BaseElement>, Class<? extends BaseBpmnJsonConverter>> convertersToJsonMap) {
    }

    protected String getStencilId(BaseElement baseElement) {
    return STENCIL_TASK_RESTCALL;
    }

    protected void convertElementToJson(ObjectNode propertiesNode, BaseElement baseElement) {
    // done in service task
    }

    protected FlowElement convertJsonToElement(JsonNode elementNode, JsonNode modelNode, Map<String, JsonNode> shapeMap) {
    ServiceTask task = new ServiceTask();
    task.setType(“rest”);
    addField(“protocol”, PROPERTY_RESTTASK_HOST, elementNode, task);
    addField(“host”, PROPERTY_RESTTASK_HOST, elementNode, task);
    addField(“port”, PROPERTY_RESTTASK_PORT, elementNode, task);
    addField(“path”, PROPERTY_RESTTASK_PATH, elementNode, task);
    addField(“inputParameters”, PROPERTY_RESTTASK_INPUT_PARAMETERS, elementNode, task);
    addField(“resultVariable”, PROPERTY_RESTTASK_RESULT_VARIABLE, elementNode, task);
    return task;
    }
    }

Where I get the properties that the user is going to put on the modeler app.

How can I get thesse values in the RestCallActivityBehavior?

So If I can get thesse values, the input párameters, on Behavior activity will be no more hardcoded.

In general terms, I have modified the classes where exist a mule task call to add a rest call here are the classe I have modified until now.

Please give a clue of whats next?