}
}
public void assembleSource(PortableObject assetContent,
StringBuilder stringBuilder) {
RuleFlowContentModel content = (RuleFlowContentModel) assetContent;
if ( content.getXml() != null && content.getXml().length() > 0 ) {
stringBuilder.append( content.getXml() );
} else if ( content.getJson() != null && content.getJson().length() > 0 ) {
// convert the json to xml
try {
String designerURL = System.getProperty( ApplicationPreferences.DESIGNER_URL ) + "/" + System.getProperty( ApplicationPreferences.DESIGNER_CONTEXT );
designerURL += "/uuidRepository?profile=" + System.getProperty( ApplicationPreferences.DESIGNER_PROFILE ) + "&action=toXML&pp=";
String xml = BPMN2ProcessHandler.serialize( designerURL +
URLEncoder.encode( content.getPreprocessingdata(),
"UTF-8" ),
content.getJson() );
stringBuilder.append( StringEscapeUtils.escapeXml( xml ) );
} catch ( IOException e ) {
log.error( "Exception converting to xml: " + e.getMessage() );
}
} else {