Search in sources :

Example 61 with CommandContext

use of org.activiti.engine.impl.interceptor.CommandContext in project Activiti by Activiti.

the class TaskEntity method setTaskDefinitionKey.

public void setTaskDefinitionKey(String taskDefinitionKey) {
    this.taskDefinitionKey = taskDefinitionKey;
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext != null) {
        commandContext.getHistoryManager().recordTaskDefinitionKeyChange(this, taskDefinitionKey);
    }
}
Also used : CommandContext(org.activiti.engine.impl.interceptor.CommandContext)

Example 62 with CommandContext

use of org.activiti.engine.impl.interceptor.CommandContext in project Activiti by Activiti.

the class TaskEntity method setParentTaskId.

public void setParentTaskId(String parentTaskId) {
    this.parentTaskId = parentTaskId;
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext != null) {
        commandContext.getHistoryManager().recordTaskParentTaskIdChange(id, parentTaskId);
    }
}
Also used : CommandContext(org.activiti.engine.impl.interceptor.CommandContext)

Example 63 with CommandContext

use of org.activiti.engine.impl.interceptor.CommandContext in project Activiti by Activiti.

the class TaskEntity method setName.

// special setters //////////////////////////////////////////////////////////
public void setName(String taskName) {
    this.name = taskName;
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext != null) {
        commandContext.getHistoryManager().recordTaskNameChange(id, taskName);
    }
}
Also used : CommandContext(org.activiti.engine.impl.interceptor.CommandContext)

Example 64 with CommandContext

use of org.activiti.engine.impl.interceptor.CommandContext in project Activiti by Activiti.

the class TaskEntity method setFormKey.

public void setFormKey(String formKey) {
    this.formKey = formKey;
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext != null) {
        commandContext.getHistoryManager().recordTaskFormKeyChange(id, formKey);
    }
}
Also used : CommandContext(org.activiti.engine.impl.interceptor.CommandContext)

Example 65 with CommandContext

use of org.activiti.engine.impl.interceptor.CommandContext in project Activiti by Activiti.

the class TaskEntity method getSpecificVariable.

// Override from VariableScopeImpl
// Overriden to avoid fetching *all* variables (as is the case in the super call)
@Override
protected VariableInstanceEntity getSpecificVariable(String variableName) {
    CommandContext commandContext = Context.getCommandContext();
    if (commandContext == null) {
        throw new ActivitiException("lazy loading outside command context");
    }
    VariableInstanceEntity variableInstance = commandContext.getVariableInstanceEntityManager().findVariableInstanceByTaskAndName(id, variableName);
    return variableInstance;
}
Also used : ActivitiException(org.activiti.engine.ActivitiException) CommandContext(org.activiti.engine.impl.interceptor.CommandContext)

Aggregations

CommandContext (org.activiti.engine.impl.interceptor.CommandContext)72 CommandExecutor (org.activiti.engine.impl.interceptor.CommandExecutor)18 DbSqlSession (org.activiti.engine.impl.db.DbSqlSession)13 SignalEventSubscriptionEntity (org.activiti.engine.impl.persistence.entity.SignalEventSubscriptionEntity)8 Date (java.util.Date)7 ActivitiException (org.activiti.engine.ActivitiException)7 CommandConfig (org.activiti.engine.impl.interceptor.CommandConfig)7 EventSubscriptionEntity (org.activiti.engine.impl.persistence.entity.EventSubscriptionEntity)7 ProcessDefinitionEntity (org.activiti.engine.impl.persistence.entity.ProcessDefinitionEntity)7 MessageEventSubscriptionEntity (org.activiti.engine.impl.persistence.entity.MessageEventSubscriptionEntity)6 HashMap (java.util.HashMap)4 TimerEntity (org.activiti.engine.impl.persistence.entity.TimerEntity)4 Job (org.activiti.engine.runtime.Job)4 Deployment (org.activiti.engine.test.Deployment)4 ArrayList (java.util.ArrayList)3 GregorianCalendar (java.util.GregorianCalendar)3 List (java.util.List)3 ExtensionElement (org.activiti.bpmn.model.ExtensionElement)3 DynamicBpmnService (org.activiti.engine.DynamicBpmnService)3 JobEntity (org.activiti.engine.impl.persistence.entity.JobEntity)3