BAM Exception

Viewing 1 reply thread
  • Author
    Posts
    • #20260

       Hi,
      I am getting the following error when I do SDK / BAMFormExpression sample. This error started after I added BAM API code in to my orchestration.
      ————————–
      Uncaught exception (see the ‘inner exception’ below) has suspended an instance of service ‘BIZ_SC_TO_UNI_WEBSER_EDI_810_OUT.ORCH_UNI_WEBSER_EDI_810(6c7d8ec3-835c-de9b-b42b-192447be695c)’.
      The service instance will remain suspended until administratively resumed or terminated.
      If resumed the instance will continue from its last persisted state and may re-throw the same unexpected exception.
      InstanceId: dceac035-4071-47ae-8a12-f6439fbeb325
      Shape name: Send_GeneralException
      ShapeId: 2f00b2f0-1263-447a-a4ef-19a92898b024
      Exception thrown from: segment 8, progress 8
      Inner exception: Type ‘Microsoft.BizTalk.Bam.EventObservation.BAMTraceFragmentBatch’ in Assembly ‘Microsoft.BizTalk.Bam.EventObservation, Version=3.0.1.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35’ is not marked as serializable.
             
      Exception type: SerializationException
      Source: mscorlib
      Target Site: System.Reflection.MemberInfo[] InternalGetSerializableMembers(System.RuntimeType)
      The following is a stack trace that identifies the location where the exception occured

         at System.Runtime.Serialization.FormatterServices.InternalGetSerializableMembers(RuntimeType type)
         at System.Runtime.Serialization.FormatterServices.GetSerializableMembers(Type type, StreamingContext context)
         at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitMemberInfo()
         at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.InitSerialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
         at System.Runtime.Serialization.Formatters.Binary.WriteObjectInfo.Serialize(Object obj, ISurrogateSelector surrogateSelector, StreamingContext context, SerObjectInfoInit serObjectInfoInit, IFormatterConverter converter, ObjectWriter objectWriter)
         at System.Runtime.Serialization.Formatters.Binary.ObjectWriter.Serialize(Object graph, Header[] inHeaders, __BinaryWriter serWriter, Boolean fCheck)
         at System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Serialize(Stream serializationStream, Object graph, Header[] headers, Boolean fCheck)
         at Microsoft.XLANGs.Core.ObjectSerializer._serialize(Object graph, StringLookup sl)
         at Microsoft.XLANGs.Core.ObjectSerializer.SerializeStateManager(IStateManager stateMgr, StringLookup lookup)
         at Microsoft.XLANGs.Core.Service.Persist(Boolean dehydrate, Context ctx, Boolean idleRequired, Boolean finalPersist, Boolean bypassCommit, Boolean terminate)
         at Microsoft.XLANGs.Core.ServiceContext.PendingCommit(Boolean ignore, XMessage msg)
         at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)
         at Microsoft.XLANGs.Core.ExceptionHandlingContext.PendingCommit(Boolean ignoreCommit, XMessage msg)
         at Microsoft.BizTalk.XLANGs.BTXEngine.BTXPortBase.SendMessage(Int32 iOperation, XLANGMessage msg, Correlation[] initCorrelations, Correlation[] followCorrelations, Context cxt, Segment seg, ActivityFlags flags)
         at BIZ_SC_TO_UNI_WEBSER_EDI_810_OUT.ORCH_UNI_WEBSER_EDI_810.segment8(StopConditions stopOn)
         at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s, StopConditions stopCond, Exception& exp)
      ——————————–

      I am mapping XML to EDI.


      Thank you,

      Siva

    • #20308

      It sounds like the exception is caused by calling a non-serializable component. Do you maybe need to call the API from within an atomic scope?

      • #20332

         Thank you for your reply Ruselw,

        I change the API and it works fine now. Its funny, even SDK sample “BAMFROMEXPRESSION” throwing same exception. I am not sure why.

        One more question, Would it be possible to handle duplicates in BAM? so if i receive duplicate invoices from same vendor, then i want to show that in the BAM screen. For example, if I use Invoice# as ActivityID, then BAM will fail when i receive dups. Would it be possible to handle this failure and show as dups?

        • #20333

           You could just generate a new GUID to use as the activity ID, and then store the invoice # as a separate field.  Not sure if this would solve your problem…

          • #20358

             Hi,

            Thank you for your help. Since I am new to BAM I am not sure how to do. I never work with BAM before. Could you give me more detail or where can I find these info?

            I have some other questions as well. Could you give me answears if possible?

            1. If i want the BAM to monitor different type of transaction from different partners, should i have to create profile(.btt) for each transaction? I would like to keep same definition. Eg. If i send or receive 850, 810, 856 to A and same documents to B, now i need 6 .btt. Am i right?

            2.I have relatedactivity, name “LoopInvoice”, in my BAM. I am using this since I have loop in my orchestration. When I view the record in BAM it is showing the relatedactivity name for each loop under the “Related Activity” section. Would it be possible to show ActivityID or some other ID under there?

            3. My relatedActivity activityID is invoice number. If i get duplicate invoice number, BAM throws error. How can i handle this to show as Duplicate? I want to keep invoice for ActivityID since I want to update this BAM up on 997.

            Thank you in advance,


            Thank you,

            Siva

             

             

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.