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 ,如需转载请自行联系原作者
相关文章
|
3月前
|
关系型数据库 MySQL Linux
Packet for query is too large (4467936 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable
【10月更文挑战第15天】解决Packet for query is too large (4467936 > 4194304). You can change this value on the server by setting the max_allowed_packet' variable
138 1
|
4月前
|
Docker 容器
ADD failed: file not found in build context or excluded by .dockerignore: stat irap_rule_center: fil
ADD failed: file not found in build context or excluded by .dockerignore: stat irap_rule_center: fil
|
3月前
Passing Messages to Process
Passing Messages to Process
16 0
|
7月前
|
存储 缓存 自然语言处理
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
“error“: { “root_cause“: [{ “type“: “circuit_breaking_exception“, “reason“: “[parent] D【已解决】
57 1
error: static assertion failed: Signal and slot arguments are not compatible.
error: static assertion failed: Signal and slot arguments are not compatible.
error: static assertion failed: Signal and slot arguments are not compatible.
|
数据安全/隐私保护
Give root password for maintenance(or type control -D to continue)
2017-09-30 18:12:08 1:错误如图,本来开机准备用一下虚拟机,就出现一个这,为啥记录一下呢,因为网上好多不是很靠谱。 原因可能是之前关闭虚拟机的时候不小心出现异常了: 2:解决办法:   个人根据自己的磁盘分区情况,进行修复即可; 解决方法,在鼠标停留的地方输入...
1852 0