use of org.drools.core.command.impl.RegistryContext in project drools by kiegroup.
the class UnregisterChannelCommand method execute.
public Void execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
ksession.unregisterChannel(name);
return null;
}
use of org.drools.core.command.impl.RegistryContext in project drools by kiegroup.
the class AbortProcessInstanceCommand method execute.
public Void execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
if (processInstanceId == null) {
return null;
}
ksession.abortProcessInstance(processInstanceId);
return null;
}
use of org.drools.core.command.impl.RegistryContext in project drools by kiegroup.
the class CompleteWorkItemCommand method execute.
public Void execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
ksession.getWorkItemManager().completeWorkItem(workItemId, results);
return null;
}
use of org.drools.core.command.impl.RegistryContext in project drools by kiegroup.
the class CreateProcessInstanceCommand method execute.
public ProcessInstance execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
if (data != null) {
for (Object o : data) {
ksession.insert(o);
}
}
ProcessInstance processInstance = (ProcessInstance) ksession.createProcessInstance(processId, parameters);
if (this.outIdentifier != null) {
((RegistryContext) context).lookup(ExecutionResultImpl.class).setResult(this.outIdentifier, processInstance.getId());
}
return processInstance;
}
use of org.drools.core.command.impl.RegistryContext in project drools by kiegroup.
the class AbortWorkItemCommand method execute.
public Void execute(Context context) {
KieSession ksession = ((RegistryContext) context).lookup(KieSession.class);
ksession.getWorkItemManager().abortWorkItem(workItemId);
return null;
}
Aggregations