com.github.egatlovs.variablemanager.managers.TaskVariableManager Maven / Gradle / Ivy
package com.github.egatlovs.variablemanager.managers;
import org.camunda.bpm.engine.TaskService;
public interface TaskVariableManager {
/**
* Sets a Variable to the Execution.
*
* Note: the variable will be processed as follows:
*
* - The object will be validated using bean validation.
* - The given object will be processed using
* {@code ProcessingUnit.class}
*
* If you want more Information of how variables are processed watch out for
* {@code ProcessingUnit.class}.
* If you want to manipulate how your variables are processed look for
* {@code @ObjectValue}, {@code @FileValue}, {@code @FieldName} and {@code @Ignore}.
*
*
* @param value - The value to be set to the Execution
* @param taskid - The id of the task to be used
*/
void setVariable(Object value, String taskid);
/**
* Sets a Variable Locally to the Execution.
*
* Note: the variable will be processed as follows:
*
* - The object will be validated using bean validation.
* - The given object will be processed using
* {@code ProcessingUnit.class}
*
* If you want more Information of how variables are processed watch out for
* {@code ProcessingUnit.class}.
* If you want to manipulate how your variables are processed look for
* {@code @ObjectValue}, {@code @FileValue}, {@code @FieldName} and {@code @Ignore}.
*
*
* @param value - The value to be set to the Execution
* @param taskid - The id of the task to be used
*/
void setVariableLocal(Object value, String taskid);
/**
* Retrieves a Variable from the Execution.
*
* The variables will be read from the given class using
* {@code FieldNames.class}. After that each variable will be called out of the
* execution.
* Now that each variable is retrieved from the execution, the
* {@code ResultObject.class} will be used to build the requested object which
* is then returned.
*
* @param clazz - The Class which should be gathered
* @param taskid - The id of the task to be used
* @return - The Object of the requested class
*/
T getVariable(Class clazz, String taskid);
/**
* Retrieves a Variable locally from the Execution.
*
* The variables will be read from the given class using
* {@code FieldNames.class}. After that each variable will be called out of the
* execution.
* Now that each variable is retrieved from the execution, the
* {@code ResultObject.class} will be used to build the requested object which
* is then returned.
*
* @param clazz - The Class which should be gathered
* @param taskid - The id of the task to be used
* @return - The Object of the requested class
*/
T getVariableLocal(Class clazz, String taskid);
/**
* Removes a Variable from the Execution.
*
* The variables will be read from the given class using
* {@code FieldNames.class}. After that each variable will be removed from the
* execution.
*
* @param clazz - The Class which should be used to retrieve the fieldnames to be
* deleted
* @param taskid - The id of the task to be used
*/
void removeVariables(Class clazz, String taskid);
/**
* Removes Variables locally from the Execution.
*
* The variables will be read from the given class using
* {@code FieldNames.class}. After that each variable will be removed from the
* execution.
*
* @param clazz - The Class which should be used to retrieve the fieldnames to be
* deleted
* @param taskid - The id of the task to be used
*/
void removeVariablesLocal(Class clazz, String taskid);
/**
* Gives access to the wrapped taskService.
*
* @return Returns the wrapped taskService
*/
TaskService getExecutionService();
/**
* Manipulate the taskService used.
*
* @param taskService - The new taskService to be used
*/
void setExecutionService(TaskService taskService);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy