How to update the null value in destination table with Opcode=4 in publish to adapter activity and subscription service?
book
Article ID: KB0076224
calendar_today
Updated On:
Products
Versions
TIBCO ActiveMatrix BusinessWorks Plug-in for Database
7.x
Description
Description: =========== When the application having subscription service and process with "publish to adapter" activity.The publish to adapter activity configured with ADB_OPCODE=4 value i.e upsert operation. In this case for new record insert operation will be performed and for the same record, any updating of record happened then update operation will be performed by the adapter.
In the case of an adbDateTime field, first insertion operation will be performed correctly but for next execution i.e to update the NULL value at DateTime field then the adapter is ignoring DateTime field and no changes happened at database side. This issue has only happened to the adbDateTime field.
Cause: ===== The root cause is that while building the SQL statement, the subscriber adapter handler will not put the date_string as the binding parameter if its value is null or equals to empty.
Issue/Introduction
How to update the null value in destination table with Opcode=4 in publish to adapter activity and subscription service?
Environment
Product: TIBCO ActiveMatrix BusinessWorks Adapter for Database
Version: 7.x
OS: All Supported Operating Systems
Resolution
Resolution: ========== To resolve this issue follow the below steps to update the null value in the DateTime field,
1)Install the TIBCO Adapter for ActiveDatabase 7.2.0 HF-003 and above hotfix in Tibco_home.
2)Explore the input tab of publish to adapter activity and select the field for which update operation with the null value to be updated.
3)Then right click and select option "Surround with choice" so that the [when] and [otherwise] condition tab gets populated.
4)Map the value in [When] condition and select the value present in [otherwise]option. Then click on the option "Edit Statement" i.e (!) and select the content tab with "Set Explicit Nil" option so that for the first time inserting the data will be processed through [when] condition while for updating null value data will be processed through [otherwise] condition. This way null value can be updated in the DateTime field.
Attachments
How to update the null value in destination table with Opcode=4 in publish to adapter activity and subscription service?
get_app