HI,
hier werden verschiedene Parameter verwendet um dann die Templates zu befüllen.
Beipiel:
In beiden Fällen wurde der Journal-Eintrag mit fast den gleichen Parametern erstellt (siehe JSON Code) - lediglich der ActivityType, welcher sich auf die SPSJournalEntryType bezieht, wurde geändert.
Code: Select all
{
"SPSActivityClassUnitOfWork":[
{
"TypeID":"fe098714-ac94-47f1-9724-df5bac86b3fb",
"OriginalSolutionHtml":"Created by Public API",
"ActivityAction": 14,
"CreatedDate":"2020-07-09 10:51:21.710",
"Creator": "216c5844-c6dd-e411-93fd-001018f589cb",
"VisibleInPortal": 1,
"SolutionParams": "<?xml version=\"1.0\" encoding=\"utf-16\"?> <parameters xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"emailSubject\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">#INC99999 Re: Journal-Entry Test</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"emailDate\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">01/01/1970 12:00:00 PM</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"emailSender\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">Matrix42, TestFrom (M42From@local.com)</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"to\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">Matrix42, Service Desk (ServiceDesk@local.com);</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"cc\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">Matrix42, TestCC (M42CC@local.com);</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryAttachmentParameter\" name=\"attachments\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <FileIds> <fileId>3c3b932f-4bc6-4151-baa6-bef7dd4a0b09</fileId> </FileIds> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryResourceStringParameter\" name=\"attachmentResource\" resourceKey=\"EmailRobot.AttachmentsNotSkipped\" fullTypeName=\"update4u.ServiceManager.BizLogic.EmailRobot.Robot, update4u.ServiceManager.BizLogic, Version=10.0.1.2990, Culture=neutral, PublicKeyToken=null\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> </JournalEntryParameterBase> </parameters>"
},
{
"TypeID":"fe098714-ac94-47f1-9724-df5bac86b3fb",
"OriginalSolutionHtml":"Created by Public API",
"ActivityAction": 0,
"CreatedDate":"2020-07-09 10:51:21.710",
"Creator": null,
"VisibleInPortal": 1,
"SolutionParams": "<?xml version=\"1.0\" encoding=\"utf-16\"?> <parameters xmlns:xsd=\"http://www.w3.org/2001/XMLSchema\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"emailSubject\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">#INC99999 Re: Journal-Entry Test</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"emailDate\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">01/01/1970 12:00:00 PM</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"emailSender\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">Matrix42, TestFrom (M42From@local.com)</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"to\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">Matrix42, Service Desk (ServiceDesk@local.com);</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryParameter\" name=\"cc\" isCurrency=\"false\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <value xsi:type=\"xsd:string\">Matrix42, TestCC (M42CC@local.com);</value> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryAttachmentParameter\" name=\"attachments\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> <FileIds> <fileId>3c3b932f-4bc6-4151-baa6-bef7dd4a0b09</fileId> </FileIds> </JournalEntryParameterBase> <JournalEntryParameterBase xsi:type=\"JournalEntryResourceStringParameter\" name=\"attachmentResource\" resourceKey=\"EmailRobot.AttachmentsNotSkipped\" fullTypeName=\"update4u.ServiceManager.BizLogic.EmailRobot.Robot, update4u.ServiceManager.BizLogic, Version=10.0.1.2990, Culture=neutral, PublicKeyToken=null\"> <IsPortalMode>false</IsPortalMode> <IsExportMode>false</IsExportMode> </JournalEntryParameterBase> </parameters>"
}
]
}
Beim Erstellen übergebe ich verschiedene Informationen / Parameter. So speicher ich z.B. den Ersteller des Journaleintrags (SPSActivityClassUnitOfWork.Creator) aber auch zusätzliche Parameter innerhalb der SolutionParams (siehe XML z.B. emailSender).
Wie du siehst, habe ich im Beispiel die die Werte 14 (Email Robot Reply), sowie 0 (Standard Journal) verwendet. Die Templates der beiden AcitivityTypen verwenden innerhalb des Aufbaues unterschiedliche Parameter und stellen daher den Inhalt anders da, wohl der Übergabeparameter, abgesehen von dem Typen selbst, deckungsgleich sind.
Email Robot Reply (14):
Code: Select all
{journalCopiedFromTicket}{journalCopiedTicketId}E-mail received from {emailSender}
Code: Select all
The following message has been received:<br>{emailSubject}<br>To: {to}<br>CC: {cc}<br>{journalComments}<br>{attachmentResource}{attachments}
- journalCreatedDate: SPSActivityClassUnitOfWork.CreatedDate (unter dem Betreff)
journalComments: SPSActivityClassUnitOfWork.OriginalSolutionHTML
emailSender, emailSubject, to, cc, attachments: Definitert innerhalb der SolutionParams
None (0):
Code: Select all
{journalCopiedFromTicket}{journalCopiedTicketId}Commented by {journalCreator}
Code: Select all
{journalComments}<br>{attachments}
- journalCreatedDate: SPSActivityClassUnitOfWork.CreatedDate (unter dem Betreff)
journalCreator: SPSActivityClassUnitOfWork.Creator
journalComments: SPSActivityClassUnitOfWork.OriginalSolutionHTML
attachments: Definitert innerhalb der SolutionParams
Daher ist es wichtig, dass die Templates für Header und Body (innerhalb der Data der Pickup-Liste SPSJournalEntryType) für Live und Test System identisch sind, um eine 1:1 Copy zu erhalten. Außerdem müssen alle Werte der SPSActivityClassUnitOfWork, wie Creator, CreatedDate, VisibleInPortal aber auch die SolutionParams ins Test-System übernommen werden. Dann sollte die interne Matrix42-Logik die Journaleinträge im Test-System, sowie im Produktivsystem identisch darstellen.