Package com.mossle.bpm.persistence.domain

Examples of com.mossle.bpm.persistence.domain.BpmConfForm


    }

    @RequestMapping("bpm-conf-form-save")
    public String save(@ModelAttribute BpmConfForm bpmConfForm,
            @RequestParam("bpmConfNodeId") Long bpmConfNodeId) {
        BpmConfForm dest = bpmConfFormManager.findUnique(
                "from BpmConfForm where bpmConfNode.id=?", bpmConfNodeId);

        if (dest == null) {
            // 如果不存在,就创建一个
            bpmConfForm.setBpmConfNode(bpmConfNodeManager.get(bpmConfNodeId));
            bpmConfForm.setStatus(1);
            bpmConfFormManager.save(bpmConfForm);
        } else {
            dest.setValue(bpmConfForm.getValue());
            dest.setType(bpmConfForm.getType());
            dest.setStatus(1);
            bpmConfFormManager.save(dest);
        }

        return "redirect:/bpm/bpm-conf-form-list.do?bpmConfNodeId="
                + bpmConfNodeId;
View Full Code Here


                + bpmConfNodeId;
    }

    @RequestMapping("bpm-conf-form-remove")
    public String remove(@RequestParam("id") Long id) {
        BpmConfForm bpmConfForm = bpmConfFormManager.get(id);
        Long bpmConfNodeId = bpmConfForm.getBpmConfNode().getId();

        if (bpmConfForm.getStatus() == 0) {
            bpmConfForm.setStatus(2);
            bpmConfFormManager.save(bpmConfForm);
        } else if (bpmConfForm.getStatus() == 2) {
            bpmConfForm.setStatus(1);
            bpmConfFormManager.save(bpmConfForm);
        } else if (bpmConfForm.getStatus() == 1) {
            if (bpmConfForm.getOriginValue() == null) {
                bpmConfFormManager.remove(bpmConfForm);
            } else {
                bpmConfForm.setStatus(0);
                bpmConfForm.setValue(bpmConfForm.getOriginValue());
                bpmConfForm.setType(bpmConfForm.getOriginType());
                bpmConfFormManager.save(bpmConfForm);
            }
        }

        return "redirect:/bpm/bpm-conf-form-list.do?bpmConfNodeId="
View Full Code Here

        if (userTask.getFormKey() == null) {
            return;
        }

        BpmConfFormManager bpmConfFormManager = getBpmConfFormManager();
        BpmConfForm bpmConfForm = bpmConfFormManager.findUnique(
                "from BpmConfForm where bpmConfNode=?", bpmConfNode);

        if (bpmConfForm == null) {
            bpmConfForm = new BpmConfForm();
            bpmConfForm.setValue(userTask.getFormKey());
            bpmConfForm.setType(0);
            bpmConfForm.setOriginValue(userTask.getFormKey());
            bpmConfForm.setOriginType(0);
            bpmConfForm.setStatus(0);
            bpmConfForm.setBpmConfNode(bpmConfNode);
            bpmConfFormManager.save(bpmConfForm);
        }
    }
View Full Code Here

TOP

Related Classes of com.mossle.bpm.persistence.domain.BpmConfForm

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.