Hi,
using a stored procedure after the DI API call has been successful is critical!
The Stored procedure is not really part of the DI API call, it just runs afterwards.
B1i gives you the correct DI API message (item creation would be correct) but afterwords you revert the successful DI API cal via Stored procedure to let the item creation fail.
You have two options:
- Let B1i logic check if the "Foreign Name" exists, otherwise skip the B1 object call or let it fail.
- Change the logic of your scenario step by switching to "Single Transaction" (autoCommit=true) and "Stop processing if fails" = false (throwException=false) and switch to B1 outbound.
Maintain the messagelog in atom0 by either using "b1im_skip" for success or "b1im_exception" for error handling.
Best regards
Bastian
P.S.: following is taken from the B1i inline help:
If you do not want to hand over the message to the receiver system, the scenario step can create a special tag that indicates to generic processing in the integration framework to skip the message processing.
Add the following to the final transformation atom (atom0):
<b1im_skip xmlns= ”” info=”my info” msglog=”true” msgout="yes">
If the integration framework skips the message, it puts the message log information to the Filtered section, if the message log is switched on. The result message contains the Message skipped by vBIU logic information.
info
To display an individual message, define it using the info attribute.
msglog
If you want to avoid an entry in the message log, introduce the msglog attribute and set it to false.
msgout
To display the skip information in the Success section of the message log, use the msgout attribute and set it to yes.
For SAP Business One Outbound Only
Add the following to the final transformation atom to display an exception in the message log, if a call or several calls in your processing have failed:
<b1im_exceptionxmlns= ”” info=”my info” >
info
To display an individual message, define it using the info attribute.
For example: <b1im_exception xmlns="" info="error message text"/>
In your process flow, set Stop processing if fails to false, and handle the error messages as well as the success messages at the outbound stage. You can add SAP Business One error messages of single or multiple calls to the outbound message of the message log