Sends an event to a workflow
 @param workflow_name [String] the class name of the workflow
 @param custom_id [String] the custom ID of the workflow (if any)
 @param event [Zenaton::Interfaces::Event] the event to send
 @return [NilClass]
547745
def send_event(workflow_name, custom_id, event)
      body = {
        ATTR_PROG => PROG,
        ATTR_NAME => workflow_name,
        ATTR_ID => custom_id,
        EVENT_NAME => event.class.name,
        EVENT_INPUT => @serializer.encode(@properties.from(event))
      }
      @http.post(send_event_url, body)
    end
752510
def send_to_backends(self, event):
        

        for name, backend in six.iteritems(self.backends):
            try:
                backend.send(event)
            except Exception:  # pylint: disable=broad-except
                LOG.exception(
                    'Unable to send event to backend: %s', name
                )
1230878
def workflow_rename(object_id, input_params={}, always_retry=True, **kwargs):
    
    return DXHTTPRequest('/%s/rename' % object_id, input_params, always_retry=always_retry, **kwargs)
1101156
def method_missing(method_name, *args, &block)
      _, event_name, callback_name = *method_name.to_s.match(/^(\w*?on_\w+?)_(\w+)$/)
      if callback_name && callback_names.include?(callback_name.to_sym)
        public_send(event_name, :"#{callback_name}", *args, &block)
      else
        super
      end
    end
1339804
def bind(self, event_name, callback):
        

        if event_name not in self.event_callbacks.keys():
            self.event_callbacks[event_name] = []

        self.event_callbacks[event_name].append(callback)
764183
def send_request_to_service(service_name, message)
      if block_given?
        EventMachine.defer do
          yield send_request_to_service(service_name, message)
        end
      else
        send_HTTP_request(@channel.default_exchange, service_name, message)
      end
    end
426752
function (connection) {
            if (connection) {
                // raise global custom event -- startEvent
                ariaCoreIO.$raiseEvent({
                    name : "startEvent",
                    o : connection
                });

                if (connection.startEvent) {
                    // raise transaction custom event -- startEvent
                    ariaCoreIO.$raiseEvent({
                        name : connection.startEvent,
                        o : connection
                    });
                }
            }
        }
207102
def events(self, *events):
        
        return self.send_events(self.create_event(e) for e in events)
960088
def enable(resource_group_name, workflow_name, custom_headers:nil)
      response = enable_async(resource_group_name, workflow_name, custom_headers:custom_headers).value!
      nil
    end
375569
def fire_event(self, evt_name, *args, **kwargs):
        
        listeners = self.__get_listeners(evt_name)
        evt = self.generate_event(evt_name)
        for listener in listeners:
            listener(evt, *args, **kwargs)
101151
public void sendEvent(final Map<String, String> params) {
        executor.execute(new Runnable() {
            @Override
            public void run() {
                // put user id
                params.put("cid", userId);
                Multimap queryParams = HashMultimap.create();
                for (Map.Entry<String, String> entry : params.entrySet()) {
                    String key = entry.getKey();
                    String value = entry.getValue();
                    Preconditions.checkNotNull(key, "Custom search param key must not be null.");
                    Preconditions.checkNotNull(value, "Custom search param value must not be null.");
                    queryParams.put(key, value);
                }
                viSearchHttpClient.get(ENDPOINT_SEND_ACTIONS, queryParams);
            }
        });
    }
13020
def on_created(self, event):
        ''''''
        if self.trigger != "create":
            return
        action_input = ActionInput(event, "", self.name)
        flows.Global.MESSAGE_DISPATCHER.send_message(action_input)
94132
def event(name)
      @unobservable_events_map ||= {}
      e = @unobservable_events_map[name]
      if not e
        if self.events.include? name
          e = Event.new
          @unobservable_events_map[name] = e
        else
          raise NameError, "Undefined event: #{name}"
        end
      end
      return e
    end
479146
def _trigger(self, event_name, *args, **kwargs):
        
        self.log('event: %s' % event_name, *args)
        for f in self._events[event_name]:
            f(*args, **kwargs)
1184377
def method_missing(method_id, *arguments, &block)
      if method_id.to_s =~ /^get_[\w]+/
        self.class.send :define_method, method_id do
          field = method_id.to_s[4..-1]
          get(field)
        end
        self.send(method_id)
      else
        super
      end
    end
627977
def execute_workflow(id, parameter_json)
      path = "/workflows/#{id}/executions/"
      response = @session.post(path, parameter_json)
      # Execution ID is the final component in the Location header URL, so
      # chop off the front, then pull off any trailing /
      response.headers[:location].gsub(%r{^.*/executions/}, '').gsub(%r{\/$}, '')
    end
1373951
def raw_custom_event(sender, event_name,
                             payload,
                             user,
                             send_hook_meta=True,
                             instance=None,
                             **kwargs):
    
    HookModel = get_hook_model()
    hooks = HookModel.objects.filter(user=user, event=event_name)

    for hook in hooks:
        new_payload = payload
        if send_hook_meta:
            new_payload = {
                'hook': hook.dict(),
                'data': payload
            }

        hook.deliver_hook(instance, payload_override=new_payload)