package com.zcxk.process.activiti.model;

import com.alibaba.fastjson.JSON;

import java.util.List;

/**
 * 任务扩展配置
 *
 * @author wilian.peng
 * @Description
 * @date 2019年7月13日 下午5:06:44
 */
public class TaskExtendConfig {
    private List<RejectConfig> rejectConfig;

    public List<RejectConfig> getRejectConfig() {
        return rejectConfig;
    }

    public void setRejectConfig(List<RejectConfig> rejectConfig) {
        this.rejectConfig = rejectConfig;
    }

    public static void main(String[] args) {
        String jsonStr = "{\"rejectConfig\":[{\"from\":\"usertask2\",\"assignee\":\"handler\"},{\"from\":\"usertask3\",\"assignee\":\"claimer\"}]}";
        TaskExtendConfig config = JSON.parseObject(jsonStr, TaskExtendConfig.class);
        List<RejectConfig> rejectConfigList = config.getRejectConfig();
        for (RejectConfig cfg : rejectConfigList) {
            System.out.println("cfg.from:" + cfg.getFrom());
            System.out.println("cfg.assignee:" + cfg.getAssignee());
        }
    }
}
