Skip to main content

Setting up Previews with ARender

Description

This integration allows ARender to communicate with and read content from Simflofy. It provides basic services to enable viewer capabilities in TSearch.


Required Components

  • ARender Rendition Engine (Transformer)
  • ARender HMI WAR (Viewer)
  • Simflofy ARender Connector (arender-simflofy-connector-1.0-SNAPSHOT.jar)

Installation

  1. Install the rendition server. Make sure your Simflofy server can communicate with the rendition server on port 8761.

  2. Unzip the hmi war file to the webapps directory where TSearch is installed.

  3. Update the following configuration files below and add them to the webapps /(hmi-war)/WEB-INF/classes/ directory.

  • Add a service account username and password.
arender-server-custom-simflofy.properties
#Username and Password for system or organization admin.  
#This user should be able to download all content in your org in order to provide preview access.

simflofy.authority.username=admin
simflofy.authority.password=admin

  • Add a bean loader for the custom URL parser.
arender-custom-server-integration.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans default-autowire="no" default-lazy-init="true" xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">
<!-- xml imported by ARender Java Web Server side, please add any
customization you wish to see loaded in this file-->
<bean class="com.simflofy.arender.urlparsers.SimflofyURLParser" id="simflofyURLParser" scope="prototype"/>
</beans>
  • Add the parser bean to the server properties.
arender-server.properties
#TODO: Add location to your rendition engine.  
arender.server.rendition.hosts=http://localhost:8761/

#TODO Add the following line.
arender.server.url.parsers.beanNames=simflofyURLParser,DefaultURLParser,DocumentIdURLParser,FileattachmentURLParser,ExternalBeanURLParser,AlterContentParser,FallbackURLParser
  • Add custom appender so we can see Simflofy logging.
log4j.properties

log4j.rootCategory=WARN, default
log4j.category.com.arondor = INFO
log4j.category.com.arondor.common.management = FATAL
log4j.category.arender-startup=INFO

##TODO Add Simflofy logging, set to desired level. (INFO, DEBUG, TRACE)
log4j.category.com.simflofy=TRACE
log4j.category.com.arondor.viewer.common.logger = INFO, perf
log4j.category.com.arondor.common.reflection.parser.spring=OFF

# Avoid having the performance log in the default log
log4j.additivity.com.arondor.viewer.common.logger=false

log4j.appender.default=org.apache.log4j.ConsoleAppender
log4j.appender.default.layout=org.apache.log4j.PatternLayout
log4j.appender.default.layout.ConversionPattern=%d{ISO8601} %p [%t] %c:%L -
%m%n

log4j.appender.VIEWER=org.apache.log4j.RollingFileAppender
log4j.appender.VIEWER.MaxFileSize=20000KB
log4j.appender.VIEWER.MaxBackupIndex=6
log4j.appender.VIEWER.File=/tmp/viewer/server.log
log4j.appender.VIEWER.layout=org.apache.log4j.PatternLayout
log4j.appender.VIEWER.layout.ConversionPattern=%d{ISO8601} %p [%t] %c:%L -
%m%n

log4j.appender.perf=org.apache.log4j.RollingFileAppender
log4j.appender.perf.MaxFileSize=20000KB
log4j.appender.perf.MaxBackupIndex=6
log4j.appender.perf.File=arender-hmi-perf.log
log4j.appender.perf.layout=org.apache.log4j.PatternLayout
log4j.appender.perf.layout.ConversionPattern=%m%n
  1. Copy the arender-simflofy-connector-1.0-SNAPSHOT.jar to webapps/(hmi-war )/WEB-INF/lib/
  1. Restart your servlet container (Tomcat). Look for logging from Simflofy's integration.

INFO [http-nio-8081-exec-4] com.simflofy.arender.urlparsers.SimflofyURLParser:48 - [Simflofy] Initializing Simflofy URL Parser.

  1. Create widget instance in simflofy-admin.
  • Set ARender HMI URL to the location of the hmi war. (leave the /ARender.html?url=)
  • Set the label
  1. Add the widget to your View --> Save and Publish your changes.

  2. Load Previews with a Document Action in your TSearch view.


Common Issues

Client Error: Blocked loading mixed active content

Make sure you are using the proper protocol in the widget configuration. If you have different protocols set for tsearch.simflofy.services.url and your ARender HMI URL, this error will occur.


PKIX path building failed

Make sure your SSL certificates have been installed in your java environment.