Loading...
Loading...
Adding a mapping to a Flow Designer Flow or ATF Step, the sys_element_mapping data is serialized into the flow/step's sys_update_xml. If the mapping is cleared from that flow/step, the serializer does not add the sys_element_mapping to the sys_update_xml. Steps to Reproduce 1) Create new Local Update Set "Make it flow" -> Submit and make current 2) Create a flow "the flow" with a sys_element_mapping record in it: a) Flow Designer -> create a flow b) Add a new Trigger "Created", set table as "Incident" -> click Done c) Add a new Action "Create Record" and drag the pill "Incident Record" onto the "Table" field -> click Done d) Save the flow 3) Return to Local Update Set -> open the update set "Make it flow", mark Complete and Save. Then click "Export to XML" UI Action 4) Verify the flow is present in an update set with the sys_element_mapping record with the following value: <sys_element_mapping action="INSERT_OR_UPDATE"> <field>table_name</field> <id>09524ba21b3b10104b3c4087bc4bcb36</id> <sys_created_by>admin</sys_created_by> <sys_created_on>2020-10-15 01:38:55</sys_created_on> <sys_id>c5524ba21b3b10104b3c4087bc4bcb37</sys_id> <sys_mod_count>0</sys_mod_count> <sys_updated_by>admin</sys_updated_by> <sys_updated_on>2020-10-15 01:38:55</sys_updated_on> <table>var__m_sys_hub_action_input_2de05916c31332002841b63b12d3aee1</table> <value>{{Created_1.table_name}}</value> </sys_element_mapping> 5) Import the remote update set "Make it flow" into a second instance: a) go to Retrieved Update sets -> Import Update Set from XML -> choose the export file you created in step 3. b) open the imported update set to its form, click "Preview Update Set", close its modal, then "Commit Update Set" and close that modal. The sys_element_mapping record must serialize after update for the eventual update action it will apply to the original instance. 6) Make a change on this second instance creating a new local update set "Make it flow 2" -> Submit and make current DEVELOPER NOTE: add a breakpoint to VariableValueXMLSerializer#52, be ready to drill into "!varEl.hasMapping()" when varEl.toString() = "". 7) Change the flow on the second instance by clearing the element mapping pill value and/or replacing it with a table name like "Incident" in the Table field a) Flow Designer -> open "the flow" -> open the "Create Incident Record" Action -> click the "X" icon next to the "Trigger->Incident Table" pill -> set its value to "Incident", click Done, click Save on the Flow DEVELOPER NOTE: you'll hit the breakpoint a number of times here, look what happens for empty text values, they're ignored. NOTE: The sys_element_mapping record will be retained in the second instance but it is not present in the flow's sys_update_xml record because its value is nil (empty text), and not null. 8) Complete the 2nd update set and complete, check the payload for that sys_element_mapping record, notice that the sys_element_mapping record is missing. 9) Import this update set back into the first instance, Preview the update set, then Commit the update set. Review the flow: the pill remains. The sys_element_mapping record is missing on the exported update set of the second instance. VariableValueXMLSerializer#hasMapping() makes the element mapping not to be copied.
This problem has been fixed. There is no workaround available. If you are able to upgrade, review the Fixed In section to determine the latest version with a permanent fix your instance can be upgraded to.
PRB1443227
Click on a version to see all relevant bugs
ServiceNow Integration
Learn more about where this data comes from
Bug Scrub Advisor
Streamline upgrades with automated vendor bug scrubs
BugZero Enterprise
Wish you caught this bug sooner? Get proactive today.