In case of asynchronous flow, sometimes we need a unique ID to track the flow across different system or different services. we can use the XSLT function oraext:generate-guid() to generate the ID.
In below example I am defining a variable as assigning the unique ID to it, and later restructuring.
you can also directly use it in a XSLT transformation.
<variables>
<variable name="correlationID" type="xsd:string">
<from>oraext:generate-guid()</from>
</variable>
</variables>
<assign name="Assign_ServiceRequestDetails">
<copy>
<from>concat(substring($correlationID,1,8),'-',substring($correlationID,9,4),'-',substring($correlationID,13,4),'-',substring($correlationID,17,4),'-',substring($correlationID,21))</from>
<to>$serviceRequest/ns14:CorrelationID</to>
</copy>
</assign>
In below example I am defining a variable as assigning the unique ID to it, and later restructuring.
you can also directly use it in a XSLT transformation.
<variables>
<variable name="correlationID" type="xsd:string">
<from>oraext:generate-guid()</from>
</variable>
</variables>
<assign name="Assign_ServiceRequestDetails">
<copy>
<from>concat(substring($correlationID,1,8),'-',substring($correlationID,9,4),'-',substring($correlationID,13,4),'-',substring($correlationID,17,4),'-',substring($correlationID,21))</from>
<to>$serviceRequest/ns14:CorrelationID</to>
</copy>
</assign>
After restructuring in assign:
This id can be use in all the subsequent bpel processes to track the flow.

