| /** |
| * |
| * 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 2.0 |
| * which accompanies this distribution, and is available at |
| * https://www.eclipse.org/legal/epl-2.0/ |
| * |
| * SPDX-License-Identifier: EPL-2.0 |
| * |
| * 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); |
| Object getProcessInstance(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> |
| * @return map with String for key and Object for values |
| */ |
| Map<String,Object> getProcessVariables(Object processInstanceObject); |
| /** |
| * @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 processInstanceObject, 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 |
| */ |
| void setProcessVariable(Object processInstanceObject, 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); |
| void registerBlipFunctionProvider(IBlipBPMFunctionProvider blipFunctionProvider); |
| void unregisterBlipFunctionProvider(IBlipBPMFunctionProvider blipFunctionProvider); |
| } |