public void signal(String signalName, Object signalData) {
ensureActivityInitialized();
SignallableActivityBehavior activityBehavior = (SignallableActivityBehavior) activity.getActivityBehavior();
try {
String signalledActivityId = activity.getId();
activityBehavior.signal(this, signalName, signalData);
// If needed, dispatch an event indicating an activity was signalled
boolean isUserTask = (activityBehavior instanceof UserTaskActivityBehavior)
|| ((activityBehavior instanceof MultiInstanceActivityBehavior)
&& ((MultiInstanceActivityBehavior) activityBehavior).getInnerActivityBehavior() instanceof UserTaskActivityBehavior);