Examples of ITaskWithState


Examples of org.intalio.tempo.workflow.task.traits.ITaskWithState

            createACL(action, task, roles, taskMetadataElement);

        taskMetadataElement.setFormUrl(task.getFormURL().toString());

        if (task instanceof ITaskWithState) {
            ITaskWithState taskWithState = (ITaskWithState) task;
            if (taskWithState.getState().equals(TaskState.FAILED)) {
                taskMetadataElement.setFailureCode(taskWithState.getFailureCode());
                taskMetadataElement.setFailureReason(taskWithState.getFailureReason());
            }
        }

        if (task instanceof ITaskWithDeadline) {
            ITaskWithDeadline crTask = (ITaskWithDeadline) task;
View Full Code Here

Examples of org.intalio.tempo.workflow.task.traits.ITaskWithState

            InvalidTaskStateException, AccessDeniedException {
        UserRoles credentials = _authProvider.authenticate(participantToken);
        Task task = dao.fetchTaskIfExists(taskID);
        checkIsAvailable(taskID, task, credentials);
        if (task instanceof ITaskWithState) {
            ITaskWithState taskWithState = (ITaskWithState) task;
            taskWithState.setState(TaskState.COMPLETED);
            dao.updateTask(task);
            dao.commit();
            if (_logger.isDebugEnabled())
                _logger.debug(credentials.getUserID() + " has completed the Workflow Task " + task);
        } else {
View Full Code Here

Examples of org.intalio.tempo.workflow.task.traits.ITaskWithState

        // UserRoles credentials = _authProvider.authenticate(participantToken);
        Task task = dao.fetchTaskIfExists(taskID);
        available = task instanceof ITaskWithState;
        // && task.isAvailableTo(credentials)
        if (available) {
            ITaskWithState taskWithState = (ITaskWithState) task;
            taskWithState.setState(TaskState.FAILED);
            taskWithState.setFailureCode(failureCode);
            taskWithState.setFailureReason(failureReason);
            dao.updateTask(task);
            dao.commit();
            _logger.debug(
            // credentials.getUserID() +
            " fails Workflow Task " + task + " with code: " + failureCode + " and reason: " + failureReason);
View Full Code Here

Examples of org.intalio.tempo.workflow.task.traits.ITaskWithState

            InvalidTaskStateException, AccessDeniedException {
        UserRoles credentials = _authProvider.authenticate(participantToken);
        Task task = dao.fetchTaskIfExists(taskID);
        checkIsAvailable(taskID, task, credentials);
        if (task instanceof ITaskWithState) {
            ITaskWithState taskWithState = (ITaskWithState) task;
            taskWithState.setState(TaskState.OBSOLETE);
            dao.updateTask(task);
            dao.commit();
            if (_logger.isDebugEnabled())
                _logger.debug(credentials.getUserID() + " has skiped the Workflow Task " + task);
        } else {
View Full Code Here

Examples of org.intalio.tempo.workflow.task.traits.ITaskWithState

            ACL acl = readACL(taskMetadata, action);
            authorize(resultTask, action, acl);
        }

        if (ITaskWithState.class.isAssignableFrom(taskClass)) {
            ITaskWithState taskWithState = (ITaskWithState) resultTask;
            taskWithState.setState(taskState);
            if (taskWithState.getState().equals(TaskState.FAILED)) {
                requireParameter(failureCode, "failure code");

                taskWithState.setFailureCode(failureCode);
                taskWithState.setFailureReason(failureReason == null ? "" : failureReason);
            } else {
                forbidParameter(failureCode, "failure code");
                forbidParameter(failureReason, "failure reason");
            }
        }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.