Output Payload Overview
Successful Execution
The following shows the output payload from a successful run:
<?xml version="1.0" encoding="UTF-8" ?>
<SSC>
<User>
<Name>PKP</Name>
</User>
<SunSystemsContext>
<BusinessUnit>PKP</BusinessUnit>
</SunSystemsContext>
<Payload>
<Item status="success" Reference="1">
<ItemCode>UDCCT01501</ItemCode>
</Item>
</Payload>
<ErrorMessages>
<Message>
<PayloadRef>1</PayloadRef>
<UserText><![CDATA[
Item Data will not be updated with any of the item tags other than the item code]]>
</UserText>
</Message>
</ErrorMessages>
</SSC>
It shows that the execution of the payload was successful and the item code for which costs were either created or amended.
Failed Execution
The following shows how the output payload from a run in which an error was generated would look:
<?xml version="1.0" encoding="UTF-8" ?>
<SSC>
<User>
<Name>PKP</Name>
</User>
<SunSystemsContext>
<BusinessUnit>PKP</BusinessUnit>
</SunSystemsContext>
<Payload>
<Item status="fail">
<ItemCode>UDCCT01303</ItemCode>
<Costs status="fail">
<CostAnalysisId>2</CostAnalysisId>
<CostTypeCode status="fail" Reference="1">
</CostTypeCode>
<CurrencyCode>GBP</CurrencyCode>
<ItemUserDefinedCost>
<ItemUserDefinedValue>1.1</ItemUserDefinedValue>
<Period>0012003</Period>
<UserDefinedCostDefinitionCode>UDC01</UserDefinedCostDefinitionCode>
</ItemUserDefinedCost>
</Costs>
</Item>
</Payload>
<ErrorMessages>
<Message>
<PayloadRef>1</PayloadRef>
<UserText>
<![CDATA[The Cost Type Code must be present in payload.]]>
</UserText>
<Exception>
<![CDATA[
com.systemsunion.JBO.common.exceptions.CostTypeCodeNotPresentException: The Cost Type Code must be
present in payload.
at
com.systemsunion.JBO.item.UserDefinedCostBO.save
(Unknown Source)
at
com.systemsunion.SSTS.components.business.userdefinedcost.UserDefinedCostImport.
execute(UserDefinedCostImport.java:59)
at
com.systemsunion.SSTS.drivers.DJI.DJIMethod.execute
(Unknown Source)
at
com.systemsunion.SSTS.drivers.DJI.DJIDriver.execute
(Unknown Source)
at com.systemsunion.SSTS.streaming.ExecutionFilter.execute
(Unknown Source)
at
com.systemsunion.util.streaming.AbstractFilter.execute
(Unknown Source)
at
com.systemsunion.util.streaming.AbstractStreamBase$1.run
(Unknown Source)
at java.lang.Thread.run(Thread.java:536)]]>
</Exception>
</Message>
</ErrorMessages>
</SSC>
It shows that the execution of the payload failed and the runtime data values that were used.
The component assigned a payload failure reference (<CostTypeCode
status="fail" Reference="1">
) to the particular error, allowing you to
find failing payload records if there are multiple records present. The error
message text for this failure was written to the <ErrorMessages> element with the
failure payload reference, allowing you to easily cross reference a particular error
message with its matching payload record. In the example shown, the component
reported that the mandatory element Cost Type Code was not present in the
payload.