cn.schoolwow.util.module.check.jsonarray.flow.common.CheckJSONArrayNotEmptyCommonFlow Maven / Gradle / Ivy
The newest version!
package cn.schoolwow.util.module.check.jsonarray.flow.common;
import cn.schoolwow.quickflow.domain.FlowContext;
import cn.schoolwow.quickflow.flow.BusinessFlow;
import com.alibaba.fastjson.JSONArray;
import java.util.List;
public class CheckJSONArrayNotEmptyCommonFlow implements BusinessFlow {
@Override
public void executeBusinessFlow(FlowContext flowContext) throws Exception {
JSONArray array = (JSONArray) flowContext.getData("array");
if(null==array||array.isEmpty()){
flowContext.broken("列表为空");
}
}
@Override
public String name() {
return "检查JSONArray不能为空";
}
}