public String getOutIdentifier() {
return outIdentifier;
}
public ProcessInstance execute(Context context) {
KieSession ksession = ((KnowledgeCommandContext) context).getKieSession();
if (data != null) {
for (Object o: data) {
ksession.insert(o);
}
}
ProcessInstance processInstance = (ProcessInstance) ksession.createProcessInstance(processId, parameters);
if ( this.outIdentifier != null ) {
((ExecutionResultImpl) ((KnowledgeCommandContext) context).getExecutionResults()).getResults().put(this.outIdentifier,
processInstance.getId());
}
return processInstance;