AnsweredAssumed Answered

Simpe test. Problem with .properties

Question asked by sversh71 on Aug 27, 2009
Latest reply on Aug 27, 2009 by sversh71
Hello, people!

I’m newbie in alfresco and my current learning theme is advanced workflow.  As the base for my experiments I took an example from the book “Alfresco Developers Guide” by J.Potts.
It’s a simple workflow process with the simple UI for the first and only task in it.
So what I did …

1. HelloWorldModel.xml

<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="hw:workflowmodel" xmlns="">
   <!– Optional meta-data about the model –>
   <description>Someco Workflow Model</description>
   <!– Imports are required to allow references to definitions in other models –>
      <import uri="" prefix="d" />
      <import uri="" prefix="bpm" />
   <!– Introduction of new namespaces defined by this model –>
      <namespace uri="" prefix="hw" />
      <type name="hw:submitHelloWorldTask">
            <property name="hw:helloName">
            <property name="hw:helloOther">

I loaded this as document into Data Dictionary > Models space and made it active.

2.  HelloWorldProcessDefinition.xml

<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="" name="hw:helloWorld">
   <start-state name="start">
      <task name="hw:submitHelloWorldTask" />
      <transition name="" to="hello"></transition>

   <node name="hello">
      <transition name="" to="end1">
         <action class="org.alfresco.repo.workflow.jbpm.AlfrescoJavaScript">
               <variable name="hw_helloName" access="write"/>
                  logger.log("Hello, " + hw_helloName + "!");

   <end-state name="end1"/>

I loaded this as document into Data Dictionary > Workflow Definitions space and made it active. As you can see it has only one action which do nothing except writes into the log the string entered by user in startTask.

3. web-client-config-custom.xml

   <config evaluator="string-compare" condition="Languages">
         <language locale="ru_RU">Russian</language>
   <config evaluator="node-type" condition="hw:submitHelloWorldTask" replace="true">
         <show-property name="hw:helloName" />
         <show-property name="hw:helloOther" />

I added appropriate settings to the web-client-config-custom.xml


# Hello World UI Workflow

# HelloWorldModel related strings
hw_workflowmodel.type.hw_submitHelloWorldTask.title=Start Hello World UI Workflow
hw_workflowmodel.type.hw_submitHelloWorldTask.description=Submit a workflow that says hello in the log hello to this person Other something here

# processdefinition related strings
hw_helloWorld.workflow.title=Hello World UI
hw_helloWorld.workflow.description=A simple hello world process

I loaded this as document into Data Dictionary > Messages space and made it active in Repository Admin console entered a command “reload messages HelloWorld”

After that steps all are working as I expect except some little problems with resources -
This problems are:

The processdefinition related strings works properly – I see name and description of my process in alfresco User Interface as described in hw_helloWorld.workflow.title and hw_helloWorld.workflow.description.
But I don’t see titles for my custom properties as described in and
Certainly I can set these titles in web-client-config-custom.xml something like that:

   <show-property name="hw:helloName" display-label="Hello Name"/>
   <show-property name="hw:helloOther" display-label="Other Name"/>

But it’s not suit me. I need this strings to be internationalized. English or Russian depends on login.
I can’t find where is the problem. Maybe in names? (,

And one more problem. The resource file doesn’t load automatically when server is restarted. Every time I should reload it by hand in Repository Admin console. What should I do for loading resources automatically?

Thank you.