Interface HvlBpmnTaskService
- All Known Implementing Classes:
HvlBpmnTaskServiceImpl
@Validated
public interface HvlBpmnTaskService
This service provides operational and retrieve methods.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCandidateGroup
(@NotBlank String taskId, @NotBlank String groupId) Convenience shorthand foraddGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
void
addCandidateUser
(@NotBlank String taskId, @NotBlank String userId) Convenience shorthand foraddUserIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
org.flowable.engine.task.Comment
addComment
(String taskId, String processInstanceId, @NotBlank String message) Add a comment to a task and/or process instance.org.flowable.engine.task.Comment
addComment
(String taskId, String processInstanceId, String type, @NotBlank String message) Add a comment to a task and/or process instance with a custom type.void
addGroupIdentityLink
(@NotBlank String taskId, @NotBlank String groupId, @NotBlank String identityLinkType) Involves a group with a task.void
addUserIdentityLink
(@NotBlank String taskId, @NotBlank String userId, @NotBlank String identityLinkType) Involves a user with a task.void
Claim responsibility for a task: the given user is made assignee for the task.void
complete
(@NotNull HvlBpmnCompleteTaskModel completeTaskModel) Called when the task is successfully executed.org.flowable.engine.task.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 contentorg.flowable.engine.task.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 contentorg.flowable.task.api.NativeTaskQuery
Returns a newNativeQuery
for tasks.org.flowable.task.api.TaskBuilder
Create a builder for the taskorg.flowable.task.api.TaskCompletionBuilder
Create a completion builder for the taskorg.flowable.task.api.TaskQuery
Returns a newTaskQuery
that can be used to dynamically query tasks.void
delegateTask
(@NotBlank String taskId, @NotBlank String userId) Delegates the task to another user.void
deleteAttachment
(@NotBlank String attachmentId) Delete an attachmentvoid
deleteCandidateGroup
(@NotBlank String taskId, @NotBlank String groupId) Convenience shorthand fordeleteGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
void
deleteCandidateUser
(@NotBlank String taskId, @NotBlank String userId) Convenience shorthand fordeleteUserIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
void
deleteComment
(@NotBlank String commentId) Removes an individual comment with the given id.void
deleteComments
(String taskId, String processInstanceId) Removes all comments from the provided task and/or process instancevoid
deleteGroupIdentityLink
(@NotBlank String taskId, @NotBlank String groupId, @NotBlank String identityLinkType) Removes the association between a group and a task for the given identityLinkType.void
deleteTask
(@NotNull HvlBpmnDeleteTaskModel deleteTaskModel) Deletes the given task, not deleting historic information that is related to this task.void
deleteUserIdentityLink
(@NotBlank String taskId, @NotBlank String userId, @NotBlank String identityLinkType) Removes the association between a user and a task for the given identityLinkType.org.flowable.engine.task.Attachment
getAttachment
(@NotBlank String attachmentId) Retrieve a particular attachmentgetAttachmentContent
(@NotBlank String attachmentId) Retrieve stream content of a particular attachmentorg.flowable.engine.task.Comment
getComment
(@NotBlank String commentId) Returns an individual comment with the given id.List<org.flowable.engine.task.Comment>
getCommentsByType
(@NotBlank String type) All comments of a given type.org.flowable.engine.runtime.DataObject
getDataObject
(@NotNull HvlBpmnTaskDataObjectQueryModel taskDataObjectQueryModel) The DataObject.getDataObjects
(@NotNull HvlBpmnTaskDataObjectQueryModel taskDataObjectQueryModel) All DataObjects visible from the given execution scope (including parent scopes).org.flowable.engine.task.Event
Returns an individual event with the given id.List<org.flowable.identitylink.api.IdentityLink>
getIdentityLinksForTask
(@NotBlank String taskId) Retrieves theIdentityLink
s associated with the given task.List<org.flowable.engine.task.Attachment>
getProcessInstanceAttachments
(@NotBlank String processInstanceId) The list of attachments associated to a process instanceList<org.flowable.engine.task.Comment>
getProcessInstanceComments
(@NotBlank String processInstanceId) The comments related to the given process instance.List<org.flowable.engine.task.Comment>
getProcessInstanceComments
(@NotBlank String processInstanceId, @NotBlank String type) The comments related to the given process instance.List<org.flowable.task.api.Task>
getSubTasks
(@NotBlank String parentTaskId) The list of subtasks for this parent taskList<org.flowable.engine.task.Attachment>
getTaskAttachments
(@NotBlank String taskId) The list of attachments associated to a taskList<org.flowable.engine.task.Comment>
getTaskComments
(@NotBlank String taskId) The comments related to the given task.List<org.flowable.engine.task.Comment>
getTaskComments
(@NotBlank String taskId, @NotBlank String type) The comments related to the given task of the given type.List<org.flowable.engine.task.Event>
getTaskEvents
(@NotBlank String taskId) The all events related to the given task.getVariable
(@NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) get a variables and search in the task scope and if available also the execution scopes.<T> T
getVariable
(@NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel, @NotNull Class<T> variableClass) get a variables and search in the task scope and if available also the execution scopes.org.flowable.variable.api.persistence.entity.VariableInstance
getVariableInstance
(@NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) The variable.List<org.flowable.variable.api.persistence.entity.VariableInstance>
getVariableInstancesLocalByTaskIds
(@NotEmpty Set<String> taskIds) get all variables and search only in the task scope.boolean
hasVariable
(@NotBlank String taskId, @NotBlank String variableName) checks whether or not the task has a variable defined with the given name, in the task scope and if available also the execution scopes.boolean
hasVariableLocal
(@NotBlank String taskId, @NotBlank String variableName) checks whether or not the task has a variable defined with the given name, local task scope only.org.flowable.task.api.Task
newTask()
Creates a new task that is not related to any process instance.org.flowable.task.api.Task
create a new task with a user defined task idqueryVariableInstances
(@NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) Query variable instances map.queryVariables
(@NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) Query variable objects map.void
removeVariable
(@NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) Removes the variable from the task.void
resolveTask
(@NotNull HvlBpmnResolveTaskModel resolveTaskModel) Marks that the assignee is done with this task and that it can be send back to the owner.void
saveAttachment
(@NotNull org.flowable.engine.task.Attachment attachment) Update the name and description of an attachmentvoid
saveComment
(@NotNull org.flowable.engine.task.Comment comment) Update a comment to a task and/or process instance.void
saveTask
(@NotNull org.flowable.task.api.Task task) Saves the given task to the persistent data store.void
setAssignee
(@NotBlank String taskId, @NotBlank String userId) Changes the assignee of the given task to the given userId.void
setDueDate
(@NotBlank String taskId, Date dueDate) Changes the due date of the taskvoid
Transfers ownership of this task to another user.void
setPriority
(@NotBlank String taskId, int priority) Changes the priority of the task.void
setVariable
(@NotBlank String taskId, @NotBlank String variableName, Object value) set variable on a task.void
setVariableLocal
(@NotBlank String taskId, @NotBlank String variableName, Object value) set variable on a task.void
setVariables
(@NotBlank String taskId, @NotEmpty Map<String, ? extends Object> variables) set variables on a task.void
setVariablesLocal
(@NotBlank String taskId, @NotEmpty Map<String, ? extends Object> variables) set variables on a task.void
A shortcut toclaim(java.lang.String, java.lang.String)
with null user in order to unclaim the task
-
Method Details
-
newTask
org.flowable.task.api.Task newTask()Creates a new task that is not related to any process instance.The returned task is transient and must be saved with
saveTask(Task)
'manually'.- Returns:
- the task
-
newTask
create a new task with a user defined task id- Parameters:
taskId
- the task id- Returns:
- the task
-
createTaskBuilder
org.flowable.task.api.TaskBuilder createTaskBuilder()Create a builder for the task- Returns:
- task builder
-
createTaskCompletionBuilder
org.flowable.task.api.TaskCompletionBuilder createTaskCompletionBuilder()Create a completion builder for the task- Returns:
- task completion builder
-
saveTask
void saveTask(@NotNull @NotNull org.flowable.task.api.Task task) Saves the given task to the persistent data store. If the task is already present in the persistent store, it is updated. After a new task has been saved, the task instance passed into this method is updated with the id of the newly created task.- Parameters:
task
- the task, cannot be null.
-
deleteTask
Deletes the given task, not deleting historic information that is related to this task.- Parameters:
deleteTaskModel
- the delete task model- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task with given id does not exist.org.flowable.common.engine.api.FlowableException
- when an error occurs while deleting the task or in case the task is part of a running process.
-
claim
Claim responsibility for a task: the given user is made assignee for the task. The difference withsetAssignee(String, String)
is that here a check is done if the task already has a user assigned to it. No check is done whether the user is known by the identity component.- Parameters:
taskId
- task to claim, cannot be null.userId
- user that claims the task. When userId is null the task is unclaimed, assigned to no one.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task doesn't exist.org.flowable.common.engine.api.FlowableTaskAlreadyClaimedException
- when the task is already claimed by another user
-
unclaim
A shortcut toclaim(java.lang.String, java.lang.String)
with null user in order to unclaim the task- Parameters:
taskId
- task to unclaim, cannot be null.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task doesn't exist.
-
complete
Called when the task is successfully executed.- Parameters:
completeTaskModel
- the complete task model- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no task exists with the given id.org.flowable.common.engine.api.FlowableException
- when this task isDelegationState.PENDING
delegation.
-
delegateTask
Delegates the task to another user. This means that the assignee is set and the delegation state is set toDelegationState.PENDING
. If no owner is set on the task, the owner is set to the current assignee of the task.- Parameters:
taskId
- The id of the task that will be delegated.userId
- The id of the user that will be set as assignee.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no task exists with the given id.
-
resolveTask
Marks that the assignee is done with this task and that it can be send back to the owner. Can only be called when this task isDelegationState.PENDING
delegation. After this method returns, thedelegationState
is set toDelegationState.RESOLVED
.- Parameters:
resolveTaskModel
- the resolve task model- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no task exists with the given id.
-
setAssignee
Changes the assignee of the given task to the given userId. No check is done whether the user is known by the identity component.- Parameters:
taskId
- id of the task, cannot be null.userId
- id of the user to use as assignee.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or user doesn't exist.
-
setOwner
Transfers ownership of this task to another user. No check is done whether the user is known by the identity component.- Parameters:
taskId
- id of the task, cannot be null.userId
- of the person that is receiving ownership.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or user doesn't exist.
-
getIdentityLinksForTask
List<org.flowable.identitylink.api.IdentityLink> getIdentityLinksForTask(@NotBlank @NotBlank String taskId) Retrieves theIdentityLink
s associated with the given task. Such anIdentityLink
informs how a certain identity (eg. group or user) is associated with a certain task (eg. as candidate, assignee, etc.)- Parameters:
taskId
- the task id- Returns:
- the identity links for task
-
addCandidateUser
Convenience shorthand foraddUserIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
- Parameters:
taskId
- id of the task, cannot be null.userId
- id of the user to use as candidate, cannot be null.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or user doesn't exist.
-
addCandidateGroup
Convenience shorthand foraddGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
- Parameters:
taskId
- id of the task, cannot be null.groupId
- id of the group to use as candidate, cannot be null.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or group doesn't exist.
-
addUserIdentityLink
void addUserIdentityLink(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String userId, @NotBlank @NotBlank String identityLinkType) Involves a user with a task. The type of identity link is defined by the given identityLinkType.- Parameters:
taskId
- id of the task, cannot be null.userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or user doesn't exist.
-
addGroupIdentityLink
void addGroupIdentityLink(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String groupId, @NotBlank @NotBlank String identityLinkType) Involves a group with a task. The type of identityLink is defined by the given identityLink.- Parameters:
taskId
- id of the task, cannot be null.groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@seeIdentityLinkType
).- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or group doesn't exist.
-
deleteCandidateUser
Convenience shorthand fordeleteUserIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
- Parameters:
taskId
- id of the task, cannot be null.userId
- id of the user to use as candidate, cannot be null.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or user doesn't exist.
-
deleteCandidateGroup
Convenience shorthand fordeleteGroupIdentityLink(String, String, String)
; with typeIdentityLinkType.CANDIDATE
- Parameters:
taskId
- id of the task, cannot be null.groupId
- id of the group to use as candidate, cannot be null.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or group doesn't exist.
-
deleteUserIdentityLink
void deleteUserIdentityLink(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String userId, @NotBlank @NotBlank String identityLinkType) Removes the association between a user and a task for the given identityLinkType.- Parameters:
taskId
- id of the task, cannot be null.userId
- id of the user involve, cannot be null.identityLinkType
- type of identityLink, cannot be null (@seeIdentityLinkType
).- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or user doesn't exist.
-
deleteGroupIdentityLink
void deleteGroupIdentityLink(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String groupId, @NotBlank @NotBlank String identityLinkType) Removes the association between a group and a task for the given identityLinkType.- Parameters:
taskId
- id of the task, cannot be null.groupId
- id of the group to involve, cannot be null.identityLinkType
- type of identity, cannot be null (@seeIdentityLinkType
).- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task or group doesn't exist.
-
setPriority
Changes the priority of the task.Authorization: actual owner / business admin
- Parameters:
taskId
- id of the task, cannot be null.priority
- the new priority for the task.- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when the task doesn't exist.
-
setDueDate
Changes the due date of the task- Parameters:
taskId
- id of the task, cannot be null.dueDate
- the new due date for the task- Throws:
org.flowable.common.engine.api.FlowableException
- when the task doesn't exist.
-
createTaskQuery
org.flowable.task.api.TaskQuery createTaskQuery()Returns a newTaskQuery
that can be used to dynamically query tasks.- Returns:
- the task query
-
createNativeTaskQuery
org.flowable.task.api.NativeTaskQuery createNativeTaskQuery()Returns a newNativeQuery
for tasks.- Returns:
- the native task query
-
setVariable
void setVariable(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String variableName, Object value) set variable on a task. If the variable is not already existing, it will be created in the most outer scope. This means the process instance in case this task is related to an execution.- Parameters:
taskId
- the task idvariableName
- the variable namevalue
- the value
-
setVariables
void setVariables(@NotBlank @NotBlank String taskId, @NotEmpty @NotEmpty Map<String, ? extends Object> variables) set variables on a task. If the variable is not already existing, it will be created in the most outer scope. This means the process instance in case this task is related to an execution.- Parameters:
taskId
- the task idvariables
- the variables
-
setVariableLocal
void setVariableLocal(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String variableName, Object value) set variable on a task. If the variable is not already existing, it will be created in the task.- Parameters:
taskId
- the task idvariableName
- the variable namevalue
- the value
-
setVariablesLocal
void setVariablesLocal(@NotBlank @NotBlank String taskId, @NotEmpty @NotEmpty Map<String, ? extends Object> variables) set variables on a task. If the variable is not already existing, it will be created in the task.- Parameters:
taskId
- the task idvariables
- the variables
-
queryVariables
Map<String,Object> queryVariables(@NotNull @NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) Query variable objects map.- Parameters:
taskVariableQueryModel
- the task variable query model- Returns:
- the map
-
queryVariableInstances
Map<String,org.flowable.variable.api.persistence.entity.VariableInstance> queryVariableInstances(@NotNull @NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) Query variable instances map.- Parameters:
taskVariableQueryModel
- the task variable query model- Returns:
- the map
-
getVariable
get a variables and search in the task scope and if available also the execution scopes.- Parameters:
taskVariableQueryModel
- the task variable query model- Returns:
- the variable
-
getVariable
<T> T getVariable(@NotNull @NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel, @NotNull @NotNull Class<T> variableClass) get a variables and search in the task scope and if available also the execution scopes.- Type Parameters:
T
- the type parameter- Parameters:
taskVariableQueryModel
- the task variable query modelvariableClass
- the variable class- Returns:
- the variable
-
getVariableInstance
org.flowable.variable.api.persistence.entity.VariableInstance getVariableInstance(@NotNull @NotNull HvlBpmnTaskVariableQueryModel taskVariableQueryModel) The variable. Searching for the variable is done in all scopes that are visible to the given task (including parent scopes). Returns null when no variable value is found with the given name.- Parameters:
taskVariableQueryModel
- the task variable query model- Returns:
- the variable or null if the variable is undefined.
- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no execution is found for the given taskId.
-
getVariableInstancesLocalByTaskIds
List<org.flowable.variable.api.persistence.entity.VariableInstance> getVariableInstancesLocalByTaskIds(@NotEmpty @NotEmpty Set<String> taskIds) get all variables and search only in the task scope.- Parameters:
taskIds
- the task ids- Returns:
- the variable instances local by task ids
-
hasVariable
checks whether or not the task has a variable defined with the given name, in the task scope and if available also the execution scopes.- Parameters:
taskId
- the task idvariableName
- the variable name- Returns:
- the boolean
-
hasVariableLocal
boolean hasVariableLocal(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String variableName) checks whether or not the task has a variable defined with the given name, local task scope only.- Parameters:
taskId
- the task idvariableName
- the variable name- Returns:
- the boolean
-
removeVariable
Removes the variable from the task. When the variable does not exist, nothing happens.- Parameters:
taskVariableQueryModel
- the task variable query model
-
getDataObjects
Map<String,org.flowable.engine.runtime.DataObject> getDataObjects(@NotNull @NotNull HvlBpmnTaskDataObjectQueryModel taskDataObjectQueryModel) All DataObjects visible from the given execution scope (including parent scopes).- Parameters:
taskDataObjectQueryModel
- the task data object query model- Returns:
- the DataObjects or an empty map if no such variables are found.
- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no task is found for the given taskId.
-
getDataObject
org.flowable.engine.runtime.DataObject getDataObject(@NotNull @NotNull HvlBpmnTaskDataObjectQueryModel taskDataObjectQueryModel) The DataObject. Searching for the DataObject is done in all scopes that are visible to the given task (including parent scopes). Returns null when no DataObject value is found with the given name.- Parameters:
taskDataObjectQueryModel
- the task data object query model- Returns:
- the DataObject or null if the variable is undefined.
- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no task is found for the given taskId.
-
addComment
org.flowable.engine.task.Comment addComment(String taskId, String processInstanceId, @NotBlank @NotBlank String message) Add a comment to a task and/or process instance.- Parameters:
taskId
- the task idprocessInstanceId
- the process instance idmessage
- the message- Returns:
- the comment
-
addComment
org.flowable.engine.task.Comment addComment(String taskId, String processInstanceId, String type, @NotBlank @NotBlank String message) Add a comment to a task and/or process instance with a custom type.- Parameters:
taskId
- the task idprocessInstanceId
- the process instance idtype
- the typemessage
- the message- Returns:
- the comment
-
saveComment
void saveComment(@NotNull @NotNull org.flowable.engine.task.Comment comment) Update a comment to a task and/or process instance.- Parameters:
comment
- the comment
-
getComment
Returns an individual comment with the given id. Returns null if no comment exists with the given id.- Parameters:
commentId
- the comment id- Returns:
- the comment
-
deleteComments
Removes all comments from the provided task and/or process instance- Parameters:
taskId
- the task idprocessInstanceId
- the process instance id
-
deleteComment
Removes an individual comment with the given id.- Parameters:
commentId
- the comment id- Throws:
org.flowable.common.engine.api.FlowableObjectNotFoundException
- when no comment exists with the given id.
-
getTaskComments
The comments related to the given task.- Parameters:
taskId
- the task id- Returns:
- the task comments
-
getTaskComments
List<org.flowable.engine.task.Comment> getTaskComments(@NotBlank @NotBlank String taskId, @NotBlank @NotBlank String type) The comments related to the given task of the given type.- Parameters:
taskId
- the task idtype
- the type- Returns:
- the task comments
-
getCommentsByType
All comments of a given type.- Parameters:
type
- the type- Returns:
- the comments by type
-
getTaskEvents
The all events related to the given task.- Parameters:
taskId
- the task id- Returns:
- the task events
-
getEvent
Returns an individual event with the given id. Returns null if no event exists with the given id.- Parameters:
eventId
- the event id- Returns:
- the event
-
getProcessInstanceComments
List<org.flowable.engine.task.Comment> getProcessInstanceComments(@NotBlank @NotBlank String processInstanceId) The comments related to the given process instance.- Parameters:
processInstanceId
- the process instance id- Returns:
- the process instance comments
-
getProcessInstanceComments
List<org.flowable.engine.task.Comment> getProcessInstanceComments(@NotBlank @NotBlank String processInstanceId, @NotBlank @NotBlank String type) The comments related to the given process instance.- Parameters:
processInstanceId
- the process instance idtype
- the type- Returns:
- the process instance comments
-
createAttachment
org.flowable.engine.task.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- Parameters:
attachmentType
- the attachment typetaskId
- the task idprocessInstanceId
- the process instance idattachmentName
- the attachment nameattachmentDescription
- the attachment descriptioncontent
- the content- Returns:
- the attachment
-
createAttachment
org.flowable.engine.task.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- Parameters:
attachmentType
- the attachment typetaskId
- the task idprocessInstanceId
- the process instance idattachmentName
- the attachment nameattachmentDescription
- the attachment descriptionurl
- the url- Returns:
- the attachment
-
saveAttachment
void saveAttachment(@NotNull @NotNull org.flowable.engine.task.Attachment attachment) Update the name and description of an attachment- Parameters:
attachment
- the attachment
-
getAttachment
Retrieve a particular attachment- Parameters:
attachmentId
- the attachment id- Returns:
- the attachment
-
getAttachmentContent
Retrieve stream content of a particular attachment- Parameters:
attachmentId
- the attachment id- Returns:
- the attachment content
-
getTaskAttachments
The list of attachments associated to a task- Parameters:
taskId
- the task id- Returns:
- the task attachments
-
getProcessInstanceAttachments
List<org.flowable.engine.task.Attachment> getProcessInstanceAttachments(@NotBlank @NotBlank String processInstanceId) The list of attachments associated to a process instance- Parameters:
processInstanceId
- the process instance id- Returns:
- the process instance attachments
-
deleteAttachment
Delete an attachment- Parameters:
attachmentId
- the attachment id
-
getSubTasks
The list of subtasks for this parent task- Parameters:
parentTaskId
- the parent task id- Returns:
- the sub tasks
-