Camunda Spin : No matching data format detected

I am getting the error “The process could not be started. : SPIN-01004 No matching data format detected” while trying to start my process. The response of the service task is a JSON String. “{”\key":"\value"}" .
I have set the output parameter in bpmn as shown below:

<camunda:outputParameter name=“Result”>
<camunda:script scriptFormat=“Javascript”>S(response).prop(‘key1’).value();</camunda:script>

And I am taking the ouptut value of result variable as the input of the next service task uri. Could you please help.

*Also tried S(response, ‘application/json’) but the error still occurs.

Can you provide a exact copy of your web service response?

As a quick check, stringify your response value such as (with JavaScript):

got the same error again on using S(JSON.stringify(response))
The Actual webservice response :

Could you please advise

Capture your response variable as a regular string variable and confirm that is it receiving the proper expected value.

I got the same error trying to acess a mock REST service, that return the following json. There is a way to fix this error?

“CustomerName”: “test”,
“CustomerCode”: “0987asdf789d”,
“errorMessage”: null

Can you provide a sample BPMN file with your sample HTTP-connector configuration.

Hi @StephenOTT,

I got the response using “S(response, ‘application/json’);”

but now, I am trying to get the variable of the Json and I am receiving the following message:

“nome”: “Andre Sousa”,
“documento”: “123456789”,
“nome”: “Lucas Rodrigues”,
“documento”: “111111111”,

How can I do to read the key : value from Json?

Thanks a lot for the reply! :+1:

Hi @Rudson_Rodrigues,
Try S(response).prop(‘key’).value();


1 Like

@Rudson_Rodrigues as I mentioned here with links : Variables for rest call from bpmn You need to read the SPIN documentation.