All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.effektif.workflow.api.WorkflowEngine Maven / Gradle / Ivy

There is a newer version: 3.0.0-beta14
Show newest version
/*
 * Copyright 2014 Effektif GmbH.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package com.effektif.workflow.api;

import com.effektif.workflow.api.model.*;
import com.effektif.workflow.api.query.WorkflowInstanceQuery;
import com.effektif.workflow.api.query.WorkflowQuery;
import com.effektif.workflow.api.workflow.ExecutableWorkflow;
import com.effektif.workflow.api.workflowinstance.WorkflowInstance;

import java.util.List;


/**
 * Main interface to the workflow engine.
 * 
 * See Workflow engine types
 * for how to obtain a WorkflowEngine object.
 * 
 * @author Tom Baeyens
 */
public interface WorkflowEngine {

  /** Validates and deploys if there are no errors. */
  Deployment deployWorkflow(ExecutableWorkflow workflow);
  
  List findWorkflows(WorkflowQuery workflowQuery);

  void deleteWorkflows(WorkflowQuery workflowQuery);

  /** starts a new workflow instance with the data specified in the trigger instance. */
  WorkflowInstance start(TriggerInstance triggerInstance);

  /** Sends a {@link Message message} to an activity instance, most likely this is invoked 
   * to end the specified activity instance and move workflow execution forward from there. */
  WorkflowInstance send(Message message);

  WorkflowInstance move(WorkflowInstanceId workflowInstanceId, String activityInstanceId, String newActivityId);
  WorkflowInstance move(WorkflowInstanceId workflowInstanceId, String newActivityId);

  WorkflowInstance cancel(WorkflowInstanceId workflowInstanceId);

  VariableValues getVariableValues(WorkflowInstanceId workflowInstanceId);

  VariableValues getVariableValues(WorkflowInstanceId workflowInstanceId, String activityInstanceId);

  void setVariableValues(WorkflowInstanceId workflowInstanceId, VariableValues variableValues);

  void setVariableValues(WorkflowInstanceId workflowInstanceId, String activityInstanceId, VariableValues variableValues);

  List findWorkflowInstances(WorkflowInstanceQuery query);
  
  void deleteWorkflowInstances(WorkflowInstanceQuery query);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy