Examples of WorkflowDefinition


Examples of org.jahia.services.workflow.WorkflowDefinition

    public List<User> findUsersById(String... strings) {
        SortedSet<User> emails = new TreeSet<User>();
        try {
            ExecutionImpl execution = ((ExecutionContext)EnvironmentImpl.getCurrent().getContext("execution")).getExecution();
            WorkflowDefinition def = (WorkflowDefinition) execution.getVariable("workflow");
            String id = (String) execution.getVariable("nodeId");
            for (String userId : strings) {
                if (userId.equals("previousTaskAssignable")) {
                    JCRNodeWrapper node = JCRSessionFactory.getInstance().getCurrentUserSession().getNodeByUUID(id);
                    List<JahiaPrincipal> principals = WorkflowService.getInstance().getAssignedRole(node, def,
View Full Code Here

Examples of org.jahia.services.workflow.WorkflowDefinition

    /**
     * sets the actorId and candidates for the given task.
     */
    public void assign(Assignable assignable, OpenExecution execution) throws Exception {

        WorkflowDefinition def = (WorkflowDefinition) execution.getVariable("workflow");
        String id = (String) execution.getVariable("nodeId");
        JCRNodeWrapper node = JCRSessionFactory.getInstance().getCurrentUserSession().getNodeByUUID(id);
        String name = null;
        if (assignable instanceof TaskImpl) {
            name = ((TaskImpl)assignable).getActivityName();
View Full Code Here

Examples of org.jahia.services.workflow.WorkflowDefinition

        }
    }

    private SortedSet<String> getAssignables(ExecutionImpl exe, String s) throws RepositoryException {
        SortedSet<String> emails = new TreeSet<String>();
        WorkflowDefinition def = (WorkflowDefinition) exe.getVariable("workflow");
        String id = (String) exe.getVariable("nodeId");
        JCRNodeWrapper node = JCRSessionFactory.getInstance().getCurrentUserSession().getNodeByUUID(id);
        List<JahiaPrincipal> principals = WorkflowService.getInstance().getAssignedRole(node, def,
                exe.getActivity().getDefaultOutgoingTransition().getDestination().getName(), exe.getProcessInstance().getId());
        for (JahiaPrincipal principal : principals) {
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.