Coercion error: is not a valid type substitution for "activity"

Coercion error: is not a valid type substitution for "activity"

book

Article ID: KB0083928

calendar_today

Updated On:

Products Versions
TIBCO ActiveMatrix BusinessWorks 6.x

Description

Adding coercion reports the following error in BW6.

Coercion error: "<process>" is not a valid type substitution for "<activity>" . This error will be shown in activities which are placed after the coercion.It happens when anyElement is used in the schema.

Issue/Introduction

Bw6 any element coercion issue.

Environment

All

Resolution

This issue is caused by invalid mapping. In bw6, It is required to indicate that the mapping is for the child element. Mapping the root element will result in the above mentioned error.

This issue can easily be resolved by making the following change by using the xslt editor.

Open the Activity-->XSLT-source and changed the coercion as follows

From 

<?xml version="1.0" encoding="UTF-8"?>
<!--START COERCIONS-->
<!-- $Response, type, m:Response -->
<!--END COERCIONS-->

to

<?xml version="1.0" encoding="UTF-8"?>
<!--START COERCIONS-->
<!-- $Response/*, type, m:Response -->
<!--END COERCIONS-->

Please note that $Response has "/*" added to it.
User-added image
After making the above change, please click the button "parse" before saving the project.