Package org.dspace.xmlworkflow.state.actions

Examples of org.dspace.xmlworkflow.state.actions.WorkflowActionConfig


    public WorkflowActionConfig getActionConfig(String actionID) {
        if(actionConfigsMap.get(actionID)!=null){
            return actionConfigsMap.get(actionID);
        }else{
            WorkflowActionConfig action = WorkflowFactory.createWorkflowActionConfig(actionID);
            action.setStep(this);
            actionConfigsMap.put(actionID, action);
            return action;
        }
    }
View Full Code Here


     * Boolean that returns whether or not the actions in this step have a ui
     * @return a boolean
     */
    public boolean hasUI(){
        for (String actionConfigId : actionConfigsList) {
            WorkflowActionConfig actionConfig = getActionConfig(actionConfigId);
            if (actionConfig.requiresUI()) {
                return true;
            }
        }
        return false;
    }
View Full Code Here

    @Override
    public ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, HttpServletRequest request) throws SQLException, AuthorizeException, IOException {
        try {
            Role role = getParent().getStep().getRole();
            if(role != null){
                WorkflowActionConfig nextAction = getParent().getStep().getNextAction(this.getParent());
                //Retrieve the action which has a user interface
                while(nextAction != null && !nextAction.requiresUI()){
                    nextAction = nextAction.getStep().getNextAction(nextAction);
                }

                if(nextAction != null){
                    WorkflowItemRole[] workflowItemRoles = WorkflowItemRole.find(c, wfi.getID(), role.getId());
                    for (WorkflowItemRole workflowItemRole : workflowItemRoles) {
View Full Code Here

    @Override
    public ActionResult execute(Context c, XmlWorkflowItem wfi, Step step, HttpServletRequest request) throws SQLException, AuthorizeException, IOException, WorkflowException {
        EPerson submitter = wfi.getSubmitter();
        Step currentStep = getParent().getStep();
        WorkflowActionConfig nextAction = getParent().getStep().getNextAction(this.getParent());
        //Retrieve the action which has a user interface
        while(nextAction != null && !nextAction.requiresUI()){
            nextAction = nextAction.getStep().getNextAction(nextAction);
        }

        createTaskForEPerson(c, wfi, step, nextAction, submitter);

        //It is important that we return to the submission page since we will continue our actions with the submitter
View Full Code Here

            {
                PoolTask poolTask = PoolTask.findByWorkflowIdAndEPerson(context, workflowID, context.getCurrentUser().getID());
                XmlWorkflowItem workflowItem = XmlWorkflowItem.find(context, workflowID);
                Workflow workflow = WorkflowFactory.getWorkflow(workflowItem.getCollection());

                WorkflowActionConfig currentAction = workflow.getStep(poolTask.getStepID()).getActionConfig(poolTask.getActionID());
                XmlWorkflowManager.doState(context, context.getCurrentUser(), request, workflowID, workflow, currentAction);
            }
            context.commit();
        }
View Full Code Here

                XmlWorkflowItem item = null;
                try {
                    item = XmlWorkflowItem.find(context, workflowItemID);
                    Workflow wf = WorkflowFactory.getWorkflow(item.getCollection());
                    Step step = wf.getStep(stepID);
                    WorkflowActionConfig action = step.getActionConfig(actionID);
                    String url = contextPath+"/handle/"+item.getCollection().getHandle()+"/xmlworkflow?workflowID="+workflowItemID+"&stepID="+stepID+"&actionID="+actionID;
                    Metadatum[] titles = item.getItem().getDC("title", null, Item.ANY);
                    String collectionName = item.getCollection().getMetadata("name");
                    EPerson submitter = item.getSubmitter();
                    String submitterName = submitter.getFullName();
View Full Code Here

TOP

Related Classes of org.dspace.xmlworkflow.state.actions.WorkflowActionConfig

Copyright © 2018 www.massapicom. 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.