RosettaNet Configuration Bug:Value cannot be null

來源:互聯網
上載者:User

最近發現在配置RosettaNet時候,總是報錯: Value cannot be null.很鬱悶,因為沒辦法調出UI配置Agreement,只好在資料庫裡修改 TPA 資訊.

不死心找bug, 反編譯Microsoft.Solutions.BTARN.AdminSnapin.dll, 跟蹤調試,發現在

public ProcessConfiguration(string displayCode)
        {...

this.fieldActivityProperties.ActivityName = values.Get("Activity_Name");

時候報錯:value cannot be null.

 

檢查BTARNConfig..PIPConfig表Data欄位,發現少了Activity_Name欄位,

<key name="Activity_Name" value="Notify of Consumption" />

 

檢查Hotfix History,發現原來是打過KB938839 Hotfix,需要更新BTARNConfig資料庫.詳見KB938839 ,

 

Update_BTARNConfig_PIPConfig.sql

 

USE [BTARNCONFIG]GOBEGIN TRANSACTION updatePatch    SET ANSI_NULLS OFF    GO    SET QUOTED_IDENTIFIER ON    GO    DECLARE @ActivityName   nvarchar(300)    DECLARE @lengthPart1    bigint    DECLARE @nameExists    int    DECLARE @PIPID        int    DECLARE @PIPName    nvarchar(256)    DECLARE @stringPart1    nvarchar(4000)    DECLARE @stringPart2    nvarchar(4000)    DECLARE @totalLength    bigint    DECLARE @totalString    nvarchar(4000)        DECLARE data_cursor CURSOR    FOR SELECT ID,Name,Data FROM dbo.PIPConfig    OPEN data_cursor    FETCH NEXT FROM data_cursor    INTO @PIPID,@PIPName,@totalString    WHILE @@FETCH_STATUS=0        BEGIN            SELECT @nameExists=CHARINDEX('Activity_Name',@totalString)                IF (@nameExists = 0)                BEGIN                SELECT @lengthPart1=(CHARINDEX('<key name="Activity_Type"',@totalString)-1),@totalLength=DATALENGTH(@totalString)                 SELECT @stringPart1=SUBSTRING(@totalString,1,@lengthPart1),@stringPart2=SUBSTRING(@totalString,@lengthPart1+1,@totalLength-@lengthPart1)                SET @ActivityName='<key name="Activity_Name" value="'+@PIPName+'" />'                    SET @stringPart1=@stringPart1+@ActivityName                UPDATE PIPConfig                SET data=@stringPart1+@stringPart2                WHERE ID=@PIPID                                END            FETCH NEXT FROM data_cursor            INTO @PIPID,@PIPName,@totalString        END    CLOSE data_cursor    DEALLOCATE data_cursorCOMMIT TRANSACTION updatePatch

--------------------------------------------

 

附 PIPConfig Data

<?xml version="1.0" encoding="utf-8"?><NameValueCollection>    <key name="PIP_Code" value="4B3"/>    <key name="PIP_Description" value="&quot;The &quot;&quot;Notify of Consumption&quot;&quot; Partner Interface Process supports consumption notification within a consignment inventory management process where &#xD;&#xA;-The supplier ships product to a consigned warehouse location based upon receipt of demand forecast and t"/>    <key name="PIP_DisplayCode" value="TI_STD_4B3_V01.00"/>    <key name="PIP_InternalID" value="1011"/>    <key name="PIP_messageStandard" value=""/>    <key name="PIP_Name" value="Notify of Consumption"/>    <key name="PIP_nonRosettaNet" value="False"/>    <key name="PIP_payloadBindingID" value=""/>    <key name="PIP_Standard" value="RosettaNet"/>    <key name="PIP_standardVersion" value=""/>    <key name="PIP_Version" value="V01.00"/>    <key name="Activity_Name" value="Notify of Consumption"/>    <key name="Activity_Type" value="Notification"/>    <key name="Activity_IsSingleAction" value="True"/>    <key name="Activity_IsSynchronous" value="False"/>    <key name="Activity_NonRepudiationOfReceipt" value="False"/>    <key name="Activity_TimetoAcknowledge" value="7200"/>    <key name="Activity_TimetoPerform" value="86400"/>    <key name="Activity_Retrycount" value="3"/>    <key name="Activity_IsAuthorizationRequired" value="False"/>    <key name="Activity_NonRepudiationofOriginandContent" value="False"/>    <key name="Activity_IsPersistentConfidentialityRequired" value="None"/>    <key name="Activity_IsSecureTransportRequired" value="True"/>    <key name="Initiator_Role" value="Consumption Notification Provider"/>    <key name="Initiator_RoleDescription" value="The party that creates and sends consumption information to Supplier."/>    <key name="Initiator_RoleType" value="Organizational"/>    <key name="Initiator_Service" value="Consumption Notification Provider Service"/>    <key name="Initiator_ServiceClassification" value="Business Service"/>    <key name="Initiator_Action" value="Consumption Notification Action"/>    <key name="Initiator_BusinessDocument_Name" value="Consumption Notification"/>    <key name="Initiator_BusinessDocument_Description" value="The Consumption Notification contains consumption information includes product identification, quantities; consumption dates, and may include payment reference number and purchase order number."/>    <key name="Initiator_BusinessDocument_Version" value="V01.00"/>    <key name="Responder_Role" value="Consumption Notification User"/>    <key name="Responder_RoleDescription" value="The party that requires consumption information from the customer to manage inventory"/>    <key name="Responder_RoleType" value="Organizational"/>    <key name="Responder_Service" value="Consumption Notification Provider Service"/>    <key name="Responder_ServiceClassification" value="Business Service"/>    <key name="Responder_Action" value="Consumption Notification Action"/>    <key name="Responder_BusinessDocument_Name" value="Consumption Notification"/>    <key name="Responder_BusinessDocument_Description" value="The Consumption Notification contains consumption information includes product identification, quantities; consumption dates, and may include payment reference number and purchase order number."/>    <key name="Responder_BusinessDocument_Version" value="V01.00"/></NameValueCollection>

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.