package com.changhong.autoform.rest.workFlow; import com.changhong.autoform.constant.data.DataUrl; import com.changhong.autoform.core.filter.AutoFormProcessStateFilter; import com.changhong.autoform.entity.WorkFlowStateEntity; import com.changhong.autoform.entity.system.RestResult; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import javax.annotation.Resource; /** * 流程相关 * @author yuezhw */ @RestController public class WorkFlowRest implements DataUrl { /** * 在费用云具体实现的 */ @Resource private AutoFormProcessStateFilter autoFormProcessStateFilter; /** * 过滤流程实例结束 */ @RequestMapping(WORKFLOW_OVER) public RestResult filterWorkFlowOver(@RequestBody WorkFlowStateEntity workFlowStateEntity){ return (autoFormProcessStateFilter.filterWorkFlowOver(workFlowStateEntity)); } /** * 流程执行前验证 */ @RequestMapping(WORKFLOW_BEFOR) public RestResult filterWorkFlowBefor(@RequestBody WorkFlowStateEntity workFlowStateEntity){ return (autoFormProcessStateFilter.filterWorkFlowBefor(workFlowStateEntity)); } /** * 流程执行后验证 */ @RequestMapping(WORKFLOW_AFTER) public RestResult filterWorkFlowAfter(@RequestBody WorkFlowStateEntity workFlowStateEntity){ return (autoFormProcessStateFilter.filterWorkFlowAfter(workFlowStateEntity)); } /** * 流程创建后 */ @RequestMapping(WORKFLOW_CREATE) public RestResult filterWorkFlowCreate(@RequestBody WorkFlowStateEntity workFlowStateEntity){ return (autoFormProcessStateFilter.filterWorkFlowCreate(workFlowStateEntity)); } /** * 流程退回后回滚 */ @RequestMapping(WORKFLOW_ROLLBACK) public RestResult filterWorkFlowRollback(@RequestBody WorkFlowStateEntity workFlowStateEntity){ return (autoFormProcessStateFilter.filterWorkFlowRollback(workFlowStateEntity)); } }