@Test public void unclaimTask() throws Exception { Long taskId = 500L; mockTaskService.unclaim(String.valueOf(taskId)); replayAll(); try { unit.unclaimTask(taskId); } catch (Exception e) { } verifyAll(); }
@Override @Transactional public void unclaimTask(Long taskId) throws AcmTaskException { if (taskId != null) { try { getActivitiTaskService().unclaim(String.valueOf(taskId)); } catch (ActivitiException e) { log.info("Unclaiming task failed for task with ID: [{}]", taskId); throw new AcmTaskException(e.getMessage(), e); } } }
ActivitiTaskDao extends AcmAbstractDao<AcmTask> implements TaskDao, AcmNotificationDao { @Override @Transactional public void unclaimTask(Long taskId) throws AcmTaskException { if (taskId != null) { try { getActivitiTaskService().unclaim(String.valueOf(taskId)); } catch (ActivitiException e) { log.info("Unclaiming task failed for task with ID: [{}]", taskId); throw new AcmTaskException(e.getMessage(), e); } } } }
ActivitiTaskDao extends AcmAbstractDao<AcmTask> implements TaskDao, AcmNotificationDao { @Override @Transactional public void unclaimTask(Long taskId) throws AcmTaskException { if (taskId != null) { try { getActivitiTaskService().unclaim(String.valueOf(taskId)); } catch (ActivitiException e) { log.info("Unclaiming task failed for task with ID: [{}]", taskId); throw new AcmTaskException(e.getMessage(), e); } } }  }
ActivitiTaskDao extends AcmAbstractDao<AcmTask> implements TaskDao, AcmNotificationDao { @Override @Transactional public void unclaimTask(Long taskId) throws AcmTaskException { if (taskId != null) { try { getActivitiTaskService().unclaim(String.valueOf(taskId)); } catch (ActivitiException e) { log.info("Unclaiming task failed for task with ID: [{}]", taskId); throw new AcmTaskException(e.getMessage(), e); } } }  @Override List<ProcessInstance> findProcessesByProcessVariables(Map<String, Object> matchProcessVariables); @Override boolean isProcessActive(String businessProcessId); @Override boolean isWaitingOnReceiveTask(String businessProcessId, String receiveTaskId); @Override T readProcessVariable(String businessProcessId, String processVariableKey, boolean readFromHistory); @Override void writeProcessVariable(String businessProcessId, String processVariableKey, Object processVariableValue); @Override void signalTask(String processInstanceId, String receiveTaskId); @Override void messageTask(String taskId, String messageName); @Override @Transactional AcmTask createAdHocTask(AcmTask in); @Override @Transactional AcmTask save(AcmTask in); @Override void ensureCorrectAssigneeInParticipants(AcmTask in); @Override @Transactional AcmTask completeTask(Principal userThatCompletedTheTask, Long taskId); @Override AcmTask completeTask(Principal userThatCompletedTheTask, Long taskId, String outcomePropertyName, String outcomeId); @Override @Transactional AcmTask deleteTask(Principal userThatCompletedTheTask, Long taskId); @Override List<AcmTask> tasksForUser(String user); @Override @Transactional(propagation = Propagation.REQUIRES_NEW) List<Long> findTasksIdsForParentObjectIdAndParentObjectType(String parentObjectType, Long parentObjectId); List<AcmTask> findByVariableForObjectTypeAndId(String name, String value, String objectType, Long objectId); @Override List<AcmTask> allTasks(); @Override List<AcmTask> pastDueTasks(); @Override @Transactional void claimTask(Long taskId, String userId); @Override @Transactional void unclaimTask(Long taskId); @Override @Transactional void deleteProcessInstance(String parentId, String processId, String deleteReason, Authentication authentication,
            String ipAddress); @Override List<AcmTask> dueSpecificDateTasks(NumberOfDays numberOfDaysFromToday); @Override AcmTask findById(Long taskId); @Override List<WorkflowHistoryInstance> getWorkflowHistory(String id, boolean adhoc); @Override List<AcmTask> getTasksModifiedSince(Date lastModified, int start, int pageSize); @Override void createFolderForTaskEvent(AcmTask task); @Override AcmTask acmTaskFromActivitiTask(Task activitiTask); @Override AcmTask acmTaskFromActivitiTask(Task activitiTask, Map<String, Object> processVariables, Map<String, Object> localVariables); @Override AcmTask acmTaskFromActivitiTask(Task activitiTask, Map<String, Object> processVariables, Map<String, Object> localVariables,
            String taskEventName); @Override byte[] getDiagram(Long id); @Override byte[] getDiagram(String processId); @Override AcmTask startBusinessProcess(Map<String, Object> pVars, String businessProcessName); RuntimeService getActivitiRuntimeService(); void setActivitiRuntimeService(RuntimeService activitiRuntimeService); TaskService getActivitiTaskService(); void setActivitiTaskService(TaskService activitiTaskService); RepositoryService getActivitiRepositoryService(); void setActivitiRepositoryService(RepositoryService activitiRepositoryService); HistoryService getActivitiHistoryService(); void setActivitiHistoryService(HistoryService activitiHistoryService); Map<String, Integer> getPriorityLevelToNumberMap(); void setPriorityLevelToNumberMap(Map<String, Integer> priorityLevelToNumberMap); Map<String, List<String>> getRequiredFieldsPerOutcomeMap(); void setRequiredFieldsPerOutcomeMap(Map<String, List<String>> requiredFieldsPerOutcomeMap); UserDao getUserDao(); void setUserDao(UserDao userDao); AcmParticipantDao getParticipantDao(); void setParticipantDao(AcmParticipantDao participantDao); DataAccessPrivilegeListener getDataAccessPrivilegeListener(); void setDataAccessPrivilegeListener(DataAccessPrivilegeListener dataAccessPrivilegeListener); TaskBusinessRule getTaskBusinessRule(); void setTaskBusinessRule(TaskBusinessRule taskBusinessRule); EcmFileService getFileService(); void setFileService(EcmFileService fileService); AcmContainerDao getContainerFolderDao(); void setContainerFolderDao(AcmContainerDao containerFolderDao); EcmFileDao getFileDao(); void setFileDao(EcmFileDao fileDao); AuditPropertyEntityAdapter getAuditPropertyEntityAdapter(); void setAuditPropertyEntityAdapter(AuditPropertyEntityAdapter auditPropertyEntityAdapter); TaskEventPublisher getTaskEventPublisher(); void setTaskEventPublisher(TaskEventPublisher taskEventPublisher); ObjectConverter getObjectConverter(); void setObjectConverter(ObjectConverter objectConverter); @Override AcmNotifiableEntity findEntity(Long id); @Override String getSupportedNotifiableObjectType(); EcmFileParticipantService getFileParticipantService(); void setFileParticipantService(EcmFileParticipantService fileParticipantService); @Override String getSupportedObjectType(); @Override AcmTask find(Long id); @Override List<AcmTask> findAll(); @Override List<AcmTask> findAllOrderBy(String column); @Override List<AcmTask> findModifiedSince(Date lastModified, int startRow, int pageSize); @Override TypedQuery<AcmTask> getSortedQuery(String sort); }
