| /** |
| * |
| * 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.ArrayList; |
| import java.util.Map; |
| |
| import org.drools.KnowledgeBase; |
| import org.drools.builder.KnowledgeBuilder; |
| import org.drools.event.process.ProcessEventListener; |
| import org.drools.io.ResourceFactoryService; |
| import org.eclipse.osbp.persistence.IPersistenceService; |
| import org.jbpm.task.Group; |
| import org.jbpm.task.User; |
| import org.jbpm.task.event.TaskEventListener; |
| import org.jbpm.task.service.TaskService; |
| |
| public interface IBPMEngine { |
| public Map<String, ArrayList<String>> getGroupsbyuser(); |
| public Map<String, ArrayList<String>> getUsersbygroup(); |
| public Map<String, User> getUsers(); |
| public Map<String, Group> getGroups(); |
| public KnowledgeBuilder getKnowledgeBuilder(); |
| public KnowledgeBase getKnowledgeBase(); |
| public ResourceFactoryService getResourceFactoryService(); |
| public TaskService getTaskService(); |
| public void startProcess(IBlipBPMStartInfo bpm, Map <String, Object> parameters); |
| public IPersistenceService getPersistenceService(); |
| public void registerResource(String processId, String resourceName); |
| public String getResourceName(String processId); |
| public void initBPMUsers(); |
| public void addOrganizationalResource(String user, String group); |
| public void addProcessEventListener(ProcessEventListener listener); |
| public void removeProcessEventListener(ProcessEventListener listener); |
| public void addTaskEventListener(TaskEventListener listener); |
| public void removeTaskEventListener(TaskEventListener listener); |
| public boolean addBpmn(String processId, String bundleResourceName, Class<?> clz); |
| /** |
| * @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 |
| */ |
| public 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 |
| */ |
| public 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 |
| */ |
| public Object setProcessVariable(Object taskInformationObject, String variable, Object value); |
| public void disposeKsession(Object ksession); |
| public Object reCreateKnowledgeSession(Object taskInformationObject); |
| public void beginTransaction(); |
| public void commitTransaction(); |
| public void rollbackTransaction(); |
| } |