訪問當前的流程實例變量信息我要上act_proc_in_桌子底下存儲在數據庫H2運行過程實例的所有信息。(如開始時間,結束時間,筆者..)從Camunda BPMN引擎
我在ExecutionListener方法(在實現JavaDelegate接口的類中)從我需要進一步轉發信息的位置開始。
我知道使用createExecutionQuery()方法的RuntimeService接口,但在所有示例中,我已經看到它似乎映射到某種實體類。我不明白。 對不起,但我是Camunda BPM引擎的新手。
public class ProcessRequestDelegate implements JavaDelegate {
private final static Logger LOGGER = Logger.getLogger("LOAN-REQUESTS");
public void execute(DelegateExecution execution) throws Exception { LOGGER.info("Processing request by '"+execution.getVariable("customerId")+"'...");
System.out.println(execution.getVariable("amount"));
int Amount= ((Double) execution.getVariable("amount")).intValue(); System.out.println("Amountis"+Amount);
ProcessEngine processEngine = BpmPlatform.getDefaultProcessEngine();
RuntimeService runtimeService = processEngine.getRuntimeService();
ResulstSet rs= runtimeService.createExecutionQuery("What to write here?");
while (rs.next()) {
String author=rs.getString("AUTHOR");
Date start = rs.getDate("START_TIME");
int sales = rs.getInt("SALES");
} }
請格式化你的問題 –
我希望這更可讀?對於那個很抱歉。 – Varda