Hi Vijay,
The error missing return will appear if you udf type is value/simple udf. Please change the udf type to queue.
refer the below blog and wiki
Context and Queue in Message Mapping UDF
UDF Execution Type - Context and Queue. - Process Integration - SCN Wiki
regards,
Harish