当前位置: 首页 > 知识库问答 >
问题:

如何使用Activiti向工作流添加便笺

燕俊明
2023-03-14

创建工作流后,它被保存为XML文件,为了检查转换后的工作流的外观,它被上传到bpmn.io(目前包括一个消息对象,如果XML文件在bpmn.io上传,该对象将不显示):

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:activiti="http://activiti.org/bpmn" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:omgdc="http://www.omg.org/spec/DD/20100524/DC" xmlns:omgdi="http://www.omg.org/spec/DD/20100524/DI" typeLanguage="http://www.w3.org/2001/XMLSchema" expressionLanguage="http://www.w3.org/1999/XPath" targetNamespace="http://www.activiti.org/test">
  <message id="message123" name="This is a test message" itemRef="ut5"></message>
  <process id="process" name="New Prod" isExecutable="true">
    <startEvent id="startEvent" name="New Product"></startEvent>
    <exclusiveGateway id="exclusiveGateway1"></exclusiveGateway>
    <sequenceFlow id="sequenceFlow-672ba4b9-2f30-41b4-b638-bb05cde15cde" sourceRef="startEvent" targetRef="exclusiveGateway1"></sequenceFlow>
    <userTask id="ut1" name="Workbox Musterprodukte"></userTask>
    <sequenceFlow id="sequenceFlow-20c9fdf5-52f4-4c8c-9d30-9522b8cac16b" name="Check: mobile Category set" sourceRef="exclusiveGateway1" targetRef="ut1"></sequenceFlow>
    <exclusiveGateway id="exclusiveGateway2"></exclusiveGateway>
    <sequenceFlow id="sequenceFlow-0651ad02-735a-4311-bf3c-55bb6146e764" sourceRef="ut1" targetRef="exclusiveGateway2"></sequenceFlow>
    <sequenceFlow id="sequenceFlow-039e61e4-6404-4fc8-b074-606ec2e0032a" name="Check: mobile Category NOT set" sourceRef="exclusiveGateway1" targetRef="exclusiveGateway2"></sequenceFlow>
    <userTask id="ut2" name="Step1"></userTask>
    <sequenceFlow id="sequenceFlow-833b5285-e302-4ab3-a0fc-b1442ec4909f" sourceRef="exclusiveGateway2" targetRef="ut2"></sequenceFlow>
    <parallelGateway id="pg1"></parallelGateway>
    <userTask id="ut3" name="Step2A"></userTask>
    <userTask id="ut4" name="Step2B"></userTask>
    <sequenceFlow id="sequenceFlow-b5f991a9-4d2c-4537-8ab2-7d5a6449cdf1" sourceRef="ut2" targetRef="pg1"></sequenceFlow>
    <sequenceFlow id="sequenceFlow-7c12d9ea-c96f-4715-a8a5-39654053225a" name="Check: Main Image available" sourceRef="pg1" targetRef="ut3"></sequenceFlow>
    <sequenceFlow id="sequenceFlow-19439ed1-2af5-43c4-8abf-df013fe24cdc" name="toom_Freigabe_CM = y" sourceRef="pg1" targetRef="ut4"></sequenceFlow>
    <parallelGateway id="pg2"></parallelGateway>
    <sequenceFlow id="sequenceFlow-faf33a66-a6db-4636-8ddf-d46484dbaa1e" sourceRef="ut3" targetRef="pg2"></sequenceFlow>
    <sequenceFlow id="sequenceFlow-6180eea1-14e6-47c8-9e68-d6c3aed0b322" sourceRef="ut4" targetRef="pg2"></sequenceFlow>
    <userTask id="ut5" name="Step3"></userTask>
    <sequenceFlow id="sequenceFlow-efb2cef7-0b4a-410b-b076-19f0cf0a97ce" sourceRef="pg2" targetRef="ut5"></sequenceFlow>
    <endEvent id="end" name="Step4"></endEvent>
    <sequenceFlow id="sequenceFlow-7129e658-6004-4004-907b-f1ea6d5602a3" sourceRef="ut5" targetRef="end"></sequenceFlow>
  </process>
  <bpmndi:BPMNDiagram id="BPMNDiagram_process">
    <bpmndi:BPMNPlane bpmnElement="process" id="BPMNPlane_process">
      <bpmndi:BPMNShape bpmnElement="ut2" id="BPMNShape_ut2">
        <omgdc:Bounds height="60.0" width="100.0" x="410.0" y="73.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="ut1" id="BPMNShape_ut1">
        <omgdc:Bounds height="60.0" width="100.0" x="170.0" y="130.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusiveGateway2" id="BPMNShape_exclusiveGateway2">
        <omgdc:Bounds height="40.0" width="40.0" x="320.0" y="78.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="exclusiveGateway1" id="BPMNShape_exclusiveGateway1">
        <omgdc:Bounds height="40.0" width="40.0" x="80.0" y="76.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="ut4" id="BPMNShape_ut4">
        <omgdc:Bounds height="60.0" width="100.0" x="650.0" y="160.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="ut3" id="BPMNShape_ut3">
        <omgdc:Bounds height="60.0" width="100.0" x="650.0" y="0.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="startEvent" id="BPMNShape_startEvent">
        <omgdc:Bounds height="30.0" width="30.0" x="0.0" y="81.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="ut5" id="BPMNShape_ut5">
        <omgdc:Bounds height="60.0" width="100.0" x="890.0" y="80.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="pg2" id="BPMNShape_pg2">
        <omgdc:Bounds height="40.0" width="40.0" x="800.0" y="90.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="end" id="BPMNShape_end">
        <omgdc:Bounds height="30.0" width="30.0" x="1040.0" y="95.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNShape bpmnElement="pg1" id="BPMNShape_pg1">
        <omgdc:Bounds height="40.0" width="40.0" x="560.0" y="88.0"></omgdc:Bounds>
      </bpmndi:BPMNShape>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-7129e658-6004-4004-907b-f1ea6d5602a3" id="BPMNEdge_sequenceFlow-7129e658-6004-4004-907b-f1ea6d5602a3">
        <omgdi:waypoint x="990.0" y="110.0"></omgdi:waypoint>
        <omgdi:waypoint x="1040.0" y="110.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-efb2cef7-0b4a-410b-b076-19f0cf0a97ce" id="BPMNEdge_sequenceFlow-efb2cef7-0b4a-410b-b076-19f0cf0a97ce">
        <omgdi:waypoint x="840.0" y="110.0"></omgdi:waypoint>
        <omgdi:waypoint x="890.0" y="110.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-672ba4b9-2f30-41b4-b638-bb05cde15cde" id="BPMNEdge_sequenceFlow-672ba4b9-2f30-41b4-b638-bb05cde15cde">
        <omgdi:waypoint x="30.0" y="96.0"></omgdi:waypoint>
        <omgdi:waypoint x="80.0" y="96.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-039e61e4-6404-4fc8-b074-606ec2e0032a" id="BPMNEdge_sequenceFlow-039e61e4-6404-4fc8-b074-606ec2e0032a">
        <omgdi:waypoint x="120.0" y="88.5"></omgdi:waypoint>
        <omgdi:waypoint x="132.0" y="88.5"></omgdi:waypoint>
        <omgdi:waypoint x="132.0" y="98.0"></omgdi:waypoint>
        <omgdi:waypoint x="320.0" y="98.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-833b5285-e302-4ab3-a0fc-b1442ec4909f" id="BPMNEdge_sequenceFlow-833b5285-e302-4ab3-a0fc-b1442ec4909f">
        <omgdi:waypoint x="360.0" y="98.0"></omgdi:waypoint>
        <omgdi:waypoint x="372.0" y="98.0"></omgdi:waypoint>
        <omgdi:waypoint x="372.0" y="103.0"></omgdi:waypoint>
        <omgdi:waypoint x="410.0" y="103.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-6180eea1-14e6-47c8-9e68-d6c3aed0b322" id="BPMNEdge_sequenceFlow-6180eea1-14e6-47c8-9e68-d6c3aed0b322">
        <omgdi:waypoint x="750.0" y="190.0"></omgdi:waypoint>
        <omgdi:waypoint x="762.0" y="190.0"></omgdi:waypoint>
        <omgdi:waypoint x="762.0" y="110.0"></omgdi:waypoint>
        <omgdi:waypoint x="800.0" y="110.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-0651ad02-735a-4311-bf3c-55bb6146e764" id="BPMNEdge_sequenceFlow-0651ad02-735a-4311-bf3c-55bb6146e764">
        <omgdi:waypoint x="270.0" y="160.0"></omgdi:waypoint>
        <omgdi:waypoint x="282.0" y="160.0"></omgdi:waypoint>
        <omgdi:waypoint x="282.0" y="98.0"></omgdi:waypoint>
        <omgdi:waypoint x="320.0" y="98.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-b5f991a9-4d2c-4537-8ab2-7d5a6449cdf1" id="BPMNEdge_sequenceFlow-b5f991a9-4d2c-4537-8ab2-7d5a6449cdf1">
        <omgdi:waypoint x="510.0" y="103.0"></omgdi:waypoint>
        <omgdi:waypoint x="522.0" y="103.0"></omgdi:waypoint>
        <omgdi:waypoint x="522.0" y="108.0"></omgdi:waypoint>
        <omgdi:waypoint x="560.0" y="108.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-faf33a66-a6db-4636-8ddf-d46484dbaa1e" id="BPMNEdge_sequenceFlow-faf33a66-a6db-4636-8ddf-d46484dbaa1e">
        <omgdi:waypoint x="750.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="762.0" y="30.0"></omgdi:waypoint>
        <omgdi:waypoint x="762.0" y="110.0"></omgdi:waypoint>
        <omgdi:waypoint x="800.0" y="110.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-7c12d9ea-c96f-4715-a8a5-39654053225a" id="BPMNEdge_sequenceFlow-7c12d9ea-c96f-4715-a8a5-39654053225a">
        <omgdi:waypoint x="600.0" y="100.5"></omgdi:waypoint>
        <omgdi:waypoint x="612.0" y="100.5"></omgdi:waypoint>
        <omgdi:waypoint x="612.0" y="30.000000000000007"></omgdi:waypoint>
        <omgdi:waypoint x="650.0" y="30.000000000000007"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-20c9fdf5-52f4-4c8c-9d30-9522b8cac16b" id="BPMNEdge_sequenceFlow-20c9fdf5-52f4-4c8c-9d30-9522b8cac16b">
        <omgdi:waypoint x="120.0" y="103.5"></omgdi:waypoint>
        <omgdi:waypoint x="132.0" y="103.5"></omgdi:waypoint>
        <omgdi:waypoint x="132.0" y="160.0"></omgdi:waypoint>
        <omgdi:waypoint x="170.0" y="160.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
      <bpmndi:BPMNEdge bpmnElement="sequenceFlow-19439ed1-2af5-43c4-8abf-df013fe24cdc" id="BPMNEdge_sequenceFlow-19439ed1-2af5-43c4-8abf-df013fe24cdc">
        <omgdi:waypoint x="600.0" y="115.5"></omgdi:waypoint>
        <omgdi:waypoint x="612.0" y="115.5"></omgdi:waypoint>
        <omgdi:waypoint x="612.0" y="190.0"></omgdi:waypoint>
        <omgdi:waypoint x="650.0" y="190.0"></omgdi:waypoint>
      </bpmndi:BPMNEdge>
    </bpmndi:BPMNPlane>
  </bpmndi:BPMNDiagram>
