How to pass all parent variables to a called process

简介:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
ound an answer, thought I'd post  for  others to use. In the called process, define a start event listener that looks up the  super  execution and pulls all the variables local. Very handy and easy.
public  class  WorkflowVariableInjectorListener  implements  ExecutionListener {
   private  static  final  long  serialVersionUID = 1L;
    
   static  Logger logger = Logger.getLogger(WorkflowVariableInjectorListener. class );
    
   @Override
   public  void  notify(DelegateExecution execution)  throws  Exception {
     logger.info( "In notify" );
     if  (execution  instanceof  ExecutionEntity) {
       ExecutionEntity executionEntity = (ExecutionEntity) execution;
       ExecutionEntity parentEntity = executionEntity.getSuperExecution();
       if  (parentEntity !=  null ) {
         // Copy all the variables into me
         executionEntity.setVariables(parentEntity.getVariables());
       }
     }
    
   }
    
}
http: //forums.activiti.org/content/how-pass-all-parent-variables-called-process
本文转自yunlielai51CTO博客,原文链接: http://blog.51cto.com/4925054/1364301 ,如需转载请自行联系原作者
相关文章
|
5月前
|
存储 缓存 自然语言处理
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
46 1
|
6月前
|
Oracle 关系型数据库
The opatch minimum version check for patch failed
The opatch minimum version check for patch failed
55 2
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
成功解决absl.flags._exceptions.UnrecognizedFlagError: Unknown command line flag 'data_format'
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
Optional int parameter ‘id‘ is present but cannot be translated into a null value due to being ……
305 0
|
分布式计算 Spark
Spark - ReturnStatementInClosureException: Return statements aren‘t allowed in Spark closures
Spark 使用 RDD 调用 Filter 函数时,dirver 端卡住,报错 ReturnStatementInClosureException: Return statements aren't allowed in Spark closures,即闭包内无法使用 return 函数。
339 0
Spark - ReturnStatementInClosureException: Return statements aren‘t allowed in Spark closures
‘Client‘ is not allowed to run in parallel.Would you like to stop the running one?
‘Client‘ is not allowed to run in parallel.Would you like to stop the running one?
566 0
‘Client‘ is not allowed to run in parallel.Would you like to stop the running one?
|
C语言
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
329 0
[Error] ‘for‘ loop initial declarations are only allowed in C99 mode
|
数据安全/隐私保护
Give root password for maintenance(or type control -D to continue)
2017-09-30 18:12:08 1:错误如图,本来开机准备用一下虚拟机,就出现一个这,为啥记录一下呢,因为网上好多不是很靠谱。 原因可能是之前关闭虚拟机的时候不小心出现异常了: 2:解决办法:   个人根据自己的磁盘分区情况,进行修复即可; 解决方法,在鼠标停留的地方输入...
1837 0