| | |
| | | package org.springblade.mdm.flow.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import io.swagger.v3.oas.annotations.Operation; |
| | | import io.swagger.v3.oas.annotations.Parameter; |
| | | import io.swagger.v3.oas.annotations.tags.Tag; |
| | |
| | | import org.flowable.engine.RuntimeService; |
| | | import org.flowable.engine.TaskService; |
| | | import org.flowable.engine.runtime.ProcessInstance; |
| | | import org.flowable.task.api.Task; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.secure.utils.AuthUtil; |
| | | import org.springblade.core.tool.api.IResultCode; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springblade.core.tool.utils.StringUtil; |
| | | import org.springblade.mdm.flow.constants.FlowContants; |
| | | import org.springblade.mdm.flow.entity.TaskDispatch; |
| | | import org.springblade.mdm.flow.excution.StartDispatcher; |
| | |
| | | dispatch.setStatus(TaskDispatch.STATUS_EXCEPTION); |
| | | dispatch.setErrMsg(e.getMessage()); |
| | | taskDispatchService.updateById(dispatch); |
| | | return R.fail("任务启动异常:"+e.getMessage()); |
| | | //return R.fail("任务启动异常:"+e.getMessage()); |
| | | return R.fail(new IResultCode() { |
| | | @Override |
| | | public String getMessage() { |
| | | return e.getMessage(); |
| | | } |
| | | |
| | | @Override |
| | | public int getCode() { |
| | | return 201; |
| | | } |
| | | }); |
| | | } |
| | | }catch(Exception e){ |
| | | return R.fail(e.getMessage()); |
| | | return R.fail(new IResultCode() { |
| | | @Override |
| | | public String getMessage() { |
| | | return e.getMessage(); |
| | | } |
| | | |
| | | @Override |
| | | public int getCode() { |
| | | return 201; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |