activiti變數variables
![5944925-d425b32b133aedb1.png](https://upload-images.jianshu.io/upload_images/5944925-d425b32b133aedb1.png)
執行之後會對一個表產生影響
![5944925-e874c2f9c7965c8a.png](https://upload-images.jianshu.io/upload_images/5944925-e874c2f9c7965c8a.png)
獲取流程的變數
第一種:在流程例項 上新增變數
(1)產生一個帶有變數的流程例項物件
![5944925-010e7d83fc6a1f85.png](https://upload-images.jianshu.io/upload_images/5944925-010e7d83fc6a1f85.png)
(2)通過以下兩種獲得變數
![5944925-5cc50815f753f5a8.png](https://upload-images.jianshu.io/upload_images/5944925-5cc50815f753f5a8.png)
第二種:在當前的任務中儲存流程變數,流程的變數儲存在正在執行的流程物件上,當前任務後的所有任務都能拿到流程變數
(1)在任務上設定流程的變數
![5944925-aa3ce6a814f04979.png](https://upload-images.jianshu.io/upload_images/5944925-aa3ce6a814f04979.png)
(2)獲取變數
![5944925-a27704e7e0415d82.png](https://upload-images.jianshu.io/upload_images/5944925-a27704e7e0415d82.png)
第三種方式:當任務完成以後設定流程變數
![5944925-242a0b3f45212619.png](https://upload-images.jianshu.io/upload_images/5944925-242a0b3f45212619.png)
請假申請後設定變數
![5944925-00ab6722c8ad1666.png](https://upload-images.jianshu.io/upload_images/5944925-00ab6722c8ad1666.png)
經理要獲得這個變數通過這種方式
第四種:在正在執行的物件中新增自定義的實體物件
(1)建立一個實體類entity,實現序列化介面,新增uid,有set和get方法.
在執行完任務後,中途在發現實體類物件需要改變屬性,新增序列化uid才能在以後的任務中獲取到屬性,否則會報錯.
![5944925-d676022e454d8ac5.png](https://upload-images.jianshu.io/upload_images/5944925-d676022e454d8ac5.png)
![5944925-df613ee1c97fc302.png](https://upload-images.jianshu.io/upload_images/5944925-df613ee1c97fc302.png)
新增一個uid
![5944925-4aecd5af0326b3dd.png](https://upload-images.jianshu.io/upload_images/5944925-4aecd5af0326b3dd.png)
(2)在測試類中執行任務後新增物件變數
![5944925-218e7d541728bc79.png](https://upload-images.jianshu.io/upload_images/5944925-218e7d541728bc79.png)
(3)獲取物件變數
![5944925-c1298a6ef2f221b4.png](https://upload-images.jianshu.io/upload_images/5944925-c1298a6ef2f221b4.png)
![5944925-9219f30d79ffb7bf.png](https://upload-images.jianshu.io/upload_images/5944925-9219f30d79ffb7bf.png)
總結:兩種方法的區別
![5944925-e32b01ae5b4cf890.png](https://upload-images.jianshu.io/upload_images/5944925-e32b01ae5b4cf890.png)
![5944925-fb631fb997ffec6b.png](https://upload-images.jianshu.io/upload_images/5944925-fb631fb997ffec6b.png)
相關文章
- Variables in Java 變數Java變數
- TensorFlow入門 - 變數(Variables)變數
- SAP BPS 變數完美級聯 - Variables in web interaces變數Web
- Activiti 學習筆記五:流程變數筆記變數
- 概率論與梳理統計-隨機變數random variables隨機變數random
- FastAPI(64)- Settings and Environment Variables 配置項和環境變數ASTAPI變數
- 1.2 C++變數和資料型別 (Variables and Data types )C++變數資料型別
- variables_order引數詳解
- Clouse Variables as Inputs
- [Bash] Environment variables
- [轉]Updating Session Variables from Dashboards using Presentation VariablesSession
- activiti
- SQL*Plus Substitution VariablesSQL
- MYSQL SHOW VARIABLES簡介MySql
- Type-Checking Variables
- Activiti(一) activiti資料庫表說明資料庫
- 成員變數、全域性變數、例項變數、類變數、靜態變數和區域性變數的區別變數
- Activiti 學習(三)—— Activiti 流程啟動並完成
- Activiti Core和Activiti Cloud Beta1釋出!Cloud
- 變數的分類(臨時(本地)變數、環境變數、全域性變數和系統變數)變數
- proxysql global_variables 翻譯SQL
- Using Multiple Variables with the Same Name
- Activiti實戰
- Activiti部署zip
- iOS 靜變數static、全域性變數extern、區域性變數、例項變數iOS變數
- JavaScript30 - 3.CSS VariablesJavaScriptCSS
- Oracle中的替換變數,&變數名,&&變數名說明Oracle變數
- linux基礎——shell變數(本地變數和環境變數)Linux變數
- 1.activiti部署
- Activiti原始碼分析原始碼
- activiti的簡介
- python變數與變數作用域Python變數
- ODI第7節-變數(一):變數變數
- Ansible fact變數與魔法變數變數
- springboot,vue,es,activiti數字知識庫管理系統Spring BootVue
- 引數和變數變數
- 17-Containers-Container Environment VariablesAI
- [轉]Updating Session Variables through GO URLSessionGo