</definitions>

共有1个答案

杨学真
2023-03-14

为什么不在活动流或序列流中使用文档字段呢?在XML中,它如下所示:

<sequenceFlow id="flow4" sourceRef="usertask1" targetRef="exclusivegateway1">
  <documentation>This is some element documentation.</documentation>
</sequenceFlow>

然后在BPMN编辑器中,它将显示为文档。你正在进行的项目真的很有趣。

格雷格

 类似资料:
  • 我正在使用Alfresco Share中的Activiti工作流,我需要在工作流中添加一个通用的所有用户任务表单的标题。此头将是一组只读属性(字段),在工作流中所有用户任务表单的顶部显示上下文工作流信息。例如,在客户端管理工作流中,头可能显示客户端名称和姓氏、客户端文件代码等,并在只读文本框或标签中显示每个值。 我想实现这样的事情(见红方): 包含信息字段的任务窗体 提前感谢您的帮助。 我在这个(

  • 我正在将我的java项目从Rabbit MQ迁移到Kafka(出于某些原因)。 在当前的工作流中,我将所有消息发布到rabbit mq exchange中,并根据消息的路由密钥将消息重定向到一个或多个队列中。我也想保留Kafka同样的功能。(我知道Kafka本来就不适合,但我想要一个变通办法)。 基本上,我想要这样的东西:每当一个主题接收到一个消息时,基于消息中存在的元,该消息应该被重定向到其他一

  • 我已经使用eclipse的Service任务等创建了一个Activit Process,并将. bar部署到在tomcat上运行的Activiti。它已成功部署,我可以使用Activit-Explorer启动我的进程,没有任何问题。部署的进程名称是“我的进程”,它列在进程下- 但我有两个问题。 我需要使用REST调用启动进程。(即不使用Activiti explorer)。它的URL是什么?我尝试

  • 我想使用alfresco activiti work flow和spring MVC实现联谊概念。 团契工作流概念 第一步:学生将提交奖学金申请。 第二步:导师1和导师2批准/拒绝奖学金申请 第3步:如果supervisor1和supervisor2都已批准,则表格将转到admin 对于上述流程,我创建了两个表 现在使用spring应用程序,我像下面这样做。 1)提交研究金表格后,在表格中插入一条

  • 我试图使用apache POI、使用primefaces和java在现有的excel工作簿中创建一个新的工作表,但是到目前为止还没有成功。谁能告诉我这是怎么做的吗?我可以做单张 下面的代码是我为在一个xls文件中创建多个工作表而编写的,我给出的条件是它没有大于65535的of行创建新工作表并迭代它,但它显示错误 警告:允许范围(0..65535)之外的无效行号(65536)java.lang.Il

  • 如果是的话,我们能做吗? 在这里,我想从相同的MyObject对象getTestId中添加一个属性到列表中,有一种方法可以在上面的语句中添加吗?