Browse Source
# Conflicts: # blade-example-api/blade-dubbo-provider-api/pom.xml # blade-example-api/pom.xml # blade-example/blade-dubbo-consumer/pom.xml # blade-example/blade-dubbo-provider/pom.xml # blade-example/blade-easypoi/pom.xml # blade-example/blade-mq-kafka/pom.xml # blade-example/blade-mq-rabbit/pom.xml # blade-example/blade-sharding-jdbc/pom.xml # blade-example/blade-sharding-jdbc/src/main/java/org/springblade/sharding/config/ShardingConfiguration.java # blade-example/blade-sharding-jdbc/src/main/resources/application-prod.yml # blade-example/blade-sharding-jdbc/src/main/resources/application-test.yml # blade-example/blade-stream-consumer/pom.xml # blade-example/blade-websocket/pom.xml # blade-example/pom.xml # blade-service-api/logpm-basicdata-api/pom.xml # blade-service-api/logpm-factory-api/pom.xml # blade-service/logpm-aftersales/pom.xml # blade-service/logpm-aftersales/src/main/resources/liteflow/demo.el.xml # blade-service/logpm-basic/pom.xml # blade-service/logpm-basic/src/main/java/com/logpm/basic/LiteFlowTest.java # blade-service/logpm-basic/src/main/java/com/logpm/basic/feign/BasicPdaClient.java # blade-service/logpm-statisticsdata/pom.xml # blade-service/logpm-trunkline/pom.xml # blade-service/pom.xml # pom.xmltraining
pref_mail@163.com
1 year ago
30 changed files with 419 additions and 194 deletions
@ -0,0 +1,39 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.example.demo.rule; |
||||
|
||||
import com.yomahub.liteflow.annotation.LiteflowComponent; |
||||
import com.yomahub.liteflow.core.NodeComponent; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
|
||||
/** |
||||
* A业务 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Slf4j |
||||
@LiteflowComponent(id = "abizRule", name = "A业务") |
||||
public class AbizRule extends NodeComponent { |
||||
@Override |
||||
public void process() throws Exception { |
||||
|
||||
log.info("A业务执行完毕"); |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,48 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.example.demo.rule; |
||||
|
||||
import com.example.demo.rule.context.BizContext; |
||||
import com.yomahub.liteflow.annotation.LiteflowComponent; |
||||
import com.yomahub.liteflow.core.NodeSwitchComponent; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
|
||||
/** |
||||
* A业务 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Slf4j |
||||
@LiteflowComponent(id = "bbizRule", name = "B业务") |
||||
public class BbizRule extends NodeSwitchComponent { |
||||
|
||||
@Override |
||||
public String processSwitch() throws Exception { |
||||
// 获取上下文
|
||||
BizContext contextBean = this.getContextBean(BizContext.class); |
||||
// 获取条件
|
||||
Boolean isPublish = contextBean.getIsPublish(); |
||||
log.info("B业务执行判断"); |
||||
// 进行节点判断
|
||||
if (isPublish) { |
||||
return "cbizRule"; |
||||
} else { |
||||
return "dbizRule"; |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,44 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.example.demo.rule; |
||||
|
||||
import com.example.demo.rule.context.BizContext; |
||||
import com.yomahub.liteflow.annotation.LiteflowComponent; |
||||
import com.yomahub.liteflow.core.NodeComponent; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
|
||||
/** |
||||
* A业务 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Slf4j |
||||
@LiteflowComponent(id = "cbizRule", name = "C业务") |
||||
public class CbizRule extends NodeComponent { |
||||
@Override |
||||
public void process() throws Exception { |
||||
// 获取上下文
|
||||
BizContext contextBean = this.getContextBean(BizContext.class); |
||||
// 修改上下文
|
||||
contextBean.setName(contextBean.getName() + "-> C"); |
||||
|
||||
log.info("C业务执行完毕"); |
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,45 @@
|
||||
/* |
||||
* Copyright (c) 2018-2028, Chill Zhuang All rights reserved. |
||||
* |
||||
* Redistribution and use in source and binary forms, with or without |
||||
* modification, are permitted provided that the following conditions are met: |
||||
* |
||||
* Redistributions of source code must retain the above copyright notice, |
||||
* this list of conditions and the following disclaimer. |
||||
* Redistributions in binary form must reproduce the above copyright |
||||
* notice, this list of conditions and the following disclaimer in the |
||||
* documentation and/or other materials provided with the distribution. |
||||
* Neither the name of the dreamlu.net developer nor the names of its |
||||
* contributors may be used to endorse or promote products derived from |
||||
* this software without specific prior written permission. |
||||
* Author: Chill 庄骞 (smallchill@163.com) |
||||
*/ |
||||
package com.example.demo.rule; |
||||
|
||||
import com.example.demo.rule.context.BizContext; |
||||
import com.yomahub.liteflow.annotation.LiteflowComponent; |
||||
import com.yomahub.liteflow.core.NodeComponent; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
|
||||
|
||||
/** |
||||
* A业务 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Slf4j |
||||
@LiteflowComponent(id = "dbizRule", name = "D业务") |
||||
public class DbizRule extends NodeComponent { |
||||
@Override |
||||
public void process() throws Exception { |
||||
// 获取上下文
|
||||
BizContext contextBean = this.getContextBean(BizContext.class); |
||||
// 修改上下文
|
||||
contextBean.setName(contextBean.getName() + "-> D"); |
||||
|
||||
log.info("D业务执行完毕"); |
||||
|
||||
|
||||
} |
||||
|
||||
} |
@ -0,0 +1,21 @@
|
||||
package com.example.demo.rule.context; |
||||
|
||||
import lombok.Data; |
||||
|
||||
/** |
||||
* 上下文类 |
||||
* |
||||
* @author Chill |
||||
*/ |
||||
@Data |
||||
public class BizContext { |
||||
|
||||
private Long id; |
||||
|
||||
private String name; |
||||
|
||||
private Integer category; |
||||
|
||||
private Boolean isPublish; |
||||
|
||||
} |
@ -1,2 +1,2 @@
|
||||
REGISTER=192.168.0.157/blade |
||||
TAG=3.1.0.RELEASE |
||||
REGISTER=192.168.0.188/blade |
||||
TAG=3.2.0.RELEASE |
||||
|
Loading…
Reference in new issue