// Called by Alteryx to notify the plugin of a new ougoing connection.
        public bool PI_AddOutgoingConnection(string pOutgoingConnectionName, AlteryxRecordInfoNet.OutgoingConnection outgoingConnection)
        {
            // Add the outgoing connection to our PluginOutputConnectionHelper so it can manage it.
            if (pOutgoingConnectionName == "Attachment Output")
            {
                m_attachmentOutputHelper.AddOutgoingConnection(outgoingConnection);
            }
            else
            {
                m_outputHelper.AddOutgoingConnection(outgoingConnection);
            }

            // Return true to indicate that we accepted the connection.
            return(true);
        }
        /// <summary>
        /// The PI_AddOutgoingConnection function pointed to by this property will be called by the Alteryx Engine when an outgoing data connection is being made.
        /// </summary>
        /// <param name="pOutgoingConnectionName">The name will be the name that you gave the connection in the IPlugin.GetOutputConnections() method.</param>
        /// <param name="outgoingConnection">You will need to use the OutgoingConnection object to send your data downstream.</param>
        /// <returns>True if the connection was handled successfully, false otherwise.</returns>
        public virtual bool PI_AddOutgoingConnection(string pOutgoingConnectionName, AlteryxRecordInfoNet.OutgoingConnection outgoingConnection)
        {
            PropertyInfo prop;

            if (!this._outputs.TryGetValue(pOutgoingConnectionName, out prop))
            {
                return(false);
            }

            var helper = prop.GetValue(this, null) as OutputHelper;

            if (helper == null)
            {
                return(false);
            }

            helper.AddConnection(outgoingConnection);
            this.DebugMessage($"Added Outgoing Connection {pOutgoingConnectionName}");
            return(true);
        }
Exemple #3
0
 public bool PI_AddOutgoingConnection(string pOutgoingConnectionName, AlteryxRecordInfoNet.OutgoingConnection outgoingConnection)
 {
     output.AddOutgoingConnection(outgoingConnection);
     return(true);
 }