User Task Listener javascript http.createRequest()

Dear All:
I use http Connector and payload is Javascript type , try to get current task id with below code but get null, can somebody give me a hand ? thanks in advance.

var currentTaskId = execution.getProcessEngineServices().getTaskService().createTaskQuery().active().processInstanceId(execution.getId()).singleResult();

------------------------------Update---------------------------------------------
I just find that at the moment the user task is not created yet, so I should post when the Task created, but below code shows http" is not defined in , please give some suggestioon , thanks in advance.

“http” is not defined in at line number 1’ [ start-instance-error ]

<?xml version="1.0" encoding="UTF-8"?>

<bpmn:definitions xmlns:bpmn=“http://www.omg.org/spec/BPMN/20100524/MODEL” xmlns:bpmndi=“http://www.omg.org/spec/BPMN/20100524/DI” xmlns:dc=“http://www.omg.org/spec/DD/20100524/DC” xmlns:camunda=“http://camunda.org/schema/1.0/bpmn” xmlns:di=“http://www.omg.org/spec/DD/20100524/DI” id=“Definitions_1949ytm” targetNamespace=“http://bpmn.io/schema/bpmn” exporter=“Camunda Modeler” exporterVersion=“4.4.0”>
<bpmn:process id=“Process_1qrc1pu” isExecutable=“true”>
<bpmn:startEvent id=“StartEvent_1”>
bpmn:outgoingFlow_1m3sakf</bpmn:outgoing>
</bpmn:startEvent>
<bpmn:sequenceFlow id=“Flow_1m3sakf” sourceRef=“StartEvent_1” targetRef=“Activity_1c2kc9c” />
<bpmn:endEvent id=“Event_19ru147”>
bpmn:incomingFlow_16lrjpl</bpmn:incoming>
</bpmn:endEvent>
<bpmn:sequenceFlow id=“Flow_16lrjpl” sourceRef=“Activity_1c2kc9c” targetRef=“Event_19ru147” />
<bpmn:userTask id=“Activity_1c2kc9c”>
bpmn:extensionElements
<camunda:taskListener event=“create”>
<camunda:script scriptFormat=“JavaScript”>var response = http.createRequest().get().url(“http://camunda.org”).execute();</camunda:script>
</camunda:taskListener>
</bpmn:extensionElements>
bpmn:incomingFlow_1m3sakf</bpmn:incoming>
bpmn:outgoingFlow_16lrjpl</bpmn:outgoing>
</bpmn:userTask>
</bpmn:process>
<bpmndi:BPMNDiagram id=“BPMNDiagram_1”>
<bpmndi:BPMNPlane id=“BPMNPlane_1” bpmnElement=“Process_1qrc1pu”>
<bpmndi:BPMNEdge id=“Flow_16lrjpl_di” bpmnElement=“Flow_16lrjpl”>
<di:waypoint x=“380” y=“120” />
<di:waypoint x=“452” y=“120” />
</bpmndi:BPMNEdge>
<bpmndi:BPMNEdge id=“Flow_1m3sakf_di” bpmnElement=“Flow_1m3sakf”>
<di:waypoint x=“215” y=“120” />
<di:waypoint x=“280” y=“120” />
</bpmndi:BPMNEdge>
<bpmndi:BPMNShape id=“Event_19ru147_di” bpmnElement=“Event_19ru147”>
<dc:Bounds x=“452” y=“102” width=“36” height=“36” />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id=“Activity_1skudb5_di” bpmnElement=“Activity_1c2kc9c”>
<dc:Bounds x=“280” y=“80” width=“100” height=“80” />
</bpmndi:BPMNShape>
<bpmndi:BPMNShape id=“_BPMNShape_StartEvent_2” bpmnElement=“StartEvent_1”>
<dc:Bounds x=“179” y=“102” width=“36” height=“36” />
</bpmndi:BPMNShape>
</bpmndi:BPMNPlane>
</bpmndi:BPMNDiagram>
</bpmn:definitions>

Hi @eason_wu,

what about execution.getCurrentActivityId()?

Hope that helps, Ingo