Exemple #1
0
        public void SetUp()
        {
            this.activityParser = new AdapterSubscriberActivityParser();
            var xml =
                @"<pd:activity name=""GetUndlCurrency"" xmlns:pd=""http://xmlns.tibco.com/bw/process/2003"" xmlns:xsl=""http://w3.org/1999/XSL/Transform"">
<pd:type>com.tibco.plugin.ae.AESubscriberActivity</pd:type>
<config>

</config>
</pd:activity>";

            doc = XElement.Parse(xml);

            this.activity = (AdapterSubscriberActivity)this.activityParser.Parse(doc);
        }
Exemple #2
0
        public Activity Parse(XElement inputElement)
        {
            var activity = new AdapterSubscriberActivity();

            activity.Name = inputElement.Attribute("name").Value;
            activity.Type = (ActivityType)inputElement.Element(XmlnsConstant.tibcoProcessNameSpace + "type").Value;

            var configElement = inputElement.Element("config");

            activity.TpPluginEndpointName = XElementParserUtils.GetStringValue(configElement.Element("tpPluginEndpointName"));

            activity.UseRequestReply               = XElementParserUtils.GetBoolValue(configElement.Element(AeSubscriberPropertyPrefix + "useRequestReply"));
            activity.TransportChoice               = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "transportChoice"));
            activity.AdapterService                = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "adapterService"));
            activity.TransportType                 = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "transportType"));
            activity.RvSubject                     = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "rvSubject"));
            activity.RvSessionService              = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "rvSessionService"));
            activity.RvSessionNetwork              = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "rvSessionNetwork"));
            activity.RvSessionDaemon               = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "rvSessionDaemon"));
            activity.MessageFormat                 = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "msgFormat"));
            activity.RvCmSessionDefaultTimeLimit   = XElementParserUtils.GetIntValue(configElement.Element(AeSubscriberPropertyPrefix + "rvCmSessionDefaultTimeLimit"));
            activity.RvCmSessionSyncLedger         = XElementParserUtils.GetBoolValue(configElement.Element(AeSubscriberPropertyPrefix + "rvCmSessionSyncLedger"));
            activity.RvCmSessionLedgerFile         = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "rvCmSessionLedgerFile"));
            activity.RvCmSessionName               = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "rvCmSessionName"));
            activity.RvCmSessionRelayAgent         = XElementParserUtils.GetStringValue(configElement.Element(AeSubscriberPropertyPrefix + "rvCmSessionRelayAgent"));
            activity.RvCmSessionRequireOldMessages = XElementParserUtils.GetBoolValue(configElement.Element(AeSubscriberPropertyPrefix + "rvCmSessionRequireOldMessages"));

            var outputSchemaElement = configElement.Element(AeSubscriberPropertyPrefix + "outputMeta");

            if (outputSchemaElement != null)
            {
                activity.OutputSchema = XElementParserUtils.GetStringValue(outputSchemaElement.Element("aeMeta"));
            }

            return(activity);
        }