AnsweredAssumed Answered

Signal Data is null in ReceiveTaskActivityBehavior

Question asked by symphony.personalis on Dec 30, 2015
Latest reply on Dec 30, 2015 by symphony.personalis
I have simple process with a Service Task backed by a ReceiveTaskActivityBehavior. It will invoke a command in a remote machine and wait for a notification. When I send a signal from outside, it hits the signal method but the data is null. Please help.


<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="" xmlns:xsi="" xmlns:xsd="" xmlns:activiti="" xmlns:bpmndi="" xmlns:omgdc="" xmlns:omgdi="" typeLanguage="" expressionLanguage="" targetNamespace="">
  <process id="test1" name="test1" isExecutable="true">
    <startEvent id="startevent1" name="Start"></startEvent>
    <endEvent id="endevent1" name="End"></endEvent>
    <serviceTask id="servicetask1" name="Service Task" activiti:class="org.activiti.CustomTask"></serviceTask>
    <sequenceFlow id="flow1" sourceRef="startevent1" targetRef="servicetask1"></sequenceFlow>
    <sequenceFlow id="flow2" sourceRef="servicetask1" targetRef="endevent1"></sequenceFlow>


public class CustomTask extends ReceiveTaskActivityBehavior {

    private static final long serialVersionUID = 2945313111593357836L;

     * (non-Javadoc)
     * @see
     * org.activiti.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior#execute
     * (org.activiti.engine.impl.pvm.delegate.ActivityExecution)
    public void execute(ActivityExecution execution) throws Exception {
        Command command = new Command();
        command.doSomething(execution.getEngineServices().getRuntimeService(), execution);


     * (non-Javadoc)
     * @see
     * org.activiti.engine.impl.bpmn.behavior.ReceiveTaskActivityBehavior#signal
     * (org.activiti.engine.impl.pvm.delegate.ActivityExecution,
     * java.lang.String, java.lang.Object)
    public void signal(ActivityExecution execution, String signalName, Object data) throws Exception {
        //Fails here
        Assert.assertEquals(data != null, true);


public class Command {

    public void doSomething(RuntimeService runtimeService, ActivityExecution execution) {
        Map<String, Object> signalData = new HashMap<String, Object>();
        runtimeService.signal(execution.getId(), signalData);