Update process variable in output parameter in CONNECTOR

sendd
As in the above diagram i have one send task, with the connector implemented as follows


which has OUTPUT parameter attempt as ${3}

NOW when the response is recieved from my java class-
@RequestMapping(value = “/getconnector”, method = RequestMethod.POST)
public int mess(HttpServletResponse response) {
System.out.println(“hey”);
response.setStatus(HttpStatus.BAD_GATEWAY.value());
int statusCode = response.getStatus();
return statusCode;

}

IN the sequence flow which connects back to send task,i have implemented one listener,with value as

if the STATUS is not 200 the token moves back to the SEND tASK , and at this time i want the attempt to become ${2} from initial value given ${3},
but the value gets decremented once becomes 2, and then again becomes 3 ,decrements and become 2.
this process goes on.
How can i update this process variable from camunda MODELER.

@Niall any thought on this :slight_smile:

@aravindhrs any help please?