![JAR search and dependency download from the Maven repository](/logo.png)
org.camunda.bpm.scenario.impl.waitstate.SignalIntermediateCatchEventExecutable Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of camunda-bpm-assert-scenario Show documentation
Show all versions of camunda-bpm-assert-scenario Show documentation
Camunda BPM Assert Scenario allows you to specify the actions
needed at process wait states before you start the process instances
executing your test scenario. As a consequence, writing such tests is
easier and faster than ever before. And refactoring and changing large
process models and their test suites can almost be done in the blink
of an eye: ;-) Done! Check it out and judge yourself!
package org.camunda.bpm.scenario.impl.waitstate;
import org.camunda.bpm.engine.history.HistoricActivityInstance;
import org.camunda.bpm.engine.runtime.EventSubscription;
import org.camunda.bpm.scenario.ProcessScenario;
import org.camunda.bpm.scenario.act.Action;
import org.camunda.bpm.scenario.delegate.EventSubscriptionDelegate;
import org.camunda.bpm.scenario.impl.ProcessRunnerImpl;
import org.camunda.bpm.scenario.impl.delegate.AbstractEventSubscriptionDelegate;
import org.camunda.bpm.scenario.impl.delegate.EventSubscriptionDelegateImpl;
import java.util.Map;
/**
* @author Martin Schimak
*/
public class SignalIntermediateCatchEventExecutable extends AbstractEventSubscriptionDelegate {
private EventSubscriptionDelegate eventSubscriptionDelegate;
public SignalIntermediateCatchEventExecutable(ProcessRunnerImpl runner, HistoricActivityInstance instance) {
super(runner, instance);
eventSubscriptionDelegate = EventSubscriptionDelegateImpl.newInstance(this, delegate);
}
@Override
protected EventSubscription getDelegate() {
return getRuntimeService().createEventSubscriptionQuery().eventType("signal").activityId(getActivityId()).executionId(getExecutionId()).singleResult();
}
@Override
protected Action action(ProcessScenario scenario) {
return scenario.waitsAtSignalIntermediateCatchEvent(getActivityId());
}
@Override
public void receive() {
eventSubscriptionDelegate.receive();
}
@Override
public void receive(Map variables) {
eventSubscriptionDelegate.receive(variables);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy