我在How to get Alfresco Action status中找到了这个问题的答案。
我有一个单操作执行器类,它为入站和出站和更新规则类型触发。Tahir Malik 告诉我们可以为动作添加一个额外的参数(#2),我该怎么做?我没有找到如何在运行时获取动作执行器的规则类型。
为我通过引导程序添加的 PS 规则和操作。
问候,尤金
=====================================
更新:
<rule:rule view:childName="rule:sampleRule">
...
<view:properties>
<rule:ruleType>
<view:values>
<view:value>inbound</view:value>
<view:value>update</view:value>
<view:value>outbound</view:value>
</view:values>
</rule:ruleType>
...
</view:properties>
<view:associations>
<rule:action>
<act:compositeaction view:childName="rule:action">
...
<view:associations>
<act:actions>
<act:action view:childName="act:actions">
<view:properties>
...
<act:definitionName>myActionBean</act:definitionName>
<act:executionActionStatus>New</act:executionActionStatus>
</view:properties>
...
</act:action>
</act:actions>
<act:conditions>
... // There is condition to check mime type of a node
</act:conditions>
</view:associations>
</act:compositeaction>
</rule:action>
</view:associations>
============================================
更新2:
<view:reference view:pathref="rule:ruleFolder">
<view:associations>
<cm:contains>
<rule:rule view:childName="rule:inboundRule">
...
<view:properties>
<rule:ruleType>
<view:values>
<view:value>inbound</view:value>
</view:values>
</rule:ruleType>
...
</view:properties>
<view:associations>
<rule:action>
<act:compositeaction view:childName="rule:action">
...
<view:properties>
...
<act:definitionName>myActionBean</act:definitionName>
<act:executionActionStatus>Completed</act:executionActionStatus>
</view:properties>
<view:associations>
<act:actions>
<act:action view:childName="act:actions">
<view:properties>
...
</view:properties>
<view:associations>
<act:parameters>
<act:actionparameter view:childName="act:parameters">
<view:properties>
<act:parameterName>ruleType</act:parameterName>
<act:parameterValue>
<view:value view:datatype="d:text">inbound</view:value>
</act:parameterValue>
</view:properties>
</act:actionparameter>
</act:parameters>
</view:associations>
</act:action>
</act:actions>
<act:conditions>
<act:compositeactioncondition view:childName="act:conditions">
<view:properties>
<act:definitionName>composite-condition</act:definitionName>
<act:or>
<view:value view:datatype="d:boolean">true</view:value>
</act:or>
<act:invert>false</act:invert>
</view:properties>
<view:associations>
<act:compositeconditions>
<act:actioncondition view:childName="act:compositeconditions">
<view:properties>
<act:definitionName>compare-mime-type</act:definitionName>
<act:invert>false</act:invert>
</view:properties>
<view:associations>
<act:parameters>
<act:actionparameter view:childName="act:parameters">
<view:properties>
<act:parameterName>value</act:parameterName>
<act:parameterValue>
<view:value view:datatype="cmis:id">my-first-mimeType</view:value>
</act:parameterValue>
</view:properties>
</act:actionparameter>
</act:parameters>
</view:associations>
</act:actioncondition>
<act:actioncondition view:childName="act:compositeconditions">
<view:properties>
<act:definitionName>compare-mime-type</act:definitionName>
<act:invert>false</act:invert>
</view:properties>
<view:associations>
<act:parameters>
<act:actionparameter view:childName="act:parameters">
<view:properties>
<act:parameterName>value</act:parameterName>
<act:parameterValue>
<view:value view:datatype="cmis:id">my-second-mimeType</view:value>
</act:parameterValue>
</view:properties>
</act:actionparameter>
</act:parameters>
</view:associations>
</act:actioncondition>
</act:compositeconditions>
<act:parameters>
<act:actionparameter view:childName="act:parameters">
<view:properties>
<act:parameterName>orconditions</act:parameterName>
<act:parameterValue>
<view:value view:datatype="d:boolean">true</view:value>
</act:parameterValue>
</view:properties>
</act:actionparameter>
</act:parameters>
</view:associations>
</act:compositeactioncondition>
</act:conditions>
</view:associations>
</act:compositeaction>
</rule:action>
</view:associations>
</rule:rule>
...
</cm:contains>
</view:associations>
</view:reference>