Camunda Modeler给流程模型设置流程变量及默认值

2023-11-07

        如下图所示,在提单页面,发起人需要手动选择走部门内分组审核还是部门负责人审核,对于这种由发起人选择走不同分支的且分支条件不是来自业务系统的情形,需要在流程模型上设置变量并赋初始化值,下面介绍如何设置及使用。

<?xml version="1.0" encoding="UTF-8"?>
<bpmn:definitions xmlns:bpmn="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:camunda="http://camunda.org/schema/1.0/bpmn" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0kg5kad" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.9.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.15.0">
  <bpmn:process id="Process_Demo11" isExecutable="true">
    <bpmn:startEvent id="StartEvent_1" name="开始事件" camunda:initiator="starter">
      <bpmn:outgoing>Flow_1w8hx7u</bpmn:outgoing>
    </bpmn:startEvent>
    <bpmn:sequenceFlow id="Flow_1w8hx7u" sourceRef="StartEvent_1" targetRef="Activity_1drnsx4" />
    <bpmn:userTask id="Activity_06ntta4" name="起草" camunda:assignee="${starter}">
      <bpmn:incoming>Flow_06hawzz</bpmn:incoming>
      <bpmn:outgoing>Flow_1us3p2e</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_1us3p2e" sourceRef="Activity_06ntta4" targetRef="Gateway_0a7spma" />
    <bpmn:inclusiveGateway id="Gateway_0a7spma" name="发起人选择">
      <bpmn:incoming>Flow_1us3p2e</bpmn:incoming>
      <bpmn:outgoing>Flow_0dm15h8</bpmn:outgoing>
      <bpmn:outgoing>Flow_1d5313z</bpmn:outgoing>
    </bpmn:inclusiveGateway>
    <bpmn:sequenceFlow id="Flow_0dm15h8" name="1" sourceRef="Gateway_0a7spma" targetRef="Activity_1h2epaw">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${para_var.indexOf("1") &gt; -1}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:exclusiveGateway id="Gateway_1t7zl4t">
      <bpmn:incoming>Flow_0ydcrpn</bpmn:incoming>
      <bpmn:incoming>Flow_1d5313z</bpmn:incoming>
      <bpmn:outgoing>Flow_1y299hk</bpmn:outgoing>
    </bpmn:exclusiveGateway>
    <bpmn:sequenceFlow id="Flow_0ydcrpn" sourceRef="Activity_1h2epaw" targetRef="Gateway_1t7zl4t" />
    <bpmn:sequenceFlow id="Flow_1d5313z" name="0" sourceRef="Gateway_0a7spma" targetRef="Gateway_1t7zl4t">
      <bpmn:conditionExpression xsi:type="bpmn:tFormalExpression">${para_var.indexOf("0") &gt; -1}</bpmn:conditionExpression>
    </bpmn:sequenceFlow>
    <bpmn:userTask id="Activity_1h2epaw" name="部门内分组审核">
      <bpmn:incoming>Flow_0dm15h8</bpmn:incoming>
      <bpmn:outgoing>Flow_0ydcrpn</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_1y299hk" sourceRef="Gateway_1t7zl4t" targetRef="Activity_09moh95" />
    <bpmn:userTask id="Activity_0ccrd9s" name="HR审批">
      <bpmn:incoming>Flow_06cclke</bpmn:incoming>
      <bpmn:outgoing>Flow_097rgey</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:endEvent id="Event_1jkyih3" name="结束事件">
      <bpmn:incoming>Flow_097rgey</bpmn:incoming>
    </bpmn:endEvent>
    <bpmn:userTask id="Activity_09moh95" name="部门负责人审核">
      <bpmn:incoming>Flow_1y299hk</bpmn:incoming>
      <bpmn:outgoing>Flow_06cclke</bpmn:outgoing>
    </bpmn:userTask>
    <bpmn:sequenceFlow id="Flow_06cclke" sourceRef="Activity_09moh95" targetRef="Activity_0ccrd9s" />
    <bpmn:sequenceFlow id="Flow_097rgey" sourceRef="Activity_0ccrd9s" targetRef="Event_1jkyih3" />
    <bpmn:sequenceFlow id="Flow_06hawzz" sourceRef="Activity_1drnsx4" targetRef="Activity_06ntta4" />
    <bpmn:task id="Activity_1drnsx4" name="初始化">
      <bpmn:extensionElements>
        <camunda:inputOutput>
          <camunda:outputParameter name="para_var">0,1</camunda:outputParameter>
        </camunda:inputOutput>
      </bpmn:extensionElements>
      <bpmn:incoming>Flow_1w8hx7u</bpmn:incoming>
      <bpmn:outgoing>Flow_06hawzz</bpmn:outgoing>
    </bpmn:task>
  </bpmn:process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_1">
    <bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_Demo11">
      <bpmndi:BPMNEdge id="Flow_1y299hk_di" bpmnElement="Flow_1y299hk">
        <di:waypoint x="885" y="277" />
        <di:waypoint x="970" y="277" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1d5313z_di" bpmnElement="Flow_1d5313z">
        <di:waypoint x="655" y="277" />
        <di:waypoint x="835" y="277" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="742" y="259" width="7" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0ydcrpn_di" bpmnElement="Flow_0ydcrpn">
        <di:waypoint x="790" y="148" />
        <di:waypoint x="860" y="148" />
        <di:waypoint x="860" y="252" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_0dm15h8_di" bpmnElement="Flow_0dm15h8">
        <di:waypoint x="630" y="252" />
        <di:waypoint x="630" y="148" />
        <di:waypoint x="690" y="148" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="642" y="197" width="7" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1us3p2e_di" bpmnElement="Flow_1us3p2e">
        <di:waypoint x="530" y="277" />
        <di:waypoint x="605" y="277" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_1w8hx7u_di" bpmnElement="Flow_1w8hx7u">
        <di:waypoint x="198" y="277" />
        <di:waypoint x="260" y="277" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_06cclke_di" bpmnElement="Flow_06cclke">
        <di:waypoint x="1070" y="277" />
        <di:waypoint x="1180" y="277" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_097rgey_di" bpmnElement="Flow_097rgey">
        <di:waypoint x="1280" y="277" />
        <di:waypoint x="1372" y="277" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge id="Flow_06hawzz_di" bpmnElement="Flow_06hawzz">
        <di:waypoint x="360" y="277" />
        <di:waypoint x="430" y="277" />
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNShape id="Gateway_0ap0c50_di" bpmnElement="Gateway_0a7spma">
        <dc:Bounds x="605" y="252" width="50" height="50" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="605" y="309" width="55" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Gateway_1t7zl4t_di" bpmnElement="Gateway_1t7zl4t" isMarkerVisible="true">
        <dc:Bounds x="835" y="252" width="50" height="50" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_16za7az_di" bpmnElement="Activity_1h2epaw">
        <dc:Bounds x="690" y="108" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0yynbrt_di" bpmnElement="Activity_09moh95">
        <dc:Bounds x="970" y="237" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0rfuc5g_di" bpmnElement="Activity_0ccrd9s">
        <dc:Bounds x="1180" y="237" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Event_1370nng_di" bpmnElement="Event_1jkyih3">
        <dc:Bounds x="1372" y="259" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="1368" y="302" width="44" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
        <dc:Bounds x="162" y="259" width="36" height="36" />
        <bpmndi:BPMNLabel>
          <dc:Bounds x="158" y="302" width="44" height="14" />
        </bpmndi:BPMNLabel>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_0mhth21_di" bpmnElement="Activity_1drnsx4">
        <dc:Bounds x="260" y="237" width="100" height="80" />
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape id="Activity_1b73k2c_di" bpmnElement="Activity_06ntta4">
        <dc:Bounds x="430" y="237" width="100" height="80" />
      </bpmndi:BPMNShape>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</bpmn:definitions>

        Camunda Modeler没有在流程属性上设置全局变量功能,我们这里借助一个Task初始化节点来实现,在初始化节点处设置输出变量para_var,默认值为“0,1”,在流程模型的变量信息处能看到所有输出变量信息。

        注:只有输出变量的作用域是全局的,输入变量的作用域是只对当前节点的

 

 

       包容网关分支条件设置,para_var包含1,则走部门内分组审核,包含0则走部门负责人审核。

        创建流程并检查返回变量

	@Test
	public void createProcess() {
		try {
			String processDefKey = "Process_Demo11";
			String userId = "bx1";
			AuthenticationService authenticationService = new AuthenticationService();
			// 获取当前流程引擎的名称
			String engineName = processEngine.getName();
			// 用户无密码登录
			UserAuthentication authentication = (UserAuthentication) authenticationService
					.createAuthenticate(engineName, userId, null, null);
			//设置当前用户为操作人
			identityService.setAuthenticatedUserId(authentication.getName());
			// 创建流程
			ProcessInstance processInstance = runtimeService.startProcessInstanceByKey(processDefKey);
			//流程创建成功获取变量信息
			if (processInstance != null && StringUtils.isNotBlank(processInstance.getId())) {
				Map<String, Object> vars = runtimeService.getVariables(processInstance.getId());
				logger.info(JSON.toJSONString(vars));
			} else {
				throw new Exception("创建流程实例失败");
			}
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

         查看打印日志,有该流程实例的流程全局变量返回

2021-09-03 21:50:45,885 [main] INFO  org.camunda.bpm.DemoApplicationTest:682 - {"starter":"bx1","para_var":"0,1"}

         在Cockpit里也能看到,流程发起后初始化节点自动执行了,并且为该流程实例设置了变量para_var

        然后通过获取下一节点方法,获取到起草节点后的节点。

[
    {
        "assignment":"",
        "name":"部门内分组审核",
        "key":"Activity_1h2epaw"
    },
    {
        "assignment":"",
        "name":"部门负责人审核",
        "key":"Activity_09moh95"
    }
]

        起草人在选定好对应的节点和节点处理人后提交到对应分支执行,下面示例将para_var=1来表示实现流转到“部门内分组审核”节点

        思考:是否有其他方法实现呢?

	@Test
	public void submitTask3() {
		try {

			String userId = "bx1";
			String taskId = "a20e9285-0cc4-11ec-b197-00ff0269ba71";
			String processInstId = "a1f64f8b-0cc4-11ec-b197-00ff0269ba71";
			String nextUserId = "bx2";
			AuthenticationService authenticationService = new AuthenticationService();
			String engineName = processEngine.getName();
			UserAuthentication authentication = (UserAuthentication) authenticationService
					.createAuthenticate(engineName, userId, null, null);
			logger.info("authentication--------->" + authentication.getName());

			identityService.setAuthenticatedUserId(authentication.getName());
			List<TaskDto> taskList = new ArrayList<TaskDto>();
			//目标节点的分支变量为1
			runtimeService.setVariable(processInstId, "para_var", "1");
			//完成任务
			taskService.complete(taskId);

			taskList = simpleGetTasks(processInstId);

			System.out.println(JSON.toJSONString(taskList));
			if (taskList != null && taskList.size() == 1) {
				//设置目标节点处理人
				taskService.setAssignee(taskList.get(0).getId(), nextUserId);
			}
			taskList = simpleGetTasks(processInstId);
			System.out.println(JSON.toJSONString(taskList));

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

        提交后,流程流转到“部门内分组审核”,对应审批人为"bx2",流程变量para_var为“1”。

        任务操作记录能看到是有bx1发给bx2的。

        若将para_var修改为0,处理人为“bx3”,查看Cockpit里边,发现流程流转符合预期,流转到“部门负责人审核”节点,任务是由bx1发给bx3的。

@Test
	public void submitTask3() {
		try {

			String userId = "bx1";
			String taskId = "7b1fc48b-0cc6-11ec-bd79-00ff0269ba71";
			String processInstId = "7afea7f1-0cc6-11ec-bd79-00ff0269ba71";
			String nextUserId = "bx3";
			AuthenticationService authenticationService = new AuthenticationService();
			String engineName = processEngine.getName();
			UserAuthentication authentication = (UserAuthentication) authenticationService
					.createAuthenticate(engineName, userId, null, null);
			logger.info("authentication--------->" + authentication.getName());

			identityService.setAuthenticatedUserId(authentication.getName());
			List<TaskDto> taskList = new ArrayList<TaskDto>();
			//目标节点的分支变量为1
			runtimeService.setVariable(processInstId, "para_var", "0");
			//完成任务
			taskService.complete(taskId);

			taskList = simpleGetTasks(processInstId);

			System.out.println(JSON.toJSONString(taskList));
			if (taskList != null && taskList.size() == 1) {
				//设置目标节点处理人
				taskService.setAssignee(taskList.get(0).getId(), nextUserId);
			}
			taskList = simpleGetTasks(processInstId);
			System.out.println(JSON.toJSONString(taskList));

		} catch (Exception e) {
			e.printStackTrace();
		}
	}

        

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

Camunda Modeler给流程模型设置流程变量及默认值 的相关文章

  • Java中ArrayList的交集和并集

    有什么方法可以做到这一点吗 我正在寻找 但没有找到 另一个问题 我需要这些方法 以便我可以过滤文件 有些是AND过滤器 有些是OR过滤器 就像集合论中的那样 所以我需要根据所有文件和保存这些文件的联合 相交 ArrayList 进行过滤 我
  • 如何让 BlazeDS 忽略属性?

    我有一个 java 类 它有一个带有 getter 和 setter 的字段 以及第二对 getter 和 setter 它们以另一种方式访问 该字段 public class NullAbleId private static final
  • 如何通过 javaconfig 使用 SchedulerFactoryBean.schedulerContextAsMap

    我使用 Spring 4 0 并将项目从 xml 移至 java config 除了访问 Service scheduleService 带注释的类来自QuartzJobBean executeInternal 我必须让它工作的 xml 位
  • 为什么 JTables 使 TableModel 在呈现时不可序列化?

    所以最近我正在开发一个工具 供我们配置某些应用程序 它不需要是什么真正令人敬畏的东西 只是一个具有一些 SQL 脚本生成功能并创建几个 XML 文件的基本工具 在此期间 我使用自己的 AbstractTableModel 实现创建了一系列
  • 过滤两次 Lambda Java

    我有一个清单如下 1 2 3 4 5 6 7 和 预期结果必须是 1 2 3 4 5 6 7 我知道怎么做才能到7点 我的结果 1 2 3 4 5 6 我也想知道如何输入 7 我添加了i gt i objList size 1到我的过滤器
  • 谷歌应用程序引擎会话

    什么是java应用程序引擎 默认会话超时 如果我们将会话超时设置为非常非常长的时间 会不会产生不良影响 因为谷歌应用程序引擎会话默认情况下仅存储在数据存储中 就像facebook一样 每次访问该页面时 会话仍然永远存在 默认会话超时设置为
  • Eclipse Maven Spring 项目 - 错误

    I need help with an error which make me crazy I started to study Java EE and I am going through tutorial on youtube Ever
  • volatile、final 和synchronized 安全发布的区别

    给定一个带有变量 x 的 A 类 变量 x 在类构造函数中设置 A x 77 我们想将 x 发布到其他线程 考虑以下 3 种变量 x 线程安全 发布的情况 1 x is final 2 x is volatile 3 x 设定为同步块 sy
  • 如何对不同的参数类型使用相同的java方法?

    我的问题 我有 2 个已定义的记录 创建对象请求 更新对象请求 必须通过实用方法进行验证 由于这两个对象具有相同的字段 因此可以对这两种类型应用相同的验证方法 现在我只是使用两种方法进行重载 但它很冗长 public record Crea
  • 如何访问JAR文件中的Maven资源? [复制]

    这个问题在这里已经有答案了 我有一个使用 Maven 构建的 Java 应用程序 我有一个资源文件夹com pkg resources 我需要从中访问文件 例如directory txt 我一直在查看各种教程和其他答案 但似乎没有一个对我有
  • 在我的 Spring Boot 示例中无法打开版本 3 中的 Swagger UI

    我在 Spring Boot 示例中打开 swagger ui 时遇到问题 当我访问 localhost 8080 swagger ui 或 localhost 8080 root api name swagger ui 时出现这种错误 S
  • Eclipse 选项卡宽度不变

    我浏览了一些与此相关的帖子 但它们似乎并不能帮助我解决我的问题 我有一个项目 其中 java 文件以 2 个空格的宽度缩进 我想将所有内容更改为 4 空格宽度 我尝试了 正确的缩进 选项 但当我将几行修改为 4 空格缩进时 它只是将所有内容
  • 不接受任何内容也不返回任何内容的函数接口[重复]

    这个问题在这里已经有答案了 JDK中是否有一个标准的函数式接口 不接受也不返回任何内容 我找不到一个 像下面这样 FunctionalInterface interface Action void execute 可运行怎么样 Functi
  • java.io.Serialized 在 C/C++ 中的等价物是什么?

    C C 的等价物是什么java io Serialized https docs oracle com javase 7 docs api java io Serializable html 有对序列化库的引用 用 C 序列化数据结构 ht
  • Cucumber 0.4.3 (cuke4duke) 与 java + maven gem 问题

    我最近开始为 Cucumber 安装一个示例项目 并尝试使用 maven java 运行它 我遵循了这个指南 http www goodercode com wp using cucumber tests with maven and ja
  • 我如何在java中读取二进制数据文件

    因此 我正在为学校做一个项目 我需要读取二进制数据文件并使用它来生成角色的统计数据 例如力量和智慧 它的设置是让前 8 位组成一个统计数据 我想知道执行此操作的实际语法是什么 是不是就像读文本文件一样 这样 File file new Fi
  • 干净构建 Java 命令行

    我正在使用命令行编译使用 eclipse 编写的项目 如下所示 javac file java 然后运行 java file args here 我将如何运行干净的构建或编译 每当我重新编译时 除非删除所有内容 否则更改不会受到影响 cla
  • 在java中为组合框分配键

    我想添加一个JComboBox在 Swing 中这很简单 但我想为组合中的每个项目分配值 我有以下代码 JComboBox jc1 new JComboBox jc1 addItem a jc1 addItem b jc1 addItem
  • 如果没有抽象成员,基类是否应该标记为抽象?

    如果一个类没有抽象成员 可以将其标记为抽象吗 即使没有实际理由直接实例化它 除了单元测试 是的 将不应该实例化的基类显式标记为抽象是合理且有益的 即使在没有抽象方法的情况下也是如此 它强制执行通用准则来使非叶类抽象 它阻止其他程序员创建该类
  • Spring Rest 和 Jsonp

    我正在尝试让我的 Spring Rest 控制器返回jsonp但我没有快乐 如果我想返回 json 但我有返回的要求 完全相同的代码可以正常工作jsonp我添加了一个转换器 我在网上找到了用于执行 jsonp 转换的源代码 我正在使用 Sp

随机推荐

  • json-server常见问题

    json server搭建本地测试服务器 mock数据 模拟后台数据 现在基本上都是前后端分离 前端是前端工程师 后端属于后端工程师 但是前后端交互是个必不可少的环节 一般用Ajax进行交互 还需要一些实验数据来支撑 就需要模拟数据 1 v
  • Android第二讲笔记(约束布局ConstraintLayout)

    目录 为什么要使用约束布局ConstraintLayout 约束布局基本属性 约束布局简单使用方法 示例 示例一 仿QQ消息 示例二 仿微信登陆界面 示例三 仿QQ音乐界面 补充 写在最后 ScrollView 滚动布局 示例一 纵向滚动
  • 实测C++变量长度、最小值、最大值

    说明 基本的内置变量类型 bool char wchar t int float double 类型修饰符 signed unsigned short long 环境 win7x64 VS2015 Debugx86 测试结果 补充 doub
  • [1190]如何解决Chrome无法访问ftp的问题

    在最新一次Chrome更新中彻底抛弃ftp协议了 之前可以在搜索栏搜索chrome flags 并将Enable support for ftp Urls设置为Enabled才能访问ftp 但是在Chrome96中直接将修改选项剔除了 这代
  • 珠心算测验-NOIP2014普及t1

    题目描述 珠心算是一种通过在脑中模拟算盘变化来完成快速运算的一种计算技术 珠心算训练 既能够开发智力 又能够为日常生活带来很多便利 因而在很多学校得到普及 某学校的珠心算老师采用一种快速考察珠心算加法能力的测验方法 他随机生成一个正整数集合
  • SpringBoot 项目在Linux服务器上启动、停止脚本(详细)

    SpringBoot 项目在Linux服务器上启动 停止脚本详细 创建脚本 在jar包目录 创建脚本 实际项目只需要修改包名 1 进入可编辑 执行代码 vim xxxxxx sh xxxxxx就是你自己创建的脚本名称 写好后 按下回车后 进
  • C语言

    这篇文章主要和大家分享三种基础的排序算法 冒泡排序 选择排序 快速排序 一 排序问题 1 冒泡排序 冒泡排序的主要思想是通过两两相邻的元素进行比较 通过元素的大小决定是否交换 一趟冒泡排序的结果是一定有一个最大数会排到最后一个元素 因此对n
  • Python中requests包的安装

    在使用pycharm开发的时候 我们经常需要导入一些包 但是这些包 我们事先并没有安装 一个显著的现象就是我们在pycharm中导入一个包时 系统提示不存在 那就是我们没有安装这个包 举一个例子 我在使用pycharm时 需要导入一个req
  • c++ typeid使用

    今天用了下c typeid这个操作符记录一下 class parent void getdata virtual void deal class son public parent int main parent pa new son po
  • How do you install Typecho in Docker and mount hosting server's Mysql service

    Fist of all I presume that you have already installed Docker and Portainer and works smoothly All CLI procdures are base
  • Ubuntu安装GCC 3.4

    Ubuntu安装GCC 3 4 一 背景 二 安装 三 总结 一 背景 因最近学习hit os编译linux 0 11版本内核 需要使用到gcc 3 4 故此记录 二 安装 下载deb包 wget http old releases ubu
  • 如何运用bat脚本批量 重命名/复制 文件

    在平时运维的时候 最繁琐的就是要每个月写运维记录的文档如excel表格 一个月30日要产生30个文件 拷30个运维记录文档的模版再进行重命名实在太麻烦了 所以想到copy模版之后可以用脚本来对文件进行重命名自己想要的效果 首先给出效果图 下
  • 登录和注册页面 - 验证码功能的实现

    目录 1 生成验证码 2 将本地验证码发布成 URL 3 后端返回验证码的 URL 给前端 4 前端将用户输入的验证码传给后端 5 后端验证验证码 1 生成验证码 使用hutool 工具生成验证码 1 1 添加 hutool 验证码依赖
  • Arduino的ESP32搭建方法-亲测OK

    使用乐鑫官方资源搭建基于Arduino的ESP32的开发环境 目录 一 配置IDE管理器 二 自动安装板支持包 三 手动安装板支持包 四 网盘的ESP32全系列基本库的板支持包 使用乐鑫官方库搭建Arduino开发环境 乐鑫官方Github
  • 数码管从0到9再从9到0循环显示

    源程序 include
  • linux中用shell脚本对tomcat和nginx做日志切割

    Tomcat日志catalina out切割小脚本 bin bash cut tomcat catalina out yesterday date F d 1 days cd usr local tomcat7 0 70 log cp ca
  • 网络编程基础API

    基础API signal函数 inculde
  • 中文语音识别数据集总结

    目录 OpenSLR国内镜像 1 Free ST Chinese Mandarin Corpus 2 Primewords Chinese Corpus Set 1 3 爱数智慧中文手机录音音频语料库 Mandarin Chinese Re
  • 我与我的电脑:一个学生的第一台电脑与职场奋斗史

    分享一个同学的故事 我的一个同学他是个聪明且勤奋的学生 当他在2003年上学时 电脑已经慢慢成为人们生活和工作的工具 因此 他决定购买一台电脑来帮助自己的学习和研究 但是 由于他的家庭经济并不富裕 他无法购买一台高端的品牌电脑 只能考虑购买
  • Camunda Modeler给流程模型设置流程变量及默认值

    如下图所示 在提单页面 发起人需要手动选择走部门内分组审核还是部门负责人审核 对于这种由发起人选择走不同分支的且分支条件不是来自业务系统的情形 需要在流程模型上设置变量并赋初始化值 下面介绍如何设置及使用