blob: d696aa5542e434be0015d09cfb956c27ce5432bd [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*/
package org.eclipse.osbp.bpm.api;
import java.util.Map;
import java.util.Set;
import org.eclipse.osbp.ui.api.useraccess.IBlipProcessPermissions;
public interface IBPMEngine {
void clearErrors();
String getErrors();
boolean registerProcess(IBlipBPMStartInfo startInfo, String resourceBundlePath, Class<?> bundleClass, IBlipProcessPermissions blipProcessPermissions);
void startProcess(IBlipBPMStartInfo bpm, Map <String, Object> parameters);
String getResourceName(String processId);
void initBPMUsers();
Set<String> getGroups();
Set<String> getUsers();
void addProcessEventListener(Object listener);
void removeProcessEventListener(Object listener);
void addTaskEventListener(Object listener);
void removeTaskEventListener(Object listener);
/**
* @param taskInformationObject object containing information about the task; it can be<ul>
* <li>process instance of type {@link org.drools.runtime.process.ProcessInstance}</li>
* <li>long value containing the process instance id</li>
* <li>int value containing the process instance id</li>
* <li>task summary of type {@link org.jbpm.task.query.TaskSummary}</li>
* </ul>
* @return map with String for key and Object for values
*/
Map<String,Object> getProcessVariables(Object taskInformationObject);
/**
* @param taskInformationObject object containing information about the task; it can be<ul>
* <li>process instance of type {@link org.drools.runtime.process.ProcessInstance}</li>
* <li>long value containing the process instance id</li>
* <li>int value containing the process instance id</li>
* <li>task summary of type {@link org.jbpm.task.query.TaskSummary}</li>
* </ul>
* @param variable name of the requested variable
* @return value of the variable or null
*/
Object getProcessVariable(Object taskInformationObject, String variable);
/**
* @param taskInformationObject object containing information about the task; it can be<ul>
* <li>process instance of type {@link org.drools.runtime.process.ProcessInstance}</li>
* <li>long value containing the process instance id</li>
* <li>int value containing the process instance id</li>
* <li>task summary of type {@link org.jbpm.task.query.TaskSummary}</li>
* </ul>
* @param variable name of the variable to be set
* @param value new values of the variable
*/
Object setProcessVariable(Object taskInformationObject, String variable, Object value);
void disposeKsession(Object ksession);
Object reCreateKnowledgeSession(Object taskInformationObject);
void beginTransaction();
void commitTransaction();
void rollbackTransaction();
Object getVariable(Object kcontext, String variable, Object defaultValue);
void setVariable(Object kcontext, String variable, Object value);
}