- lambada实现
@Configuration public class CommonDelegate { @Bean("test") JavaDelegate testDelegate() { return execution -> { System.out.println("test>>>>>"); Map<String,String> map = new HashMap<>(); execution.setVariable("map",map); execution.setVariable("jname", UUID.randomUUID().toString()); execution.setVariable("jage", System.nanoTime()); }; } }
Expression的使用
${myBean.doWork(execution)} @Component("myBean") public class MyService { public void doWork(DelegateExecution execution) { System.out.println("myBean:doWork>>>>>>"); Object jname = execution.getVariable("jname"); execution.setVariable("jname", jname + "zzzzz"); } } map,jname必須是variables里的变量
标签:map,setVariable,实现,System,public,JavaDelegate,Camunda,execution,jname From: https://www.cnblogs.com/coderdxj/p/18184272