Scripted Field Mapping from Jira Webhook to sub-flow in integrationHub fails with error.


You have configured Jira Webhooks to send to ServiceNow information about records that have been modified or created in Jira side. However, you cannot access the returned input variable fields from Jira into your scripted field map. Your map assigns a returned field such as 'Status' as follow:

var status = fd_data.trigger.current.status;

Then when the sub-flow is executed, you find this error:

Operation(Jira Webhook demo.<sys_id value>) failed with error: com.snc.process_flow.exception.OpException: No Record found


The scripted mapping is referencing a non existent sub-flow object 'fd_data.trigger'. For example:

var status = fd_data.trigger.current.status;


Since the webhook flow is a sub-flow, the correct way to have access to the input variables (coming from Jira Webhook) is using a subflow_inputs object 'fd_data.subflow_inputs' instead of 'fd_data.trigger'. Then a reference to the incoming object and the variable is needed.

The received data structure from Jira Webhook for status is:
Subflow input --> Issue --> status

Then, the correct way to extract the status into a script variable is:
var status = fd_data.subflow_inputs.issue.status;

the "dot walking" path means:
From 'flow designer data' ==> 'access all Subflow inputs' ==> 'get issue variables' ==> 'read status'.

This will resolve the error.