plate-approval.bpmn20.xml 2.17 KB
<?xml version="1.0" encoding="UTF-8"?>
<!--
  Reference printing-shop plug-in BPMN — plate approval workflow.

  This file is the executable acceptance test for the P2.1 follow-up
  "plug-in-shipped BPMN auto-deployment" chunk. It lives inside the
  plug-in JAR under processes/, which Flowable's Spring Boot starter
  CANNOT see (classpath auto-scan doesn't traverse PF4J plug-in
  classloaders). The host's PluginProcessDeployer reads this file out
  of the JAR at plug-in start time and registers it with the Flowable
  RepositoryService under category = "printing-shop". On plug-in stop
  the host calls undeployByPlugin("printing-shop") which cascade-
  deletes this deployment and every process instance that referenced
  it.

  Structure: a single synchronous service task that delegates to the
  shared Spring bean "taskDispatcher", which then routes by activity
  id to the registered TaskHandler whose key() returns the serviceTask
  id ("printing_shop.plate.approve" — PlateApprovalTaskHandler in the
  plug-in's main module).

  Process-definition key "plugin-printing-shop-plate-approval" is the
  REST caller's handle:
      POST /api/v1/workflow/process-instances
           {"processDefinitionKey":"plugin-printing-shop-plate-approval",
            "variables":{"plateId":"...."}}
-->
<definitions xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:flowable="http://flowable.org/bpmn"
             targetNamespace="http://vibeerp.org/plugin/printing-shop/bpmn">
  <process id="plugin-printing-shop-plate-approval"
           name="Printing shop — plate approval"
           isExecutable="true">
    <startEvent id="start"/>
    <sequenceFlow id="flow-start-to-approve"
                  sourceRef="start"
                  targetRef="printing_shop.plate.approve"/>
    <serviceTask id="printing_shop.plate.approve"
                 name="Approve plate"
                 flowable:delegateExpression="${taskDispatcher}"/>
    <sequenceFlow id="flow-approve-to-end"
                  sourceRef="printing_shop.plate.approve"
                  targetRef="end"/>
    <endEvent id="end"/>
  </process>
</definitions>