本文整理匯總了Java中org.kie.api.runtime.KieSession.getProcessInstance方法的典型用法代碼示例。如果您正苦於以下問題:Java KieSession.getProcessInstance方法的具體用法?Java KieSession.getProcessInstance怎麽用?Java KieSession.getProcessInstance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.kie.api.runtime.KieSession
的用法示例。
在下文中一共展示了KieSession.getProcessInstance方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: cancelTimer
import org.kie.api.runtime.KieSession; //導入方法依賴的package包/類
public void cancelTimer(String identifier, long piid) {
RuntimeEngine runtimeEngine = getRuntimeEngine(identifier, piid);
KieSession kSession = runtimeEngine.getKieSession();
WorkflowProcessInstance pi = (WorkflowProcessInstance) kSession
.getProcessInstance(piid);
TimerNodeInstance timerInstance = getTimerInstance(pi);
TimerManager tm = getTimerManager(kSession);
tm.cancelTimer(timerInstance.getId());
dispose(runtimeEngine);
}
示例2: setAsTriggered
import org.kie.api.runtime.KieSession; //導入方法依賴的package包/類
public void setAsTriggered(String identifier, long piid) {
RuntimeEngine runtimeEngine = getRuntimeEngine(identifier, piid);
KieSession kSession = runtimeEngine.getKieSession();
WorkflowProcessInstance pi = (WorkflowProcessInstance) kSession
.getProcessInstance(piid);
TimerNodeInstance oldTimerInstance = getTimerInstance(pi);
oldTimerInstance.triggerCompleted(true);
dispose(runtimeEngine);
}
示例3: updateTimerNode
import org.kie.api.runtime.KieSession; //導入方法依賴的package包/類
public void updateTimerNode(Long piid, String identifier, long delay,
long period, int repeatLimit) {
RuntimeEngine runtimeEngine = getRuntimeEngine(identifier, piid);
KieSession kSession = runtimeEngine.getKieSession();
WorkflowProcessInstance pi = (WorkflowProcessInstance) kSession
.getProcessInstance(piid);
TimerNodeInstance timerInstance = getTimerInstance(pi);
UpdateTimerCommand cmd = new UpdateTimerCommand(piid, timerInstance
.getTimerNode().getName(), delay, period, repeatLimit);
kSession.execute(cmd);
dispose(runtimeEngine);
}
示例4: execute
import org.kie.api.runtime.KieSession; //導入方法依賴的package包/類
@Override
void execute(KieSession kieSession, TaskService taskService, JBPMConfiguration configuration, Exchange exchange) {
ProcessInstance processInstance = kieSession.getProcessInstance(safe(getProcessInstanceId(configuration, exchange)));
setResult(exchange, processInstance);
}