<code>ound an answer, thought I'd post </code><code>for</code> <code>others to use. In the called process, define a start event listener that looks up the </code><code>super</code> <code>execution and pulls all the variables local. Very handy and easy.</code>
<code>public</code> <code>class</code> <code>WorkflowVariableInjectorListener </code><code>implements</code> <code>ExecutionListener {</code>
<code> </code><code>private</code> <code>static</code> <code>final</code> <code>long</code> <code>serialVersionUID = 1L;</code>
<code> </code>
<code> </code><code>static</code> <code>Logger logger = Logger.getLogger(WorkflowVariableInjectorListener.</code><code>class</code><code>);</code>
<code> </code><code>@Override</code>
<code> </code><code>public</code> <code>void</code> <code>notify(DelegateExecution execution) </code><code>throws</code> <code>Exception {</code>
<code> </code><code>logger.info(</code><code>"In notify"</code><code>);</code>
<code> </code><code>if</code> <code>(execution </code><code>instanceof</code> <code>ExecutionEntity) {</code>
<code> </code><code>ExecutionEntity executionEntity = (ExecutionEntity) execution;</code>
<code> </code><code>ExecutionEntity parentEntity = executionEntity.getSuperExecution();</code>
<code> </code><code>if</code> <code>(parentEntity != </code><code>null</code><code>) {</code>
<code> </code><code>// Copy all the variables into me</code>
<code> </code><code>executionEntity.setVariables(parentEntity.getVariables());</code>
<code> </code><code>}</code>
<code> </code><code>}</code>
<code> </code><code>}</code>
<code>}</code>
<code>http:</code><code>//forums.activiti.org/content/how-pass-all-parent-variables-called-process</code>
<code>本文轉自yunlielai51CTO部落格,原文連結:</code>http://blog.51cto.com/4925054/1364301,如需轉載請自行聯系原作者