简体   繁体   English

在alfresco activiti中本地化工作流任务标题

[英]Localize workflow task title in alfresco activiti

I followed this tutorial to create a custom alfresco activiti workflow: http://ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html 我按照本教程创建了一个自定义alfresco activiti工作流程: http//ecmarchitect.com/alfresco-developer-series-tutorials/workflow/tutorial/tutorial.html

I tried to externalize the contained strings by creating .properties files and made them known in the xyz-context.xml . 我试图通过创建.properties文件来外化包含的字符串,并在xyz-context.xml它们已知。 While this is working I face a problem with changing the title of a worfklow task. 虽然这是有效的,但我在更改worfklow任务的标题时遇到了问题。

I use the following sampleWorkflow.properties file: 我使用以下sampleWorkflow.properties文件:

 sampleWf.task.confirmTask.title=Confirm this, with a title which is different than the task name
 sampleWf.task.confirmTask.description=Confirm please

The bpmn-snippet for this tasks, is configured like this: 此任务的bpmn-snippet配置如下:

<userTask id="confirmTask" name="Confirm" activiti:assignee="${bpm_assignee.properties.userName}" activiti:formKey="samplewf:customTypeTask"></userTask>

My question is 我的问题是

Why only the description of the workflow tasks change, but not the title? 为什么只更改工作流任务的描述,而不是标题?

The above localization works, when I don't use the task ID but it's property like this: 上面的本地化工作,当我不使用任务ID但它的属性是这样的:

sampleWf.task.samplewf_customTypeTask.title=This changes the title

If this the only possibility I'd need to deploy a lot of custom types just for naming purposes. 如果这是唯一的可能性,我需要部署很多自定义类型只是为了命名目的。 Can't I reuse types across workflows and just change the title (name) by this configuration? 我不能跨工作流重用类型,只是通过此配置更改标题(名称)?

Please refer to this link in order to have a better idea on how strings could be localized in a workflow in Alfresco : 请参阅此链接 ,以便更好地了解如何在Alfresco的工作流中本地化字符串:

 <workflow_prefix>_<workflow_name>.workflow.[title|description] <workflow_prefix>_<workflow_name>.node.<node_name>.[title|description] <workflow_prefix>_<workflow_name>.node.<node_name>.transition.<transition_name>.[title|description] <workflow_prefix>_<workflow_name>.task.<task_prefix>_<task_name>.[title|description] 

where: 哪里:

 <workflow_prefix> is the workflow model namespace prefix <workflow_name> is the workflow name <node_name> is the name of a node within the workflow <transition_name> is the name of a node transition within the workflow <task_prefix> is the task namespace prefix <task_name> is the task name <transition_name> is the workflow transition name 

Which suggests you should be putting something like : 这表明你应该做的事情如下:

sampleWf_<workflow-name>.task.sampleWf_confirmTask.title=Confirm this, with a title which is different than the task name

Which -in theory- should give you the possibility of using the same task model in multiple workflows with different localization, but I guess you still have to duplicate your model in order to be able to have multiple localizations in the same workflow! 哪个 - 理论上 - 应该为您提供在具有不同本地化的多个工作流中使用相同任务模型的可能性,但我想您仍然必须复制模型才能在同一工作流中进行多个本地化!

Update : Oops! 更新:哎呀! I got tricked by this statement: 我被这句话欺骗了:

This page was last modified on 13 March 2015, at 02:22. 本页面最后修改于2015年3月13日02:22。

That was a bot marking the page as obsolete! 这是一个标记页面过时的机器人! The page is obviously outdated and it is talking about jbpm, not activiti, hopefully you still can use the same naming conventions! 该页面显然已经过时,它正在谈论jbpm,而不是activiti,希望你仍然可以使用相同的命名约定!

Otherwise , worst case scenario, you got to create new task models that basically just extend your original task model to be able to customize the task title as needed (No need to redefine properties/constraints ...). 否则 ,在最坏的情况下,您必须创建新的任务模型,基本上只需扩展您的原始任务模型,以便能够根据需要自定义任务标题(无需重新定义属性/约束......)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM