Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
VB.NET General Discussion
How do I end CaseParty.Get process and display a message
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="okaymy1112, post: 172641, member: 50467"] What I am trying to do is end the CaseParty.Get process when the original @ID is not found. This means it is not found because it was changed. Also inside the objCaseParty, I want to add a display message "Original party no longer exist on the case. In my xml document the original CaseParty/@ID was 854 but because this CasePartyName was changed the new CasePArty/@ID is 243. This causes an excelption which is what I want to avoid. How do I do this? Here is the CaseParty.Get object I want to make the changes [CODE]objCaseParty = Msc.Integration.Mncis.Library.v4.CaseParty.Get(CInt(aobjXmlInputDoc.DocumentElement.SelectSingleNode("Case/CaseParty[Connection/@BaseConnection='DF']/@ID").InnerText), strCaseNumber, True)[/CODE] Right now I am getting an Exception "Unknown party for provided case" from running CaseParty.Get process because my xml document original CaseParty (@ID) has been changed. So this means the original CaseParty.@ID no longer exist. For that reason, instead of getting an Exception, I want to end CaseParty.Get process. I also want to display text message "The original party (MNCIS Parking) that triggered the NameGet process is no longer on the case." [B]vb.net sub[/B] [CODE]Option Strict On Option Explicit On Imports System.Xml Imports System.Collections.Generic Public Class BcaNameGet Shared Sub main() Dim objMessageProcessor As New MessageProcessor objMessageProcessor.ProcessInputQueue(False, False) End Sub Private Class MessageProcessor : Inherits Msc.Integration.MessageBroker.Library.v4.XmlMessageProcessor Protected Overrides Sub ProcessMessage(ByRef aobjBroker As MessageBroker.Library.v4.Broker, ByRef aobjXmlInputDoc As System.Xml.XmlDocument, ByRef aobjInstantiatedObjectsCollection As Microsoft.VisualBasic.Collection) MyBase.ProcessMessage(aobjBroker, aobjXmlInputDoc, aobjInstantiatedObjectsCollection) Dim objSimpleType As Msc.Integration.CourtXml.Library.v4.SimpleType = CType(aobjInstantiatedObjectsCollection.Item("SIMPLETYPE"), Msc.Integration.CourtXml.Library.v4.SimpleType) Dim strCitationNumber As String = aobjXmlInputDoc.DocumentElement.SelectSingleNode("Citation/CitationNumber").InnerText Dim strIssuingAgency As String = aobjXmlInputDoc.DocumentElement.SelectSingleNode("Citation/Agency/@Word").InnerText Dim blnWasEFiled As Boolean = Msc.Integration.Mncis.Library.v4.Citation.WasEFiled(strCitationNumber, strIssuingAgency, True) Dim strCaseNumber As String = aobjXmlInputDoc.DocumentElement.SelectSingleNode("Case/CaseNumber").InnerText Dim objXmlPersonNameNode As XmlNode = aobjXmlInputDoc.DocumentElement.SelectSingleNode("Case/CaseParty[Connection/@BaseConnection='DF']/CasePartyName") Dim objCaseParty As Msc.Integration.Mncis.Library.v4.CaseParty Dim objBusinessName As Msc.Integration.Mncis.Library.v4.BusinessName Dim objPersonName As Msc.Integration.Mncis.Library.v4.PersonName Dim objNickname As Msc.Integration.Mncis.Library.v4.Nickname Dim strUser As String = aobjXmlInputDoc.DocumentElement.SelectSingleNode("ControlPoint/@UserID").InnerText Dim blnNoRetry As Boolean = False 'Get the existing party and update with registration name objCaseParty = Msc.Integration.Mncis.Library.v4.CaseParty.Get(CInt(aobjXmlInputDoc.DocumentElement.SelectSingleNode("Case/CaseParty[Connection/@BaseConnection='DF']/@ID").InnerText), strCaseNumber, True) If objVehicleRegistration.BusinessName.Length > 0 Then objBusinessName = New Msc.Integration.Mncis.Library.v4.BusinessName objBusinessName.BusinessName = objVehicleRegistration.BusinessName objBusinessName.IsCurrent = True objCaseParty.AddCasePartyName(CType(objBusinessName, Msc.Integration.Mncis.Library.v4.IName), , True) Else If objVehicleRegistration.PersonFirstName.Length > 0 Then objPersonName = New Msc.Integration.Mncis.Library.v4.PersonName objPersonName.First = objVehicleRegistration.PersonFirstName objPersonName.Last = objVehicleRegistration.PersonLastName objPersonName.Middle = objVehicleRegistration.PersonMiddleName objPersonName.IsCurrent = True objCaseParty.AddCasePartyName(CType(objPersonName, Msc.Integration.Mncis.Library.v4.IName), , True) Else objNickname = New Msc.Integration.Mncis.Library.v4.Nickname objNickname.Nickname = objVehicleRegistration.PersonLastName objNickname.IsCurrent = True objCaseParty.AddCasePartyName(CType(objNickname, Msc.Integration.Mncis.Library.v4.IName), , True) End If objCaseParty.Party.CurrentDateOfBirth = objVehicleRegistration.PersonBirthDate End If End Sub End Class End Class[/CODE] [B]xml document[/B] [CODE]<Integration> <ControlPoint Timestamp="7/28/2016 11:20:49 AM" UserID="Nope">SAVE-CR-CASE</ControlPoint> <Case InternalID="685" ID="14870882" Op="A" xmlns:user="[URL]http://tylertechnologies.com[/URL]"> <CaseNumber>426</CaseNumber> <Court/> <CaseParty Op="A" ID="854"> <Connection Op="A" Word="JRD" BaseConnection="PL" ID="684"> <Description>Jurisdiction</Description> <TimestampCreate Op="A">7/28/2016 11:20:49 AM</TimestampCreate> <DateAdded Op="A">07/28/2016</DateAdded> <RemovedDate Op="A"/> <RemovedReason Op="A" Word=""/> <Comment Op="A"/> </Connection> <CasePartyName Op="A" Current="true" ID="54441" InternalNameID="570"> <CasePartyNameType Op="A" Word=""/> <NameType>Business</NameType> <NameLast>State of Minnesota</NameLast> <FormattedName>State of Minnesota</FormattedName> </CasePartyName> <TimestampCreate Op="A">7/28/2016 11:20:49 AM</TimestampCreate> </CaseParty> <CaseParty Op="A" ID="243"> <SendNotice Op="A">true</SendNotice> <RestrictView Op="A">false</RestrictView> <Connection Op="A" Word="DFD" BaseConnection="DF" ID="44919685" InternalCasePartyConnectionID="1651126621"> <Description>Defendant</Description> <TimestampCreate Op="A">7/28/2016 11:20:49 AM</TimestampCreate> <DateAdded Op="A">07/28/2016</DateAdded> <RemovedDate Op="A"/> <RemovedReason Op="A" Word=""/> <Comment Op="A"/> </Connection> <CasePartyName Op="A" Current="true" ID="12121330" InternalNameID="1618922645"> <CasePartyNameType Op="A" Word=""/> <NameType>Standard</NameType> <NameFirst>MNCIS</NameFirst> <NameLast>Parking</NameLast> <FormattedName>Parking, MNCIS</FormattedName> </CasePartyName> <TimestampCreate Op="A">7/28/2016 11:20:49 AM</TimestampCreate> </CaseParty> </Case> <Citation Op="A" ID="679" xmlns:user="[URL]http://tylertechnologies.com[/URL]"> <CitationNumber Op="A">549</CitationNumber> <CaseTypeKey Op="A" Word="CRM">Crim/Traf Mandatory</CaseTypeKey> <Agency Op="A" Word="MN0270300">Brooklyn Park Police Department</Agency> <OffenseDate Op="A">07/18/2016</OffenseDate> <Vehicle Op="A"> <VehicleLicensePlateState Op="A">MN</VehicleLicensePlateState> <VehicleLicensePlateNumber Op="A">348MAR</VehicleLicensePlateNumber> </Vehicle> </Citation> </Integration> [/CODE] [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
VB.NET General Discussion
How do I end CaseParty.Get process and display a message
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom