cancel
Showing results for 
Search instead for 
Did you mean: 

I18n support for userTask's documentation tag

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi there,

May I know userTask's documentation tag support internationalization such as a message bundle define for each locale?

Please advice. Thanks.

Best regards,
Chee Kin
8 REPLIES 8

jbarrez
Star Contributor
Star Contributor
No, not yet. Spring Surf does have everything baked into it to handle it … but it is not yet implemented in our webapps.

limcheekin
Champ on-the-rise
Champ on-the-rise
No, not yet. Spring Surf does have everything baked into it to handle it … but it is not yet implemented in our webapps.

Thanks for quick response. Given approveVacation.description defined in the messages.properties, will activiti engine pick up itself if I defined the following userTask in my bpmn20.xml file:

  <userTask id="handleVacationRequest" activiti:formKey="/vacationRequest/approval"
   name="Handle Vacation Request">
   <documentation>approveVacation.description</documentation>
   <potentialOwner>
    <resourceAssignmentExpression>
     <formalExpression>management</formalExpression>
    </resourceAssignmentExpression>
   </potentialOwner>
  </userTask>

Please advice.

Thanks,
Chee Kin

jbarrez
Star Contributor
Star Contributor
Hi Lim, internatibnalization is not supported at this moment.
Are you using your own forms technology? If so, you could probably look up the key before it is displayed.

limcheekin
Champ on-the-rise
Champ on-the-rise
Hi Lim, internatibnalization is not supported at this moment.
Are you using your own forms technology? If so, you could probably look up the key before it is displayed.

Hi Joram,

Thanks for writing.

Yes, I did put some thought on this. I have no problem to look up the key. But how do I access to variable username given the following bpmn20.xml:

<userTask id="initiateVacationRequest" activiti:formKey="/vacationRequest/create" name="Initiate Vacation Request">
  <documentation>Vacation request by ${username}</documentation>
………

Hm… The solution seems like I need to store the username in task variable and resolve it myself when my application detect ${username} in the documentation tag. Do you have better suggestion?

Lastly, is this feature (internationalization support) is in the Activiti roadmap?

Best regards,
Chee Kin

jbarrez
Star Contributor
Star Contributor
Mmm.. if you do a task.getDescription, doesnt it resolve the variables automatically?

Internationalisation is not directly on our roadmap (ie first 4-6 months), since we first want to stabilize and build out the engine features before going full speed ahead with the UI's.

limcheekin
Champ on-the-rise
Champ on-the-rise
Mmm.. if you do a task.getDescription, doesnt it resolve the variables automatically?

Internationalisation is not directly on our roadmap (ie first 4-6 months), since we first want to stabilize and build out the engine features before going full speed ahead with the UI's.

Thanks for quick response.

Given bpmn20.xml:

  <userTask id="handleVacationRequest" activiti:formKey="/vacationRequest/approval"
   name="Handle Vacation Request">
   <documentation>approveVacation.description</documentation>
   <potentialOwner>
    <resourceAssignmentExpression>
     <formalExpression>management</formalExpression>
    </resourceAssignmentExpression>
   </potentialOwner>
  </userTask>

and message.properties:

approveVacation.description=Vacation request by ${username}

Will task.getDescription() resolve the ${username} variable automatically?

Best regards,
Chee Kin

jbarrez
Star Contributor
Star Contributor
Ah, now I understand your question…. but no, it won't resolve it.
It will resolve everything before returning the value from task.getDescription.

However, you can use the ExpressionManager class to create an Expression from the value you get back from your messages.properties. That expressio n then needs the execution from your task to be evaluated. The ExpressionManager is normally available on the configuration (but maybe you need to cast).

limcheekin
Champ on-the-rise
Champ on-the-rise
Ah, now I understand your question…. but no, it won't resolve it.
It will resolve everything before returning the value from task.getDescription.

However, you can use the ExpressionManager class to create an Expression from the value you get back from your messages.properties. That expressio n then needs the execution from your task to be evaluated. The ExpressionManager is normally available on the configuration (but maybe you need to cast).

Thanks, seems like working with ExpressionManager is the way to go.

Regards,
Chee Kin