1.需求
2.步骤
2.1先创建用户类型
2.2在后台编辑流程主键和DCParm
LifeCycleZYQProcessor
@DCComponent(namespace = "IDaaS系统.60_测试.题目七.流程组件", displayName = "LifeCycleZYQProcessor", description = "执行添加后修改init的值为true的流程"
+ "Processor",
type = DCType.Processor)
@Component
@Scope(value = "prototype")
public class LifeCycleZYQProcessor extends AbstractDynamicComponent<NoConfig> implements
IProcessor<LifeCycleInput, ResultOutput> {
@Autowired
private SearchService searchService;
@Autowired
private DataStoreService dataStoreService;
@Override
public void init() {
}
@Override
public ResultOutput runProcess(LifeCycleInput input) {
Map data = input.getData();
data.put("init",true);
dataStoreService.updateData(data,"IDaaS系统.60_测试.题目七.Person",true);
ResultOutput resultOutput = new ResultOutput();
resultOutput.setResult(true);
return resultOutput;
}
}
LifeCycleInput
@DCParam(namespace = "IDaaS系统.60_测试.题目七.LifeCycleZYQProcessor", displayName = "AccountPwdInput")
public class LifeCycleInput {
@DCParamAttr(displayName = "数据", description = "数据-map", required = true)
public Map data;
public Map getData() {
return data;
}
public void setData(Map data) {
this.data = data;
}
}
ResultOutput
@DCParam(namespace = "IDaaS系统.60_测试.题目七.LifeCycleZYQProcessor", displayName = "ResultOutput")
public class ResultOutput {
@DCParamAttr(displayName = "Result", description = "Result", required = false)
private Boolean result;
public Boolean isResult() {
return result;
}
public Boolean getResult() {
return result;
}
public void setResult(Boolean result) {
this.result = result;
}
}
过后重启adminapplication
2.3创建流程LifeCycleTest
2.3.1编辑流程
配置流程
编辑start
编辑进程节点
编辑输入配置
编辑end
此处无end,不填
保存发布流程
2.4 创建生命周期
点击用户类型——》点击生命周期管理器——》添加流程(为刚才创建的流程)