public override void InnerRun(Dictionary <string, object> vars, Dictionary <string, object> outputVars, Dictionary <string, object> InvertedInputVars, Message message) { COREobject core = COREobject.i; DBEntities context = core.Context; try { string rabbitMQName = (string)vars["rabbitMQ"]; object messageObject = vars["Message"]; if (string.IsNullOrEmpty(rabbitMQName)) { throw new Exception($"{Name}: Please attach RabbitMQ integration."); } if (messageObject == null) { throw new Exception($"{Name}: Message must not be null."); } N.RabbitMQ mq = context.RabbitMQs.SingleOrDefault(q => q.Name == rabbitMQName); if (mq == null) { throw new Exception($"{Name}: Requested RabbitMQ {rabbitMQName} was not found"); } RabbitMQService service = new RabbitMQService(mq); string body; if (messageObject is JToken) { body = messageObject.ToString(); } else { body = Convert.ToString(messageObject); } service.Send(body); service.Close(); outputVars["Result"] = true; outputVars["Error"] = ""; } catch (Exception e) { outputVars["Result"] = false; outputVars["Error"] = e.Message; } }