Search in sources :

Example 1 with BPMNSignal

use of org.activiti.api.process.model.BPMNSignal in project Activiti by Activiti.

the class ToSignalConverterTest method fromShouldSetMetaInfoAndVariables.

@Test
public void fromShouldSetMetaInfoAndVariables() {
    // given
    ActivitiSignalEventImpl internalEvent = new ActivitiSignalEventImpl(ActivitiEventType.ACTIVITY_SIGNALED);
    internalEvent.setSignalName("go");
    internalEvent.setSignalData(singletonMap("signalVar", "value"));
    internalEvent.setProcessDefinitionId("procDefId");
    internalEvent.setProcessInstanceId("procInstId");
    // when
    BPMNSignal signal = toSignalConverter.from(internalEvent);
    // then
    assertThat(signal.getSignalPayload().getName()).isEqualTo("go");
    assertThat(signal.getSignalPayload().getVariables()).containsEntry("signalVar", "value");
    assertThat(signal.getProcessDefinitionId()).isEqualTo("procDefId");
    assertThat(signal.getProcessInstanceId()).isEqualTo("procInstId");
}
Also used : ActivitiSignalEventImpl(org.activiti.engine.delegate.event.impl.ActivitiSignalEventImpl) BPMNSignal(org.activiti.api.process.model.BPMNSignal) Test(org.junit.jupiter.api.Test)

Aggregations

BPMNSignal (org.activiti.api.process.model.BPMNSignal)1 ActivitiSignalEventImpl (org.activiti.engine.delegate.event.impl.ActivitiSignalEventImpl)1 Test (org.junit.jupiter.api.Test)1