Hi @joram!
Thank you for your reply.
I was not aware there were 2 fora, so thank you for the tip!
I’m building the palette and translation files from a java app, and the output is a folder structure as described in the tutorial.
com/flowable/addons/palette/
which contains my xml files (e.g. calculation-domain.process.palette.xml)
com/flowable/addons/palette/i18n
which contains my properties files
com/flowable/addons/palette/component-presentations/palette-icons
which contain svg and png images
The generated XML has a reference to the properties file as such:
<palette id="calculation-domain-palette" hide-parent-palette-elements="true"
xmlns="http://www.edorasware.com/schema/vis/palette"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.edorasware.com/schema/vis/palette http://www.edorasware.com/schema/vis/edoras-vis-process-palette-2.0.60.xsd"
apply-patch-to-palette="flowable-process-palette"
resource-bundle="calculation-domain-messages">
and the referenced translation file has name calculation-domain-messages.properties
.
Example contents of a translation file;
# Palette group headers for functional area Calculator Demo
calculator-demo-palette-tasks-client.title=Calculator Demo
calculator-demo-palette-tasks-impl.title=Calculator Demo (Impl)
# Await MeaningOfLifeCalculated Event
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.title=Await MeaningOfLifeCalculated Event
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.description=Waits for a Business Event to happen
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.eventType.title=Event Type
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.eventType.description=Type of BusinessEvent to wait for
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.correlationKey.title=Correlation Key
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.correlationKey.description=The field used to identify the expected event we wait for
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.correlationValue.title=Correlation Value
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.correlationValue.description=The value used for correlating the expected event
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.eventVariable.title=Event Variable
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.eventVariable.description=The process variable in which the event information will be available
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.mapping.title=Incoming payload mapping
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.mapping.description=Mapping of incoming payload to process variables
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.businessKey.title=New value for process instance businessKey
demo.calculation.AwaitMeaningOfLifeCalculatedEventTask.businessKey.description=JUEL or JsonPath expression that determines a new Business Key for the process instance
Example contents of the XML file:
<group id="calculator-demo-palette-tasks-client" index="300">
<component id="demo.calculation.AwaitMeaningOfLifeCalculatedEventTask" extends="ServiceTask"
attribute-groups="baseAttributes,activitiMultiInstanceAttributes"
presentation-id="await-event.presentation">
<attribute index="1" id="name" value="Await MeaningOfLifeCalculated" category="common" optional="true"/>
<attribute index="2" id="eventType" type="SimpleText" value="demo.calculation.MeaningOfLifeCalculated" category="edoras" export="true" extension-element="true" readonly="true"/>
<attribute index="3" id="correlationKey" type="ComboBox" value="" category="edoras" optional="true" export="true" extension-element="true">
<items>
<item id="empty" title="<none>" value=""/>
<item id="user" title="user" value="$.payload.user"/>
</items>
</attribute>
<attribute index="4" id="correlationValue" type="SimpleTextExpression" category="edoras" optional="true" export="true" extension-element="true"/>
<attribute index="5" id="mapping" category="edoras" type="Complex" export="true" field-extension="false" xml-name="mapping">
<complex-items>
<complex-item id="variableName" type="SimpleTextExpression" optional="false" value="" width="250" />
<complex-item id="variableType" type="Combobox" value="" category="edoras" optional="false" export="true" extension-element="true">
<items>
<item id="string" title="String" value="string"/>
<item id="number" title="Number" value="number"/>
<item id="integer" title="Integer" value="integer"/>
<item id="boolean" title="Boolean" value="boolean"/>
<item id="json" title="Json" value="json"/>
</items>
</complex-item>
<complex-item id="expressionOrJsonPath" value="" width="250" optional="true">
<validation-rules>
<reserved-words scope="root,parent,self" value="id,definitionId,type,state,creationTime,updateTime,currentUser,isUserInGroup,isUserInGroups,isUserInAllGroups,i18n" />
</validation-rules>
</complex-item>
<complex-item id="defaultValue" type="SimpleTextExpression" optional="true" value="" width="250" />
</complex-items>
</attribute>
<attribute index="6" id="eventVariable" value="event" type="SimpleText" category="edoras" optional="true" export="true" extension-element="true"/>
<attribute index="7" id="businessKey" value="" type="SimpleText" category="edoras" optional="true" export="true" extension-element="true"/>
<attribute id="overwrite" visible="false"/>
<attribute id="tasktype" value="Service" visible="false"/>
<attribute id="delegateexpression" value="${awaitBusinessEventTask}" visible="false" constant="true"/>
<attribute id="expression" visible="false"/>
<attribute id="resultvariable" visible="false"/>
<attribute id="class" visible="false"/>
<attribute id="classfields" value="" visible="false"/>
<attribute id="servicetasktriggerable" value="true" visible="false"/>
<attribute id="servicetaskUseLocalScopeForResultVariable" value="" visible="false"/>
<attribute id="genericproperty" value="" visible="false"/>
</component>
</group>
I bundle it by making creating a jar from the com root folder. I then place it directly in the webservers \lib
folder (locally I’m running a Tomcat 9) and I reboot the webserver from the console.
I see logs nor exceptions coming from the PaletteDeployer or any of that matter. The palette is rendered ok, groups and components are translated in the accordion menu as they should, but the component’s attributes/properties are not translated. They’re usually only visible as property.xxx.title in the detail screen.