use of com.mulesoft.tools.migration.library.gateway.steps.policy.utils.ClientIdEnforcementOnErrorContinueElementWriter in project mule-migration-assistant by mulesoft.
the class ValidateClientProcessorChainTagMigrationStep method migrateContent.
@Override
protected void migrateContent(Element errorHandlerElement, List<Content> cloneContentList) {
Element onErrorContinueElement = new ClientIdEnforcementOnErrorContinueElementWriter().create(errorHandlerElement, false);
onErrorContinueElement.addContent(0, cloneContentList);
replaceSetPayloadElement(onErrorContinueElement.getChildren(SET_PAYLOAD_TAG_NAME, MULE_4_POLICY_NAMESPACE).stream().filter(e -> {
String attrValue = e.getAttributeValue(VALUE_ATTR_NAME);
return attrValue.equals(VALUE_FLOW_VARS) || attrValue.equals(VALUE_VARS);
}).findFirst().orElse(null));
com.mulesoft.tools.migration.library.mule.steps.http.HttpConnectorListener.httpListenerLib(getApplicationModel());
addNamespaceDeclaration(getRootElement(onErrorContinueElement), HTTP_TRANSFORM_NAMESPACE, HTTP_TRANSFORM_XSI_SCHEMA_LOCATION_URI_MULE4);
}
Aggregations