Getting stuck with Using service execution task

We have a scenario where a BizDoc in TN is being posted in SAP R/3 using a BAPI call. We have a service in IS which takes the bizdoc and calls the SAP BAPI to post the document.
The entire set-up works fine if we use Synchronous call to the service in the processing rule to process the document from TN.
Moment we make it ‘service execution task’ we get the following error:
“Probable reason for failure-Error invoking service Service did not return valid output - {2}”
We have implemented the recommended output serviceOutput with appropriate variables.

Would greatly appreciate a solution.

Regards,
Harish

Your service output should have this value serviceOutput.status to “success” if it has executed successfully. If not, your task will fail

Hi Manohar,
The serviceOutput.status is set to success and fail based on the BAPI output.

The BAPI we are executing does not have a commit transaction inside it in SAP. So as to commit the transaction we have build the service in such a manner that we first lock the session, call the BAPI, commit or rollback based on return message from BAPI and then release the session.

Now as per our observation, if the TN is put in service execution task and the service is called, the service stops at the lock session which gives an error ‘Null Pointer exception’. If suppose if we disable the lock session service, then everrything goes fine, except the transaction does not get commited in SAP. The serviceOutput status and message properly comes back to Trading Network.

There seems to be some problem in using lock session service along with service execution task.

Regards

Ganesh.R.Iyer

Just a thought; have you tried putting in a savePipelineToFile and capturing the pipeline at the beginning of the service execution task and verifying that the proper values a set for the lock?

-TW

Yes Thomas. I tried to save the pipeline values to file and saw the variables. The lock session requires server name which is properly set.

Regards

Ganesh.R.Iyer