Migration from 1.10 to 1.11
The database sample below is set for MariaDB, to use in another database connection please take a look at the Installation 1.x section.
- Update the metadata definition because have been added new values and fields:
- Added a new value "error" in the status field to help in the resolution of errors.
- Added a new check box field named "okp:remotesignature.pin" to request pin in the UI.
- Added a new textarea field named "okp:remotesignature.errorMessage" to save the message of the error.
The metadata field "okp:remotesignature.extra" is empty in the next sample. Should use your own fields in case you need them. Take a look at the Installation 1.x section for more information about the options you can set in this field.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE property-groups PUBLIC "-//OpenKM//DTD Property Groups 3.10//EN"
"http://www.openkm.com/dtd/property-groups-3.10.dtd">
<property-groups>
<property-group label="Remote Signature" name="okg:remotesignature">
<select label="Status" name="okp:remotesignature.status" type="simple" readonly="true">
<option label="Pending to send" value="pendingToSend" selected="true"/>
<option label="Pending to sign" value="pendingToSign"/>
<option label="Signed" value="signed" />
<option label="Error" value="error" />
</select>
<input label="Mail to notify" type="text" name="okp:remotesignature.mail">
<validator type="req"/>
</input>
<checkbox label="Request Pin" name="okp:remotesignature.pin" />
<select label="Sign Location" name="okp:remotesignature.location" type="simple">
<option label="NorthWest" value="1"/>
<option label="North" value="2"/>
<option label="NorthEast" value="3" />
<option label="West" value="4"/>
<option label="Center" value="5"/>
<option label="East" value="6" />
<option label="SouthWest" value="7"/>
<option label="South" value="8"/>
<option label="SouthEast" value="9" />
<validator type="req"/>
</select>
<select label="Language" name="okp:remotesignature.lang" type="simple">
<option label="English" value="en-GB"/>
<option label="Español" value="es-ES"/>
<validator type="req"/>
</select>
<select label="Extra" name="okp:remotesignature.extra" type="multiple">
</select>
<input label="DNI" type="text" name="okp:remotesignature.dni" readonly="true">
</input>
<input label="Name" type="text" name="okp:remotesignature.name" readonly="true">
</input>
<input label="Page" type="text" name="okp:remotesignature.page">
</input>
<input label="Send Date" type="date" name="okp:remotesignature.sendDate" timeFormat="hm" readonly="true"/>
<input label="Sign Date" type="date" name="okp:remotesignature.signDate" timeFormat="hm" readonly="true"/>
<input label="Signature Device IP" type="text" name="okp:remotesignature.ip" readonly="true"/>
<textarea label="Error Message" name="okp:remotesignature.errorMessage" width="200px" readonly="true" dbColumnSize="512"/>
</property-group>
</property-groups>
- Go to the Administration > Database query and execute the next query to add new translations:
In the case of have another language you should insert your own translations based in the scripts below.
-- English
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'enter.pin', 'Enter pin', 'en-GB');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'enter.valid.pin', 'Please enter a 6-digit pin.', 'en-GB');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'submit', 'Submit', 'en-GB');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'request', 'Request pin', 'en-GB');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'pin.sent', 'Requested pin sent!', 'en-GB');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'invalid.pin', 'Invalid Pin!', 'en-GB');
-- Spanish
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'enter.pin', 'Introducir pin', 'es-ES');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'enter.valid.pin', 'Porfavor introduzca un numero de 6 cifras', 'es-ES');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'submit', 'Enviar', 'es-ES');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'request', 'Solicitar código', 'es-ES');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'request.sent', 'El código de verificación ha sido enviado!', 'es-ES');
INSERT INTO OKM_TRANSLATION (TR_MODULE, TR_KEY, TR_TEXT, TR_LANGUAGE) VALUES ('rs', 'invalid.pin', 'Pin incorrecto!', 'es-ES');
- Go to the Administration > Database query and execute the next query to add configuration parameters:
INSERT INTO OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) VALUES ('rs.subject-verify.es-ES', 'string', 'Remote Signature: Código de verificación');
INSERT INTO OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) VALUES ('rs.body-verify.es-ES', 'html', '<p>Su pin de verificación para el documento ${docName} es ${pin}</p>');
INSERT INTO OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) VALUES ('rs.subject-verify.en-GB', 'string', 'Remote Signature: Verification pin');
INSERT INTO OKM_CONFIG (CFG_KEY, CFG_TYPE, CFG_VALUE) VALUES ('rs.body-verify.en-GB', 'html', '<p>Your verification pin for the document ${docName} is ${pin} </p>');
- Create a database named remote-signature
- Update the remote-signature.properties file with the database connection
# OpenKM Hibernate configuration values
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
spring.datasource.url=jdbc:mariadb://localhost:3306/remote-signature?useUnicode=true&characterEncoding=UTF8&serverTimezone=CET&nullNamePatternMatchesAll=true
spring.datasource.username=openkm
spring.datasource.password=openkm
# JPA
spring.jpa.show-sql=false
spring.jpa.hibernate.ddl-auto=create-only
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDB103Dialect
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
spring.jpa.properties.hibernate.jdbc.batch_size=50
spring.jpa.properties.hibernate.order_inserts=true
spring.jpa.properties.hibernate.order_updates=true
spring.jpa.properties.hibernate.batch_versioned_data=true
- Stop Tomcat and replace the remote-signature.war archive