IBM BPM, V8.0.1, All platforms > Migrating and upgrading your IBM BPM environment > Migrating from other products > Migrating from WebSphere InterChange Server or WebSphere Business Integration Server Express > Troubleshooting migration from WebSphere InterChange Server or WebSphere Business Integration Server Express

Failure trying to serialize an object that is not serializable in a migrated BPEL file

If a serialization failure occurs in a BPEL file generated by the migration, you might be able to modify it to prevent the failure from occurring.


Problem: A serialization failure occurs in a custom snippet node of a business process execution language (BPEL) file generated by migration because an attempt is made to serialize an object that is not serializable.


Cause: In WebSphere InterChange Server or WebSphere Business Integration Server Express , a Collaboration Template is compiled into a single Java™ class. In IBM BPM, each node in a BPEL file might compile into a separate Java class. In WebSphere InterChange Server or WebSphere Business Integration Server Express, a variable can be declared once and shared throughout the various steps of a Collaboration Template. To simulate that behavior in the migrated BPEL file, each variable used in a code snippet must be retrieved at the start of the snippet and saved at the end of the snippet. Variables defined in WebSphere InterChange Server or WebSphere Business Integration Server Express Port definitions become BPEL variables. These are retrieved into BusObj variables at the beginning of each snippet (if referenced in the snippet) and saved back to the BPEL variables at the end of each snippet.

For example, a retrieval at the beginning of snippets looks like this:

BusObj tempBusObj = null;if (tempBusObj_var != null) { tempBusObj =
      new BusObj(tempBusObj_var); };
and a save at the end of snippets looks like this:
if (tempBusObj == null) { tempBusObj_var = null; } else { tempBusObj_var =
      tempBusObj.getBusinessGraph(); }
Other variables used in the WebSphere InterChange Server or WebSphere Business Integration Server Express snippet code are serialized and stored as a String in a BPEL variable named CollabTemplateName_var. These variables are deserialized at the beginning of each BPEL snippet, and then serialized and saved at the end of each BPEL Snippet that they are referenced in.

For example, objects are retrieved like this:

BusObj tempBusObj = (BusObj)BaseCollaboration.deserialize
  (FrontEndCollab_var.getString("tempBusObj"));
and objects are saved like this:
FrontEndCollab_var.setString("tempBusObj", BaseCollaboration.serialize(tempBusObj));

If the type of the object being serialized is not serializable, then using serialize and deserialize will fail when the BPEL is run.


Solution: After migration, modify the BPEL file as follows:

: Troubleshooting migration from WebSphere InterChange Server or WebSphere Business Integration Server Express