Skip to content

Commit

Permalink
Update DefinitionProcessor.java
Browse files Browse the repository at this point in the history
fix: flow_model has no default data when createFlow.

close didi#47.
  • Loading branch information
trdmm authored Jun 14, 2023
1 parent b796e88 commit efc7eee
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,15 @@ public class DefinitionProcessor {

public CreateFlowResult create(CreateFlowParam createFlowParam) {
CreateFlowResult createFlowResult = new CreateFlowResult();
List<FlowElement> flowElementList = Lists.newArrayList();
try {
ParamValidator.validate(createFlowParam);

FlowDefinitionPO flowDefinitionPO = new FlowDefinitionPO();
BeanUtils.copyProperties(createFlowParam, flowDefinitionPO);
String flowModuleId = idGenerator.getNextId();
flowDefinitionPO.setFlowModuleId(flowModuleId);
flowDefinitionPO.setFlowModel(JSON.toJSONString(flowElementList));
flowDefinitionPO.setStatus(FlowDefinitionStatus.INIT);
Date date = new Date();
flowDefinitionPO.setCreateTime(date);
Expand Down

0 comments on commit efc7eee

Please sign in to comment.