cancel
Showing results for 
Search instead for 
Did you mean: 

SAP Field Service Management - java.io.ByteArrayInputStream cannot be cast to java.lang.String

samot
Participant
0 Kudos

Hello guys,

we are encountering the following error with our Custom Business Rule:

We are getting the "java.io.ByteArrayInputStream cannot be cast to java.lang.String" error message in the Business rule Execution Log, when the BR is triggered by the creation of ServiceAssignmentStatus, after closing the ServiceCall and synchronizing the Windows application.

We have identified that this error message appears only when we are trying to use two FSM Webhook actions, in order to retrieve the signature attachments from the Smartform generated on the ServiceCall.

This is also not the first time, we have encountered this message, and also in that case it was related to the API calls through the FSM Webhook action. That time we have solved it by applying the credentials (Client ID and Client Secret) with the suitable permissions. But this solution doesn't work for us this time (we have tried pretty much any combination). We also think that the credentials with user-group - Admin (Pre-configured), with all the actions on the Attachment object set to ALL, should be sufficient. And it is if we trigger the BR with the ServiceAssignmentStatus object ID through the Execute on the BR.

Has anyone else also encountered such an issue? We will be grateful for any hint and also provide more details, if needed.

Thank you.

0 Kudos

I don't know the root cause. I will look into it and will let you know.

Accepted Solutions (1)

Accepted Solutions (1)

samot
Participant

The problem was in the permissions. We had to switch the Permission setting, in the Trigger section of the Business rule from the "Full Permissions - maximum permissions for given company type" to "Current user - nothing more than user permissions". I'm not really sure why we had to do this or how do these permissions affect the used "FSM Webhook" actions, during their API calls, so some explanation would be appreciated.

Thank you.

Yes, exactly. The error occurs, when the Web API returns an error (response code > 300). The error message is not shown here properly. The error handling will be improved in version 7.149.0.

samot
Participant
0 Kudos

marcin.tamberg thank you. Could you please also elaborate, how does the permission setting in the Trigger section of the Business rule affect the execution of the FSM Webhook action? Like, why does it work with the, in my opinion more restricted permissions, but not with the Full permissions?

Thank you.

Answers (0)