Interface TaskService

All Known Implementing Classes:
TaskServiceImpl

public interface TaskService
Service which provides access to Task and form related operations.
Author:
Tom Baeyens, Joram Barrez, Thorben Lindhauer
  • getVariableTyped

    <T extends TypedValue> T getVariableTyped(String taskId, String variableName, boolean deserializeValue)
    Get a variables and search in the task scope and if available also the execution scopes.
    Parameters:
    taskId - the id of the task
    variableName - the name of the variable to fetch
    deserializeValue - if false a, SerializableValue will not be deserialized.
    Returns:
    the TypedValue for the variable or 'null' in case no such variable exists.
    Throws:
    ClassCastException - in case the value is not of the requested type
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariableLocal

    Object getVariableLocal(String taskId, String variableName)
    Get a variables and only search in the task scope.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • getVariableLocalTyped

    <T extends TypedValue> T getVariableLocalTyped(String taskId, String variableName)
    Get a variables and only search in the task scope.
    Parameters:
    taskId - the id of the task
    variableName - the name of the variable to fetch
    Returns:
    the TypedValue for the variable or 'null' in case no such variable exists.
    Throws:
    ClassCastException - in case the value is not of the requested type
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariableLocalTyped

    <T extends TypedValue> T getVariableLocalTyped(String taskId, String variableName, boolean deserializeValue)
    Get a variables and only search in the task scope.
    Parameters:
    taskId - the id of the task
    variableName - the name of the variable to fetch
    deserializeValue - if false a, SerializableValue will not be deserialized.
    Returns:
    the TypedValue for the variable or 'null' in case no such variable exists.
    Throws:
    ClassCastException - in case the value is not of the requested type
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariables

    Map<String,Object> getVariables(String taskId)
    Get all variables and search in the task scope and if available also the execution scopes. If you have many variables and you only need a few, consider using getVariables(String, Collection) for better performance.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • getVariablesTyped

    VariableMap getVariablesTyped(String taskId)
    Get all variables and search in the task scope and if available also the execution scopes. If you have many variables and you only need a few, consider using getVariables(String, Collection) for better performance.
    Parameters:
    taskId - the id of the task
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariablesTyped

    VariableMap getVariablesTyped(String taskId, boolean deserializeValues)
    Get all variables and search in the task scope and if available also the execution scopes. If you have many variables and you only need a few, consider using getVariables(String, Collection) for better performance.
    Parameters:
    taskId - the id of the task
    deserializeValues - if false, SerializableValues will not be deserialized.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariablesLocal

    Map<String,Object> getVariablesLocal(String taskId)
    Get all variables and search only in the task scope. If you have many task local variables and you only need a few, consider using getVariablesLocal(String, Collection) for better performance.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • getVariablesLocalTyped

    VariableMap getVariablesLocalTyped(String taskId)
    Get all variables and search only in the task scope. If you have many task local variables and you only need a few, consider using getVariablesLocal(String, Collection) for better performance.
    Parameters:
    taskId - the id of the task
    deserializeValues - if false, SerializableValues will not be deserialized.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariablesLocalTyped

    VariableMap getVariablesLocalTyped(String taskId, boolean deserializeValues)
    Get all variables and search only in the task scope. If you have many task local variables and you only need a few, consider using getVariablesLocal(String, Collection) for better performance.
    Parameters:
    taskId - the id of the task
    deserializeValues - if false, SerializableValues will not be deserialized.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariables

    Map<String,Object> getVariables(String taskId, Collection<String> variableNames)
    Get values for all given variableNames
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • getVariablesTyped

    VariableMap getVariablesTyped(String taskId, Collection<String> variableNames, boolean deserializeValues)
    Get values for all given variableName
    Parameters:
    taskId - the id of the task
    variableNames - only fetch variables whose names are in the collection.
    deserializeValues - if false, SerializableValues will not be deserialized.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • getVariablesLocal

    Map<String,Object> getVariablesLocal(String taskId, Collection<String> variableNames)
    Get a variable on a task
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • getVariablesLocalTyped

    VariableMap getVariablesLocalTyped(String taskId, Collection<String> variableNames, boolean deserializeValues)
    Get values for all given variableName. Only search in the local task scope.
    Parameters:
    taskId - the id of the task
    variableNames - only fetch variables whose names are in the collection.
    deserializeValues - if false, SerializableValues will not be deserialized.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException -

    In case of standalone tasks:

  • if the user has no Permissions.READ permission on Resources.TASK or
  • if this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK
  • In case the task is part of a running process instance:

  • if the user has no Permissions.READ permission on Resources.TASK and no Permissions.READ_TASK permission on Resources.PROCESS_DEFINITION
  • in case this configuration is enabled and the user has no TaskPermissions.READ_VARIABLE permission on Resources.TASK and no ProcessDefinitionPermissions.READ_TASK_VARIABLE permission on Resources.PROCESS_DEFINITION
  • Since:
    7.2
  • removeVariable

    void removeVariable(String taskId, String variableName)
    Removes the variable from the task. When the variable does not exist, nothing happens.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException - If the user has none of the following:
  • TaskPermissions.UPDATE_VARIABLE permission on Resources.TASK
  • Permissions.UPDATE permission on Resources.TASK
  • or if the task is part of a running process instance:
  • removeVariableLocal

    void removeVariableLocal(String taskId, String variableName)
    Removes the variable from the task (not considering parent scopes). When the variable does not exist, nothing happens.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException - If the user has none of the following:
  • TaskPermissions.UPDATE_VARIABLE permission on Resources.TASK
  • Permissions.UPDATE permission on Resources.TASK
  • or if the task is part of a running process instance:
  • removeVariables

    void removeVariables(String taskId, Collection<String> variableNames)
    Removes all variables in the given collection from the task. Non existing variable names are simply ignored.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException - If the user has none of the following:
  • TaskPermissions.UPDATE_VARIABLE permission on Resources.TASK
  • Permissions.UPDATE permission on Resources.TASK
  • or if the task is part of a running process instance:
  • removeVariablesLocal

    void removeVariablesLocal(String taskId, Collection<String> variableNames)
    Removes all variables in the given collection from the task (not considering parent scopes). Non existing variable names are simply ignored.
    Throws:
    ProcessEngineException - when the task doesn't exist.
    AuthorizationException - If the user has none of the following:
  • TaskPermissions.UPDATE_VARIABLE permission on Resources.TASK
  • Permissions.UPDATE permission on Resources.TASK
  • or if the task is part of a running process instance:
  • addComment

    @Deprecated void addComment(String taskId, String processInstanceId, String message)
    Deprecated.
    Add a comment to a task and/or process instance.
  • createComment

    Comment createComment(String taskId, String processInstanceId, String message)
    Creates a comment to a task and/or process instance and returns the comment.
  • deleteTaskComment

    void deleteTaskComment(String taskId, String commentId)
    Deletes a comment of a given taskId and commentId
    Parameters:
    taskId - id of a task of a comment that is intended to be deleted
    commentId - id of a comment that is intended to be deleted
    Throws:
    BadUserRequestException - if taskId is null
    NullValueException - if no task with the given id exists
    AuthorizationException - if the user hasn't any of Permissions.UPDATE, Permissions.TASK_WORK permissions on Resources.TASK or no Permissions.UPDATE_TASK, Permissions.TASK_WORK permissions on Resources.PROCESS_DEFINITION (if the task is part of a running process instance).
  • deleteProcessInstanceComment

    void deleteProcessInstanceComment(String processInstanceId, String commentId)
    Deletes a comment by a given processInstanceId and commentId
    Parameters:
    processInstanceId - id of a processInstance of a comment that is intended to be deleted
    commentId - id of a comment that is intended to be deleted
    Throws:
    BadUserRequestException - if processInstanceId is null
    NullValueException - if no process instance with the given id exists
    AuthorizationException - if the user hasn't any of Permissions.UPDATE permission on Resources.PROCESS_INSTANCE or no Permissions.UPDATE_INSTANCE permission on Resources.PROCESS_DEFINITION
  • deleteTaskComments

    void deleteTaskComments(String taskId)
    Deletes all comments by a given taskId
    Parameters:
    taskId - id of a task of all comments that are intended to be deleted
    Throws:
    BadUserRequestException - if taskId is null
    NullValueException - if no task with the given id exists
    AuthorizationException - if the user hasn't any of Permissions.UPDATE, Permissions.TASK_WORK permissions on Resources.TASK or no Permissions.UPDATE_TASK, Permissions.TASK_WORK permissions on Resources.PROCESS_DEFINITION (if the task is part of a running process instance).
  • deleteProcessInstanceComments

    void deleteProcessInstanceComments(String processInstanceId)
    Deletes all comments by a given processInstanceId
    Parameters:
    processInstanceId - id of a process instance of comments that are intended to be deleted
    Throws:
    BadUserRequestException - if processInstanceId is null
    NullValueException - if no process instance with the given id exists
    AuthorizationException - if the user hasn't any of Permissions.UPDATE permission on Resources.PROCESS_INSTANCE or no Permissions.UPDATE_INSTANCE permission on Resources.PROCESS_DEFINITION
  • updateTaskComment

    void updateTaskComment(String taskId, String commentId, String message)
    Updates a comment on a given task ID
    Parameters:
    taskId - id of a task of a comment that is intended to be updated
    commentId - id of a comment that is intended to be updated
    message - new message that needs to be updated
    Throws:
    NullValueException - if no task or comment are found with the given ids
    AuthorizationException - if the user hasn't any of Permissions.UPDATE, Permissions.TASK_WORK permissions on Resources.TASK or no Permissions.UPDATE_TASK, Permissions.TASK_WORK permissions on Resources.PROCESS_DEFINITION (if the task is part of a running process instance).
  • updateProcessInstanceComment

    void updateProcessInstanceComment(String processInstanceId, String commentId, String message)
    Updates comment on a given processInstance ID
    Parameters:
    processInstanceId - id of a process instance of a comment that is intended to be updated
    commentId - id of a comment that is intended to be updated
    message - new message that needs to be updated
    Throws:
    NullValueException - if no process instance or comment are found with the given ids
    AuthorizationException - if the user hasn't any of Permissions.UPDATE, Permissions.TASK_WORK permissions on Resources.TASK or no Permissions.UPDATE_TASK, Permissions.TASK_WORK permissions on Resources.PROCESS_DEFINITION (if the task is part of a running process instance).
  • getTaskComments

    List<Comment> getTaskComments(String taskId)
    The comments related to the given task.
  • getTaskComment

    Comment getTaskComment(String taskId, String commentId)
    Retrieve a particular task comment
  • getTaskEvents

    @Deprecated List<Event> getTaskEvents(String taskId)
    Deprecated.
    This method has been deprecated as of Camunda Platform 7.1. It has been replaced with the operation log. See UserOperationLogEntry and UserOperationLogQuery.

    The all events related to the given task.

    As of Camunda Platform 7.4 task events are only written in context of a logged in user. This behavior can be toggled in the process engine configuration using the property legacyUserOperationLog (default false). To restore the engine's previous behavior, set the flag to true.

    See Also:
  • getProcessInstanceComments

    List<Comment> getProcessInstanceComments(String processInstanceId)
    The comments related to the given process instance.
  • createAttachment

    Attachment createAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, InputStream content)
    Add a new attachment to a task and/or a process instance and use an input stream to provide the content please use method in runtime service to operate on process instance. Either taskId or processInstanceId has to be provided
    Parameters:
    taskId - - task that should have an attachment
    processInstanceId - - id of a process to use if task id is null
    attachmentType - - name of the attachment, can be null
    attachmentName - - name of the attachment, can be null
    attachmentDescription - - full text description, can be null
    content - - byte array with content of attachment
  • createAttachment

    Attachment createAttachment(String attachmentType, String taskId, String processInstanceId, String attachmentName, String attachmentDescription, String url)
    Add a new attachment to a task and/or a process instance and use an url as the content please use method in runtime service to operate on process instance Either taskId or processInstanceId has to be provided
    Parameters:
    taskId - - task that should have an attachment
    processInstanceId - - id of a process to use if task id is null
    attachmentType - - name of the attachment, can be null
    attachmentName - - name of the attachment, can be null
    attachmentDescription - - full text description, can be null
    url - - url of the attachment, can be null
  • saveAttachment

    void saveAttachment(Attachment attachment)
    Update the name and decription of an attachment
  • getAttachment

    Attachment getAttachment(String attachmentId)
    Retrieve a particular attachment
  • getTaskAttachment

    Attachment getTaskAttachment(String taskId, String attachmentId)
    Retrieve a particular attachment to the given task id and attachment id
  • getAttachmentContent

    InputStream getAttachmentContent(String attachmentId)
    Retrieve stream content of a particular attachment
  • getTaskAttachmentContent

    InputStream getTaskAttachmentContent(String taskId, String attachmentId)
    Retrieve stream content of a particular attachment to the given task id and attachment id
  • getTaskAttachments

    List<Attachment> getTaskAttachments(String taskId)
    The list of attachments associated to a task
  • getProcessInstanceAttachments

    List<Attachment> getProcessInstanceAttachments(String processInstanceId)
    The list of attachments associated to a process instance
  • deleteAttachment

    void deleteAttachment(String attachmentId)
    Delete an attachment
  • deleteTaskAttachment

    void deleteTaskAttachment(String taskId, String attachmentId)
    Delete an attachment to the given task id and attachment id
  • getSubTasks

    List<Task> getSubTasks(String parentTaskId)
    The list of subtasks for this parent task
  • createTaskReport

    TaskReport createTaskReport()
    Instantiate a task report
  • handleBpmnError

    void handleBpmnError(String taskId, String errorCode)
    Signals that a business error appears, which should be handled by the process engine.
    Parameters:
    taskId - the id of an existing active task
    errorCode - the error code of the corresponding bmpn error
    Throws:
    NotFoundException - if no task with the given id exists
    BadUserRequestException - if task id or error code were null or empty
    SuspendedEntityInteractionException - if the task is suspended
    AuthorizationException - if the user has none of the following permissions:
  • Permissions.TASK_WORK permission on Resources.TASK or Resources.PROCESS_DEFINITION resource
  • Permissions.UPDATE permission on Resources.TASK resource
  • Permissions.UPDATE_TASK permission on Resources.PROCESS_DEFINITION resource
  • handleBpmnError

    void handleBpmnError(String taskId, String errorCode, String errorMessage)
    Parameters:
    taskId - the id of an existing active task
    errorCode - the error code of the corresponding bmpn error
    errorMessage - the error message of the corresponding bmpn error
    See Also:
  • handleBpmnError

    void handleBpmnError(String taskId, String errorCode, String errorMessage, Map<String,Object> variables)
    Parameters:
    taskId - the id of an existing active task
    errorCode - the error code of the corresponding bmpn error
    errorMessage - the error message of the corresponding bmpn error
    variables - the variables to pass to the execution
    See Also:
  • handleEscalation

    void handleEscalation(String taskId, String escalationCode)
    Signals that an escalation appears, which should be handled by the process engine.
    Parameters:
    taskId - the id of an existing active task
    escalationCode - the escalation code of the corresponding escalation
    variables - the variables to pass to the execution
    Throws:
    NotFoundException - if no task with the given id exists
    BadUserRequestException - if task id or escalation code were null or empty
    SuspendedEntityInteractionException - if the task is suspended
    AuthorizationException - if the user has none of the following permissions:
  • Permissions.TASK_WORK permission on Resources.TASK or Resources.PROCESS_DEFINITION resource
  • Permissions.UPDATE permission on Resources.TASK resource
  • Permissions.UPDATE_TASK permission on Resources.PROCESS_DEFINITION resource
  • handleEscalation

    void handleEscalation(String taskId, String escalationCode, Map<String,Object> variables)
    Signals that an escalation appears, which should be handled by the process engine.
    Parameters:
    taskId - the id of an existing active task
    escalationCode - the escalation code of the corresponding escalation
    variables - the variables to pass to the execution
    Throws:
    NotFoundException - if no task with the given id exists
    BadUserRequestException - if task id or escalation code were null or empty
    SuspendedEntityInteractionException - if the task is suspended
    AuthorizationException - if the user has none of the following permissions:
  • Permissions.TASK_WORK permission on Resources.TASK or Resources.PROCESS_DEFINITION resource
  • Permissions.UPDATE permission on Resources.TASK resource
  • Permissions.UPDATE_TASK permission on Resources.PROCESS_DEFINITION resource