ActivitiTaskDao extends AcmAbstractDao<AcmTask> implements TaskDao, AcmNotificationDao { @Override @Transactional public void unclaimTask(Long taskId) throws AcmTaskException { if (taskId != null) { try { getActivitiTaskService().unclaim(String.valueOf(taskId)); } catch (ActivitiException e) { log.info("Unclaiming task failed for task with ID: [{}]", taskId); throw new AcmTaskException(e.getMessage(), e); } } }  @Override List<ProcessInstance> findProcessesByProcessVariables(Map<String, Object> matchProcessVariables); @Override boolean isProcessActive(String businessProcessId); @Override boolean isWaitingOnReceiveTask(String businessProcessId, String receiveTaskId); @Override T readProcessVariable(String businessProcessId, String processVariableKey, boolean readFromHistory); @Override void writeProcessVariable(String businessProcessId, String processVariableKey, Object processVariableValue); @Override void signalTask(String processInstanceId, String receiveTaskId); @Override void messageTask(String taskId, String messageName); @Override @Transactional AcmTask createAdHocTask(AcmTask in); @Override @Transactional AcmTask save(AcmTask in); @Override void ensureCorrectAssigneeInParticipants(AcmTask in); @Override @Transactional AcmTask completeTask(Principal userThatCompletedTheTask, Long taskId); @Override AcmTask completeTask(Principal userThatCompletedTheTask, Long taskId, String outcomePropertyName, String outcomeId); @Override @Transactional AcmTask deleteTask(Principal userThatCompletedTheTask, Long taskId); @Override List<AcmTask> tasksForUser(String user); @Override @Transactional(propagation = Propagation.REQUIRES_NEW) List<Long> findTasksIdsForParentObjectIdAndParentObjectType(String parentObjectType, Long parentObjectId); List<AcmTask> findByVariableForObjectTypeAndId(String name, String value, String objectType, Long objectId); @Override List<AcmTask> allTasks(); @Override List<AcmTask> pastDueTasks(); @Override @Transactional void claimTask(Long taskId, String userId); @Override @Transactional void unclaimTask(Long taskId); @Override @Transactional void deleteProcessInstance(String parentId, String processId, String deleteReason, Authentication authentication,
            String ipAddress); @Override List<AcmTask> dueSpecificDateTasks(NumberOfDays numberOfDaysFromToday); @Override AcmTask findById(Long taskId); @Override List<WorkflowHistoryInstance> getWorkflowHistory(String id, boolean adhoc); @Override List<AcmTask> getTasksModifiedSince(Date lastModified, int start, int pageSize); @Override void createFolderForTaskEvent(AcmTask task); @Override AcmTask acmTaskFromActivitiTask(Task activitiTask); @Override AcmTask acmTaskFromActivitiTask(Task activitiTask, Map<String, Object> processVariables, Map<String, Object> localVariables); @Override AcmTask acmTaskFromActivitiTask(Task activitiTask, Map<String, Object> processVariables, Map<String, Object> localVariables,
            String taskEventName); @Override byte[] getDiagram(Long id); @Override byte[] getDiagram(String processId); @Override AcmTask startBusinessProcess(Map<String, Object> pVars, String businessProcessName); RuntimeService getActivitiRuntimeService(); void setActivitiRuntimeService(RuntimeService activitiRuntimeService); TaskService getActivitiTaskService(); void setActivitiTaskService(TaskService activitiTaskService); RepositoryService getActivitiRepositoryService(); void setActivitiRepositoryService(RepositoryService activitiRepositoryService); HistoryService getActivitiHistoryService(); void setActivitiHistoryService(HistoryService activitiHistoryService); Map<String, Integer> getPriorityLevelToNumberMap(); void setPriorityLevelToNumberMap(Map<String, Integer> priorityLevelToNumberMap); Map<String, List<String>> getRequiredFieldsPerOutcomeMap(); void setRequiredFieldsPerOutcomeMap(Map<String, List<String>> requiredFieldsPerOutcomeMap); UserDao getUserDao(); void setUserDao(UserDao userDao); AcmParticipantDao getParticipantDao(); void setParticipantDao(AcmParticipantDao participantDao); DataAccessPrivilegeListener getDataAccessPrivilegeListener(); void setDataAccessPrivilegeListener(DataAccessPrivilegeListener dataAccessPrivilegeListener); TaskBusinessRule getTaskBusinessRule(); void setTaskBusinessRule(TaskBusinessRule taskBusinessRule); EcmFileService getFileService(); void setFileService(EcmFileService fileService); AcmContainerDao getContainerFolderDao(); void setContainerFolderDao(AcmContainerDao containerFolderDao); EcmFileDao getFileDao(); void setFileDao(EcmFileDao fileDao); AuditPropertyEntityAdapter getAuditPropertyEntityAdapter(); void setAuditPropertyEntityAdapter(AuditPropertyEntityAdapter auditPropertyEntityAdapter); TaskEventPublisher getTaskEventPublisher(); void setTaskEventPublisher(TaskEventPublisher taskEventPublisher); ObjectConverter getObjectConverter(); void setObjectConverter(ObjectConverter objectConverter); @Override AcmNotifiableEntity findEntity(Long id); @Override String getSupportedNotifiableObjectType(); EcmFileParticipantService getFileParticipantService(); void setFileParticipantService(EcmFileParticipantService fileParticipantService); @Override String getSupportedObjectType(); @Override AcmTask find(Long id); @Override List<AcmTask> findAll(); @Override List<AcmTask> findAllOrderBy(String column); @Override List<AcmTask> findModifiedSince(Date lastModified, int startRow, int pageSize); @Override TypedQuery<AcmTask> getSortedQuery(String sort);  }