mirror of
https://github.com/status-im/spiff-arena.git
synced 2025-01-27 18:24:58 +00:00
Merge branch 'main' into feature/nested-groups
This commit is contained in:
commit
912229a196
29
.flake8
Normal file
29
.flake8
Normal file
@ -0,0 +1,29 @@
|
||||
[flake8]
|
||||
select = B,B9,C,D,DAR,E,F,N,RST,S,W
|
||||
ignore = E203,E501,RST201,RST203,RST301,W503,S410,S320
|
||||
max-line-length = 120
|
||||
max-complexity = 30
|
||||
docstring-convention = google
|
||||
rst-roles = class,const,func,meth,mod,ref
|
||||
rst-directives = deprecated
|
||||
|
||||
per-file-ignores =
|
||||
# prefer naming tests descriptively rather than forcing comments
|
||||
spiffworkflow-backend/tests/*:S101,D103
|
||||
|
||||
spiffworkflow-backend/bin/keycloak_test_server.py:B950,D
|
||||
spiffworkflow-backend/conftest.py:S105
|
||||
spiffworkflow-backend/wsgi.py:S104
|
||||
|
||||
# allow writing to /tmp for throwaway script output
|
||||
spiffworkflow-backend/bin/get_bpmn_json_for_process_instance:S108
|
||||
|
||||
# the exclude=./migrations option doesn't seem to work with pre-commit
|
||||
# migrations are autogenerated from "flask db migration" so ignore them
|
||||
spiffworkflow-backend/migrations/*:D
|
||||
spiffworkflow-backend/src/spiffworkflow_backend/config/testing.py:S105
|
||||
spiffworkflow-backend/src/spiffworkflow_backend/load_database_models.py:F401
|
||||
|
||||
# this file overwrites methods from the logging library so we can't change them
|
||||
# and ignore long comment line
|
||||
spiffworkflow-backend/src/spiffworkflow_backend/services/logging_service.py:N802,B950
|
75
.pre-commit-config.yaml
Normal file
75
.pre-commit-config.yaml
Normal file
@ -0,0 +1,75 @@
|
||||
repos:
|
||||
- repo: local
|
||||
hooks:
|
||||
- id: black
|
||||
name: black
|
||||
# entry: bash -c 'cd spiffworkflow-backend && black'
|
||||
entry: black
|
||||
language: system
|
||||
files: ^spiffworkflow-backend/
|
||||
types: [python]
|
||||
require_serial: true
|
||||
# exclude: ^migrations/
|
||||
exclude: "/migrations/"
|
||||
- id: check-added-large-files
|
||||
files: ^spiffworkflow-backend/
|
||||
name: Check for added large files
|
||||
entry: check-added-large-files
|
||||
language: system
|
||||
- id: check-toml
|
||||
files: ^spiffworkflow-backend/
|
||||
name: Check Toml
|
||||
entry: check-toml
|
||||
language: system
|
||||
types: [toml]
|
||||
- id: check-yaml
|
||||
files: ^spiffworkflow-backend/
|
||||
name: Check Yaml
|
||||
entry: check-yaml
|
||||
language: system
|
||||
types: [yaml]
|
||||
- id: end-of-file-fixer
|
||||
files: ^spiffworkflow-backend/
|
||||
name: Fix End of Files
|
||||
entry: end-of-file-fixer
|
||||
language: system
|
||||
types: [text]
|
||||
stages: [commit, push, manual]
|
||||
- id: flake8
|
||||
files: ^spiffworkflow-backend/
|
||||
name: flake8
|
||||
entry: flake8
|
||||
language: system
|
||||
types: [python]
|
||||
require_serial: true
|
||||
exclude: "/migrations/"
|
||||
- id: pyupgrade
|
||||
files: ^spiffworkflow-backend/
|
||||
name: pyupgrade
|
||||
description: Automatically upgrade syntax for newer versions.
|
||||
entry: pyupgrade
|
||||
language: system
|
||||
types: [python]
|
||||
args: [--py37-plus]
|
||||
- id: reorder-python-imports
|
||||
files: ^spiffworkflow-backend/
|
||||
name: Reorder python imports
|
||||
entry: reorder-python-imports
|
||||
language: system
|
||||
types: [python]
|
||||
args: [--application-directories=spiffworkflow-backend/src]
|
||||
exclude: "(/migrations/|load_database_models)"
|
||||
- id: trailing-whitespace
|
||||
files: ^spiffworkflow-backend/
|
||||
name: Trim Trailing Whitespace
|
||||
entry: trailing-whitespace-fixer
|
||||
language: system
|
||||
types: [text]
|
||||
stages: [commit, push, manual]
|
||||
exclude: "/migrations/"
|
||||
# - repo: https://github.com/pre-commit/mirrors-prettier
|
||||
# rev: v2.4.1
|
||||
# hooks:
|
||||
# - id: prettier
|
||||
# files: ^spiffworkflow-backend/
|
||||
# exclude_types: [html]
|
@ -3,5 +3,11 @@
|
||||
|
||||
git subtree push --prefix=spiffworkflow-frontend git@github.com:sartography/spiffworkflow-frontend.git add_md_file
|
||||
|
||||
# run pyl
|
||||
`./bin/run_pyl`
|
||||
|
||||
|
||||
Requires at root:
|
||||
- .darglint
|
||||
- .flake8
|
||||
- .pre-commit-config.yaml
|
||||
- pyproject.toml
|
||||
|
@ -144,7 +144,7 @@ class PythonScriptEngine(object):
|
||||
self.check_for_overwrite(task, external_methods or {})
|
||||
self._execute(script, task.data, external_methods or {})
|
||||
except Exception as err:
|
||||
wte = self.create_task_exec_exception(task, err)
|
||||
wte = self.create_task_exec_exception(task, script, err)
|
||||
self.error_tasks[task.id] = wte
|
||||
raise wte
|
||||
|
||||
@ -153,7 +153,7 @@ class PythonScriptEngine(object):
|
||||
tasks."""
|
||||
raise NotImplementedError("To call external services override the script engine and implement `call_service`.")
|
||||
|
||||
def create_task_exec_exception(self, task, err):
|
||||
def create_task_exec_exception(self, task, script, err):
|
||||
|
||||
if isinstance(err, WorkflowTaskExecException):
|
||||
return err
|
||||
@ -170,8 +170,7 @@ class PythonScriptEngine(object):
|
||||
for frame_summary in traceback.extract_tb(tb):
|
||||
if frame_summary.filename == '<string>':
|
||||
line_number = frame_summary.lineno
|
||||
error_line = task.task_spec.script.splitlines()[
|
||||
line_number - 1]
|
||||
error_line = script.splitlines()[line_number - 1]
|
||||
return WorkflowTaskExecException(task, detail, err, line_number,
|
||||
error_line)
|
||||
|
||||
|
@ -18,8 +18,10 @@
|
||||
# 02110-1301 USA
|
||||
|
||||
import glob
|
||||
import os
|
||||
|
||||
from lxml import etree
|
||||
from lxml.etree import DocumentInvalid
|
||||
|
||||
from SpiffWorkflow.bpmn.specs.events.event_definitions import NoneEventDefinition
|
||||
|
||||
@ -37,6 +39,7 @@ from ..specs.ScriptTask import ScriptTask
|
||||
from ..specs.ServiceTask import ServiceTask
|
||||
from ..specs.UserTask import UserTask
|
||||
from .ProcessParser import ProcessParser
|
||||
from .node_parser import DEFAULT_NSMAP
|
||||
from .util import full_tag, xpath_eval, first
|
||||
from .task_parsers import (UserTaskParser, NoneTaskParser, ManualTaskParser,
|
||||
ExclusiveGatewayParser, ParallelGatewayParser, InclusiveGatewayParser,
|
||||
@ -47,6 +50,28 @@ from .event_parsers import (StartEventParser, EndEventParser, BoundaryEventParse
|
||||
SendTaskParser, ReceiveTaskParser)
|
||||
|
||||
|
||||
XSD_PATH = os.path.join(os.path.dirname(__file__), 'schema', 'BPMN20.xsd')
|
||||
|
||||
class BpmnValidator:
|
||||
|
||||
def __init__(self, xsd_path=XSD_PATH, imports=None):
|
||||
schema = etree.parse(open(xsd_path))
|
||||
if imports is not None:
|
||||
for ns, fn in imports.items():
|
||||
elem = etree.Element(
|
||||
'{http://www.w3.org/2001/XMLSchema}import',
|
||||
namespace=ns,
|
||||
schemaLocation=fn
|
||||
)
|
||||
schema.getroot().insert(0, elem)
|
||||
self.validator = etree.XMLSchema(schema)
|
||||
|
||||
def validate(self, bpmn, filename=None):
|
||||
try:
|
||||
self.validator.assertValid(bpmn)
|
||||
except DocumentInvalid as di:
|
||||
raise DocumentInvalid(str(di) + "file: " + filename)
|
||||
|
||||
class BpmnParser(object):
|
||||
"""
|
||||
The BpmnParser class is a pluggable base class that manages the parsing of
|
||||
@ -83,15 +108,16 @@ class BpmnParser(object):
|
||||
|
||||
PROCESS_PARSER_CLASS = ProcessParser
|
||||
|
||||
def __init__(self):
|
||||
def __init__(self, namespaces=None, validator=None):
|
||||
"""
|
||||
Constructor.
|
||||
"""
|
||||
self.namespaces = namespaces or DEFAULT_NSMAP
|
||||
self.validator = validator
|
||||
self.process_parsers = {}
|
||||
self.process_parsers_by_name = {}
|
||||
self.collaborations = {}
|
||||
self.process_dependencies = set()
|
||||
self.dmn_dependencies = set()
|
||||
|
||||
def _get_parser_class(self, tag):
|
||||
if tag in self.OVERRIDE_PARSER_CLASSES:
|
||||
@ -146,46 +172,31 @@ class BpmnParser(object):
|
||||
file
|
||||
:param filename: Optionally, provide the source filename.
|
||||
"""
|
||||
xpath = xpath_eval(bpmn)
|
||||
# do a check on our bpmn to ensure that no id appears twice
|
||||
# this *should* be taken care of by our modeler - so this test
|
||||
# should never fail.
|
||||
ids = [x for x in xpath('.//bpmn:*[@id]')]
|
||||
foundids = {}
|
||||
for node in ids:
|
||||
id = node.get('id')
|
||||
if foundids.get(id,None) is not None:
|
||||
raise ValidationException(
|
||||
'The bpmn document should have no repeating ids but (%s) repeats'%id,
|
||||
node=node,
|
||||
filename=filename)
|
||||
else:
|
||||
foundids[id] = 1
|
||||
if self.validator:
|
||||
self.validator.validate(bpmn, filename)
|
||||
|
||||
for process in xpath('.//bpmn:process'):
|
||||
self.create_parser(process, xpath, filename)
|
||||
self._add_processes(bpmn, filename)
|
||||
self._add_collaborations(bpmn)
|
||||
|
||||
self._find_dependencies(xpath)
|
||||
def _add_processes(self, bpmn, filename=None):
|
||||
for process in bpmn.xpath('.//bpmn:process', namespaces=self.namespaces):
|
||||
self._find_dependencies(process)
|
||||
self.create_parser(process, filename)
|
||||
|
||||
collaboration = first(xpath('.//bpmn:collaboration'))
|
||||
def _add_collaborations(self, bpmn):
|
||||
collaboration = first(bpmn.xpath('.//bpmn:collaboration', namespaces=self.namespaces))
|
||||
if collaboration is not None:
|
||||
collaboration_xpath = xpath_eval(collaboration)
|
||||
name = collaboration.get('id')
|
||||
self.collaborations[name] = [ participant.get('processRef') for participant in collaboration_xpath('.//bpmn:participant') ]
|
||||
|
||||
def _find_dependencies(self, xpath):
|
||||
"""Locate all calls to external BPMN and DMN files, and store their
|
||||
ids in our list of dependencies"""
|
||||
for call_activity in xpath('.//bpmn:callActivity'):
|
||||
def _find_dependencies(self, process):
|
||||
"""Locate all calls to external BPMN, and store their ids in our list of dependencies"""
|
||||
for call_activity in process.xpath('.//bpmn:callActivity', namespaces=self.namespaces):
|
||||
self.process_dependencies.add(call_activity.get('calledElement'))
|
||||
parser_cls, cls = self._get_parser_class(full_tag('businessRuleTask'))
|
||||
if parser_cls:
|
||||
for business_rule in xpath('.//bpmn:businessRuleTask'):
|
||||
self.dmn_dependencies.add(parser_cls.get_decision_ref(business_rule))
|
||||
|
||||
|
||||
def create_parser(self, node, doc_xpath, filename=None, lane=None):
|
||||
parser = self.PROCESS_PARSER_CLASS(self, node, filename=filename, doc_xpath=doc_xpath, lane=lane)
|
||||
def create_parser(self, node, filename=None, lane=None):
|
||||
parser = self.PROCESS_PARSER_CLASS(self, node, self.namespaces, filename=filename, lane=lane)
|
||||
if parser.get_id() in self.process_parsers:
|
||||
raise ValidationException('Duplicate process ID', node=node, filename=filename)
|
||||
if parser.get_name() in self.process_parsers_by_name:
|
||||
@ -194,14 +205,11 @@ class BpmnParser(object):
|
||||
self.process_parsers_by_name[parser.get_name()] = parser
|
||||
|
||||
def get_dependencies(self):
|
||||
return self.process_dependencies.union(self.dmn_dependencies)
|
||||
return self.process_dependencies
|
||||
|
||||
def get_process_dependencies(self):
|
||||
return self.process_dependencies
|
||||
|
||||
def get_dmn_dependencies(self):
|
||||
return self.dmn_dependencies
|
||||
|
||||
def get_spec(self, process_id_or_name):
|
||||
"""
|
||||
Parses the required subset of the BPMN files, in order to provide an
|
||||
|
@ -29,7 +29,7 @@ class ProcessParser(NodeParser):
|
||||
process.
|
||||
"""
|
||||
|
||||
def __init__(self, p, node, filename=None, doc_xpath=None, lane=None):
|
||||
def __init__(self, p, node, nsmap, filename=None, lane=None):
|
||||
"""
|
||||
Constructor.
|
||||
|
||||
@ -39,7 +39,7 @@ class ProcessParser(NodeParser):
|
||||
:param doc_xpath: an xpath evaluator for the document (optional)
|
||||
:param lane: the lane of a subprocess (optional)
|
||||
"""
|
||||
super().__init__(node, filename, doc_xpath, lane)
|
||||
super().__init__(node, nsmap, filename=filename, lane=lane)
|
||||
self.parser = p
|
||||
self.parsed_nodes = {}
|
||||
self.lane = lane
|
||||
@ -58,7 +58,6 @@ class ProcessParser(NodeParser):
|
||||
can be called by a TaskParser instance, that is owned by this
|
||||
ProcessParser.
|
||||
"""
|
||||
|
||||
if node.get('id') in self.parsed_nodes:
|
||||
return self.parsed_nodes[node.get('id')]
|
||||
|
||||
@ -66,7 +65,7 @@ class ProcessParser(NodeParser):
|
||||
if not node_parser or not spec_class:
|
||||
raise ValidationException("There is no support implemented for this task type.",
|
||||
node=node, filename=self.filename)
|
||||
np = node_parser(self, spec_class, node, self.lane)
|
||||
np = node_parser(self, spec_class, node, lane=self.lane)
|
||||
task_spec = np.parse_node()
|
||||
return task_spec
|
||||
|
||||
@ -82,12 +81,12 @@ class ProcessParser(NodeParser):
|
||||
# Check for an IO Specification.
|
||||
io_spec = first(self.xpath('./bpmn:ioSpecification'))
|
||||
if io_spec is not None:
|
||||
data_parser = DataSpecificationParser(io_spec, self.filename, self.doc_xpath)
|
||||
data_parser = DataSpecificationParser(io_spec, filename=self.filename)
|
||||
self.spec.data_inputs, self.spec.data_outputs = data_parser.parse_io_spec()
|
||||
|
||||
# Get the data objects
|
||||
for obj in self.xpath('./bpmn:dataObject'):
|
||||
data_parser = DataSpecificationParser(obj, self.filename, self.doc_xpath)
|
||||
data_parser = DataSpecificationParser(obj, filename=self.filename)
|
||||
data_object = data_parser.parse_data_object()
|
||||
self.spec.data_objects[data_object.name] = data_object
|
||||
|
||||
|
@ -46,7 +46,7 @@ class TaskParser(NodeParser):
|
||||
outgoing transitions, once the child tasks have all been parsed.
|
||||
"""
|
||||
|
||||
def __init__(self, process_parser, spec_class, node, lane=None):
|
||||
def __init__(self, process_parser, spec_class, node, nsmap=None, lane=None):
|
||||
"""
|
||||
Constructor.
|
||||
|
||||
@ -56,7 +56,7 @@ class TaskParser(NodeParser):
|
||||
extending the TaskParser.
|
||||
:param node: the XML node for this task
|
||||
"""
|
||||
super().__init__(node, process_parser.filename, process_parser.doc_xpath, lane)
|
||||
super().__init__(node, nsmap, filename=process_parser.filename, lane=lane)
|
||||
self.process_parser = process_parser
|
||||
self.spec_class = spec_class
|
||||
self.spec = self.process_parser.spec
|
||||
|
@ -1,30 +1,41 @@
|
||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException
|
||||
from .util import xpath_eval, first
|
||||
from .util import first
|
||||
|
||||
DEFAULT_NSMAP = {
|
||||
'bpmn': 'http://www.omg.org/spec/BPMN/20100524/MODEL',
|
||||
'bpmndi': 'http://www.omg.org/spec/BPMN/20100524/DI',
|
||||
'dc': 'http://www.omg.org/spec/DD/20100524/DC',
|
||||
|
||||
}
|
||||
|
||||
CAMUNDA_MODEL_NS = 'http://camunda.org/schema/1.0/bpmn'
|
||||
|
||||
class NodeParser:
|
||||
|
||||
def __init__(self, node, filename, doc_xpath, lane=None):
|
||||
def __init__(self, node, nsmap=None, filename=None, lane=None):
|
||||
|
||||
self.node = node
|
||||
self.nsmap = nsmap or DEFAULT_NSMAP
|
||||
self.filename = filename
|
||||
self.doc_xpath = doc_xpath
|
||||
self.xpath = xpath_eval(node)
|
||||
self.lane = self._get_lane() or lane
|
||||
self.position = self._get_position() or {'x': 0.0, 'y': 0.0}
|
||||
|
||||
def get_id(self):
|
||||
return self.node.get('id')
|
||||
|
||||
|
||||
def xpath(self, xpath, extra_ns=None):
|
||||
return self._xpath(self.node, xpath, extra_ns)
|
||||
|
||||
def doc_xpath(self, xpath, extra_ns=None):
|
||||
root = self.node.getroottree().getroot()
|
||||
return self._xpath(root, xpath, extra_ns)
|
||||
|
||||
def parse_condition(self, sequence_flow):
|
||||
xpath = xpath_eval(sequence_flow)
|
||||
expression = first(xpath('.//bpmn:conditionExpression'))
|
||||
expression = first(self._xpath(sequence_flow, './/bpmn:conditionExpression'))
|
||||
return expression.text if expression is not None else None
|
||||
|
||||
def parse_documentation(self, sequence_flow=None):
|
||||
xpath = xpath_eval(sequence_flow) if sequence_flow is not None else self.xpath
|
||||
documentation_node = first(xpath('.//bpmn:documentation'))
|
||||
documentation_node = first(self._xpath(sequence_flow or self.node, './/bpmn:documentation'))
|
||||
return None if documentation_node is None else documentation_node.text
|
||||
|
||||
def parse_incoming_data_references(self):
|
||||
@ -50,10 +61,9 @@ class NodeParser:
|
||||
def parse_extensions(self, node=None):
|
||||
extensions = {}
|
||||
extra_ns = {'camunda': CAMUNDA_MODEL_NS}
|
||||
xpath = xpath_eval(self.node, extra_ns) if node is None else xpath_eval(node, extra_ns)
|
||||
extension_nodes = xpath( './/bpmn:extensionElements/camunda:properties/camunda:property')
|
||||
for node in extension_nodes:
|
||||
extensions[node.get('name')] = node.get('value')
|
||||
extension_nodes = self.xpath('.//bpmn:extensionElements/camunda:properties/camunda:property', extra_ns)
|
||||
for ex_node in extension_nodes:
|
||||
extensions[ex_node.get('name')] = ex_node.get('value')
|
||||
return extensions
|
||||
|
||||
def _get_lane(self):
|
||||
@ -65,3 +75,11 @@ class NodeParser:
|
||||
bounds = first(self.doc_xpath(f".//bpmndi:BPMNShape[@bpmnElement='{self.get_id()}']//dc:Bounds"))
|
||||
if bounds is not None:
|
||||
return {'x': float(bounds.get('x', 0)), 'y': float(bounds.get('y', 0))}
|
||||
|
||||
def _xpath(self, node, xpath, extra_ns=None):
|
||||
if extra_ns is not None:
|
||||
nsmap = self.nsmap.copy()
|
||||
nsmap.update(extra_ns)
|
||||
else:
|
||||
nsmap = self.nsmap
|
||||
return node.xpath(xpath, namespaces=nsmap)
|
||||
|
33
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/BPMN20.xsd
Normal file
33
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/BPMN20.xsd
Normal file
@ -0,0 +1,33 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema elementFormDefault="qualified" attributeFormDefault="unqualified" xmlns="http://www.omg.org/spec/BPMN/20100524/MODEL" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" targetNamespace="http://www.omg.org/spec/BPMN/20100524/MODEL">
|
||||
|
||||
<xsd:import namespace="http://www.omg.org/spec/BPMN/20100524/DI" schemaLocation="BPMNDI.xsd"/>
|
||||
<xsd:include schemaLocation="Semantic.xsd"/>
|
||||
|
||||
<xsd:element name="definitions" type="tDefinitions"/>
|
||||
<xsd:complexType name="tDefinitions">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="import" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="extension" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="rootElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="bpmndi:BPMNDiagram" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="relationship" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
<xsd:attribute name="targetNamespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional" default="http://www.w3.org/1999/XPath"/>
|
||||
<xsd:attribute name="typeLanguage" type="xsd:anyURI" use="optional" default="http://www.w3.org/2001/XMLSchema"/>
|
||||
<xsd:attribute name="exporter" type="xsd:string"/>
|
||||
<xsd:attribute name="exporterVersion" type="xsd:string"/>
|
||||
<xsd:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:element name="import" type="tImport"/>
|
||||
<xsd:complexType name="tImport">
|
||||
<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="location" type="xsd:string" use="required"/>
|
||||
<xsd:attribute name="importType" type="xsd:anyURI" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
100
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/BPMNDI.xsd
Normal file
100
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/BPMNDI.xsd
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:bpmndi="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" targetNamespace="http://www.omg.org/spec/BPMN/20100524/DI" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.omg.org/spec/DD/20100524/DC" schemaLocation="DC.xsd" />
|
||||
<xsd:import namespace="http://www.omg.org/spec/DD/20100524/DI" schemaLocation="DI.xsd" />
|
||||
|
||||
<xsd:element name="BPMNDiagram" type="bpmndi:BPMNDiagram" />
|
||||
<xsd:element name="BPMNPlane" type="bpmndi:BPMNPlane" />
|
||||
<xsd:element name="BPMNLabelStyle" type="bpmndi:BPMNLabelStyle" />
|
||||
<xsd:element name="BPMNShape" type="bpmndi:BPMNShape" substitutionGroup="di:DiagramElement" />
|
||||
<xsd:element name="BPMNLabel" type="bpmndi:BPMNLabel" />
|
||||
<xsd:element name="BPMNEdge" type="bpmndi:BPMNEdge" substitutionGroup="di:DiagramElement" />
|
||||
|
||||
<xsd:complexType name="BPMNDiagram">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Diagram">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="bpmndi:BPMNPlane" />
|
||||
<xsd:element ref="bpmndi:BPMNLabelStyle" maxOccurs="unbounded" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="BPMNPlane">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Plane">
|
||||
<xsd:attribute name="bpmnElement" type="xsd:QName" />
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="BPMNEdge">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:LabeledEdge">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="bpmndi:BPMNLabel" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="bpmnElement" type="xsd:QName" />
|
||||
<xsd:attribute name="sourceElement" type="xsd:QName" />
|
||||
<xsd:attribute name="targetElement" type="xsd:QName" />
|
||||
<xsd:attribute name="messageVisibleKind" type="bpmndi:MessageVisibleKind" />
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="BPMNShape">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:LabeledShape">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="bpmndi:BPMNLabel" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="bpmnElement" type="xsd:QName" />
|
||||
<xsd:attribute name="isHorizontal" type="xsd:boolean" />
|
||||
<xsd:attribute name="isExpanded" type="xsd:boolean" />
|
||||
<xsd:attribute name="isMarkerVisible" type="xsd:boolean" />
|
||||
<xsd:attribute name="isMessageVisible" type="xsd:boolean" />
|
||||
<xsd:attribute name="participantBandKind" type="bpmndi:ParticipantBandKind" />
|
||||
<xsd:attribute name="choreographyActivityShape" type="xsd:QName"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="BPMNLabel">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Label">
|
||||
<xsd:attribute name="labelStyle" type="xsd:QName" />
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="BPMNLabelStyle">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Style">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dc:Font" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:simpleType name="ParticipantBandKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="top_initiating" />
|
||||
<xsd:enumeration value="middle_initiating" />
|
||||
<xsd:enumeration value="bottom_initiating" />
|
||||
<xsd:enumeration value="top_non_initiating" />
|
||||
<xsd:enumeration value="middle_non_initiating" />
|
||||
<xsd:enumeration value="bottom_non_initiating" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="MessageVisibleKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="initiating" />
|
||||
<xsd:enumeration value="non_initiating" />
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
29
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/DC.xsd
Normal file
29
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/DC.xsd
Normal file
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" targetNamespace="http://www.omg.org/spec/DD/20100524/DC" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:element name="Font" type="dc:Font"/>
|
||||
<xsd:element name="Point" type="dc:Point"/>
|
||||
<xsd:element name="Bounds" type="dc:Bounds"/>
|
||||
|
||||
<xsd:complexType name="Font">
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
<xsd:attribute name="size" type="xsd:double"/>
|
||||
<xsd:attribute name="isBold" type="xsd:boolean"/>
|
||||
<xsd:attribute name="isItalic" type="xsd:boolean"/>
|
||||
<xsd:attribute name="isUnderline" type="xsd:boolean"/>
|
||||
<xsd:attribute name="isStrikeThrough" type="xsd:boolean"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Point">
|
||||
<xsd:attribute name="x" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="y" type="xsd:double" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Bounds">
|
||||
<xsd:attribute name="x" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="y" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="width" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="height" type="xsd:double" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
100
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/DI.xsd
Normal file
100
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/DI.xsd
Normal file
@ -0,0 +1,100 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/DD/20100524/DI" targetNamespace="http://www.omg.org/spec/DD/20100524/DI" elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.omg.org/spec/DD/20100524/DC" schemaLocation="DC.xsd" />
|
||||
|
||||
<xsd:element name="DiagramElement" type="di:DiagramElement" />
|
||||
<xsd:element name="Diagram" type="di:Diagram" />
|
||||
<xsd:element name="Style" type="di:Style" />
|
||||
<xsd:element name="Node" type="di:Node" />
|
||||
<xsd:element name="Edge" type="di:Edge" />
|
||||
<xsd:element name="Shape" type="di:Shape" />
|
||||
<xsd:element name="Plane" type="di:Plane" />
|
||||
<xsd:element name="LabeledEdge" type="di:LabeledEdge" />
|
||||
<xsd:element name="Label" type="di:Label" />
|
||||
<xsd:element name="LabeledShape" type="di:LabeledShape" />
|
||||
|
||||
<xsd:complexType abstract="true" name="DiagramElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="extension" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" />
|
||||
<xsd:anyAttribute namespace="##other" processContents="lax" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="Diagram">
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="documentation" type="xsd:string" />
|
||||
<xsd:attribute name="resolution" type="xsd:double" />
|
||||
<xsd:attribute name="id" type="xsd:ID" />
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="Node">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:DiagramElement" />
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="Edge">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:DiagramElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element maxOccurs="unbounded" minOccurs="2" name="waypoint" type="dc:Point" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="LabeledEdge">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Edge" />
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="Shape">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Node">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dc:Bounds" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="LabeledShape">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Shape" />
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="Label">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Node">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dc:Bounds" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="Plane">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Node">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="di:DiagramElement" maxOccurs="unbounded" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType abstract="true" name="Style">
|
||||
<xsd:attribute name="id" type="xsd:ID" />
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
1559
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/Semantic.xsd
Normal file
1559
SpiffWorkflow/SpiffWorkflow/bpmn/parser/schema/Semantic.xsd
Normal file
File diff suppressed because it is too large
Load Diff
@ -0,0 +1 @@
|
||||
"""__init.py__"""
|
@ -138,7 +138,6 @@ class SubprocessParser:
|
||||
|
||||
task_parser.process_parser.parser.create_parser(
|
||||
task_parser.node,
|
||||
doc_xpath=task_parser.doc_xpath,
|
||||
filename=task_parser.filename,
|
||||
lane=task_parser.lane
|
||||
)
|
||||
|
@ -46,7 +46,7 @@ class SubWorkflowTask(BpmnSpecMixin):
|
||||
|
||||
if len(subworkflow.spec.data_outputs) == 0:
|
||||
# Copy all workflow data if no outputs are specified
|
||||
my_task.data = deepcopy(subworkflow.data)
|
||||
my_task.data = deepcopy(subworkflow.last_task.data)
|
||||
else:
|
||||
end = subworkflow.get_tasks_from_spec_name('End', workflow=subworkflow)
|
||||
# Otherwise only copy data with the specified names
|
||||
|
@ -1,10 +1,10 @@
|
||||
from ..specs.UserTask import UserTask
|
||||
from ..parser.UserTaskParser import UserTaskParser
|
||||
from ..parser.task_spec import UserTaskParser
|
||||
from ...bpmn.parser.BpmnParser import full_tag
|
||||
|
||||
from SpiffWorkflow.dmn.parser.BpmnDmnParser import BpmnDmnParser
|
||||
from SpiffWorkflow.dmn.specs.BusinessRuleTask import BusinessRuleTask
|
||||
from SpiffWorkflow.camunda.parser.business_rule_task import BusinessRuleTaskParser
|
||||
from SpiffWorkflow.camunda.parser.task_spec import BusinessRuleTaskParser
|
||||
|
||||
from SpiffWorkflow.bpmn.specs.events import EndEvent, IntermediateThrowEvent, StartEvent, IntermediateCatchEvent, BoundaryEvent
|
||||
from .event_parsers import CamundaStartEventParser, CamundaEndEventParser, \
|
||||
|
@ -1,38 +0,0 @@
|
||||
from SpiffWorkflow.bpmn.parser.util import xpath_eval
|
||||
from SpiffWorkflow.bpmn.parser.TaskParser import TaskParser
|
||||
|
||||
from SpiffWorkflow.dmn.specs.BusinessRuleTask import BusinessRuleTask
|
||||
|
||||
CAMUNDA_MODEL_NS = 'http://camunda.org/schema/1.0/bpmn'
|
||||
|
||||
|
||||
class BusinessRuleTaskParser(TaskParser):
|
||||
dmn_debug = None
|
||||
|
||||
def __init__(self, process_parser, spec_class, node, lane=None):
|
||||
super(BusinessRuleTaskParser, self).__init__(process_parser, spec_class, node, lane)
|
||||
self.xpath = xpath_eval(self.node, extra_ns={'camunda': CAMUNDA_MODEL_NS})
|
||||
|
||||
def create_task(self):
|
||||
decision_ref = self.get_decision_ref(self.node)
|
||||
return BusinessRuleTask(self.spec, self.get_task_spec_name(),
|
||||
dmnEngine=self.process_parser.parser.get_engine(decision_ref, self.node),
|
||||
lane=self.lane, position=self.position,
|
||||
description=self.node.get('name', None),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def get_decision_ref(node):
|
||||
return node.attrib['{' + CAMUNDA_MODEL_NS + '}decisionRef']
|
||||
|
||||
|
||||
def _on_trigger(self, my_task):
|
||||
pass
|
||||
|
||||
def serialize(self, serializer, **kwargs):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def deserialize(cls, serializer, wf_spec, s_state, **kwargs):
|
||||
pass
|
||||
|
@ -1,18 +1,54 @@
|
||||
from ...bpmn.parser.TaskParser import TaskParser
|
||||
from ...bpmn.parser.util import xpath_eval
|
||||
from ...camunda.specs.UserTask import Form, FormField, EnumFormField
|
||||
|
||||
from SpiffWorkflow.bpmn.parser.TaskParser import TaskParser
|
||||
from SpiffWorkflow.bpmn.parser.node_parser import DEFAULT_NSMAP
|
||||
|
||||
from SpiffWorkflow.dmn.specs.BusinessRuleTask import BusinessRuleTask
|
||||
|
||||
CAMUNDA_MODEL_NS = 'http://camunda.org/schema/1.0/bpmn'
|
||||
|
||||
|
||||
|
||||
class BusinessRuleTaskParser(TaskParser):
|
||||
dmn_debug = None
|
||||
|
||||
def __init__(self, process_parser, spec_class, node, lane=None):
|
||||
nsmap = DEFAULT_NSMAP.copy()
|
||||
nsmap.update({'camunda': CAMUNDA_MODEL_NS})
|
||||
super(BusinessRuleTaskParser, self).__init__(process_parser, spec_class, node, nsmap, lane)
|
||||
|
||||
def create_task(self):
|
||||
decision_ref = self.get_decision_ref(self.node)
|
||||
return BusinessRuleTask(self.spec, self.get_task_spec_name(),
|
||||
dmnEngine=self.process_parser.parser.get_engine(decision_ref, self.node),
|
||||
lane=self.lane, position=self.position,
|
||||
description=self.node.get('name', None),
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
def get_decision_ref(node):
|
||||
return node.attrib['{' + CAMUNDA_MODEL_NS + '}decisionRef']
|
||||
|
||||
def _on_trigger(self, my_task):
|
||||
pass
|
||||
|
||||
def serialize(self, serializer, **kwargs):
|
||||
pass
|
||||
|
||||
@classmethod
|
||||
def deserialize(cls, serializer, wf_spec, s_state, **kwargs):
|
||||
pass
|
||||
|
||||
|
||||
class UserTaskParser(TaskParser):
|
||||
"""
|
||||
Base class for parsing User Tasks
|
||||
"""
|
||||
|
||||
def __init__(self, process_parser, spec_class, node, lane=None):
|
||||
super(UserTaskParser, self).__init__(process_parser, spec_class, node, lane)
|
||||
self.xpath = xpath_eval(node, extra_ns={'camunda': CAMUNDA_MODEL_NS})
|
||||
nsmap = DEFAULT_NSMAP.copy()
|
||||
nsmap.update({'camunda': CAMUNDA_MODEL_NS})
|
||||
super(UserTaskParser, self).__init__(process_parser, spec_class, node, nsmap, lane)
|
||||
|
||||
def create_task(self):
|
||||
form = self.get_form()
|
@ -1,19 +1,31 @@
|
||||
import glob
|
||||
import os
|
||||
|
||||
from ...bpmn.parser.util import xpath_eval
|
||||
from lxml import etree
|
||||
|
||||
from ...bpmn.parser.util import full_tag
|
||||
from ...bpmn.parser.ValidationException import ValidationException
|
||||
|
||||
from ...bpmn.parser.BpmnParser import BpmnParser
|
||||
from ...dmn.parser.DMNParser import DMNParser
|
||||
from ...bpmn.parser.BpmnParser import BpmnParser, BpmnValidator
|
||||
from ...dmn.parser.DMNParser import DMNParser, get_dmn_ns
|
||||
from ..engine.DMNEngine import DMNEngine
|
||||
from lxml import etree
|
||||
|
||||
XSD_DIR = os.path.join(os.path.dirname(__file__), 'schema')
|
||||
SCHEMAS = {
|
||||
'http://www.omg.org/spec/DMN/20151101/dmn.xsd': os.path.join(XSD_DIR, 'DMN.xsd'),
|
||||
'http://www.omg.org/spec/DMN/20180521/MODEL/': os.path.join(XSD_DIR, 'DMN12.xsd'),
|
||||
'https://www.omg.org/spec/DMN/20191111/MODEL/': os.path.join(XSD_DIR, 'DMN13.xsd'),
|
||||
}
|
||||
|
||||
|
||||
class BpmnDmnParser(BpmnParser):
|
||||
|
||||
def __init__(self):
|
||||
super().__init__()
|
||||
def __init__(self, namespaces=None, validator=None, dmn_schemas=None):
|
||||
super().__init__(namespaces, validator)
|
||||
self.dmn_schemas = dmn_schemas or SCHEMAS
|
||||
self.dmn_parsers = {}
|
||||
self.dmn_parsers_by_name = {}
|
||||
self.dmn_dependencies = set()
|
||||
|
||||
def get_engine(self, decision_ref, node):
|
||||
if decision_ref not in self.dmn_parsers:
|
||||
@ -24,15 +36,23 @@ class BpmnDmnParser(BpmnParser):
|
||||
dmn_parser = self.dmn_parsers[decision_ref]
|
||||
dmn_parser.parse()
|
||||
decision = dmn_parser.decision
|
||||
|
||||
return DMNEngine(decision.decisionTables[0])
|
||||
|
||||
def add_dmn_xml(self, node, filename=None):
|
||||
"""
|
||||
Add the given lxml representation of the DMN file to the parser's set.
|
||||
"""
|
||||
xpath = xpath_eval(node)
|
||||
dmn_parser = DMNParser(
|
||||
self, node, filename=filename, doc_xpath=xpath)
|
||||
nsmap = get_dmn_ns(node)
|
||||
# We have to create a dmn validator on the fly, because we support multiple versions
|
||||
# If we have a bpmn validator, assume DMN validation should be done as well.
|
||||
# I don't like this, but I don't see a better solution.
|
||||
schema = self.dmn_schemas.get(nsmap.get('dmn'))
|
||||
if self.validator and schema is not None:
|
||||
validator = BpmnValidator(schema)
|
||||
validator.validate(node, filename)
|
||||
|
||||
dmn_parser = DMNParser(self, node, nsmap, filename=filename)
|
||||
self.dmn_parsers[dmn_parser.get_id()] = dmn_parser
|
||||
self.dmn_parsers_by_name[dmn_parser.get_name()] = dmn_parser
|
||||
|
||||
@ -59,3 +79,16 @@ class BpmnDmnParser(BpmnParser):
|
||||
self.add_dmn_xml(etree.parse(f).getroot(), filename=filename)
|
||||
finally:
|
||||
f.close()
|
||||
|
||||
def get_dependencies(self):
|
||||
return self.process_dependencies.union(self.dmn_dependencies)
|
||||
|
||||
def get_dmn_dependencies(self):
|
||||
return self.dmn_dependencies
|
||||
|
||||
def _find_dependencies(self, process):
|
||||
super()._find_dependencies(process)
|
||||
parser_cls, cls = self._get_parser_class(full_tag('businessRuleTask'))
|
||||
for business_rule in process.xpath('.//bpmn:businessRuleTask',namespaces=self.namespaces):
|
||||
self.dmn_dependencies.add(parser_cls.get_decision_ref(business_rule))
|
||||
|
||||
|
@ -1,25 +1,28 @@
|
||||
import ast
|
||||
|
||||
from SpiffWorkflow.bpmn.parser.node_parser import NodeParser, DEFAULT_NSMAP
|
||||
|
||||
from ...bpmn.parser.util import xpath_eval
|
||||
|
||||
from ...dmn.specs.model import Decision, DecisionTable, InputEntry, \
|
||||
OutputEntry, Input, Output, Rule
|
||||
|
||||
|
||||
def get_dmn_ns(node):
|
||||
"""
|
||||
Returns the namespace definition for the current DMN
|
||||
|
||||
:param node: the XML node for the DMN document
|
||||
"""
|
||||
nsmap = DEFAULT_NSMAP.copy()
|
||||
if 'http://www.omg.org/spec/DMN/20151101/dmn.xsd' in node.nsmap.values():
|
||||
return 'http://www.omg.org/spec/DMN/20151101/dmn.xsd'
|
||||
nsmap['dmn'] = 'http://www.omg.org/spec/DMN/20151101/dmn.xsd'
|
||||
elif 'http://www.omg.org/spec/DMN/20180521/DI/' in node.nsmap.values():
|
||||
nsmap['dmn'] = 'http://www.omg.org/spec/DMN/20180521/DI/'
|
||||
elif 'https://www.omg.org/spec/DMN/20191111/MODEL/' in node.nsmap.values():
|
||||
return 'https://www.omg.org/spec/DMN/20191111/MODEL/'
|
||||
return None
|
||||
nsmap['dmn'] = 'https://www.omg.org/spec/DMN/20191111/MODEL/'
|
||||
return nsmap
|
||||
|
||||
|
||||
class DMNParser(object):
|
||||
class DMNParser(NodeParser):
|
||||
"""
|
||||
Please note this DMN Parser still needs a lot of work. A few key areas
|
||||
that need to be addressed:
|
||||
@ -30,7 +33,7 @@ class DMNParser(object):
|
||||
|
||||
DT_FORMAT = '%Y-%m-%dT%H:%M:%S'
|
||||
|
||||
def __init__(self, p, node, svg=None, filename=None, doc_xpath=None):
|
||||
def __init__(self, p, node, nsmap, svg=None, filename=None):
|
||||
"""
|
||||
Constructor.
|
||||
|
||||
@ -40,14 +43,13 @@ class DMNParser(object):
|
||||
(optional)
|
||||
:param filename: the source BMN filename (optional)
|
||||
"""
|
||||
super().__init__(node, nsmap, filename=filename)
|
||||
|
||||
self.parser = p
|
||||
self.node = node
|
||||
self.decision = None
|
||||
self.svg = svg
|
||||
self.filename = filename
|
||||
self.doc_xpath = doc_xpath
|
||||
self.dmn_ns = get_dmn_ns(self.node)
|
||||
self.xpath = xpath_eval(self.node, {'dmn': self.dmn_ns})
|
||||
|
||||
def parse(self):
|
||||
self.decision = self._parse_decision(self.node.findall('{*}decision'))
|
||||
@ -117,11 +119,12 @@ class DMNParser(object):
|
||||
|
||||
def _parse_input(self, input_element):
|
||||
type_ref = None
|
||||
xpath = xpath_eval(input_element, {'dmn': self.dmn_ns})
|
||||
prefix = self.nsmap['dmn']
|
||||
xpath = xpath_eval(input_element, {'dmn': prefix})
|
||||
expression = None
|
||||
for input_expression in xpath('dmn:inputExpression'):
|
||||
type_ref = input_expression.attrib.get('typeRef', '')
|
||||
expression_node = input_expression.find('{' + self.dmn_ns + '}text')
|
||||
expression_node = input_expression.find('{' + prefix + '}text')
|
||||
if expression_node is not None:
|
||||
expression = expression_node.text
|
||||
|
||||
|
159
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DC.xsd
Normal file
159
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DC.xsd
Normal file
@ -0,0 +1,159 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
|
||||
targetNamespace="http://www.omg.org/spec/DMN/20180521/DC/"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:element name="Color" type="dc:Color"/>
|
||||
<xsd:element name="Point" type="dc:Point"/>
|
||||
<xsd:element name="Bounds" type="dc:Bounds"/>
|
||||
<xsd:element name="Dimension" type="dc:Dimension"/>
|
||||
|
||||
<xsd:complexType name="Color">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Color is a data type that represents a color value in the RGB format.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:attribute name="red" type="dc:rgb" use="required"/>
|
||||
<xsd:attribute name="green" type="dc:rgb" use="required"/>
|
||||
<xsd:attribute name="blue" type="dc:rgb" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:simpleType name="rgb">
|
||||
<xsd:restriction base="xsd:int">
|
||||
<xsd:minInclusive value="0"/>
|
||||
<xsd:maxInclusive value="255"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:complexType name="Point">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>A Point specifies an location in some x-y coordinate system.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:attribute name="x" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="y" type="xsd:double" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Dimension">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Dimension specifies two lengths (width and height) along the x and y axes in some x-y coordinate system.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:attribute name="width" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="height" type="xsd:double" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Bounds">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Bounds specifies a rectangular area in some x-y coordinate system that is defined by a location (x and y) and a size (width and height).</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:attribute name="x" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="y" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="width" type="xsd:double" use="required"/>
|
||||
<xsd:attribute name="height" type="xsd:double" use="required"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:simpleType name="AlignmentKind">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>AlignmentKind enumerates the possible options for alignment for layout purposes.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="start"/>
|
||||
<xsd:enumeration value="end"/>
|
||||
<xsd:enumeration value="center"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
<xsd:simpleType name="KnownColor">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>KnownColor is an enumeration of 17 known colors.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="maroon">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #800000</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="red">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #FF0000</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="orange">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #FFA500</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="yellow">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #FFFF00</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="olive">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #808000</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="purple">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #800080</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="fuchsia">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #FF00FF</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="white">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #FFFFFF</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="lime">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #00FF00</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="green">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #008000</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="navy">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #000080</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="blue">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #0000FF</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="aqua">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #00FFFF</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="teal">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #008080</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="black">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #000000</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="silver">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #C0C0C0</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
<xsd:enumeration value="gray">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a color with a value of #808080</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:enumeration>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
|
||||
</xsd:schema>
|
438
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMN.xsd
Normal file
438
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMN.xsd
Normal file
@ -0,0 +1,438 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns="http://www.omg.org/spec/DMN/20151101/dmn.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.omg.org/spec/DMN/20151101/dmn.xsd" elementFormDefault="qualified">
|
||||
<xsd:element name="DMNElement" type="tDMNElement" abstract="true"/>
|
||||
<xsd:complexType name="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="extensionElements" minOccurs="0" maxOccurs="1">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="label" type="xsd:string" use="optional"/>
|
||||
<xsd:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="namedElement" type="tNamedElement" abstract="true" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tDMNElementReference">
|
||||
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="definitions" type="tDefinitions" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tDefinitions">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="import" type="tImport" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="itemDefinition" type="tItemDefinition" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="drgElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="elementCollection" type="tElementCollection" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="businessContextElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional" default="http://www.omg.org/spec/FEEL/20140401"/>
|
||||
<xsd:attribute name="typeLanguage" type="xsd:anyURI" use="optional" default="http://www.omg.org/spec/FEEL/20140401"/>
|
||||
<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="exporter" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="exporterVersion" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="import" type="tImport"/>
|
||||
<xsd:complexType name="tImport">
|
||||
<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="locationURI" type="xsd:anyURI" use="optional"/>
|
||||
<xsd:attribute name="importType" type="xsd:anyURI" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="elementCollection" type="tElementCollection" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tElementCollection">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="drgElement" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="drgElement" type="tDRGElement" abstract="true" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tDRGElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decision" type="tDecision" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tDecision">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="question" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="allowedAnswers" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
<xsd:element name="informationRequirement" type="tInformationRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="supportedObjective" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="impactedPerformanceIndicator" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionMaker" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionOwner" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="usingProcess" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="usingTask" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- decisionLogic -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="businessContextElement" type="tBusinessContextElement" abstract="true"/>
|
||||
<xsd:complexType name="tBusinessContextElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="performanceIndicator" type="tPerformanceIndicator" substitutionGroup="businessContextElement"/>
|
||||
<xsd:complexType name="tPerformanceIndicator">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tBusinessContextElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="impactingDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="organizationUnit" type="tOrganizationUnit" substitutionGroup="businessContextElement"/>
|
||||
<xsd:complexType name="tOrganizationUnit">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tBusinessContextElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="decisionMade" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionOwned" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="businessKnowledgeModel" type="tBusinessKnowledgeModel" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tBusinessKnowledgeModel">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="encapsulatedLogic" type="tFunctionDefinition" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="inputData" type="tInputData" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tInputData">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="knowledgeSource" type="tKnowledgeSource" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tKnowledgeSource">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="type" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="owner" type="tDMNElementReference" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="locationURI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tInformationRequirement">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="1" maxOccurs="1">
|
||||
<xsd:element name="requiredDecision" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredInput" type="tDMNElementReference"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tKnowledgeRequirement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="requiredKnowledge" type="tDMNElementReference" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tAuthorityRequirement">
|
||||
<xsd:choice minOccurs="1" maxOccurs="1">
|
||||
<xsd:element name="requiredDecision" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredInput" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredAuthority" type="tDMNElementReference"/>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="expression" type="tExpression" abstract="true"/>
|
||||
<xsd:complexType name="tExpression">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:attribute name="typeRef" type="xsd:QName"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="itemDefinition" type="tItemDefinition" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tItemDefinition">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:choice>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="typeRef" type="xsd:QName"/>
|
||||
<xsd:element name="allowedValues" type="tUnaryTests" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:element name="itemComponent" type="tItemDefinition" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="typeLanguage" type="xsd:anyURI" use="optional"/>
|
||||
<xsd:attribute name="isCollection" type="xsd:boolean" use="optional" default="false"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="literalExpression" type="tLiteralExpression" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tLiteralExpression">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:choice minOccurs="0" maxOccurs="1">
|
||||
<xsd:element name="text" type="xsd:string"/>
|
||||
<xsd:element name="importedValues" type="tImportedValues"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="invocation" type="tInvocation" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tInvocation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<!-- calledFunction -->
|
||||
<xsd:element ref="expression" minOccurs="0"/>
|
||||
<xsd:element name="binding" type="tBinding" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tBinding">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameter" type="tInformationItem" minOccurs="1" maxOccurs="1"/>
|
||||
<!-- bindingFormula -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="informationItem" type="tInformationItem" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tInformationItem">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="typeRef" type="xsd:QName"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decisionTable" type="tDecisionTable" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tDecisionTable">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="input" type="tInputClause" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="output" type="tOutputClause" maxOccurs="unbounded"/>
|
||||
<!-- NB: when the hit policy is FIRST or RULE ORDER, the ordering of the rules is significant and MUST be preserved -->
|
||||
<xsd:element name="rule" type="tDecisionRule" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="hitPolicy" type="tHitPolicy" use="optional" default="UNIQUE"/>
|
||||
<xsd:attribute name="aggregation" type="tBuiltinAggregator" use="optional"/>
|
||||
<xsd:attribute name="preferredOrientation" type="tDecisionTableOrientation" use="optional" default="Rule-as-Row"/>
|
||||
<xsd:attribute name="outputLabel" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tDecisionRule">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="inputEntry" type="tUnaryTests" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="outputEntry" type="tLiteralExpression" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tImportedValues">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tImport">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="importedElement" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="artifact" type="tArtifact" abstract="true" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tArtifact">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="textAnnotation" type="tTextAnnotation" substitutionGroup="artifact"/>
|
||||
<xsd:complexType name="tTextAnnotation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tArtifact">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="textFormat" type="xsd:string" default="text/plain"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="association" type="tAssociation" substitutionGroup="artifact"/>
|
||||
<xsd:complexType name="tAssociation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tArtifact">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sourceRef" type="tDMNElementReference"/>
|
||||
<xsd:element name="targetRef" type="tDMNElementReference"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="associationDirection" type="tAssociationDirection" default="None"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="tAssociationDirection">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="None"/>
|
||||
<xsd:enumeration value="One"/>
|
||||
<xsd:enumeration value="Both"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="tDecisionTableOrientation">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="Rule-as-Row"/>
|
||||
<xsd:enumeration value="Rule-as-Column"/>
|
||||
<xsd:enumeration value="CrossTable"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="tHitPolicy">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="UNIQUE"/>
|
||||
<xsd:enumeration value="FIRST"/>
|
||||
<xsd:enumeration value="PRIORITY"/>
|
||||
<xsd:enumeration value="ANY"/>
|
||||
<xsd:enumeration value="COLLECT"/>
|
||||
<xsd:enumeration value="RULE ORDER"/>
|
||||
<xsd:enumeration value="OUTPUT ORDER"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="tBuiltinAggregator">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="SUM"/>
|
||||
<xsd:enumeration value="COUNT"/>
|
||||
<xsd:enumeration value="MIN"/>
|
||||
<xsd:enumeration value="MAX"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="tOutputClause">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="outputValues" type="tUnaryTests" minOccurs="0"/>
|
||||
<xsd:element name="defaultOutputEntry" type="tLiteralExpression" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="typeRef" type="xsd:QName"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tInputClause">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="inputExpression" type="tLiteralExpression"/>
|
||||
<xsd:element name="inputValues" type="tUnaryTests" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="context" type="tContext" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tContext">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="contextEntry" type="tContextEntry" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tContextEntry">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0" maxOccurs="1"/>
|
||||
<!-- value -->
|
||||
<xsd:element ref="expression" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="functionDefinition" type="tFunctionDefinition" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tFunctionDefinition">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="formalParameter" type="tInformationItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- body -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="relation" type="tRelation" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tRelation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="column" type="tInformationItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="row" type="tList" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="list" type="tList" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tList">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<!-- element -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tUnaryTests">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tNamedElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decisionService" type="tDecisionService" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tDecisionService">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="outputDecision" type="tDMNElementReference" maxOccurs="unbounded"/>
|
||||
<xsd:element name="encapsulatedDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="inputDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="inputData" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
504
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMN12.xsd
Normal file
504
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMN12.xsd
Normal file
@ -0,0 +1,504 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema elementFormDefault="qualified"
|
||||
xmlns="http://www.omg.org/spec/DMN/20180521/MODEL/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:dmndi="http://www.omg.org/spec/DMN/20180521/DMNDI/"
|
||||
targetNamespace="http://www.omg.org/spec/DMN/20180521/MODEL/">
|
||||
|
||||
<xsd:import namespace="http://www.omg.org/spec/DMN/20180521/DMNDI/"
|
||||
schemaLocation="DMNDI12.xsd">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Include the DMN Diagram Interchange (DI) schema
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:import>
|
||||
|
||||
<xsd:element name="DMNElement" type="tDMNElement" abstract="true"/>
|
||||
<xsd:complexType name="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="extensionElements" minOccurs="0" maxOccurs="1">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="label" type="xsd:string" use="optional"/>
|
||||
<xsd:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="namedElement" type="tNamedElement" abstract="true" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tNamedElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tDMNElementReference">
|
||||
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="definitions" type="tDefinitions" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tDefinitions">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="import" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="itemDefinition" type="tItemDefinition" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="drgElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="elementCollection" type="tElementCollection" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="businessContextElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="dmndi:DMNDI" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional" default="http://www.omg.org/spec/DMN/20180521/FEEL/"/>
|
||||
<xsd:attribute name="typeLanguage" type="xsd:anyURI" use="optional" default="http://www.omg.org/spec/DMN/20180521/FEEL/"/>
|
||||
<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="exporter" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="exporterVersion" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="import" type="tImport" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tImport">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="locationURI" type="xsd:anyURI" use="optional"/>
|
||||
<xsd:attribute name="importType" type="xsd:anyURI" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="elementCollection" type="tElementCollection" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tElementCollection">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="drgElement" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="drgElement" type="tDRGElement" abstract="true" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tDRGElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decision" type="tDecision" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tDecision">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="question" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="allowedAnswers" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
<xsd:element name="informationRequirement" type="tInformationRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="supportedObjective" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="impactedPerformanceIndicator" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionMaker" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionOwner" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="usingProcess" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="usingTask" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- decisionLogic -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="businessContextElement" type="tBusinessContextElement" abstract="true"/>
|
||||
<xsd:complexType name="tBusinessContextElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="performanceIndicator" type="tPerformanceIndicator" substitutionGroup="businessContextElement"/>
|
||||
<xsd:complexType name="tPerformanceIndicator">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tBusinessContextElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="impactingDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="organizationUnit" type="tOrganizationUnit" substitutionGroup="businessContextElement"/>
|
||||
<xsd:complexType name="tOrganizationUnit">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tBusinessContextElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="decisionMade" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionOwned" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="invocable" type="tInvocable" abstract="true" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tInvocable">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="businessKnowledgeModel" type="tBusinessKnowledgeModel" substitutionGroup="invocable"/>
|
||||
<xsd:complexType name="tBusinessKnowledgeModel">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tInvocable">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="encapsulatedLogic" type="tFunctionDefinition" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="inputData" type="tInputData" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tInputData">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="knowledgeSource" type="tKnowledgeSource" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tKnowledgeSource">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="type" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="owner" type="tDMNElementReference" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="locationURI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="informationRequirement" type="tInformationRequirement" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tInformationRequirement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="1" maxOccurs="1">
|
||||
<xsd:element name="requiredDecision" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredInput" type="tDMNElementReference"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tKnowledgeRequirement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="requiredKnowledge" type="tDMNElementReference" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tAuthorityRequirement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:choice minOccurs="1" maxOccurs="1">
|
||||
<xsd:element name="requiredDecision" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredInput" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredAuthority" type="tDMNElementReference"/>
|
||||
</xsd:choice>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="expression" type="tExpression" abstract="true"/>
|
||||
<xsd:complexType name="tExpression">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:attribute name="typeRef" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="itemDefinition" type="tItemDefinition" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tItemDefinition">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:choice>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="typeRef" type="xsd:string"/>
|
||||
<xsd:element name="allowedValues" type="tUnaryTests" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:element name="itemComponent" type="tItemDefinition" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="typeLanguage" type="xsd:anyURI" use="optional"/>
|
||||
<xsd:attribute name="isCollection" type="xsd:boolean" use="optional" default="false"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="literalExpression" type="tLiteralExpression" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tLiteralExpression">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:choice minOccurs="0" maxOccurs="1">
|
||||
<xsd:element name="text" type="xsd:string"/>
|
||||
<xsd:element name="importedValues" type="tImportedValues"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="invocation" type="tInvocation" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tInvocation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<!-- calledFunction -->
|
||||
<xsd:element ref="expression" minOccurs="0"/>
|
||||
<xsd:element name="binding" type="tBinding" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tBinding">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameter" type="tInformationItem" minOccurs="1" maxOccurs="1"/>
|
||||
<!-- bindingFormula -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="informationItem" type="tInformationItem" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tInformationItem">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="typeRef" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decisionTable" type="tDecisionTable" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tDecisionTable">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="input" type="tInputClause" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="output" type="tOutputClause" maxOccurs="unbounded"/>
|
||||
<xsd:element name="annotation" type="tRuleAnnotationClause" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- NB: when the hit policy is FIRST or RULE ORDER, the ordering of the rules is significant and MUST be preserved -->
|
||||
<xsd:element name="rule" type="tDecisionRule" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="hitPolicy" type="tHitPolicy" use="optional" default="UNIQUE"/>
|
||||
<xsd:attribute name="aggregation" type="tBuiltinAggregator" use="optional"/>
|
||||
<xsd:attribute name="preferredOrientation" type="tDecisionTableOrientation" use="optional" default="Rule-as-Row"/>
|
||||
<xsd:attribute name="outputLabel" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tInputClause">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="inputExpression" type="tLiteralExpression"/>
|
||||
<xsd:element name="inputValues" type="tUnaryTests" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tOutputClause">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="outputValues" type="tUnaryTests" minOccurs="0"/>
|
||||
<xsd:element name="defaultOutputEntry" type="tLiteralExpression" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="typeRef" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tRuleAnnotationClause">
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tDecisionRule">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="inputEntry" type="tUnaryTests" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="outputEntry" type="tLiteralExpression" maxOccurs="unbounded"/>
|
||||
<xsd:element name="annotationEntry" type="tRuleAnnotation" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tRuleAnnotation">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="tHitPolicy">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="UNIQUE"/>
|
||||
<xsd:enumeration value="FIRST"/>
|
||||
<xsd:enumeration value="PRIORITY"/>
|
||||
<xsd:enumeration value="ANY"/>
|
||||
<xsd:enumeration value="COLLECT"/>
|
||||
<xsd:enumeration value="RULE ORDER"/>
|
||||
<xsd:enumeration value="OUTPUT ORDER"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="tBuiltinAggregator">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="SUM"/>
|
||||
<xsd:enumeration value="COUNT"/>
|
||||
<xsd:enumeration value="MIN"/>
|
||||
<xsd:enumeration value="MAX"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="tDecisionTableOrientation">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="Rule-as-Row"/>
|
||||
<xsd:enumeration value="Rule-as-Column"/>
|
||||
<xsd:enumeration value="CrossTable"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="tImportedValues">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tImport">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="importedElement" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="artifact" type="tArtifact" abstract="true" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tArtifact">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="textAnnotation" type="tTextAnnotation" substitutionGroup="artifact"/>
|
||||
<xsd:complexType name="tTextAnnotation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tArtifact">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="textFormat" type="xsd:string" default="text/plain"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="association" type="tAssociation" substitutionGroup="artifact"/>
|
||||
<xsd:complexType name="tAssociation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tArtifact">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sourceRef" type="tDMNElementReference"/>
|
||||
<xsd:element name="targetRef" type="tDMNElementReference"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="associationDirection" type="tAssociationDirection" default="None"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="tAssociationDirection">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="None"/>
|
||||
<xsd:enumeration value="One"/>
|
||||
<xsd:enumeration value="Both"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:element name="context" type="tContext" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tContext">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="contextEntry" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="contextEntry" type="tContextEntry" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tContextEntry">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0" maxOccurs="1"/>
|
||||
<!-- value -->
|
||||
<xsd:element ref="expression" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="functionDefinition" type="tFunctionDefinition" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tFunctionDefinition">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="formalParameter" type="tInformationItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- body -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="kind" type="tFunctionKind" default="FEEL"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="tFunctionKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="FEEL"/>
|
||||
<xsd:enumeration value="Java"/>
|
||||
<xsd:enumeration value="PMML"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:element name="relation" type="tRelation" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tRelation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="column" type="tInformationItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="row" type="tList" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="list" type="tList" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tList">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<!-- element -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tUnaryTests">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decisionService" type="tDecisionService" substitutionGroup="invocable"/>
|
||||
<xsd:complexType name="tDecisionService">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tInvocable">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="outputDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="encapsulatedDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="inputDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="inputData" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
524
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMN13.xsd
Normal file
524
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMN13.xsd
Normal file
@ -0,0 +1,524 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema elementFormDefault="qualified"
|
||||
xmlns="https://www.omg.org/spec/DMN/20191111/MODEL/"
|
||||
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/"
|
||||
targetNamespace="https://www.omg.org/spec/DMN/20191111/MODEL/">
|
||||
|
||||
<xsd:import namespace="https://www.omg.org/spec/DMN/20191111/DMNDI/"
|
||||
schemaLocation="DMNDI13.xsd">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>
|
||||
Include the DMN Diagram Interchange (DI) schema
|
||||
</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:import>
|
||||
|
||||
<xsd:element name="DMNElement" type="tDMNElement" abstract="true"/>
|
||||
<xsd:complexType name="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="description" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="extensionElements" minOccurs="0" maxOccurs="1">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID" use="optional"/>
|
||||
<xsd:attribute name="label" type="xsd:string" use="optional"/>
|
||||
<xsd:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="namedElement" type="tNamedElement" abstract="true" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tNamedElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:attribute name="name" type="xsd:string" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tDMNElementReference">
|
||||
<xsd:attribute name="href" type="xsd:anyURI" use="required"/>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="definitions" type="tDefinitions" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tDefinitions">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="import" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="itemDefinition" type="tItemDefinition" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="drgElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="artifact" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="elementCollection" type="tElementCollection" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="businessContextElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="dmndi:DMNDI" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional" default="https://www.omg.org/spec/DMN/20191111/FEEL/"/>
|
||||
<xsd:attribute name="typeLanguage" type="xsd:anyURI" use="optional" default="https://www.omg.org/spec/DMN/20191111/FEEL/"/>
|
||||
<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="exporter" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="exporterVersion" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="import" type="tImport" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tImport">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="namespace" type="xsd:anyURI" use="required"/>
|
||||
<xsd:attribute name="locationURI" type="xsd:anyURI" use="optional"/>
|
||||
<xsd:attribute name="importType" type="xsd:anyURI" use="required"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="elementCollection" type="tElementCollection" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tElementCollection">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="drgElement" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="drgElement" type="tDRGElement" abstract="true" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tDRGElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decision" type="tDecision" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tDecision">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="question" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="allowedAnswers" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
<xsd:element name="informationRequirement" type="tInformationRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="supportedObjective" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="impactedPerformanceIndicator" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionMaker" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionOwner" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="usingProcess" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="usingTask" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- decisionLogic -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="businessContextElement" type="tBusinessContextElement" abstract="true"/>
|
||||
<xsd:complexType name="tBusinessContextElement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="URI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="performanceIndicator" type="tPerformanceIndicator" substitutionGroup="businessContextElement"/>
|
||||
<xsd:complexType name="tPerformanceIndicator">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tBusinessContextElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="impactingDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="organizationUnit" type="tOrganizationUnit" substitutionGroup="businessContextElement"/>
|
||||
<xsd:complexType name="tOrganizationUnit">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tBusinessContextElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="decisionMade" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="decisionOwned" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="invocable" type="tInvocable" abstract="true" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tInvocable">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="businessKnowledgeModel" type="tBusinessKnowledgeModel" substitutionGroup="invocable"/>
|
||||
<xsd:complexType name="tBusinessKnowledgeModel">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tInvocable">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="encapsulatedLogic" type="tFunctionDefinition" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="inputData" type="tInputData" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tInputData">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="knowledgeSource" type="tKnowledgeSource" substitutionGroup="drgElement"/>
|
||||
<xsd:complexType name="tKnowledgeSource">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDRGElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="type" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="owner" type="tDMNElementReference" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="locationURI" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="informationRequirement" type="tInformationRequirement" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tInformationRequirement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:choice minOccurs="1" maxOccurs="1">
|
||||
<xsd:element name="requiredDecision" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredInput" type="tDMNElementReference"/>
|
||||
</xsd:choice>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="knowledgeRequirement" type="tKnowledgeRequirement" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tKnowledgeRequirement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="requiredKnowledge" type="tDMNElementReference" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="authorityRequirement" type="tAuthorityRequirement" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tAuthorityRequirement">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:choice minOccurs="1" maxOccurs="1">
|
||||
<xsd:element name="requiredDecision" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredInput" type="tDMNElementReference"/>
|
||||
<xsd:element name="requiredAuthority" type="tDMNElementReference"/>
|
||||
</xsd:choice>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="expression" type="tExpression" abstract="true"/>
|
||||
<xsd:complexType name="tExpression">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:attribute name="typeRef" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="itemDefinition" type="tItemDefinition" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tItemDefinition">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:choice>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="typeRef" type="xsd:string"/>
|
||||
<xsd:element name="allowedValues" type="tUnaryTests" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:element name="itemComponent" type="tItemDefinition" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="functionItem" type="tFunctionItem" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="typeLanguage" type="xsd:anyURI" use="optional"/>
|
||||
<xsd:attribute name="isCollection" type="xsd:boolean" use="optional" default="false"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="functionItem" type="tFunctionItem" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tFunctionItem">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameters" type="tInformationItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="outputTypeRef" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="literalExpression" type="tLiteralExpression" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tLiteralExpression">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:choice minOccurs="0" maxOccurs="1">
|
||||
<xsd:element name="text" type="xsd:string"/>
|
||||
<xsd:element name="importedValues" type="tImportedValues"/>
|
||||
</xsd:choice>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="invocation" type="tInvocation" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tInvocation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<!-- calledFunction -->
|
||||
<xsd:element ref="expression" minOccurs="0"/>
|
||||
<xsd:element name="binding" type="tBinding" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tBinding">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameter" type="tInformationItem" minOccurs="1" maxOccurs="1"/>
|
||||
<!-- bindingFormula -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="informationItem" type="tInformationItem" substitutionGroup="namedElement"/>
|
||||
<xsd:complexType name="tInformationItem">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tNamedElement">
|
||||
<xsd:attribute name="typeRef" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decisionTable" type="tDecisionTable" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tDecisionTable">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="input" type="tInputClause" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="output" type="tOutputClause" maxOccurs="unbounded"/>
|
||||
<xsd:element name="annotation" type="tRuleAnnotationClause" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- NB: when the hit policy is FIRST or RULE ORDER, the ordering of the rules is significant and MUST be preserved -->
|
||||
<xsd:element name="rule" type="tDecisionRule" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="hitPolicy" type="tHitPolicy" use="optional" default="UNIQUE"/>
|
||||
<xsd:attribute name="aggregation" type="tBuiltinAggregator" use="optional"/>
|
||||
<xsd:attribute name="preferredOrientation" type="tDecisionTableOrientation" use="optional" default="Rule-as-Row"/>
|
||||
<xsd:attribute name="outputLabel" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tInputClause">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="inputExpression" type="tLiteralExpression"/>
|
||||
<xsd:element name="inputValues" type="tUnaryTests" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tOutputClause">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="outputValues" type="tUnaryTests" minOccurs="0"/>
|
||||
<xsd:element name="defaultOutputEntry" type="tLiteralExpression" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="optional"/>
|
||||
<xsd:attribute name="typeRef" type="xsd:string"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tRuleAnnotationClause">
|
||||
<xsd:attribute name="name" type="xsd:string"/>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tDecisionRule">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="inputEntry" type="tUnaryTests" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="outputEntry" type="tLiteralExpression" maxOccurs="unbounded"/>
|
||||
<xsd:element name="annotationEntry" type="tRuleAnnotation" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tRuleAnnotation">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string" minOccurs="0"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="tHitPolicy">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="UNIQUE"/>
|
||||
<xsd:enumeration value="FIRST"/>
|
||||
<xsd:enumeration value="PRIORITY"/>
|
||||
<xsd:enumeration value="ANY"/>
|
||||
<xsd:enumeration value="COLLECT"/>
|
||||
<xsd:enumeration value="RULE ORDER"/>
|
||||
<xsd:enumeration value="OUTPUT ORDER"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="tBuiltinAggregator">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="SUM"/>
|
||||
<xsd:enumeration value="COUNT"/>
|
||||
<xsd:enumeration value="MIN"/>
|
||||
<xsd:enumeration value="MAX"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:simpleType name="tDecisionTableOrientation">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="Rule-as-Row"/>
|
||||
<xsd:enumeration value="Rule-as-Column"/>
|
||||
<xsd:enumeration value="CrossTable"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:complexType name="tImportedValues">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tImport">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="importedElement" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="artifact" type="tArtifact" abstract="true" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tArtifact">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="group" type="tGroup" substitutionGroup="artifact"/>
|
||||
<xsd:complexType name="tGroup">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tArtifact">
|
||||
<xsd:attribute name="name" type="xsd:string" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="textAnnotation" type="tTextAnnotation" substitutionGroup="artifact"/>
|
||||
<xsd:complexType name="tTextAnnotation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tArtifact">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="textFormat" type="xsd:string" default="text/plain"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="association" type="tAssociation" substitutionGroup="artifact"/>
|
||||
<xsd:complexType name="tAssociation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tArtifact">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="sourceRef" type="tDMNElementReference"/>
|
||||
<xsd:element name="targetRef" type="tDMNElementReference"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="associationDirection" type="tAssociationDirection" default="None"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="tAssociationDirection">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="None"/>
|
||||
<xsd:enumeration value="One"/>
|
||||
<xsd:enumeration value="Both"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:element name="context" type="tContext" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tContext">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="contextEntry" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="contextEntry" type="tContextEntry" substitutionGroup="DMNElement"/>
|
||||
<xsd:complexType name="tContextEntry">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tDMNElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="variable" type="tInformationItem" minOccurs="0" maxOccurs="1"/>
|
||||
<!-- value -->
|
||||
<xsd:element ref="expression" minOccurs="1" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="functionDefinition" type="tFunctionDefinition" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tFunctionDefinition">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="formalParameter" type="tInformationItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<!-- body -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="kind" type="tFunctionKind" default="FEEL"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:simpleType name="tFunctionKind">
|
||||
<xsd:restriction base="xsd:string">
|
||||
<xsd:enumeration value="FEEL"/>
|
||||
<xsd:enumeration value="Java"/>
|
||||
<xsd:enumeration value="PMML"/>
|
||||
</xsd:restriction>
|
||||
</xsd:simpleType>
|
||||
<xsd:element name="relation" type="tRelation" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tRelation">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="column" type="tInformationItem" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="row" type="tList" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="list" type="tList" substitutionGroup="expression"/>
|
||||
<xsd:complexType name="tList">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<!-- element -->
|
||||
<xsd:element ref="expression" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:complexType name="tUnaryTests">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tExpression">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="text" type="xsd:string"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="expressionLanguage" type="xsd:anyURI" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
<xsd:element name="decisionService" type="tDecisionService" substitutionGroup="invocable"/>
|
||||
<xsd:complexType name="tDecisionService">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="tInvocable">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="outputDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="encapsulatedDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="inputDecision" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element name="inputData" type="tDMNElementReference" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
</xsd:schema>
|
115
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMNDI12.xsd
Normal file
115
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMNDI12.xsd
Normal file
@ -0,0 +1,115 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
|
||||
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
|
||||
targetNamespace="http://www.omg.org/spec/DMN/20180521/DI/"
|
||||
elementFormDefault="qualified"
|
||||
attributeFormDefault="unqualified">
|
||||
<xsd:import namespace="http://www.omg.org/spec/DMN/20180521/DC/"
|
||||
schemaLocation="DC.xsd"/>
|
||||
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>The Diagram Interchange (DI) package enables interchange of graphical information that language users have control over, such as position of nodes and line routing points. Language specifications specialize elements of DI to define diagram interchange elements for a language.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
|
||||
<xsd:element name="Style" type="di:Style">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>This element should never be instantiated directly, but rather concrete implementation should. It is placed there only to be referred in the sequence</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
|
||||
<xsd:complexType name="DiagramElement" abstract="true">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>DiagramElement is the abstract super type of all elements in diagrams, including diagrams themselves. When contained in a diagram, diagram elements are laid out relative to the diagram's origin.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="extension" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element ref="di:Style" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>an optional locally-owned style for this diagram element.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="sharedStyle" type="xsd:IDREF">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>a reference to an optional shared style element for this diagram element.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="id" type="xsd:ID"/>
|
||||
<xsd:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Diagram" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:DiagramElement">
|
||||
<xsd:attribute name="name" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>the name of the diagram.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="documentation" type="xsd:string">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>the documentation of the diagram.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
<xsd:attribute name="resolution" type="xsd:double">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>the resolution of the diagram expressed in user units per inch.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:attribute>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Shape" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:DiagramElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dc:Bounds" minOccurs="0" maxOccurs="1">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>the optional bounds of the shape relative to the origin of its nesting plane.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Edge" abstract="true">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:DiagramElement">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="waypoint" type="dc:Point" minOccurs="0" maxOccurs="unbounded">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>an optional list of points relative to the origin of the nesting diagram that specifies the connected line segments of the edge</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="Style" abstract="true">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>Style contains formatting properties that affect the appearance or style of diagram elements, including diagram themselves.</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="extension" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded" />
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="id" type="xsd:ID"/>
|
||||
<xsd:anyAttribute namespace="##other" processContents="lax"/>
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
108
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMNDI13.xsd
Normal file
108
SpiffWorkflow/SpiffWorkflow/dmn/parser/schema/DMNDI13.xsd
Normal file
@ -0,0 +1,108 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
|
||||
xmlns:dmndi="https://www.omg.org/spec/DMN/20191111/DMNDI/"
|
||||
xmlns:dc="http://www.omg.org/spec/DMN/20180521/DC/"
|
||||
xmlns:di="http://www.omg.org/spec/DMN/20180521/DI/"
|
||||
targetNamespace="https://www.omg.org/spec/DMN/20191111/DMNDI/"
|
||||
elementFormDefault="qualified" attributeFormDefault="unqualified">
|
||||
|
||||
<xsd:import namespace="http://www.omg.org/spec/DMN/20180521/DC/"
|
||||
schemaLocation="DC.xsd"/>
|
||||
<xsd:import namespace="http://www.omg.org/spec/DMN/20180521/DI/"
|
||||
schemaLocation="DMNDI12.xsd"/>
|
||||
|
||||
<xsd:element name="DMNDI" type="dmndi:DMNDI"/>
|
||||
<xsd:element name="DMNDiagram" type="dmndi:DMNDiagram"/>
|
||||
<xsd:element name="DMNDiagramElement" type="di:DiagramElement">
|
||||
<xsd:annotation>
|
||||
<xsd:documentation>This element should never be instantiated directly, but rather concrete implementation should. It is placed there only to be referred in the sequence</xsd:documentation>
|
||||
</xsd:annotation>
|
||||
</xsd:element>
|
||||
<xsd:element name="DMNShape" type="dmndi:DMNShape" substitutionGroup="dmndi:DMNDiagramElement"/>
|
||||
<xsd:element name="DMNEdge" type="dmndi:DMNEdge" substitutionGroup="dmndi:DMNDiagramElement"/>
|
||||
<xsd:element name="DMNStyle" type="dmndi:DMNStyle" substitutionGroup="di:Style"/>
|
||||
<xsd:element name="DMNLabel" type="dmndi:DMNLabel"/>
|
||||
<xsd:element name="DMNDecisionServiceDividerLine" type="dmndi:DMNDecisionServiceDividerLine"/>
|
||||
|
||||
<xsd:complexType name="DMNDI">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dmndi:DMNDiagram" minOccurs="0" maxOccurs="unbounded"/>
|
||||
<xsd:element ref="dmndi:DMNStyle" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DMNDiagram">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Diagram">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Size" type="dc:Dimension" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="dmndi:DMNDiagramElement" minOccurs="0" maxOccurs="unbounded"/>
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DMNShape">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Shape">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dmndi:DMNLabel" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element ref="dmndi:DMNDecisionServiceDividerLine" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="dmnElementRef" type="xsd:QName" use="required"/>
|
||||
<xsd:attribute name="isListedInputData" type="xsd:boolean" use="optional"/>
|
||||
<xsd:attribute name="isCollapsed" type="xsd:boolean" use="optional" default="false"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DMNDecisionServiceDividerLine">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Edge"/>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DMNEdge">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Edge">
|
||||
<xsd:sequence>
|
||||
<xsd:element ref="dmndi:DMNLabel" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="dmnElementRef" type="xsd:QName" use="required"/>
|
||||
<xsd:attribute name="sourceElement" type="xsd:QName" use="optional"/>
|
||||
<xsd:attribute name="targetElement" type="xsd:QName" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DMNLabel">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Shape">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="Text" type="xsd:string" minOccurs="0" maxOccurs="1" />
|
||||
</xsd:sequence>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
<xsd:complexType name="DMNStyle">
|
||||
<xsd:complexContent>
|
||||
<xsd:extension base="di:Style">
|
||||
<xsd:sequence>
|
||||
<xsd:element name="FillColor" type="dc:Color" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="StrokeColor" type="dc:Color" minOccurs="0" maxOccurs="1"/>
|
||||
<xsd:element name="FontColor" type="dc:Color" minOccurs="0" maxOccurs="1"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="fontFamily" type="xsd:string"/>
|
||||
<xsd:attribute name="fontSize" type="xsd:double"/>
|
||||
<xsd:attribute name="fontItalic" type="xsd:boolean"/>
|
||||
<xsd:attribute name="fontBold" type="xsd:boolean"/>
|
||||
<xsd:attribute name="fontUnderline" type="xsd:boolean"/>
|
||||
<xsd:attribute name="fontStrikeThrough" type="xsd:boolean"/>
|
||||
<xsd:attribute name="labelHorizontalAlignement" type="dc:AlignmentKind"/>
|
||||
<xsd:attribute name="labelVerticalAlignment" type="dc:AlignmentKind"/>
|
||||
</xsd:extension>
|
||||
</xsd:complexContent>
|
||||
</xsd:complexType>
|
||||
|
||||
</xsd:schema>
|
@ -1 +1 @@
|
||||
from .process import SpiffBpmnParser
|
||||
from .process import SpiffBpmnParser, VALIDATOR
|
@ -1,5 +1,7 @@
|
||||
import os
|
||||
|
||||
from SpiffWorkflow.dmn.parser.BpmnDmnParser import BpmnDmnParser
|
||||
from SpiffWorkflow.bpmn.parser.BpmnParser import full_tag
|
||||
from SpiffWorkflow.bpmn.parser.BpmnParser import BpmnValidator, full_tag
|
||||
|
||||
from SpiffWorkflow.bpmn.specs.events import StartEvent, EndEvent, IntermediateThrowEvent, BoundaryEvent, IntermediateCatchEvent
|
||||
from SpiffWorkflow.spiff.specs import NoneTask, ManualTask, UserTask, ScriptTask, SubWorkflowTask, TransactionSubprocess, CallActivity, ServiceTask
|
||||
@ -11,6 +13,10 @@ from SpiffWorkflow.dmn.specs import BusinessRuleTask
|
||||
|
||||
from SpiffWorkflow.spiff.parser.task_spec import BusinessRuleTaskParser
|
||||
|
||||
SPIFF_XSD = os.path.join(os.path.dirname(__file__), 'schema', 'spiffworkflow.xsd')
|
||||
VALIDATOR = BpmnValidator(imports={'spiffworkflow': SPIFF_XSD})
|
||||
|
||||
|
||||
class SpiffBpmnParser(BpmnDmnParser):
|
||||
|
||||
OVERRIDE_PARSER_CLASSES = {
|
||||
@ -31,3 +37,4 @@ class SpiffBpmnParser(BpmnDmnParser):
|
||||
full_tag('receiveTask'): (SpiffReceiveTaskParser, ReceiveTask),
|
||||
full_tag('businessRuleTask'): (BusinessRuleTaskParser, BusinessRuleTask)
|
||||
}
|
||||
|
||||
|
@ -0,0 +1,64 @@
|
||||
<xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
|
||||
<xsd:element name="calledDecisionId" type="xsd:string"/>
|
||||
<xsd:element name="instructionsForEndUser" type="xsd:string"/>
|
||||
<xsd:element name="messagePayload" type="xsd:string"/>
|
||||
<xsd:element name="messageVariable" type="xsd:string"/>
|
||||
<xsd:element name="preScript" type="xsd:string"/>
|
||||
<xsd:element name="postScript" type="xsd:string"/>
|
||||
<xsd:element name="properties">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="property" maxOccurs="unbounded" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute type="xsd:string" name="name" use="optional"/>
|
||||
<xsd:attribute type="xsd:string" name="value" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="unitTests">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="unitTest" maxOccurs="unbounded" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element type="xsd:string" name="inputJson"/>
|
||||
<xsd:element type="xsd:string" name="expectedOutputJson"/>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute type="xsd:string" name="id" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="serviceTaskOperator">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameters">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="parameter" maxOccurs="unbounded" minOccurs="0">
|
||||
<xsd:complexType>
|
||||
<xsd:simpleContent>
|
||||
<xsd:extension base="xsd:string">
|
||||
<xsd:attribute type="xsd:string" name="id" use="optional"/>
|
||||
<xsd:attribute type="xsd:string" name="type" use="optional"/>
|
||||
<xsd:attribute type="xsd:string" name="value" use="optional"/>
|
||||
</xsd:extension>
|
||||
</xsd:simpleContent>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:sequence>
|
||||
<xsd:attribute type="xsd:string" name="id"/>
|
||||
<xsd:attribute type="xsd:string" name="resultVariable" use="optional"/>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
@ -142,12 +142,16 @@ class ServiceTaskParser(SpiffTaskParser):
|
||||
def create_task(self):
|
||||
extensions = self.parse_extensions()
|
||||
operator = extensions.get('serviceTaskOperator')
|
||||
prescript = extensions.get('preScript')
|
||||
postscript = extensions.get('postScript')
|
||||
return self.spec_class(
|
||||
self.spec, self.get_task_spec_name(),
|
||||
operator['name'], operator['parameters'],
|
||||
operator['resultVariable'],
|
||||
description=self.node.get('name', None),
|
||||
lane=self.lane, position=self.position)
|
||||
lane=self.lane, position=self.position,
|
||||
prescript=prescript,
|
||||
postscript=postscript)
|
||||
|
||||
class BusinessRuleTaskParser(SpiffTaskParser):
|
||||
|
||||
|
@ -39,6 +39,6 @@ class SpiffBpmnTask(BpmnSpecMixin):
|
||||
self.execute_script(my_task, self.prescript)
|
||||
|
||||
def _on_complete_hook(self, my_task):
|
||||
super()._on_complete_hook(my_task)
|
||||
if self.postscript is not None:
|
||||
self.execute_script(my_task, self.postscript)
|
||||
super()._on_complete_hook(my_task)
|
||||
|
@ -21,6 +21,7 @@ setup(name='SpiffWorkflow',
|
||||
author_email='dan@sartography.com',
|
||||
license='lGPLv2',
|
||||
packages=find_packages(exclude=['tests', 'tests.*']),
|
||||
package_data={'SpiffWorkflow.bpmn.parser.schema': ['*.xsd']},
|
||||
install_requires=['configparser', 'lxml', 'celery', 'dateparser', 'pytz',
|
||||
# required for python 3.7 - https://stackoverflow.com/a/73932581
|
||||
'importlib-metadata<5.0; python_version <= "3.7"'],
|
||||
|
@ -3,6 +3,7 @@
|
||||
import json
|
||||
import os
|
||||
import unittest
|
||||
from SpiffWorkflow.bpmn.parser.BpmnParser import BpmnValidator
|
||||
|
||||
from SpiffWorkflow.task import TaskState
|
||||
|
||||
@ -18,9 +19,10 @@ class BpmnWorkflowTestCase(unittest.TestCase):
|
||||
|
||||
serializer = BpmnWorkflowSerializer(wf_spec_converter)
|
||||
|
||||
def load_workflow_spec(self, filename, process_name):
|
||||
def load_workflow_spec(self, filename, process_name, validate=True):
|
||||
f = os.path.join(os.path.dirname(__file__), 'data', filename)
|
||||
parser = TestBpmnParser()
|
||||
validator = BpmnValidator() if validate else None
|
||||
parser = TestBpmnParser(validator=validator)
|
||||
parser.add_bpmn_files_by_glob(f)
|
||||
top_level_spec = parser.get_spec(process_name)
|
||||
subprocesses = parser.get_subprocess_specs(process_name)
|
||||
|
@ -1,36 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
from SpiffWorkflow.bpmn.parser.ValidationException import ValidationException
|
||||
__author__ = 'kellym'
|
||||
|
||||
|
||||
|
||||
class ClashingNameTest2(BpmnWorkflowTestCase):
|
||||
"""The example bpmn diagram tests both a set cardinality from user input
|
||||
as well as looping over an existing array."""
|
||||
|
||||
def setUp(self):
|
||||
pass
|
||||
|
||||
def loadWorkflow(self):
|
||||
self.load_workflow_spec('Approvals_bad.bpmn', 'Approvals')
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
# make sure we raise an exception
|
||||
# when validating a workflow with multiple
|
||||
# same IDs in the BPMN workspace
|
||||
self.assertRaises(ValidationException,self.loadWorkflow)
|
||||
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(ClashingNameTest2)
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -1,18 +1,10 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
|
||||
|
||||
|
||||
import sys
|
||||
import os
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.camunda.parser.CamundaParser import CamundaParser
|
||||
from SpiffWorkflow.dmn.parser.BpmnDmnParser import BpmnDmnParser
|
||||
from SpiffWorkflow.spiff.parser import SpiffBpmnParser
|
||||
from tests.SpiffWorkflow.bpmn.BpmnLoaderForTests import TestBpmnParser
|
||||
|
||||
sys.path.insert(0, os.path.join(os.path.dirname(__file__), '..', '..', '..'))
|
||||
from SpiffWorkflow.bpmn.workflow import BpmnWorkflow
|
||||
from tests.SpiffWorkflow.bpmn.BpmnWorkflowTestCase import BpmnWorkflowTestCase
|
||||
|
||||
__author__ = 'danfunk'
|
||||
@ -34,6 +26,7 @@ class ProcessDependencyTest(BpmnWorkflowTestCase):
|
||||
self.actual_test(SpiffBpmnParser())
|
||||
|
||||
def actual_test(self, parser):
|
||||
# We ought to test the parsers in the packages they belong to, not here.
|
||||
filename = 'call_activity_nested'
|
||||
process_name = 'Level1'
|
||||
base_dir = os.path.join(os.path.dirname(__file__), 'data', filename)
|
||||
|
@ -102,7 +102,7 @@
|
||||
</model:process>
|
||||
<model:process id="First_Approval_Wins" name="First Approval Wins">
|
||||
<model:documentation></model:documentation>
|
||||
<model:laneSet id="First_Approval_Wins.First Approval Wins_laneSet">
|
||||
<model:laneSet id="First_Approval_Wins.First_Approval_Wins_laneSet">
|
||||
<model:lane id="First_Approval_Wins.Supervisor" name="Supervisor">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Supervisor_Approval</model:flowNodeRef>
|
||||
@ -147,7 +147,7 @@
|
||||
</model:process>
|
||||
<model:process id="Parallel_Approvals_SP" name="Parallel Approvals SP">
|
||||
<model:documentation></model:documentation>
|
||||
<model:laneSet id="Parallel_Approvals_SP.Parallel Approvals SP_laneSet">
|
||||
<model:laneSet id="Parallel_Approvals_SP.Parallel_Approvals_SP_laneSet">
|
||||
<model:lane id="Parallel_Approvals_SP.Supervisor" name="Supervisor">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Start3</model:flowNodeRef>
|
||||
|
@ -1,403 +0,0 @@
|
||||
<?xml version="1.0" encoding="ASCII"?>
|
||||
<model:definitions xmlns:dc="http://www.omg.org/spec/DD/20100524/DC" xmlns:di="http://www.omg.org/spec/BPMN/20100524/DI" xmlns:di_1="http://www.omg.org/spec/DD/20100524/DI" xmlns:model="http://www.omg.org/spec/BPMN/20100524/MODEL" exporter="BonitaSoft" exporterVersion="5.7" expressionLanguage="http://groovy.codehaus.org/" targetNamespace="http://bonitasoft.com/Approvals">
|
||||
<model:collaboration id="Approvals">
|
||||
<model:documentation></model:documentation>
|
||||
<model:participant id="Initiator">
|
||||
<model:documentation>Person who takes the first action to start the process</model:documentation>
|
||||
</model:participant>
|
||||
<model:participant id="_auWnIO-1EeG6ILSEFG-uBA" name="Approvals" processRef="Approvals"/>
|
||||
<model:participant id="_auX1QO-1EeG6ILSEFG-uBA" name="First Approval Wins" processRef="First_Approval_Wins"/>
|
||||
<model:participant id="_auYcUO-1EeG6ILSEFG-uBA" name="Parallel Approvals SP" processRef="Parallel_Approvals_SP"/>
|
||||
</model:collaboration>
|
||||
<model:process id="Approvals" name="Approvals">
|
||||
<model:documentation></model:documentation>
|
||||
<model:laneSet id="Approvals_laneSet">
|
||||
<model:lane id="Approvals.Test" name="Test">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Start1</model:flowNodeRef>
|
||||
<model:flowNodeRef>First_Approval_Wins</model:flowNodeRef>
|
||||
<model:flowNodeRef>End1</model:flowNodeRef>
|
||||
<model:flowNodeRef>First_Approval_Wins_Done</model:flowNodeRef>
|
||||
<model:flowNodeRef>Parallel_Approvals_Done</model:flowNodeRef>
|
||||
<model:flowNodeRef>Parallel_SP</model:flowNodeRef>
|
||||
<model:flowNodeRef>Parallel_SP_Done</model:flowNodeRef>
|
||||
</model:lane>
|
||||
<model:lane id="Approvals.Supervisor" name="Supervisor">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Supervisor_Approval__P_</model:flowNodeRef>
|
||||
<model:flowNodeRef>Gateway4</model:flowNodeRef>
|
||||
<model:flowNodeRef>Gateway5</model:flowNodeRef>
|
||||
</model:lane>
|
||||
<model:lane id="Approvals.Manager" name="Manager">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Manager_Approval__P_</model:flowNodeRef>
|
||||
</model:lane>
|
||||
</model:laneSet>
|
||||
<model:startEvent id="Approvals.Start1" name="Start1">
|
||||
<model:documentation></model:documentation>
|
||||
</model:startEvent>
|
||||
<model:callActivity id="Approvals.First_Approval_Wins" name="First Approval Wins" calledElement="First_Approval_Wins">
|
||||
<model:documentation></model:documentation>
|
||||
</model:callActivity>
|
||||
<model:endEvent id="Approvals.End1" name="End1">
|
||||
<model:documentation></model:documentation>
|
||||
</model:endEvent>
|
||||
<model:manualTask id="Approvals.First_Approval_Wins_Done" name="First Approval Wins Done">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:manualTask id="Approvals.Parallel_Approvals_Done" name="Parallel Approvals Done">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:callActivity id="Approvals.Parallel_SP" name="Parallel SP" calledElement="Parallel_Approvals_SP">
|
||||
<model:documentation></model:documentation>
|
||||
</model:callActivity>
|
||||
<model:manualTask id="Approvals.Parallel_SP_Done" name="Parallel SP Done">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:manualTask id="Approvals.Supervisor_Approval__P_" name="Supervisor Approval (P)">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:parallelGateway id="Approvals.Gateway4" name="Gateway4">
|
||||
<model:documentation></model:documentation>
|
||||
</model:parallelGateway>
|
||||
<model:parallelGateway id="Approvals.Gateway5" name="Gateway5">
|
||||
<model:documentation></model:documentation>
|
||||
</model:parallelGateway>
|
||||
<model:manualTask id="Approvals.Manager_Approval__P_" name="Manager Approval (P)">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:sequenceFlow id="_IcV3AO4CEeG6ILSEFG-uBA" sourceRef="Approvals.Start1" targetRef="Approvals.First_Approval_Wins">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_vVCwgO4DEeG6ILSEFG-uBA" sourceRef="Approvals.First_Approval_Wins" targetRef="Approvals.First_Approval_Wins_Done">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="On_to_Parallel_Approvals1" name="On to Parallel Approvals" sourceRef="Approvals.First_Approval_Wins_Done" targetRef="Approvals.Gateway4">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_dceXwO6YEeG6ILSEFG-uBA" sourceRef="Approvals.Gateway4" targetRef="Approvals.Manager_Approval__P_">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_d_Hx0O6YEeG6ILSEFG-uBA" sourceRef="Approvals.Gateway4" targetRef="Approvals.Supervisor_Approval__P_">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="Approve2" name="Approve" sourceRef="Approvals.Supervisor_Approval__P_" targetRef="Approvals.Gateway5">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="On_To_Parallel_SP3" name="On To Parallel SP" sourceRef="Approvals.Parallel_Approvals_Done" targetRef="Approvals.Parallel_SP">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="Approve4" name="Approve" sourceRef="Approvals.Manager_Approval__P_" targetRef="Approvals.Gateway5">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="OK5" name="OK" sourceRef="Approvals.Parallel_SP_Done" targetRef="Approvals.End1">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_76Vy8O6ZEeG6ILSEFG-uBA" sourceRef="Approvals.Parallel_SP" targetRef="Approvals.Parallel_SP_Done">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_E8AnwO6aEeG6ILSEFG-uBA" sourceRef="Approvals.Gateway5" targetRef="Approvals.Parallel_Approvals_Done">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
</model:process>
|
||||
<model:process id="First_Approval_Wins" name="First Approval Wins">
|
||||
<model:documentation></model:documentation>
|
||||
<model:laneSet id="First_Approval_Wins.First Approval Wins_laneSet">
|
||||
<model:lane id="First_Approval_Wins.Supervisor" name="Supervisor">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Supervisor_Approval</model:flowNodeRef>
|
||||
<model:flowNodeRef>Start2</model:flowNodeRef>
|
||||
<model:flowNodeRef>Supervisor_Approved</model:flowNodeRef>
|
||||
</model:lane>
|
||||
<model:lane id="First_Approval_Wins.Manager" name="Manager">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Manager_Approval</model:flowNodeRef>
|
||||
<model:flowNodeRef>Manager_Approved</model:flowNodeRef>
|
||||
</model:lane>
|
||||
</model:laneSet>
|
||||
<model:manualTask id="First_Approval_Wins.Supervisor_Approval" name="Supervisor Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:startEvent id="First_Approval_Wins.Start2" name="Start2">
|
||||
<model:documentation></model:documentation>
|
||||
</model:startEvent>
|
||||
<model:endEvent id="First_Approval_Wins.Supervisor_Approved" name="Supervisor Approved">
|
||||
<model:documentation></model:documentation>
|
||||
<model:terminateEventDefinition id="_auX1Qe-1EeG6ILSEFG-uBA"/>
|
||||
</model:endEvent>
|
||||
<model:manualTask id="First_Approval_Wins.Manager_Approval" name="Manager Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:endEvent id="First_Approval_Wins.Manager_Approved" name="Manager Approved">
|
||||
<model:documentation></model:documentation>
|
||||
<model:terminateEventDefinition id="_auX1Qu-1EeG6ILSEFG-uBA"/>
|
||||
</model:endEvent>
|
||||
<model:sequenceFlow id="Approve6" name="Approve" sourceRef="First_Approval_Wins.Supervisor_Approval" targetRef="First_Approval_Wins.Supervisor_Approved">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="Approve7" name="Approve" sourceRef="First_Approval_Wins.Manager_Approval" targetRef="First_Approval_Wins.Manager_Approved">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_CtMukO7hEeG6ILSEFG-uBA" sourceRef="First_Approval_Wins.Start2" targetRef="First_Approval_Wins.Supervisor_Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_DBwCQO7hEeG6ILSEFG-uBA" sourceRef="First_Approval_Wins.Start2" targetRef="First_Approval_Wins.Manager_Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
</model:process>
|
||||
<model:process id="Parallel_Approvals_SP" name="Parallel Approvals SP">
|
||||
<model:documentation></model:documentation>
|
||||
<model:laneSet id="Parallel_Approvals_SP.Parallel Approvals SP_laneSet">
|
||||
<model:lane id="Parallel_Approvals_SP.Supervisor" name="Supervisor">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Start3</model:flowNodeRef>
|
||||
<model:flowNodeRef>Supervisor_Approval</model:flowNodeRef>
|
||||
<model:flowNodeRef>End2</model:flowNodeRef>
|
||||
</model:lane>
|
||||
<model:lane id="Parallel_Approvals_SP.Manager" name="Manager">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Manager_Approval</model:flowNodeRef>
|
||||
</model:lane>
|
||||
<model:lane id="Parallel_Approvals_SP.Operator" name="Operator">
|
||||
<model:documentation></model:documentation>
|
||||
<model:flowNodeRef>Step1</model:flowNodeRef>
|
||||
</model:lane>
|
||||
</model:laneSet>
|
||||
<model:startEvent id="Parallel_Approvals_SP.Start3" name="Start3">
|
||||
<model:documentation></model:documentation>
|
||||
</model:startEvent>
|
||||
<model:manualTask id="Parallel_Approvals_SP.Supervisor_Approval" name="Supervisor Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:endEvent id="Parallel_Approvals_SP.End2" name="End2">
|
||||
<model:documentation></model:documentation>
|
||||
</model:endEvent>
|
||||
<model:manualTask id="Parallel_Approvals_SP.Manager_Approval" name="Manager Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:manualTask id="Parallel_Approvals_SP.Step1" name="Operator Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:manualTask>
|
||||
<model:sequenceFlow id="Approve8" name="Approve" sourceRef="Parallel_Approvals_SP.Supervisor_Approval" targetRef="Parallel_Approvals_SP.End2">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="Approve9" name="Approve" sourceRef="Parallel_Approvals_SP.Manager_Approval" targetRef="Parallel_Approvals_SP.End2">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_InMVgO6ZEeG6ILSEFG-uBA" sourceRef="Parallel_Approvals_SP.Start3" targetRef="Parallel_Approvals_SP.Step1">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="_JEeucO6ZEeG6ILSEFG-uBA" sourceRef="Parallel_Approvals_SP.Start3" targetRef="Parallel_Approvals_SP.Manager_Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
<model:sequenceFlow id="Approve10" name="Approve" sourceRef="Parallel_Approvals_SP.Step1" targetRef="Parallel_Approvals_SP.Supervisor_Approval">
|
||||
<model:documentation></model:documentation>
|
||||
</model:sequenceFlow>
|
||||
</model:process>
|
||||
<di:BPMNDiagram name="Approvals">
|
||||
<di:BPMNPlane id="plane_Approvals" bpmnElement="Approvals">
|
||||
<di:BPMNShape id="_Ib2u0O4CEeG6ILSEFG-uBA" bpmnElement="Approvals" isHorizontal="true">
|
||||
<dc:Bounds height="724.0" width="1352.0" x="30.0" y="30.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_H6ddQO6XEeG6ILSEFG-uBA" bpmnElement="Test" isHorizontal="true">
|
||||
<dc:Bounds height="329.0" width="1330.0" x="52.0" y="30.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_IcCVAO4CEeG6ILSEFG-uBA" bpmnElement="Start1">
|
||||
<dc:Bounds height="34.0" width="30.0" x="92.0" y="95.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_R6kE8O4CEeG6ILSEFG-uBA" bpmnElement="First_Approval_Wins">
|
||||
<dc:Bounds height="74.0" width="148.0" x="206.0" y="95.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_FRlL8O6WEeG6ILSEFG-uBA" bpmnElement="End1">
|
||||
<dc:Bounds height="34.0" width="30.0" x="1045.0" y="170.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_8wLWIO6WEeG6ILSEFG-uBA" bpmnElement="First_Approval_Wins_Done">
|
||||
<dc:Bounds height="84.0" width="168.0" x="192.0" y="190.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_oV8bsO6YEeG6ILSEFG-uBA" bpmnElement="Parallel_Approvals_Done">
|
||||
<dc:Bounds height="74.0" width="148.0" x="522.0" y="190.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_Q-TKYO6ZEeG6ILSEFG-uBA" bpmnElement="Parallel_SP">
|
||||
<dc:Bounds height="50.0" width="100.0" x="735.0" y="107.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_4T7s8O6ZEeG6ILSEFG-uBA" bpmnElement="Parallel_SP_Done">
|
||||
<dc:Bounds height="74.0" width="148.0" x="865.0" y="117.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_rvrNEO6XEeG6ILSEFG-uBA" bpmnElement="Supervisor" isHorizontal="true">
|
||||
<dc:Bounds height="250.0" width="1330.0" x="52.0" y="359.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_8zU7UO6XEeG6ILSEFG-uBA" bpmnElement="Supervisor_Approval__P_">
|
||||
<dc:Bounds height="83.0" width="166.0" x="403.0" y="459.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_aVYD8O6YEeG6ILSEFG-uBA" bpmnElement="Gateway4">
|
||||
<dc:Bounds height="43.0" width="43.0" x="211.0" y="408.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_CesQwO6aEeG6ILSEFG-uBA" bpmnElement="Gateway5">
|
||||
<dc:Bounds height="43.0" width="43.0" x="613.0" y="479.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_vgLDMO6XEeG6ILSEFG-uBA" bpmnElement="Manager" isHorizontal="true">
|
||||
<dc:Bounds height="145.0" width="1330.0" x="52.0" y="609.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_JXN5sO6YEeG6ILSEFG-uBA" bpmnElement="Manager_Approval__P_">
|
||||
<dc:Bounds height="60.0" width="120.0" x="419.0" y="639.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNEdge id="_IcWeEO4CEeG6ILSEFG-uBA" bpmnElement="_IcV3AO4CEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="122.0" y="122.0"/>
|
||||
<di_1:waypoint x="206.0" y="122.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_vVDXkO4DEeG6ILSEFG-uBA" bpmnElement="_vVCwgO4DEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="311.0" y="169.0"/>
|
||||
<di_1:waypoint x="311.0" y="190.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_DYxlUO6YEeG6ILSEFG-uBA" bpmnElement="On_to_Parallel_Approvals">
|
||||
<di_1:waypoint x="240.0" y="274.0"/>
|
||||
<di_1:waypoint x="240.0" y="415.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_dcfl4O6YEeG6ILSEFG-uBA" bpmnElement="_dceXwO6YEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="236.0" y="447.0"/>
|
||||
<di_1:waypoint x="236.0" y="668.0"/>
|
||||
<di_1:waypoint x="419.0" y="668.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_d_I_8O6YEeG6ILSEFG-uBA" bpmnElement="_d_Hx0O6YEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="248.0" y="434.0"/>
|
||||
<di_1:waypoint x="325.0" y="434.0"/>
|
||||
<di_1:waypoint x="325.0" y="480.0"/>
|
||||
<di_1:waypoint x="403.0" y="480.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_vsd9UO6YEeG6ILSEFG-uBA" bpmnElement="Approve">
|
||||
<di_1:waypoint x="569.0" y="487.0"/>
|
||||
<di_1:waypoint x="592.0" y="487.0"/>
|
||||
<di_1:waypoint x="592.0" y="496.0"/>
|
||||
<di_1:waypoint x="616.0" y="496.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_yTd0wO6YEeG6ILSEFG-uBA" bpmnElement="On_To_Parallel_SP">
|
||||
<di_1:waypoint x="670.0" y="194.0"/>
|
||||
<di_1:waypoint x="720.0" y="194.0"/>
|
||||
<di_1:waypoint x="720.0" y="173.0"/>
|
||||
<di_1:waypoint x="745.0" y="173.0"/>
|
||||
<di_1:waypoint x="745.0" y="157.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_34HwIO6YEeG6ILSEFG-uBA" bpmnElement="Approve">
|
||||
<di_1:waypoint x="539.0" y="668.0"/>
|
||||
<di_1:waypoint x="626.0" y="668.0"/>
|
||||
<di_1:waypoint x="626.0" y="514.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_UUS10O6ZEeG6ILSEFG-uBA" bpmnElement="OK">
|
||||
<di_1:waypoint x="1013.0" y="180.0"/>
|
||||
<di_1:waypoint x="1045.0" y="180.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_76XBEO6ZEeG6ILSEFG-uBA" bpmnElement="_76Vy8O6ZEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="835.0" y="135.0"/>
|
||||
<di_1:waypoint x="850.0" y="135.0"/>
|
||||
<di_1:waypoint x="850.0" y="137.0"/>
|
||||
<di_1:waypoint x="865.0" y="137.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_E8B14O6aEeG6ILSEFG-uBA" bpmnElement="_E8AnwO6aEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="628.0" y="485.0"/>
|
||||
<di_1:waypoint x="628.0" y="264.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNShape id="_R6hBoO4CEeG6ILSEFG-uBA" bpmnElement="First_Approval_Wins" isHorizontal="true">
|
||||
<dc:Bounds height="500.0" width="1352.0" x="30.0" y="774.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_sDQsIO4CEeG6ILSEFG-uBA" bpmnElement="Supervisor" isHorizontal="true">
|
||||
<dc:Bounds height="250.0" width="1330.0" x="52.0" y="774.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_R6vrIe4CEeG6ILSEFG-uBA" bpmnElement="Supervisor_Approval">
|
||||
<dc:Bounds height="50.0" width="100.0" x="320.0" y="858.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_VgS1gO4CEeG6ILSEFG-uBA" bpmnElement="Start2">
|
||||
<dc:Bounds height="34.0" width="30.0" x="134.0" y="843.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_jja8kO4DEeG6ILSEFG-uBA" bpmnElement="Supervisor_Approved">
|
||||
<dc:Bounds height="34.0" width="30.0" x="538.0" y="876.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_ttNsgO4CEeG6ILSEFG-uBA" bpmnElement="Manager" isHorizontal="true">
|
||||
<dc:Bounds height="250.0" width="1330.0" x="52.0" y="1024.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_jf_DgO4CEeG6ILSEFG-uBA" bpmnElement="Manager_Approval">
|
||||
<dc:Bounds height="50.0" width="100.0" x="304.0" y="1124.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_oUPnQO4DEeG6ILSEFG-uBA" bpmnElement="Manager_Approved">
|
||||
<dc:Bounds height="34.0" width="30.0" x="522.0" y="1134.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNEdge id="_mAyW4O4DEeG6ILSEFG-uBA" bpmnElement="Approve">
|
||||
<di_1:waypoint x="420.0" y="886.0"/>
|
||||
<di_1:waypoint x="479.0" y="886.0"/>
|
||||
<di_1:waypoint x="479.0" y="892.0"/>
|
||||
<di_1:waypoint x="538.0" y="892.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_qIrZUO4DEeG6ILSEFG-uBA" bpmnElement="Approve">
|
||||
<di_1:waypoint x="404.0" y="1153.0"/>
|
||||
<di_1:waypoint x="463.0" y="1153.0"/>
|
||||
<di_1:waypoint x="463.0" y="1147.0"/>
|
||||
<di_1:waypoint x="522.0" y="1147.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_CtMuku7hEeG6ILSEFG-uBA" bpmnElement="_CtMukO7hEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="164.0" y="872.0"/>
|
||||
<di_1:waypoint x="242.0" y="872.0"/>
|
||||
<di_1:waypoint x="242.0" y="880.0"/>
|
||||
<di_1:waypoint x="320.0" y="880.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_DBxQYO7hEeG6ILSEFG-uBA" bpmnElement="_DBwCQO7hEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="149.0" y="877.0"/>
|
||||
<di_1:waypoint x="149.0" y="1149.0"/>
|
||||
<di_1:waypoint x="304.0" y="1149.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNShape id="_Zk-u8O4uEeG6ILSEFG-uBA" bpmnElement="Parallel_Approvals_SP" isHorizontal="true">
|
||||
<dc:Bounds height="630.0" width="1352.0" x="30.0" y="1294.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_f_FroO4uEeG6ILSEFG-uBA" bpmnElement="Supervisor" isHorizontal="true">
|
||||
<dc:Bounds height="280.0" width="1330.0" x="52.0" y="1394.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_uEKI4O4uEeG6ILSEFG-uBA" bpmnElement="Start3">
|
||||
<dc:Bounds height="34.0" width="30.0" x="134.0" y="1530.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_vTJEgO4uEeG6ILSEFG-uBA" bpmnElement="Supervisor_Approval">
|
||||
<dc:Bounds height="50.0" width="100.0" x="493.0" y="1522.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_K4QgkO6WEeG6ILSEFG-uBA" bpmnElement="End2">
|
||||
<dc:Bounds height="34.0" width="30.0" x="799.0" y="1530.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_j4eYAO4uEeG6ILSEFG-uBA" bpmnElement="Manager" isHorizontal="true">
|
||||
<dc:Bounds height="250.0" width="1330.0" x="52.0" y="1674.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_y4gBoO4uEeG6ILSEFG-uBA" bpmnElement="Manager_Approval">
|
||||
<dc:Bounds height="50.0" width="100.0" x="364.0" y="1795.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_RkTswO7hEeG6ILSEFG-uBA" bpmnElement="Operator" isHorizontal="true">
|
||||
<dc:Bounds height="100.0" width="1330.0" x="52.0" y="1294.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNShape id="_VVzBYO7hEeG6ILSEFG-uBA" bpmnElement="Step1">
|
||||
<dc:Bounds height="50.0" width="100.0" x="364.0" y="1324.0"/>
|
||||
</di:BPMNShape>
|
||||
<di:BPMNEdge id="_-dnqoO4uEeG6ILSEFG-uBA" bpmnElement="Approve">
|
||||
<di_1:waypoint x="593.0" y="1554.0"/>
|
||||
<di_1:waypoint x="799.0" y="1554.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="__RQHAO4uEeG6ILSEFG-uBA" bpmnElement="Approve">
|
||||
<di_1:waypoint x="464.0" y="1825.0"/>
|
||||
<di_1:waypoint x="631.0" y="1825.0"/>
|
||||
<di_1:waypoint x="631.0" y="1558.0"/>
|
||||
<di_1:waypoint x="799.0" y="1558.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_InOKsO6ZEeG6ILSEFG-uBA" bpmnElement="_InMVgO6ZEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="164.0" y="1558.0"/>
|
||||
<di_1:waypoint x="264.0" y="1558.0"/>
|
||||
<di_1:waypoint x="264.0" y="1365.0"/>
|
||||
<di_1:waypoint x="364.0" y="1365.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_JEgjoO6ZEeG6ILSEFG-uBA" bpmnElement="_JEeucO6ZEeG6ILSEFG-uBA">
|
||||
<di_1:waypoint x="149.0" y="1564.0"/>
|
||||
<di_1:waypoint x="149.0" y="1634.0"/>
|
||||
<di_1:waypoint x="307.0" y="1634.0"/>
|
||||
<di_1:waypoint x="307.0" y="1812.0"/>
|
||||
<di_1:waypoint x="364.0" y="1812.0"/>
|
||||
</di:BPMNEdge>
|
||||
<di:BPMNEdge id="_W9jpYO7hEeG6ILSEFG-uBA" bpmnElement="Approve">
|
||||
<di_1:waypoint x="464.0" y="1356.0"/>
|
||||
<di_1:waypoint x="532.0" y="1356.0"/>
|
||||
<di_1:waypoint x="532.0" y="1522.0"/>
|
||||
</di:BPMNEdge>
|
||||
</di:BPMNPlane>
|
||||
</di:BPMNDiagram>
|
||||
</model:definitions>
|
@ -2,31 +2,31 @@
|
||||
<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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_0qmxumb" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
|
||||
|
||||
<bpmn:collaboration id="my_collaboration">
|
||||
|
||||
|
||||
<bpmn:participant id="buddy" name="Buddy" processRef="process_buddy" />
|
||||
<bpmn:participant id="Person" name="Person" processRef="random_person_process" />
|
||||
|
||||
|
||||
<bpmn:messageFlow id="love_letter_flow" name="Love Letter Flow" sourceRef="ActivitySendLetter" targetRef="Person" />
|
||||
<bpmn:messageFlow id="response_flow" name="response flow" sourceRef="Person" targetRef="EventReceiveLetter" />
|
||||
|
||||
|
||||
<bpmn:correlationKey name="lover">
|
||||
<bpmn:correlationPropertyRef>lover_name</bpmn:correlationPropertyRef>
|
||||
</bpmn:correlationKey>
|
||||
|
||||
|
||||
</bpmn:collaboration>
|
||||
|
||||
|
||||
<bpmn:message id="love_letter" name="Love Letter" />
|
||||
<bpmn:message id="love_letter_response" name="Love Letter Response" />
|
||||
|
||||
<bpmn:correlationProperty id="lover_name" name="Lover's Name">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter">
|
||||
<bpmn:formalExpression>lover_name</bpmn:formalExpression>
|
||||
<bpmn:messagePath>lover_name</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter_response">
|
||||
<bpmn:formalExpression>from_name</bpmn:formalExpression>
|
||||
<bpmn:messagePath>from_name</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
|
||||
|
||||
<bpmn:process id="process_buddy" name="Process Buddy" isExecutable="true">
|
||||
<bpmn:startEvent id="StartEvent_1">
|
||||
<bpmn:outgoing>Flow_1bl6jeh</bpmn:outgoing>
|
||||
@ -49,12 +49,12 @@
|
||||
</bpmn:process>
|
||||
|
||||
<bpmn:process id="random_person_process" name="Process" isExecutable="false" />
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="my_collaboration">
|
||||
<bpmndi:BPMNShape id="Participant_12ffz3p_di" bpmnElement="buddy" isHorizontal="true">
|
||||
@ -109,4 +109,4 @@
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
||||
</bpmn:definitions>
|
||||
|
@ -9,10 +9,10 @@
|
||||
</bpmn:collaboration>
|
||||
<bpmn:correlationProperty id="process_id" name="Test Correlation">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_19nm5f5">
|
||||
<bpmn:formalExpression>task_num</bpmn:formalExpression>
|
||||
<bpmn:messagePath>task_num</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_0fc1gu7">
|
||||
<bpmn:formalExpression>init_id</bpmn:formalExpression>
|
||||
<bpmn:messagePath>init_id</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:process id="proc_1" name="Process 1" isExecutable="true">
|
||||
|
@ -13,18 +13,18 @@
|
||||
</bpmn:collaboration>
|
||||
<bpmn:correlationProperty id="process_id" name="Test Correlation">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_19nm5f5">
|
||||
<bpmn:formalExpression>task_num</bpmn:formalExpression>
|
||||
<bpmn:messagePath>task_num</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_0fc1gu7">
|
||||
<bpmn:formalExpression>init_id</bpmn:formalExpression>
|
||||
<bpmn:messagePath>init_id</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:correlationProperty id="task_id" name="Test Correlation">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_0hr1xdn">
|
||||
<bpmn:formalExpression>task_num</bpmn:formalExpression>
|
||||
<bpmn:messagePath>task_num</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_0z3cr5h">
|
||||
<bpmn:formalExpression>subprocess</bpmn:formalExpression>
|
||||
<bpmn:messagePath>subprocess</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:process id="proc_1" name="Process 1" isExecutable="true">
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="4.11.1" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
|
||||
<bpmn:process id="Process" isExecutable="true">
|
||||
<bpmn:ioSpecification />
|
||||
<bpmn:dataObject id="obj_1" />
|
||||
<bpmn:startEvent id="Event_0kmwi7u">
|
||||
<bpmn:outgoing>Flow_18858hr</bpmn:outgoing>
|
||||
|
@ -9,6 +9,18 @@
|
||||
<dataInput id="in_2" name="input 2" />
|
||||
<dataOutput id="out_1" name="output 1" />
|
||||
<dataOutput id="out_2" name="output 2" />
|
||||
<!-- creating input sets and output sets is way to define these
|
||||
as a required set of inputs or outputs that must all
|
||||
appear together -->
|
||||
<inputSet name="Inputs" id="INS_1">
|
||||
<dataInputRefs>id_1</dataInputRefs>
|
||||
<dataInputRefs>id_2</dataInputRefs>
|
||||
</inputSet>
|
||||
<outputSet name="Outputs" id="OUTS_1">
|
||||
<dataOutputRefs>out_1</dataOutputRefs>
|
||||
<dataOutputRefs>out_2</dataOutputRefs>
|
||||
</outputSet>
|
||||
<outputSet name="Outputs" id="ID_8"/>
|
||||
</ioSpecification>
|
||||
<startEvent id="Event_1rtivo5">
|
||||
<outgoing>Flow_0n038fc</outgoing>
|
||||
|
@ -11,8 +11,8 @@ __author__ = 'matth'
|
||||
|
||||
|
||||
class ActionManagementTest(BpmnWorkflowTestCase):
|
||||
START_TIME_DELTA=0.01
|
||||
FINISH_TIME_DELTA=0.02
|
||||
START_TIME_DELTA=0.05
|
||||
FINISH_TIME_DELTA=0.10
|
||||
|
||||
def now_plus_seconds(self, seconds):
|
||||
return datetime.datetime.now() + datetime.timedelta(seconds=seconds)
|
||||
@ -27,7 +27,7 @@ class ActionManagementTest(BpmnWorkflowTestCase):
|
||||
self.assertEqual(1, len(self.workflow.get_tasks(TaskState.READY)))
|
||||
self.workflow.get_tasks(TaskState.READY)[0].set_data(
|
||||
start_time=start_time, finish_time=finish_time)
|
||||
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
self.do_next_exclusive_step("Review Action", choice='Approve')
|
||||
self.workflow.do_engine_steps()
|
||||
|
@ -41,7 +41,7 @@ def track_workflow(wf_spec, completed_set):
|
||||
class CallActivityEscalationTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'CallActivity-Escalation-Test')
|
||||
self.spec, subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'CallActivity-Escalation-Test', False)
|
||||
self.workflow = BpmnWorkflow(self.spec, subprocesses)
|
||||
|
||||
def testShouldEscalate(self):
|
||||
|
@ -13,7 +13,7 @@ __author__ = 'matth'
|
||||
class MessageInterruptsSpTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Message Interrupts SP')
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Message Interrupts SP', False)
|
||||
|
||||
def testRunThroughHappySaveAndRestore(self):
|
||||
|
||||
|
@ -13,7 +13,7 @@ __author__ = 'matth'
|
||||
class MessageInterruptsTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Test Workflows')
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Test Workflows', False)
|
||||
|
||||
def testRunThroughHappySaveAndRestore(self):
|
||||
|
||||
|
@ -13,7 +13,7 @@ __author__ = 'matth'
|
||||
class MessageNonInterruptTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Test Workflows')
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Test Workflows', False)
|
||||
|
||||
def testRunThroughHappySaveAndRestore(self):
|
||||
|
||||
|
@ -13,7 +13,7 @@ __author__ = 'matth'
|
||||
class MessageNonInterruptsSpTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Message Non Interrupt SP')
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Message Non Interrupt SP', False)
|
||||
|
||||
def testRunThroughHappySaveAndRestore(self):
|
||||
|
||||
|
@ -13,7 +13,7 @@ __author__ = 'matth'
|
||||
class MessagesTest(BpmnWorkflowTestCase):
|
||||
|
||||
def setUp(self):
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Test Workflows')
|
||||
self.spec, self.subprocesses = self.load_workflow_spec('Test-Workflows/*.bpmn20.xml', 'Test Workflows', False)
|
||||
|
||||
def testRunThroughHappy(self):
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
from SpiffWorkflow.bpmn.parser.util import full_tag
|
||||
from SpiffWorkflow.camunda.specs.UserTask import UserTask
|
||||
from SpiffWorkflow.camunda.parser.CamundaParser import CamundaParser
|
||||
from SpiffWorkflow.camunda.parser.UserTaskParser import UserTaskParser
|
||||
from SpiffWorkflow.camunda.parser.business_rule_task import BusinessRuleTaskParser
|
||||
from SpiffWorkflow.camunda.parser.task_spec import UserTaskParser, BusinessRuleTaskParser
|
||||
from SpiffWorkflow.dmn.specs.BusinessRuleTask import BusinessRuleTask
|
||||
|
||||
from .BaseTestCase import BaseTestCase
|
||||
|
@ -1,6 +1,6 @@
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.camunda.parser.UserTaskParser import UserTaskParser
|
||||
from SpiffWorkflow.camunda.parser.task_spec import UserTaskParser
|
||||
from tests.SpiffWorkflow.camunda.BaseTestCase import BaseTestCase
|
||||
|
||||
|
@ -1,28 +0,0 @@
|
||||
import unittest
|
||||
|
||||
from SpiffWorkflow.camunda.parser.UserTaskParser import UserTaskParser
|
||||
from SpiffWorkflow.camunda.specs.UserTask import UserTask
|
||||
from SpiffWorkflow.camunda.parser.CamundaParser import CamundaParser
|
||||
|
||||
|
||||
class CamundaParserTest(unittest.TestCase):
|
||||
CORRELATE = CamundaParser
|
||||
|
||||
def setUp(self):
|
||||
self.parser = CamundaParser()
|
||||
|
||||
def test_overrides(self):
|
||||
expected_key = "{http://www.omg.org/spec/BPMN/20100524/MODEL}userTask"
|
||||
self.assertIn(expected_key,
|
||||
self.parser.OVERRIDE_PARSER_CLASSES)
|
||||
|
||||
self.assertEqual((UserTaskParser, UserTask),
|
||||
self.parser.OVERRIDE_PARSER_CLASSES.get(expected_key))
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(CamundaParserTest)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
@ -4,7 +4,7 @@ from lxml import etree
|
||||
|
||||
from SpiffWorkflow.bpmn.PythonScriptEngine import Box
|
||||
from SpiffWorkflow.dmn.engine.DMNEngine import DMNEngine
|
||||
from SpiffWorkflow.dmn.parser.DMNParser import DMNParser
|
||||
from SpiffWorkflow.dmn.parser.DMNParser import DMNParser, get_dmn_ns
|
||||
|
||||
|
||||
class Workflow:
|
||||
@ -33,7 +33,7 @@ class DecisionRunner:
|
||||
with open(fn) as fh:
|
||||
node = etree.parse(fh)
|
||||
|
||||
self.dmnParser = DMNParser(None, node.getroot())
|
||||
self.dmnParser = DMNParser(None, node.getroot(), get_dmn_ns(node.getroot()))
|
||||
self.dmnParser.parse()
|
||||
|
||||
decision = self.dmnParser.decision
|
||||
|
@ -12,7 +12,7 @@ class DmnVersionTest(BpmnWorkflowTestCase):
|
||||
|
||||
def testLoad(self):
|
||||
dmn = os.path.join(os.path.dirname(__file__), 'data',
|
||||
'dmn_version_20191111_test.dmn')
|
||||
'dmn_version_20151101_test.dmn')
|
||||
self.assertIsNone(self.parser.add_dmn_file(dmn))
|
||||
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import os
|
||||
|
||||
from SpiffWorkflow.spiff.parser import SpiffBpmnParser
|
||||
from SpiffWorkflow.spiff.parser import SpiffBpmnParser, VALIDATOR
|
||||
from SpiffWorkflow.spiff.serializer import NoneTaskConverter, \
|
||||
ManualTaskConverter, UserTaskConverter, ScriptTaskConverter, \
|
||||
SubWorkflowTaskConverter, TransactionSubprocessConverter, \
|
||||
@ -28,9 +28,9 @@ class BaseTestCase(BpmnWorkflowTestCase):
|
||||
|
||||
serializer = BpmnWorkflowSerializer(wf_spec_converter)
|
||||
|
||||
def load_workflow_spec(self, filename, process_name, dmn_filename=None):
|
||||
def load_workflow_spec(self, filename, process_name, dmn_filename=None, validate=True):
|
||||
bpmn = os.path.join(os.path.dirname(__file__), 'data', filename)
|
||||
parser = SpiffBpmnParser()
|
||||
parser = SpiffBpmnParser(validator=VALIDATOR if validate else None)
|
||||
parser.add_bpmn_files_by_glob(bpmn)
|
||||
if dmn_filename is not None:
|
||||
dmn = os.path.join(os.path.dirname(__file__), 'data', 'dmn', dmn_filename)
|
||||
|
@ -5,53 +5,51 @@
|
||||
<bpmn:outgoing>Flow_0lrg65h</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0lrg65h" sourceRef="StartEvent_1" targetRef="Activity_10k4dgb" />
|
||||
<bpmn:endEvent id="Event_184erzz">
|
||||
<bpmn:incoming>Flow_0l8nhib</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_0l8nhib" sourceRef="Activity_0ux7vpx" targetRef="Event_184erzz" />
|
||||
<bpmn:businessRuleTask id="Activity_0ux7vpx" name="Business Rules" scriptFormat="python" script="question = "X"">
|
||||
<bpmn:extensionElements>
|
||||
<spiffworkflow:calledDecisionId>decision_1</spiffworkflow:calledDecisionId>
|
||||
<spiffworkflow:preScript />
|
||||
<spiffworkflow:postScript />
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_1109ldv</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_0l8nhib</bpmn:outgoing>
|
||||
</bpmn:businessRuleTask>
|
||||
<bpmn:sequenceFlow id="Flow_1109ldv" sourceRef="Activity_10k4dgb" targetRef="Activity_0ux7vpx" />
|
||||
<bpmn:scriptTask id="Activity_10k4dgb" name="Set BR Variable">
|
||||
<bpmn:incoming>Flow_0lrg65h</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1109ldv</bpmn:outgoing>
|
||||
<bpmn:outgoing>Flow_0m1tt51</bpmn:outgoing>
|
||||
<bpmn:script>question = "X"</bpmn:script>
|
||||
</bpmn:scriptTask>
|
||||
<bpmn:sequenceFlow id="Flow_0m1tt51" sourceRef="Activity_10k4dgb" targetRef="Activity_0diq2z1" />
|
||||
<bpmn:businessRuleTask id="Activity_0diq2z1" name="Business Rules">
|
||||
<bpmn:extensionElements>
|
||||
<spiffworkflow:calledDecisionId>decision_1</spiffworkflow:calledDecisionId>
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_0m1tt51</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_19vr2vt</bpmn:outgoing>
|
||||
</bpmn:businessRuleTask>
|
||||
<bpmn:endEvent id="Event_0cqyhox">
|
||||
<bpmn:incoming>Flow_19vr2vt</bpmn:incoming>
|
||||
</bpmn:endEvent>
|
||||
<bpmn:sequenceFlow id="Flow_19vr2vt" sourceRef="Activity_0diq2z1" targetRef="Event_0cqyhox" />
|
||||
</bpmn:process>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
<bpmndi:BPMNPlane id="BPMNPlane_1" bpmnElement="Process_bd2e724">
|
||||
<bpmndi:BPMNEdge id="Flow_1109ldv_di" bpmnElement="Flow_1109ldv">
|
||||
<di:waypoint x="370" y="177" />
|
||||
<di:waypoint x="430" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0l8nhib_di" bpmnElement="Flow_0l8nhib">
|
||||
<di:waypoint x="530" y="177" />
|
||||
<di:waypoint x="612" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0lrg65h_di" bpmnElement="Flow_0lrg65h">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="270" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNShape id="_BPMNShape_StartEvent_2" bpmnElement="StartEvent_1">
|
||||
<dc:Bounds x="179" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_184erzz_di" bpmnElement="Event_184erzz">
|
||||
<dc:Bounds x="612" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_070a8q9_di" bpmnElement="Activity_0ux7vpx">
|
||||
<dc:Bounds x="430" y="137" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_1emp7lc_di" bpmnElement="Activity_10k4dgb">
|
||||
<dc:Bounds x="270" y="137" width="100" height="80" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Activity_08xsh1p_di" bpmnElement="Activity_0diq2z1">
|
||||
<dc:Bounds x="430" y="137" width="100" height="80" />
|
||||
<bpmndi:BPMNLabel />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNShape id="Event_0cqyhox_di" bpmnElement="Event_0cqyhox">
|
||||
<dc:Bounds x="592" y="159" width="36" height="36" />
|
||||
</bpmndi:BPMNShape>
|
||||
<bpmndi:BPMNEdge id="Flow_0lrg65h_di" bpmnElement="Flow_0lrg65h">
|
||||
<di:waypoint x="215" y="177" />
|
||||
<di:waypoint x="270" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_0m1tt51_di" bpmnElement="Flow_0m1tt51">
|
||||
<di:waypoint x="370" y="177" />
|
||||
<di:waypoint x="430" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
<bpmndi:BPMNEdge id="Flow_19vr2vt_di" bpmnElement="Flow_19vr2vt">
|
||||
<di:waypoint x="530" y="177" />
|
||||
<di:waypoint x="592" y="177" />
|
||||
</bpmndi:BPMNEdge>
|
||||
</bpmndi:BPMNPlane>
|
||||
</bpmndi:BPMNDiagram>
|
||||
</bpmn:definitions>
|
||||
|
@ -9,10 +9,10 @@
|
||||
</bpmn:collaboration>
|
||||
<bpmn:correlationProperty id="process_id" name="Test Correlation">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_19nm5f5">
|
||||
<bpmn:formalExpression>num</bpmn:formalExpression>
|
||||
<bpmn:messagePath>num</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="Message_0fc1gu7">
|
||||
<bpmn:formalExpression>init_id</bpmn:formalExpression>
|
||||
<bpmn:messagePath>init_id</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:message id="Message_19nm5f5" name="init_proc_2">
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" id="Definitions_96f6665" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="3.0.0-dev">
|
||||
<bpmn:collaboration id="Collaboration_0oye1os" messages="[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object],[object Object]">
|
||||
<bpmn:collaboration id="Collaboration_0oye1os">
|
||||
<bpmn:participant id="message_initiator" name="Message Initiator" processRef="message_send_process" />
|
||||
<bpmn:participant id="message-receiver-one" name="Message Receiver One" />
|
||||
<bpmn:participant id="message-receiver-two" name="Message Receiver Two" />
|
||||
@ -19,18 +19,18 @@
|
||||
</bpmn:collaboration>
|
||||
<bpmn:correlationProperty id="mcp_topica_one" name="MCP TopicA One">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_send_one">
|
||||
<bpmn:formalExpression>topica_one</bpmn:formalExpression>
|
||||
<bpmn:messagePath>topica_one</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_response_one">
|
||||
<bpmn:formalExpression>payload_var_one.topica</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payload_var_one.topica</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:correlationProperty id="mcp_topicb_one" name="MCP TopicB_one">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_send_one">
|
||||
<bpmn:formalExpression>topicb_one</bpmn:formalExpression>
|
||||
<bpmn:messagePath>topicb_one</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_response_one">
|
||||
<bpmn:formalExpression>payload_var_one.topicb</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payload_var_one.topicb</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:process id="message_send_process" name="Message Send Process" isExecutable="true">
|
||||
@ -117,18 +117,18 @@ del time</bpmn:script>
|
||||
</bpmn:message>
|
||||
<bpmn:correlationProperty id="mcp_topica_two" name="MCP Topica Two">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_send_two">
|
||||
<bpmn:formalExpression>topica_two</bpmn:formalExpression>
|
||||
<bpmn:messagePath>topica_two</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_response_two">
|
||||
<bpmn:formalExpression>topica_two</bpmn:formalExpression>
|
||||
<bpmn:messagePath>topica_two</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:correlationProperty id="mcp_topicb_two" name="MCP Topicb Two">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_send_two">
|
||||
<bpmn:formalExpression>topicb_two</bpmn:formalExpression>
|
||||
<bpmn:messagePath>topicb_two</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_response_two">
|
||||
<bpmn:formalExpression>topicb_two</bpmn:formalExpression>
|
||||
<bpmn:messagePath>topicb_two</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
|
||||
<bpmn:process id="Process_1" isExecutable="true">
|
||||
<bpmn:ioSpecification />
|
||||
<bpmn:startEvent id="Event_1ftsuzw">
|
||||
<bpmn:outgoing>Flow_1hjrex4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
|
@ -4,6 +4,12 @@
|
||||
<bpmn:ioSpecification>
|
||||
<bpmn:dataInput id="in_data" name="Input" />
|
||||
<bpmn:dataOutput id="out_data" name="Output" />
|
||||
<bpmn:inputSet>
|
||||
<bpmn:dataInputRefs>in_data</bpmn:dataInputRefs>
|
||||
</bpmn:inputSet>
|
||||
<bpmn:outputSet>
|
||||
<bpmn:dataOutputRefs>out_data</bpmn:dataOutputRefs>
|
||||
</bpmn:outputSet>
|
||||
</bpmn:ioSpecification>
|
||||
<bpmn:startEvent id="Event_1ftsuzw">
|
||||
<bpmn:outgoing>Flow_1a4nkhi</bpmn:outgoing>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
|
||||
<bpmn:process id="Process_1" isExecutable="true">
|
||||
<bpmn:ioSpecification />
|
||||
<bpmn:startEvent id="Event_1ftsuzw">
|
||||
<bpmn:outgoing>Flow_1hjrex4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
|
||||
<bpmn:process id="parent" isExecutable="true">
|
||||
<bpmn:ioSpecification />
|
||||
<bpmn:startEvent id="Event_1i37yhp">
|
||||
<bpmn:outgoing>Flow_1e5oj0e</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
|
@ -1,7 +1,6 @@
|
||||
<?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:di="http://www.omg.org/spec/DD/20100524/DI" xmlns:spiffworkflow="http://spiffworkflow.org/bpmn/schema/1.0/core" xmlns:modeler="http://camunda.org/schema/modeler/1.0" id="Definitions_19o7vxg" targetNamespace="http://bpmn.io/schema/bpmn" exporter="Camunda Modeler" exporterVersion="5.0.0" modeler:executionPlatform="Camunda Platform" modeler:executionPlatformVersion="7.17.0">
|
||||
<bpmn:process id="Process_1" isExecutable="true">
|
||||
<bpmn:ioSpecification />
|
||||
<bpmn:startEvent id="Event_1ftsuzw">
|
||||
<bpmn:outgoing>Flow_1hjrex4</bpmn:outgoing>
|
||||
</bpmn:startEvent>
|
||||
@ -16,7 +15,7 @@
|
||||
<spiffworkflow:property name="formJsonSchemaFilename" value="my_json_jschema.json" />
|
||||
<spiffworkflow:property name="formUiSchemaFilename" value="my_ui_jschema.json" />
|
||||
</spiffworkflow:properties>
|
||||
</bpmn:extensionElements>3
|
||||
</bpmn:extensionElements>
|
||||
<bpmn:incoming>Flow_1hjrex4</bpmn:incoming>
|
||||
<bpmn:outgoing>Flow_1vlqqxh</bpmn:outgoing>
|
||||
</bpmn:userTask>
|
||||
|
16
bin/push_all_subtrees
Executable file
16
bin/push_all_subtrees
Executable file
@ -0,0 +1,16 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function error_handler() {
|
||||
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||
exit "$2"
|
||||
}
|
||||
trap 'error_handler ${LINENO} $?' ERR
|
||||
set -o errtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
subtrees=$("${script_dir}/get_subtree_prefixes")
|
||||
|
||||
for subtree in $subtrees ; do
|
||||
echo -e "\n$subtree"
|
||||
"${script_dir}/push_subtree" "$subtree"
|
||||
done
|
36
bin/run_pyl
Executable file
36
bin/run_pyl
Executable file
@ -0,0 +1,36 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function error_handler() {
|
||||
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||
exit "$2"
|
||||
}
|
||||
trap 'error_handler ${LINENO} $?' ERR
|
||||
set -o errtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
python_projects=(
|
||||
flask-bpmn
|
||||
spiffworkflow-backend
|
||||
)
|
||||
|
||||
function run_fix_docstrings() {
|
||||
fix_python_docstrings $(get_top_level_directories_containing_python_files)
|
||||
}
|
||||
|
||||
function run_pre_commmit() {
|
||||
poetry run pre-commit run --verbose --all-files
|
||||
}
|
||||
|
||||
for python_project in "${python_projects[@]}" ; do
|
||||
pushd "$python_project"
|
||||
run_fix_docstrings || run_fix_docstrings
|
||||
popd
|
||||
done
|
||||
run_pre_commmit || run_pre_commmit
|
||||
|
||||
for python_project in "${python_projects[@]}"; do
|
||||
pushd "$python_project"
|
||||
poet i
|
||||
poet mypy
|
||||
poet test
|
||||
popd
|
||||
done
|
20
bin/run_servers_locally
Executable file
20
bin/run_servers_locally
Executable file
@ -0,0 +1,20 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
function error_handler() {
|
||||
>&2 echo "Exited with BAD EXIT CODE '${2}' in ${0} script at line: ${1}."
|
||||
exit "$2"
|
||||
}
|
||||
trap 'error_handler ${LINENO} $?' ERR
|
||||
set -o errtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
# HELP: runs backend and frontend in tmux. REQUIRES running in a current TMUX session.
|
||||
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
||||
# https://stackoverflow.com/a/39523222/6090676
|
||||
# The syntax for a specific pane is tmux send-keys -t {session}:{window}.{pane}, so tmux send-keys -t Test:Test1.1 "TEST" C-m would send that to the first pane. –
|
||||
pane_uid=$(tmux split-window -t backend.2 -c "${script_dir}/../spiffworkflow-backend" -P -F '#{pane_id}')
|
||||
tmux send-keys -t "$pane_uid" "./bin/run_server_locally" Enter
|
||||
|
||||
pane_uid=$(tmux split-window -t frontend.2 -c "${script_dir}/../spiffworkflow-frontend" -P -F '#{pane_id}')
|
||||
tmux send-keys -t "$pane_uid" "npm start" Enter
|
@ -3,7 +3,7 @@ import {
|
||||
BpmnPropertiesPanelModule,
|
||||
BpmnPropertiesProviderModule,
|
||||
} from 'bpmn-js-properties-panel';
|
||||
import diagramXML from '../test/spec/bpmn/script_task.bpmn';
|
||||
import diagramXML from '../test/spec/bpmn/user_form.bpmn';
|
||||
import spiffworkflow from './spiffworkflow';
|
||||
import setupFileOperations from './fileOperations';
|
||||
|
||||
@ -45,7 +45,7 @@ try {
|
||||
bpmnModeler.importXML(diagramXML).then(() => {});
|
||||
|
||||
/**
|
||||
* It is possible to poplulate certain components using API calls to
|
||||
* It is possible to populate certain components using API calls to
|
||||
* a backend. Here we mock out the API call, but this gives you
|
||||
* a sense of how things might work.
|
||||
*
|
||||
@ -75,7 +75,58 @@ bpmnModeler.on('spiff.service_tasks.requested', (event) => {
|
||||
});
|
||||
});
|
||||
|
||||
/**
|
||||
* Python Script authoring is best done in some sort of editor
|
||||
* here is an example that will connect a large CodeMirror editor
|
||||
* to the "Launch Editor" buttons (Script Tasks, and the Pre and Post
|
||||
* scripts on all other tasks.
|
||||
*/
|
||||
const myCodeMirror = CodeMirror(document.getElementById('code_editor'), {
|
||||
lineNumbers: true,
|
||||
mode: 'python',
|
||||
});
|
||||
|
||||
const saveCodeBtn = document.getElementById('saveCode');
|
||||
let launchCodeEvent = null;
|
||||
|
||||
bpmnModeler.on('script.editor.launch', (newEvent) => {
|
||||
launchCodeEvent = newEvent;
|
||||
myCodeMirror.setValue(launchCodeEvent.script);
|
||||
setTimeout(function() {
|
||||
myCodeMirror.refresh();
|
||||
},1); // We have to wait a moment before calling refresh.
|
||||
document.getElementById('code_overlay').style.display = 'block';
|
||||
document.getElementById('code_editor').focus();
|
||||
});
|
||||
|
||||
saveCodeBtn.addEventListener('click', (_event) => {
|
||||
const { scriptType, element } = launchCodeEvent;
|
||||
launchCodeEvent.eventBus.fire('script.editor.update', { element, scriptType, script: myCodeMirror.getValue()} )
|
||||
document.getElementById('code_overlay').style.display = 'none';
|
||||
});
|
||||
|
||||
|
||||
/**
|
||||
* Like Python Script Editing, it can be nice to edit your Markdown in a
|
||||
* good editor as well.
|
||||
*/
|
||||
var simplemde = new SimpleMDE({ element: document.getElementById("markdown_textarea") });
|
||||
let launchMarkdownEvent = null;
|
||||
bpmnModeler.on('markdown.editor.launch', (newEvent) => {
|
||||
launchMarkdownEvent = newEvent;
|
||||
simplemde.value(launchMarkdownEvent.markdown);
|
||||
document.getElementById('markdown_overlay').style.display = 'block';
|
||||
document.getElementById('markdown_editor').focus();
|
||||
});
|
||||
|
||||
const saveMarkdownBtn = document.getElementById('saveMarkdown');
|
||||
saveMarkdownBtn.addEventListener('click', (_event) => {
|
||||
const { element } = launchMarkdownEvent;
|
||||
launchMarkdownEvent.eventBus.fire('markdown.editor.update', { element, markdown:simplemde.value() });
|
||||
document.getElementById('markdown_overlay').style.display = 'none';
|
||||
});
|
||||
|
||||
// This handles the download and upload buttons - it isn't specific to
|
||||
// the BPMN modeler or these extensions, just a quick way to allow you to
|
||||
// create and save files.
|
||||
// create and save files, so keeping it outside the example.
|
||||
setupFileOperations(bpmnModeler);
|
||||
|
@ -1,9 +1,3 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
@ -57,3 +51,30 @@ html, body {
|
||||
.bpmn-js-spiffworkflow-btn:hover {
|
||||
background-color: RoyalBlue;
|
||||
}
|
||||
|
||||
/* Code Editor -- provided as a div overlay */
|
||||
.overlay {
|
||||
position: fixed; /* Sit on top of the page content */
|
||||
display: none; /* Hidden by default */
|
||||
width: 100%; /* Full width (cover the whole page) */
|
||||
height: 100%; /* Full height (cover the whole page) */
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background-color: rgba(0,0,0,0.5); /* Black background with opacity */
|
||||
z-index: 200; /* BPMN Canvas has some huge z-indexes, pop-up tools are 100 for ex.*/
|
||||
}
|
||||
|
||||
#code_editor, #markdown_editor {
|
||||
background-color: #ccc;
|
||||
margin: 50px auto 10px auto;
|
||||
max-width: 800px;
|
||||
}
|
||||
|
||||
#code_buttons, #markdown_buttons {
|
||||
margin: 50px auto 10px auto;
|
||||
max-width: 800px;
|
||||
right: 10px;
|
||||
}
|
||||
|
||||
|
@ -1,17 +1,36 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<!--
|
||||
IMPORTANT:
|
||||
This is here to provide an exmaple of how you might use this library in your application.
|
||||
You should be able to take this example, and modify it to suite your own needs.
|
||||
-->
|
||||
<title>bpmn-js-spiffworkflow</title>
|
||||
|
||||
<meta charset="utf-8"/>
|
||||
<!-- here are the core dependencies you will need to include -->
|
||||
<link rel="stylesheet" href="vendor/bpmn-js/assets/diagram-js.css"/>
|
||||
<link rel="stylesheet" href="vendor/bpmn-js/assets/bpmn-js.css"/>
|
||||
<link rel="stylesheet" href="vendor/bpmn-js/assets/bpmn-font/css/bpmn-embedded.css"/>
|
||||
<link rel="stylesheet" href="vendor/bpmn-js-properties-panel/assets/properties-panel.css"/>
|
||||
|
||||
<!-- Some local css settings -->
|
||||
<link rel="stylesheet" href="css/app.css"/>
|
||||
<link rel="shortcut icon" href="#">
|
||||
|
||||
<!-- A python code editor, we are using CodeMirror here -- see app.js for how this is wired in -->
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/codemirror.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/codemirror.min.css">
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/6.65.7/mode/python/python.min.js"></script>
|
||||
|
||||
<!-- Markdown Editor -- see app.js for how to wire these in. -->
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.css">
|
||||
<script src="https://cdn.jsdelivr.net/simplemde/latest/simplemde.min.js"></script>
|
||||
|
||||
<!-- Just have this for the download file icon -->
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<div id="menu">
|
||||
@ -22,6 +41,24 @@
|
||||
<div id="modeler"></div>
|
||||
<div id="panel"></div>
|
||||
</div>
|
||||
<!-- the following are overlays to provide editors for Python and Markdown -->
|
||||
<div id="code_overlay" class="overlay">
|
||||
<div id="code_editor"></div>
|
||||
<div id="code_buttons">
|
||||
<button id="saveCode" class="bpmn-js-spiffworkflow-btn">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
<div id="markdown_overlay" class="overlay">
|
||||
<div id="markdown_editor">
|
||||
<textarea id="markdown_textarea"></textarea>
|
||||
</div>
|
||||
<div id="markdown_buttons">
|
||||
<button id="saveMarkdown" class="bpmn-js-spiffworkflow-btn">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Here we load up our application, it's where the configuration happens. -->
|
||||
<script src="app.js"></script>
|
||||
|
||||
</body>
|
||||
</html><!---->
|
||||
|
@ -38,6 +38,7 @@ export default class IoInterceptor extends CommandInterceptor {
|
||||
di.bpmnElement = dataIO;
|
||||
di.id = dataIO.id + 'DI';
|
||||
bpmnUpdater.updateBounds(context.shape);
|
||||
|
||||
if (type == 'bpmn:DataInput') {
|
||||
collectionAdd(ioSpecification.get('dataInputs'), dataIO);
|
||||
} else {
|
||||
@ -60,6 +61,9 @@ export default class IoInterceptor extends CommandInterceptor {
|
||||
if (context.shape.di.$parent) {
|
||||
collectionRemove(context.shape.di.$parent.planeElement, context.shape.di);
|
||||
}
|
||||
if (ioSpec.dataInputs.length === 0 && ioSpec.dataOutputs.length === 0) {
|
||||
process.ioSpecification = null;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@ -88,13 +92,15 @@ function assureIOSpecificationExists(process, bpmnFactory) {
|
||||
let ioSpecification = process.get('ioSpecification');
|
||||
|
||||
if (!ioSpecification) {
|
||||
let inputSet = bpmnFactory.create('bpmn:InputSet');
|
||||
let outputSet = bpmnFactory.create('bpmn:OutputSet');
|
||||
|
||||
// Create the BPMN
|
||||
ioSpecification = bpmnFactory.create('bpmn:InputOutputSpecification', {
|
||||
dataInputs: [],
|
||||
inputSets: [],
|
||||
inputSets: [inputSet],
|
||||
dataOutputs: [],
|
||||
outputSets: []
|
||||
outputSets: [outputSet],
|
||||
});
|
||||
ioSpecification.$parent = process;
|
||||
process.ioSpecification = ioSpecification;
|
||||
@ -102,5 +108,7 @@ function assureIOSpecificationExists(process, bpmnFactory) {
|
||||
return ioSpecification;
|
||||
}
|
||||
|
||||
|
||||
|
||||
IoInterceptor.$inject = [ 'eventBus', 'bpmnFactory', 'bpmnUpdater' ];
|
||||
|
||||
|
@ -3,7 +3,7 @@ import { is, isAny } from 'bpmn-js/lib/util/ModelUtil';
|
||||
import scriptGroup, { SCRIPT_TYPE } from './SpiffScriptGroup';
|
||||
import { SpiffExtensionCalledDecision } from './SpiffExtensionCalledDecision';
|
||||
import { SpiffExtensionTextInput } from './SpiffExtensionTextInput';
|
||||
import { SpiffExtensionInstructionsForEndUser } from './SpiffExtensionInstructionsForEndUser';
|
||||
import instructionsGroup from './SpiffExtensionInstructionsForEndUser';
|
||||
import {
|
||||
ServiceTaskParameterArray,
|
||||
ServiceTaskOperatorSelect, ServiceTaskResultTextInput,
|
||||
@ -16,7 +16,7 @@ export default function ExtensionsPropertiesProvider(
|
||||
translate,
|
||||
moddle,
|
||||
commandStack,
|
||||
elementRegistry
|
||||
elementRegistry,
|
||||
) {
|
||||
this.getGroups = function (element) {
|
||||
return function (groups) {
|
||||
@ -27,7 +27,7 @@ export default function ExtensionsPropertiesProvider(
|
||||
} else if (
|
||||
isAny(element, ['bpmn:Task', 'bpmn:CallActivity', 'bpmn:SubProcess'])
|
||||
) {
|
||||
groups.push(preScriptPostScriptGroup(element, translate, moddle));
|
||||
groups.push(preScriptPostScriptGroup(element, translate, moddle, commandStack));
|
||||
}
|
||||
if (is(element, 'bpmn:UserTask')) {
|
||||
groups.push(createUserGroup(element, translate, moddle, commandStack));
|
||||
@ -37,9 +37,9 @@ export default function ExtensionsPropertiesProvider(
|
||||
createBusinessRuleGroup(element, translate, moddle, commandStack)
|
||||
);
|
||||
}
|
||||
if (is(element, 'bpmn:ManualTask')) {
|
||||
if (isAny(element, ['bpmn:ManualTask', 'bpmn:UserTask', 'bpmn:EndEvent'])) {
|
||||
groups.push(
|
||||
createManualTaskPropertiesGroup(
|
||||
createUserInstructionsGroup (
|
||||
element,
|
||||
translate,
|
||||
moddle,
|
||||
@ -97,14 +97,15 @@ function createScriptGroup(element, translate, moddle, commandStack) {
|
||||
* @param moddle For altering the underlying XML File.
|
||||
* @returns The components to add to the properties panel.
|
||||
*/
|
||||
function preScriptPostScriptGroup(element, translate, moddle) {
|
||||
function preScriptPostScriptGroup(element, translate, moddle, commandStack) {
|
||||
return {
|
||||
id: 'spiff_pre_post_scripts',
|
||||
label: translate('SpiffWorkflow Scripts'),
|
||||
label: translate('Pre/Post Scripts'),
|
||||
entries: [
|
||||
...scriptGroup({
|
||||
element,
|
||||
moddle,
|
||||
commandStack,
|
||||
translate,
|
||||
scriptType: SCRIPT_TYPE.pre,
|
||||
label: 'Pre-Script',
|
||||
@ -113,6 +114,7 @@ function preScriptPostScriptGroup(element, translate, moddle) {
|
||||
...scriptGroup({
|
||||
element,
|
||||
moddle,
|
||||
commandStack,
|
||||
translate,
|
||||
scriptType: SCRIPT_TYPE.post,
|
||||
label: 'Post-Script',
|
||||
@ -132,7 +134,7 @@ function preScriptPostScriptGroup(element, translate, moddle) {
|
||||
function createUserGroup(element, translate, moddle, commandStack) {
|
||||
return {
|
||||
id: 'user_task_properties',
|
||||
label: translate('SpiffWorkflow Web Form'),
|
||||
label: translate('Web Form (with Json Schemas)'),
|
||||
entries: [
|
||||
{
|
||||
element,
|
||||
@ -187,26 +189,24 @@ function createBusinessRuleGroup(element, translate, moddle, commandStack) {
|
||||
* @param moddle
|
||||
* @returns entries
|
||||
*/
|
||||
function createManualTaskPropertiesGroup(
|
||||
function createUserInstructionsGroup (
|
||||
element,
|
||||
translate,
|
||||
moddle,
|
||||
commandStack
|
||||
) {
|
||||
return {
|
||||
id: 'manual_task_properties',
|
||||
label: translate('Manual Task Properties'),
|
||||
id: 'instructions',
|
||||
label: translate('Instructions'),
|
||||
entries: [
|
||||
{
|
||||
...instructionsGroup({
|
||||
element,
|
||||
moddle,
|
||||
commandStack,
|
||||
component: SpiffExtensionInstructionsForEndUser,
|
||||
label: translate('Instructions For End User'),
|
||||
description: translate(
|
||||
'The instructions to show the user(s) who are responsible for completing the task.'
|
||||
),
|
||||
},
|
||||
translate,
|
||||
label: 'Instructions',
|
||||
description: 'The instructions to display when completing this task.',
|
||||
}),
|
||||
],
|
||||
};
|
||||
}
|
||||
|
@ -1,7 +1,11 @@
|
||||
import {useService } from 'bpmn-js-properties-panel';
|
||||
import { TextAreaEntry } from '@bpmn-io/properties-panel';
|
||||
import { useService } from 'bpmn-js-properties-panel';
|
||||
import {
|
||||
HeaderButton,
|
||||
isTextFieldEntryEdited,
|
||||
TextAreaEntry,
|
||||
} from '@bpmn-io/properties-panel';
|
||||
|
||||
const SPIFF_PROP = "spiffworkflow:instructionsForEndUser"
|
||||
const SPIFF_PROP = 'spiffworkflow:instructionsForEndUser';
|
||||
|
||||
/**
|
||||
* A generic properties' editor for text input.
|
||||
@ -13,61 +17,120 @@ const SPIFF_PROP = "spiffworkflow:instructionsForEndUser"
|
||||
*
|
||||
* @returns {string|null|*}
|
||||
*/
|
||||
export function SpiffExtensionInstructionsForEndUser(props) {
|
||||
const element = props.element;
|
||||
const commandStack = props.commandStack, moddle = props.moddle;
|
||||
const label = props.label, description = props.description;
|
||||
function SpiffExtensionInstructionsForEndUser(props) {
|
||||
const { element, commandStack, moddle, label, description } = props;
|
||||
const debounce = useService('debounceInput');
|
||||
|
||||
const getPropertyObject = () => {
|
||||
const bizObj = element.businessObject;
|
||||
if (!bizObj.extensionElements) {
|
||||
return null;
|
||||
} else {
|
||||
return bizObj.extensionElements.get("values").filter(function (e) {
|
||||
return e.$instanceOf(SPIFF_PROP)
|
||||
})[0];
|
||||
}
|
||||
}
|
||||
|
||||
const getValue = () => {
|
||||
const property = getPropertyObject()
|
||||
if (property) {
|
||||
return property.instructionsForEndUser;
|
||||
}
|
||||
return ""
|
||||
}
|
||||
return getPropertyValue(element);
|
||||
};
|
||||
|
||||
const setValue = value => {
|
||||
let property = getPropertyObject()
|
||||
let businessObject = element.businessObject;
|
||||
let extensions = businessObject.extensionElements;
|
||||
|
||||
if (!property) {
|
||||
property = moddle.create(SPIFF_PROP);
|
||||
if (!extensions) {
|
||||
extensions = moddle.create('bpmn:ExtensionElements');
|
||||
}
|
||||
extensions.get('values').push(property);
|
||||
}
|
||||
property.instructionsForEndUser = value;
|
||||
|
||||
commandStack.execute('element.updateModdleProperties', {
|
||||
element,
|
||||
moddleElement: businessObject,
|
||||
properties: {
|
||||
"extensionElements": extensions
|
||||
}
|
||||
});
|
||||
const setValue = (value) => {
|
||||
setProperty(commandStack, moddle, element, value);
|
||||
};
|
||||
|
||||
return TextAreaEntry({
|
||||
id: 'extension_instruction_for_end_user',
|
||||
element: element,
|
||||
description: description,
|
||||
label: label,
|
||||
getValue: getValue,
|
||||
setValue: setValue,
|
||||
debounce: debounce,
|
||||
})
|
||||
element,
|
||||
description,
|
||||
label,
|
||||
getValue,
|
||||
setValue,
|
||||
debounce,
|
||||
});
|
||||
}
|
||||
|
||||
function getPropertyObject(element) {
|
||||
const bizObj = element.businessObject;
|
||||
if (!bizObj.extensionElements) {
|
||||
return null;
|
||||
}
|
||||
return bizObj.extensionElements.get('values').filter(function (e) {
|
||||
return e.$instanceOf(SPIFF_PROP);
|
||||
})[0];
|
||||
}
|
||||
|
||||
function getPropertyValue(element) {
|
||||
const property = getPropertyObject(element);
|
||||
if (property) {
|
||||
return property.instructionsForEndUser;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
function setProperty(commandStack, moddle, element, value) {
|
||||
let property = getPropertyObject(element);
|
||||
const { businessObject } = element;
|
||||
let extensions = businessObject.extensionElements;
|
||||
|
||||
if (!property) {
|
||||
property = moddle.create(SPIFF_PROP);
|
||||
if (!extensions) {
|
||||
extensions = moddle.create('bpmn:ExtensionElements');
|
||||
}
|
||||
extensions.get('values').push(property);
|
||||
}
|
||||
property.instructionsForEndUser = value;
|
||||
|
||||
commandStack.execute('element.updateModdleProperties', {
|
||||
element,
|
||||
moddleElement: businessObject,
|
||||
properties: {
|
||||
extensionElements: extensions,
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function LaunchMarkdownEditorButton(props) {
|
||||
const { element, moddle, commandStack } = props;
|
||||
const eventBus = useService('eventBus');
|
||||
return HeaderButton({
|
||||
className: 'spiffworkflow-properties-panel-button',
|
||||
onClick: () => {
|
||||
const markdown = getPropertyValue(element);
|
||||
eventBus.fire('markdown.editor.launch', {
|
||||
element,
|
||||
markdown,
|
||||
eventBus,
|
||||
});
|
||||
// Listen for a response, to update the script.
|
||||
eventBus.once('markdown.editor.update', (event) => {
|
||||
console.log("Markdown update!!!")
|
||||
setProperty(commandStack, moddle, event.element, event.markdown);
|
||||
});
|
||||
},
|
||||
children: 'Launch Editor',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a text box and button for editing markdown.
|
||||
* @param element The element that should get the markdown.
|
||||
* @param moddle For updating the underlying xml document when needed.
|
||||
* @returns {[{component: (function(*)), isEdited: *, id: string, element},{component: (function(*)), isEdited: *, id: string, element}]}
|
||||
*/
|
||||
export default function getEntries(props) {
|
||||
const { element, moddle, label, description, translate, commandStack } =
|
||||
props;
|
||||
|
||||
return [
|
||||
{
|
||||
id: `edit_markdown`,
|
||||
element,
|
||||
component: SpiffExtensionInstructionsForEndUser,
|
||||
isEdited: isTextFieldEntryEdited,
|
||||
moddle,
|
||||
commandStack,
|
||||
label,
|
||||
description,
|
||||
},
|
||||
{
|
||||
id: `launchMarkdownEditor`,
|
||||
element,
|
||||
component: LaunchMarkdownEditorButton,
|
||||
isEdited: isTextFieldEntryEdited,
|
||||
moddle,
|
||||
commandStack,
|
||||
},
|
||||
];
|
||||
}
|
||||
|
@ -16,69 +16,19 @@ export const SCRIPT_TYPE = {
|
||||
function PythonScript(props) {
|
||||
const { element, id } = props;
|
||||
const { type } = props;
|
||||
const { moddle } = props;
|
||||
const { moddle, commandStack } = props;
|
||||
const { label } = props;
|
||||
const { description } = props;
|
||||
|
||||
const translate = useService('translate');
|
||||
const debounce = useService('debounceInput');
|
||||
|
||||
/**
|
||||
* Finds the value of the given type within the extensionElements
|
||||
* given a type of "spiff:preScript", would find it in this, and return
|
||||
* the object.
|
||||
*
|
||||
* <bpmn:
|
||||
<bpmn:userTask id="123" name="My User Task!">
|
||||
<bpmn:extensionElements>
|
||||
<spiff:preScript>
|
||||
me = "100% awesome"
|
||||
</spiff:preScript>
|
||||
</bpmn:extensionElements>
|
||||
...
|
||||
</bpmn:userTask>
|
||||
*
|
||||
* @returns {string|null|*}
|
||||
*/
|
||||
const getScriptObject = () => {
|
||||
const bizObj = element.businessObject;
|
||||
if (type === SCRIPT_TYPE.bpmn) {
|
||||
return bizObj;
|
||||
}
|
||||
if (!bizObj.extensionElements) {
|
||||
return null;
|
||||
}
|
||||
return bizObj.extensionElements
|
||||
.get('values')
|
||||
.filter(function getInstanceOfType(e) {
|
||||
return e.$instanceOf(type);
|
||||
})[0];
|
||||
};
|
||||
|
||||
const getValue = () => {
|
||||
const scriptObj = getScriptObject();
|
||||
if (scriptObj) {
|
||||
return scriptObj.script;
|
||||
}
|
||||
return '';
|
||||
return getScriptString(element, type);
|
||||
};
|
||||
|
||||
const setValue = (value) => {
|
||||
const { businessObject } = element;
|
||||
let scriptObj = getScriptObject();
|
||||
// Create the script object if needed.
|
||||
if (!scriptObj) {
|
||||
scriptObj = moddle.create(type);
|
||||
if (type !== SCRIPT_TYPE.bpmn) {
|
||||
if (!businessObject.extensionElements) {
|
||||
businessObject.extensionElements = moddle.create(
|
||||
'bpmn:ExtensionElements'
|
||||
);
|
||||
}
|
||||
businessObject.extensionElements.get('values').push(scriptObj);
|
||||
}
|
||||
}
|
||||
scriptObj.script = value;
|
||||
updateScript(commandStack, moddle, element, type, value);
|
||||
};
|
||||
|
||||
return TextAreaEntry({
|
||||
@ -93,20 +43,107 @@ function PythonScript(props) {
|
||||
}
|
||||
|
||||
function LaunchEditorButton(props) {
|
||||
const { element, type } = props;
|
||||
const { element, type, moddle, commandStack } = props;
|
||||
const eventBus = useService('eventBus');
|
||||
// fixme: add a call up date as a property
|
||||
return HeaderButton({
|
||||
className: 'spiffworkflow-properties-panel-button',
|
||||
onClick: () => {
|
||||
eventBus.fire('launch.script.editor', { element, type });
|
||||
const script = getScriptString(element, type);
|
||||
eventBus.fire('script.editor.launch', {
|
||||
element,
|
||||
scriptType: type,
|
||||
script,
|
||||
eventBus,
|
||||
});
|
||||
// Listen for a response, to update the script.
|
||||
eventBus.once('script.editor.update', (event) => {
|
||||
updateScript(
|
||||
commandStack,
|
||||
moddle,
|
||||
element,
|
||||
event.scriptType,
|
||||
event.script
|
||||
);
|
||||
});
|
||||
},
|
||||
children: 'Launch Editor',
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a python script.
|
||||
* Finds the value of the given type within the extensionElements
|
||||
* given a type of "spiff:preScript", would find it in this, and return
|
||||
* the object.
|
||||
*
|
||||
* <bpmn:
|
||||
<bpmn:userTask id="123" name="My User Task!">
|
||||
<bpmn:extensionElements>
|
||||
<spiff:preScript>
|
||||
me = "100% awesome"
|
||||
</spiff:preScript>
|
||||
</bpmn:extensionElements>
|
||||
...
|
||||
</bpmn:userTask>
|
||||
*
|
||||
* @returns {string|null|*}
|
||||
*/
|
||||
function getScriptObject(element, scriptType) {
|
||||
const bizObj = element.businessObject;
|
||||
if (scriptType === SCRIPT_TYPE.bpmn) {
|
||||
return bizObj;
|
||||
}
|
||||
if (!bizObj.extensionElements) {
|
||||
return null;
|
||||
}
|
||||
return bizObj.extensionElements
|
||||
.get('values')
|
||||
.filter(function getInstanceOfType(e) {
|
||||
return e.$instanceOf(scriptType);
|
||||
})[0];
|
||||
}
|
||||
|
||||
function updateScript(commandStack, moddle, element, scriptType, newValue) {
|
||||
const { businessObject } = element;
|
||||
let scriptObj = getScriptObject(element, scriptType);
|
||||
// Create the script object if needed.
|
||||
if (!scriptObj) {
|
||||
scriptObj = moddle.create(scriptType);
|
||||
if (scriptType !== SCRIPT_TYPE.bpmn) {
|
||||
let { extensionElements } = businessObject;
|
||||
if (!extensionElements) {
|
||||
extensionElements = moddle.create('bpmn:ExtensionElements');
|
||||
}
|
||||
scriptObj.script = newValue;
|
||||
extensionElements.get('values').push(scriptObj);
|
||||
commandStack.execute('element.updateModdleProperties', {
|
||||
element,
|
||||
moddleElement: businessObject,
|
||||
properties: {
|
||||
extensionElements,
|
||||
},
|
||||
});
|
||||
}
|
||||
} else {
|
||||
commandStack.execute('element.updateModdleProperties', {
|
||||
element,
|
||||
moddleElement: scriptObj,
|
||||
properties: {
|
||||
script: newValue,
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function getScriptString(element, scriptType) {
|
||||
const scriptObj = getScriptObject(element, scriptType);
|
||||
if (scriptObj && scriptObj.script) {
|
||||
return scriptObj.script;
|
||||
}
|
||||
return '';
|
||||
}
|
||||
|
||||
/**
|
||||
* Generates a text box and button for editing a script.
|
||||
* @param element The elemment that should get the script task.
|
||||
* @param scriptType The type of script -- can be a preScript, postScript or a BPMN:Script for script tags
|
||||
* @param moddle For updating the underlying xml document when needed.
|
||||
@ -131,6 +168,7 @@ export default function getEntries(props) {
|
||||
component: PythonScript,
|
||||
isEdited: isTextFieldEntryEdited,
|
||||
moddle,
|
||||
commandStack,
|
||||
label,
|
||||
description,
|
||||
},
|
||||
@ -141,6 +179,7 @@ export default function getEntries(props) {
|
||||
component: LaunchEditorButton,
|
||||
isEdited: isTextFieldEntryEdited,
|
||||
moddle,
|
||||
commandStack,
|
||||
},
|
||||
];
|
||||
|
||||
|
@ -82,7 +82,7 @@ export function MessageCorrelationPropertiesArray(props) {
|
||||
'bpmn:CorrelationPropertyRetrievalExpression'
|
||||
);
|
||||
const messageRefElement = getMessageRefElement(element);
|
||||
const newFormalExpression = moddle.create('bpmn:FormalExpression');
|
||||
const newFormalExpression = moddle.create('bpmn:messagePath');
|
||||
newFormalExpression.body = '';
|
||||
|
||||
newRetrievalExpressionElement.messageRef = messageRefElement;
|
||||
|
40349
bpmn-js-spiffworkflow/dist/index.js
vendored
40349
bpmn-js-spiffworkflow/dist/index.js
vendored
File diff suppressed because one or more lines are too long
1
bpmn-js-spiffworkflow/dist/index.js.map
vendored
1
bpmn-js-spiffworkflow/dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -1,14 +0,0 @@
|
||||
"use strict";
|
||||
(self["webpackChunkbpmn_js_spiffworkflow"] = self["webpackChunkbpmn_js_spiffworkflow"] || []).push([["src_moddle_spiffworkflow_json"],{
|
||||
|
||||
/***/ "./src/moddle/spiffworkflow.json":
|
||||
/*!***************************************!*\
|
||||
!*** ./src/moddle/spiffworkflow.json ***!
|
||||
\***************************************/
|
||||
/***/ ((module) => {
|
||||
|
||||
module.exports = JSON.parse('{"name":"SpiffWorkflow","uri":"http://spiffworkflow.org/bpmn/schema/1.0/core","prefix":"spiffworkflow","associations":[],"types":[{"name":"preScript","superClass":["Element"],"properties":[{"name":"script","isBody":true,"type":"String"}]},{"name":"postScript","superClass":["Element"],"properties":[{"name":"script","isBody":true,"type":"String"}]},{"name":"messagePayload","superClass":["Element"],"properties":[{"name":"messagePayload","isBody":true,"type":"String"}]},{"name":"messageVariable","superClass":["Element"],"properties":[{"name":"messageVariable","isBody":true,"type":"String"}]},{"name":"calledDecisionId","superClass":["Element"],"properties":[{"name":"calledDecisionId","isBody":true,"type":"String"}]},{"name":"instructionsForEndUser","superClass":["Element"],"properties":[{"name":"instructionsForEndUser","isBody":true,"type":"String"}]},{"name":"properties","superClass":["Element"],"properties":[{"name":"properties","type":"property","isMany":true}]},{"name":"property","superClass":["Element"],"properties":[{"name":"name","isAttr":true,"type":"String"},{"name":"value","isAttr":true,"type":"String"}]},{"name":"serviceTaskOperator","superClass":["Element"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"parameterList","type":"parameters"}]},{"name":"parameters","superClass":["Element"],"properties":[{"name":"parameters","type":"parameter","isMany":true}]},{"name":"parameter","superClass":["Element"],"properties":[{"name":"id","isAttr":true,"type":"String"},{"name":"type","isAttr":true,"type":"String"},{"name":"value","isAttr":true,"type":"String"}]}]}');
|
||||
|
||||
/***/ })
|
||||
|
||||
}]);
|
183
bpmn-js-spiffworkflow/package-lock.json
generated
183
bpmn-js-spiffworkflow/package-lock.json
generated
@ -9,10 +9,6 @@
|
||||
"version": "0.0.8",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@bpmn-io/properties-panel": "^0.19.0",
|
||||
"bpmn-js": "^9.4.0",
|
||||
"bpmn-js-properties-panel": "^1.5.0",
|
||||
"diagram-js": "^8.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
"inherits-browser": "^0.0.1",
|
||||
"min-dash": "^3.8.1",
|
||||
@ -59,6 +55,11 @@
|
||||
"stringify": "^5.2.0",
|
||||
"webpack": "^5.73.0",
|
||||
"webpack-cli": "^4.9.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bpmn-js": "*",
|
||||
"bpmn-js-properties-panel": "*",
|
||||
"diagram-js": "*"
|
||||
}
|
||||
},
|
||||
"node_modules/@ampproject/remapping": {
|
||||
@ -1898,6 +1899,7 @@
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/element-templates-validator/-/element-templates-validator-0.9.0.tgz",
|
||||
"integrity": "sha512-oS5eaXPKxl5bV8x4dJYPCWJpWMumr16TTS39S1oJEh/bKke/nhMBuhsk6wWCp7+G3jWWDkUcS1jGAAaKtvQneA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@camunda/element-templates-json-schema": "^0.10.0",
|
||||
"@camunda/zeebe-element-templates-json-schema": "^0.5.0",
|
||||
@ -1909,6 +1911,7 @@
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/extract-process-variables/-/extract-process-variables-0.5.1.tgz",
|
||||
"integrity": "sha512-Kx0zknI9GRli1EDkgmkUV34cKYsqppsgbcnfrSaT2Tmh7CGXEo8b6UzuGFlZtCZt4488UxjP7UhdrONTt5Si/A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"min-dash": "^3.8.1"
|
||||
}
|
||||
@ -1917,6 +1920,7 @@
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/feel-editor/-/feel-editor-0.2.0.tgz",
|
||||
"integrity": "sha512-R85p56nFxffNp0fStNxz561EXJmcTdVZL7NyVhuB3qKS/mt4thuvK1B43YnXKdLx8WessjsbHzjvWkbCYZRWkQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@codemirror/autocomplete": "^6.0.3",
|
||||
"@codemirror/commands": "^6.0.0",
|
||||
@ -1932,6 +1936,7 @@
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/properties-panel/-/properties-panel-0.19.0.tgz",
|
||||
"integrity": "sha512-cw+MfA2gpCBsa9Q0+JT3Gc7OvR1NGXuyQj4yOk5QoQHNzxuIMNuz6EX2NvDsCrf0oSzc9z0FapbzDuJB+DSC1g==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@bpmn-io/feel-editor": "0.2.0",
|
||||
"classnames": "^2.3.1",
|
||||
@ -1943,17 +1948,20 @@
|
||||
"node_modules/@camunda/element-templates-json-schema": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@camunda/element-templates-json-schema/-/element-templates-json-schema-0.10.0.tgz",
|
||||
"integrity": "sha512-igc5o6/Dn2LlnhvbtYy6D34v6yU9RqlfiUbb/zjyLjXQ7+dgWyJFICBPoNjXltlJPjx5XAnIT1mKDD+45/44mA=="
|
||||
"integrity": "sha512-igc5o6/Dn2LlnhvbtYy6D34v6yU9RqlfiUbb/zjyLjXQ7+dgWyJFICBPoNjXltlJPjx5XAnIT1mKDD+45/44mA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@camunda/zeebe-element-templates-json-schema": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@camunda/zeebe-element-templates-json-schema/-/zeebe-element-templates-json-schema-0.5.0.tgz",
|
||||
"integrity": "sha512-BVHVl4cuK9LxL1eDSdWs8AzuZd981/+CPkw7xlwcB1Xkn6Di8E2iRbDUCBhOIqkahjJYq957nVtbM6jlqXX5qw=="
|
||||
"integrity": "sha512-BVHVl4cuK9LxL1eDSdWs8AzuZd981/+CPkw7xlwcB1Xkn6Di8E2iRbDUCBhOIqkahjJYq957nVtbM6jlqXX5qw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@codemirror/autocomplete": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.1.0.tgz",
|
||||
"integrity": "sha512-wtO4O5WDyXhhCd4q4utDIDZxnQfmJ++3dGBCG9LMtI79+92OcA1DVk/n7BEupKmjIr8AzvptDz7YQ9ud6OkU+A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@ -1971,6 +1979,7 @@
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.0.1.tgz",
|
||||
"integrity": "sha512-iNHDByicYqQjs0Wo1MKGfqNbMYMyhS9WV6EwMVwsHXImlFemgEUC+c5X22bXKBStN3qnwg4fArNZM+gkv22baQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@ -1982,6 +1991,7 @@
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.1.tgz",
|
||||
"integrity": "sha512-MC3svxuvIj0MRpFlGHxLS6vPyIdbTr2KKPEW46kCoCXw2ktb4NTkpkPBI/lSP/FoNXLCBJ0mrnUi1OoZxtpW1Q==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@codemirror/view": "^6.0.0",
|
||||
@ -1995,6 +2005,7 @@
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.0.0.tgz",
|
||||
"integrity": "sha512-nUUXcJW1Xp54kNs+a1ToPLK8MadO0rMTnJB8Zk4Z8gBdrN0kqV7uvUraU/T2yqg+grDNR38Vmy/MrhQN/RgwiA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@codemirror/view": "^6.0.0",
|
||||
@ -2004,12 +2015,14 @@
|
||||
"node_modules/@codemirror/state": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.1.1.tgz",
|
||||
"integrity": "sha512-2s+aXsxmAwnR3Rd+JDHPG/1lw0YsA9PEwl7Re88gHJHGfxyfEzKBmsN4rr53RyPIR4lzbbhJX0DCq0WlqlBIRw=="
|
||||
"integrity": "sha512-2s+aXsxmAwnR3Rd+JDHPG/1lw0YsA9PEwl7Re88gHJHGfxyfEzKBmsN4rr53RyPIR4lzbbhJX0DCq0WlqlBIRw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@codemirror/view": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.2.0.tgz",
|
||||
"integrity": "sha512-3emW1symh+GoteFMBPsltjmF790U/trouLILATh3JodbF/z98HvcQh2g3+H6dfNIHx16uNonsAF4mNzVr1TJNA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"style-mod": "^4.0.0",
|
||||
@ -2160,12 +2173,14 @@
|
||||
"node_modules/@lezer/common": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.0.tgz",
|
||||
"integrity": "sha512-ohydQe+Hb+w4oMDvXzs8uuJd2NoA3D8YDcLiuDsLqH+yflDTPEpgCsWI3/6rH5C3BAedtH1/R51dxENldQceEA=="
|
||||
"integrity": "sha512-ohydQe+Hb+w4oMDvXzs8uuJd2NoA3D8YDcLiuDsLqH+yflDTPEpgCsWI3/6rH5C3BAedtH1/R51dxENldQceEA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/@lezer/highlight": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.0.0.tgz",
|
||||
"integrity": "sha512-nsCnNtim90UKsB5YxoX65v3GEIw3iCHw9RM2DtdgkiqAbKh9pCdvi8AWNwkYf10Lu6fxNhXPpkpHbW6mihhvJA==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@lezer/common": "^1.0.0"
|
||||
}
|
||||
@ -2174,6 +2189,7 @@
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.2.1.tgz",
|
||||
"integrity": "sha512-RpHRs+Q+5tPsXtobSfSeRFRAnTRD0e4bApDvo74O+JiaWq9812x5S8WgftNX67owdaTQXCB5E8XZGALo4Wt77A==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@lezer/common": "^1.0.0"
|
||||
}
|
||||
@ -2788,6 +2804,7 @@
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/array-move/-/array-move-3.0.1.tgz",
|
||||
"integrity": "sha512-H3Of6NIn2nNU1gsVDqDnYKY/LCdWvCMMOWifNGhKcVQgiZ6nOek39aESOvro6zmueP07exSl93YLvkN4fZOkSg==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=10"
|
||||
},
|
||||
@ -3022,6 +3039,7 @@
|
||||
"version": "9.4.0",
|
||||
"resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-9.4.0.tgz",
|
||||
"integrity": "sha512-7dusZBYCFognA0TmspWaKZ47UjFhyRT+//hMdyLtPCKY1M0uAPXHoFv73MohlsEa7a75h0q6zjCj5W0/RHBwvg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"bpmn-moddle": "^7.1.3",
|
||||
"css.escape": "^1.5.1",
|
||||
@ -3039,6 +3057,7 @@
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bpmn-js-properties-panel/-/bpmn-js-properties-panel-1.5.0.tgz",
|
||||
"integrity": "sha512-0VAPk6xK/u+GepjGjt8HAXtBa2ab5o4Dkn5II8UgnFMoQThpvrsLras3vh1il8j/2vPhngAsfiA8z7Y9nJ6/Hw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@bpmn-io/element-templates-validator": "^0.9.0",
|
||||
"@bpmn-io/extract-process-variables": "^0.5.0",
|
||||
@ -3061,6 +3080,7 @@
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-7.1.3.tgz",
|
||||
"integrity": "sha512-ZcBfw0NSOdYTSXFKEn7MOXHItz7VfLZTrFYKO8cK6V8ZzGjCcdiLIOiw7Lctw1PJsihhLiZQS8Htj2xKf+NwCg==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"min-dash": "^3.5.2",
|
||||
"moddle": "^5.0.2",
|
||||
@ -3330,7 +3350,8 @@
|
||||
"node_modules/classnames": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz",
|
||||
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA=="
|
||||
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/clean-css": {
|
||||
"version": "4.1.11",
|
||||
@ -3592,7 +3613,8 @@
|
||||
"node_modules/crelt": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz",
|
||||
"integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA=="
|
||||
"integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
@ -3611,7 +3633,8 @@
|
||||
"node_modules/css.escape": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
|
||||
"integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg=="
|
||||
"integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/custom-event": {
|
||||
"version": "1.0.1",
|
||||
@ -3726,6 +3749,7 @@
|
||||
"version": "8.9.0",
|
||||
"resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-8.9.0.tgz",
|
||||
"integrity": "sha512-577bUEbkwZ7id4SCXcD2qrlKoRPXry2SDSPt5T6tEOjwKrTllKr5d1HZoJzGws4VMQq5fmY51Gce1iFT9S4Dlw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"css.escape": "^1.5.1",
|
||||
"didi": "^8.0.1",
|
||||
@ -3742,6 +3766,7 @@
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-1.7.0.tgz",
|
||||
"integrity": "sha512-ZfTLF4hdWr7NSoruwxGvVmu7aVaUjWRXjwgK5dx58LbXAsNjBS3Ap7zjVuGxjWUpCZ/MMwyZ00lpTHPH2P7BFQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"min-dash": "^3.5.2",
|
||||
"min-dom": "^3.1.3"
|
||||
@ -3753,7 +3778,8 @@
|
||||
"node_modules/didi": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/didi/-/didi-8.0.1.tgz",
|
||||
"integrity": "sha512-7oXiXbp8DHE3FfQsVBkc2pwePo3Jy2uyGS9trAeBmfxiZAP4WV23LWokRpMmyl3hlu8OEAsyMxx19i5P6TVaJQ=="
|
||||
"integrity": "sha512-7oXiXbp8DHE3FfQsVBkc2pwePo3Jy2uyGS9trAeBmfxiZAP4WV23LWokRpMmyl3hlu8OEAsyMxx19i5P6TVaJQ==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/diff": {
|
||||
"version": "5.0.0",
|
||||
@ -5119,6 +5145,7 @@
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
|
||||
"integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==",
|
||||
"peer": true,
|
||||
"engines": {
|
||||
"node": ">=0.8.0"
|
||||
}
|
||||
@ -5319,7 +5346,8 @@
|
||||
"node_modules/ids": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ids/-/ids-1.0.0.tgz",
|
||||
"integrity": "sha512-Zvtq1xUto4LttpstyOlFum8lKx+i1OmRfg+6A9drFS9iSZsDPMHG4Sof/qwNR4kCU7jBeWFPrY2ocHxiz7cCRw=="
|
||||
"integrity": "sha512-Zvtq1xUto4LttpstyOlFum8lKx+i1OmRfg+6A9drFS9iSZsDPMHG4Sof/qwNR4kCU7jBeWFPrY2ocHxiz7cCRw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/ignore": {
|
||||
"version": "5.2.0",
|
||||
@ -5861,7 +5889,8 @@
|
||||
"node_modules/json-source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/json-source-map/-/json-source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg=="
|
||||
"integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/json-stable-stringify-without-jsonify": {
|
||||
"version": "1.0.1",
|
||||
@ -6090,6 +6119,7 @@
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/lezer-feel/-/lezer-feel-0.4.0.tgz",
|
||||
"integrity": "sha512-yd+AWsOE4NGVeW4x50HXUA9dKs9MUa7H8PATPNEmBiXKfIijPlC6+FEy8OLjOzb4b9y9pPPpAqnZ2/kvLmvZVw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@lezer/lr": "^0.16.0"
|
||||
}
|
||||
@ -6097,12 +6127,14 @@
|
||||
"node_modules/lezer-feel/node_modules/@lezer/common": {
|
||||
"version": "0.16.1",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.16.1.tgz",
|
||||
"integrity": "sha512-qPmG7YTZ6lATyTOAWf8vXE+iRrt1NJd4cm2nJHK+v7X9TsOF6+HtuU/ctaZy2RCrluxDb89hI6KWQ5LfQGQWuA=="
|
||||
"integrity": "sha512-qPmG7YTZ6lATyTOAWf8vXE+iRrt1NJd4cm2nJHK+v7X9TsOF6+HtuU/ctaZy2RCrluxDb89hI6KWQ5LfQGQWuA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/lezer-feel/node_modules/@lezer/lr": {
|
||||
"version": "0.16.3",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.16.3.tgz",
|
||||
"integrity": "sha512-pau7um4eAw94BEuuShUIeQDTf3k4Wt6oIUOYxMmkZgDHdqtIcxWND4LRxi8nI9KuT4I1bXQv67BCapkxt7Ywqw==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"@lezer/common": "^0.16.0"
|
||||
}
|
||||
@ -6625,6 +6657,7 @@
|
||||
"version": "9.0.6",
|
||||
"resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-9.0.6.tgz",
|
||||
"integrity": "sha512-tl0reHpsY/aKlLGhXeFlQWlYAQHFxTkFqC8tq8jXRYpQSnLVw13T6swMaourLd7EXqHdWsc+5ggsB+fEep6xZQ==",
|
||||
"peer": true,
|
||||
"dependencies": {
|
||||
"min-dash": "^3.5.2",
|
||||
"moddle": "^5.0.2",
|
||||
@ -6978,7 +7011,8 @@
|
||||
"node_modules/object-refs": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/object-refs/-/object-refs-0.3.0.tgz",
|
||||
"integrity": "sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ=="
|
||||
"integrity": "sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/object.assign": {
|
||||
"version": "4.1.2",
|
||||
@ -7203,7 +7237,8 @@
|
||||
"node_modules/path-intersection": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-2.2.1.tgz",
|
||||
"integrity": "sha512-9u8xvMcSfuOiStv9bPdnRJQhGQXLKurew94n4GPQCdH1nj9QKC9ObbNoIpiRq8skiOBxKkt277PgOoFgAt3/rA=="
|
||||
"integrity": "sha512-9u8xvMcSfuOiStv9bPdnRJQhGQXLKurew94n4GPQCdH1nj9QKC9ObbNoIpiRq8skiOBxKkt277PgOoFgAt3/rA==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
@ -7327,6 +7362,7 @@
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/preact-markup/-/preact-markup-2.1.1.tgz",
|
||||
"integrity": "sha512-8JL2p36mzK8XkspOyhBxUSPjYwMxDM0L5BWBZWxsZMVW8WsGQrYQDgVuDKkRspt2hwrle+Cxr/053hpc9BJwfw==",
|
||||
"peer": true,
|
||||
"peerDependencies": {
|
||||
"preact": ">=10"
|
||||
}
|
||||
@ -7866,7 +7902,8 @@
|
||||
"node_modules/saxen": {
|
||||
"version": "8.1.2",
|
||||
"resolved": "https://registry.npmjs.org/saxen/-/saxen-8.1.2.tgz",
|
||||
"integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw=="
|
||||
"integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/schema-utils": {
|
||||
"version": "4.0.0",
|
||||
@ -7942,7 +7979,8 @@
|
||||
"node_modules/semver-compare": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
|
||||
"integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow=="
|
||||
"integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/serialize-javascript": {
|
||||
"version": "6.0.0",
|
||||
@ -8118,9 +8156,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/socket.io-parser": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.4.tgz",
|
||||
"integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==",
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz",
|
||||
"integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@types/component-emitter": "^1.2.10",
|
||||
@ -8341,7 +8379,8 @@
|
||||
"node_modules/style-mod": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.0.tgz",
|
||||
"integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw=="
|
||||
"integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/supports-color": {
|
||||
"version": "7.2.0",
|
||||
@ -8377,9 +8416,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/terser": {
|
||||
"version": "5.14.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz",
|
||||
"integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==",
|
||||
"version": "5.15.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz",
|
||||
"integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==",
|
||||
"dev": true,
|
||||
"dependencies": {
|
||||
"@jridgewell/source-map": "^0.3.2",
|
||||
@ -8815,7 +8854,8 @@
|
||||
"node_modules/w3c-keyname": {
|
||||
"version": "2.2.6",
|
||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.6.tgz",
|
||||
"integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg=="
|
||||
"integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg==",
|
||||
"peer": true
|
||||
},
|
||||
"node_modules/watchpack": {
|
||||
"version": "2.4.0",
|
||||
@ -10458,6 +10498,7 @@
|
||||
"version": "0.9.0",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/element-templates-validator/-/element-templates-validator-0.9.0.tgz",
|
||||
"integrity": "sha512-oS5eaXPKxl5bV8x4dJYPCWJpWMumr16TTS39S1oJEh/bKke/nhMBuhsk6wWCp7+G3jWWDkUcS1jGAAaKtvQneA==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@camunda/element-templates-json-schema": "^0.10.0",
|
||||
"@camunda/zeebe-element-templates-json-schema": "^0.5.0",
|
||||
@ -10469,6 +10510,7 @@
|
||||
"version": "0.5.1",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/extract-process-variables/-/extract-process-variables-0.5.1.tgz",
|
||||
"integrity": "sha512-Kx0zknI9GRli1EDkgmkUV34cKYsqppsgbcnfrSaT2Tmh7CGXEo8b6UzuGFlZtCZt4488UxjP7UhdrONTt5Si/A==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"min-dash": "^3.8.1"
|
||||
}
|
||||
@ -10477,6 +10519,7 @@
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/feel-editor/-/feel-editor-0.2.0.tgz",
|
||||
"integrity": "sha512-R85p56nFxffNp0fStNxz561EXJmcTdVZL7NyVhuB3qKS/mt4thuvK1B43YnXKdLx8WessjsbHzjvWkbCYZRWkQ==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@codemirror/autocomplete": "^6.0.3",
|
||||
"@codemirror/commands": "^6.0.0",
|
||||
@ -10492,6 +10535,7 @@
|
||||
"version": "0.19.0",
|
||||
"resolved": "https://registry.npmjs.org/@bpmn-io/properties-panel/-/properties-panel-0.19.0.tgz",
|
||||
"integrity": "sha512-cw+MfA2gpCBsa9Q0+JT3Gc7OvR1NGXuyQj4yOk5QoQHNzxuIMNuz6EX2NvDsCrf0oSzc9z0FapbzDuJB+DSC1g==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@bpmn-io/feel-editor": "0.2.0",
|
||||
"classnames": "^2.3.1",
|
||||
@ -10503,17 +10547,20 @@
|
||||
"@camunda/element-templates-json-schema": {
|
||||
"version": "0.10.0",
|
||||
"resolved": "https://registry.npmjs.org/@camunda/element-templates-json-schema/-/element-templates-json-schema-0.10.0.tgz",
|
||||
"integrity": "sha512-igc5o6/Dn2LlnhvbtYy6D34v6yU9RqlfiUbb/zjyLjXQ7+dgWyJFICBPoNjXltlJPjx5XAnIT1mKDD+45/44mA=="
|
||||
"integrity": "sha512-igc5o6/Dn2LlnhvbtYy6D34v6yU9RqlfiUbb/zjyLjXQ7+dgWyJFICBPoNjXltlJPjx5XAnIT1mKDD+45/44mA==",
|
||||
"peer": true
|
||||
},
|
||||
"@camunda/zeebe-element-templates-json-schema": {
|
||||
"version": "0.5.0",
|
||||
"resolved": "https://registry.npmjs.org/@camunda/zeebe-element-templates-json-schema/-/zeebe-element-templates-json-schema-0.5.0.tgz",
|
||||
"integrity": "sha512-BVHVl4cuK9LxL1eDSdWs8AzuZd981/+CPkw7xlwcB1Xkn6Di8E2iRbDUCBhOIqkahjJYq957nVtbM6jlqXX5qw=="
|
||||
"integrity": "sha512-BVHVl4cuK9LxL1eDSdWs8AzuZd981/+CPkw7xlwcB1Xkn6Di8E2iRbDUCBhOIqkahjJYq957nVtbM6jlqXX5qw==",
|
||||
"peer": true
|
||||
},
|
||||
"@codemirror/autocomplete": {
|
||||
"version": "6.1.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.1.0.tgz",
|
||||
"integrity": "sha512-wtO4O5WDyXhhCd4q4utDIDZxnQfmJ++3dGBCG9LMtI79+92OcA1DVk/n7BEupKmjIr8AzvptDz7YQ9ud6OkU+A==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@ -10525,6 +10572,7 @@
|
||||
"version": "6.0.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.0.1.tgz",
|
||||
"integrity": "sha512-iNHDByicYqQjs0Wo1MKGfqNbMYMyhS9WV6EwMVwsHXImlFemgEUC+c5X22bXKBStN3qnwg4fArNZM+gkv22baQ==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@codemirror/language": "^6.0.0",
|
||||
"@codemirror/state": "^6.0.0",
|
||||
@ -10536,6 +10584,7 @@
|
||||
"version": "6.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/language/-/language-6.2.1.tgz",
|
||||
"integrity": "sha512-MC3svxuvIj0MRpFlGHxLS6vPyIdbTr2KKPEW46kCoCXw2ktb4NTkpkPBI/lSP/FoNXLCBJ0mrnUi1OoZxtpW1Q==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@codemirror/view": "^6.0.0",
|
||||
@ -10549,6 +10598,7 @@
|
||||
"version": "6.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/lint/-/lint-6.0.0.tgz",
|
||||
"integrity": "sha512-nUUXcJW1Xp54kNs+a1ToPLK8MadO0rMTnJB8Zk4Z8gBdrN0kqV7uvUraU/T2yqg+grDNR38Vmy/MrhQN/RgwiA==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"@codemirror/view": "^6.0.0",
|
||||
@ -10558,12 +10608,14 @@
|
||||
"@codemirror/state": {
|
||||
"version": "6.1.1",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/state/-/state-6.1.1.tgz",
|
||||
"integrity": "sha512-2s+aXsxmAwnR3Rd+JDHPG/1lw0YsA9PEwl7Re88gHJHGfxyfEzKBmsN4rr53RyPIR4lzbbhJX0DCq0WlqlBIRw=="
|
||||
"integrity": "sha512-2s+aXsxmAwnR3Rd+JDHPG/1lw0YsA9PEwl7Re88gHJHGfxyfEzKBmsN4rr53RyPIR4lzbbhJX0DCq0WlqlBIRw==",
|
||||
"peer": true
|
||||
},
|
||||
"@codemirror/view": {
|
||||
"version": "6.2.0",
|
||||
"resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.2.0.tgz",
|
||||
"integrity": "sha512-3emW1symh+GoteFMBPsltjmF790U/trouLILATh3JodbF/z98HvcQh2g3+H6dfNIHx16uNonsAF4mNzVr1TJNA==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@codemirror/state": "^6.0.0",
|
||||
"style-mod": "^4.0.0",
|
||||
@ -10687,12 +10739,14 @@
|
||||
"@lezer/common": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-1.0.0.tgz",
|
||||
"integrity": "sha512-ohydQe+Hb+w4oMDvXzs8uuJd2NoA3D8YDcLiuDsLqH+yflDTPEpgCsWI3/6rH5C3BAedtH1/R51dxENldQceEA=="
|
||||
"integrity": "sha512-ohydQe+Hb+w4oMDvXzs8uuJd2NoA3D8YDcLiuDsLqH+yflDTPEpgCsWI3/6rH5C3BAedtH1/R51dxENldQceEA==",
|
||||
"peer": true
|
||||
},
|
||||
"@lezer/highlight": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/highlight/-/highlight-1.0.0.tgz",
|
||||
"integrity": "sha512-nsCnNtim90UKsB5YxoX65v3GEIw3iCHw9RM2DtdgkiqAbKh9pCdvi8AWNwkYf10Lu6fxNhXPpkpHbW6mihhvJA==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@lezer/common": "^1.0.0"
|
||||
}
|
||||
@ -10701,6 +10755,7 @@
|
||||
"version": "1.2.1",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-1.2.1.tgz",
|
||||
"integrity": "sha512-RpHRs+Q+5tPsXtobSfSeRFRAnTRD0e4bApDvo74O+JiaWq9812x5S8WgftNX67owdaTQXCB5E8XZGALo4Wt77A==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@lezer/common": "^1.0.0"
|
||||
}
|
||||
@ -11232,7 +11287,8 @@
|
||||
"array-move": {
|
||||
"version": "3.0.1",
|
||||
"resolved": "https://registry.npmjs.org/array-move/-/array-move-3.0.1.tgz",
|
||||
"integrity": "sha512-H3Of6NIn2nNU1gsVDqDnYKY/LCdWvCMMOWifNGhKcVQgiZ6nOek39aESOvro6zmueP07exSl93YLvkN4fZOkSg=="
|
||||
"integrity": "sha512-H3Of6NIn2nNU1gsVDqDnYKY/LCdWvCMMOWifNGhKcVQgiZ6nOek39aESOvro6zmueP07exSl93YLvkN4fZOkSg==",
|
||||
"peer": true
|
||||
},
|
||||
"array.prototype.flat": {
|
||||
"version": "1.3.0",
|
||||
@ -11411,6 +11467,7 @@
|
||||
"version": "9.4.0",
|
||||
"resolved": "https://registry.npmjs.org/bpmn-js/-/bpmn-js-9.4.0.tgz",
|
||||
"integrity": "sha512-7dusZBYCFognA0TmspWaKZ47UjFhyRT+//hMdyLtPCKY1M0uAPXHoFv73MohlsEa7a75h0q6zjCj5W0/RHBwvg==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"bpmn-moddle": "^7.1.3",
|
||||
"css.escape": "^1.5.1",
|
||||
@ -11428,6 +11485,7 @@
|
||||
"version": "1.5.0",
|
||||
"resolved": "https://registry.npmjs.org/bpmn-js-properties-panel/-/bpmn-js-properties-panel-1.5.0.tgz",
|
||||
"integrity": "sha512-0VAPk6xK/u+GepjGjt8HAXtBa2ab5o4Dkn5II8UgnFMoQThpvrsLras3vh1il8j/2vPhngAsfiA8z7Y9nJ6/Hw==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@bpmn-io/element-templates-validator": "^0.9.0",
|
||||
"@bpmn-io/extract-process-variables": "^0.5.0",
|
||||
@ -11444,6 +11502,7 @@
|
||||
"version": "7.1.3",
|
||||
"resolved": "https://registry.npmjs.org/bpmn-moddle/-/bpmn-moddle-7.1.3.tgz",
|
||||
"integrity": "sha512-ZcBfw0NSOdYTSXFKEn7MOXHItz7VfLZTrFYKO8cK6V8ZzGjCcdiLIOiw7Lctw1PJsihhLiZQS8Htj2xKf+NwCg==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"min-dash": "^3.5.2",
|
||||
"moddle": "^5.0.2",
|
||||
@ -11633,7 +11692,8 @@
|
||||
"classnames": {
|
||||
"version": "2.3.1",
|
||||
"resolved": "https://registry.npmjs.org/classnames/-/classnames-2.3.1.tgz",
|
||||
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA=="
|
||||
"integrity": "sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA==",
|
||||
"peer": true
|
||||
},
|
||||
"clean-css": {
|
||||
"version": "4.1.11",
|
||||
@ -11848,7 +11908,8 @@
|
||||
"crelt": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/crelt/-/crelt-1.0.5.tgz",
|
||||
"integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA=="
|
||||
"integrity": "sha512-+BO9wPPi+DWTDcNYhr/W90myha8ptzftZT+LwcmUbbok0rcP/fequmFYCw8NMoH7pkAZQzU78b3kYrlua5a9eA==",
|
||||
"peer": true
|
||||
},
|
||||
"cross-spawn": {
|
||||
"version": "7.0.3",
|
||||
@ -11864,7 +11925,8 @@
|
||||
"css.escape": {
|
||||
"version": "1.5.1",
|
||||
"resolved": "https://registry.npmjs.org/css.escape/-/css.escape-1.5.1.tgz",
|
||||
"integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg=="
|
||||
"integrity": "sha512-YUifsXXuknHlUsmlgyY0PKzgPOr7/FjCePfHNt0jxm83wHZi44VDMQ7/fGNkjY3/jV1MC+1CmZbaHzugyeRtpg==",
|
||||
"peer": true
|
||||
},
|
||||
"custom-event": {
|
||||
"version": "1.0.1",
|
||||
@ -11946,6 +12008,7 @@
|
||||
"version": "8.9.0",
|
||||
"resolved": "https://registry.npmjs.org/diagram-js/-/diagram-js-8.9.0.tgz",
|
||||
"integrity": "sha512-577bUEbkwZ7id4SCXcD2qrlKoRPXry2SDSPt5T6tEOjwKrTllKr5d1HZoJzGws4VMQq5fmY51Gce1iFT9S4Dlw==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"css.escape": "^1.5.1",
|
||||
"didi": "^8.0.1",
|
||||
@ -11962,6 +12025,7 @@
|
||||
"version": "1.7.0",
|
||||
"resolved": "https://registry.npmjs.org/diagram-js-direct-editing/-/diagram-js-direct-editing-1.7.0.tgz",
|
||||
"integrity": "sha512-ZfTLF4hdWr7NSoruwxGvVmu7aVaUjWRXjwgK5dx58LbXAsNjBS3Ap7zjVuGxjWUpCZ/MMwyZ00lpTHPH2P7BFQ==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"min-dash": "^3.5.2",
|
||||
"min-dom": "^3.1.3"
|
||||
@ -11970,7 +12034,8 @@
|
||||
"didi": {
|
||||
"version": "8.0.1",
|
||||
"resolved": "https://registry.npmjs.org/didi/-/didi-8.0.1.tgz",
|
||||
"integrity": "sha512-7oXiXbp8DHE3FfQsVBkc2pwePo3Jy2uyGS9trAeBmfxiZAP4WV23LWokRpMmyl3hlu8OEAsyMxx19i5P6TVaJQ=="
|
||||
"integrity": "sha512-7oXiXbp8DHE3FfQsVBkc2pwePo3Jy2uyGS9trAeBmfxiZAP4WV23LWokRpMmyl3hlu8OEAsyMxx19i5P6TVaJQ==",
|
||||
"peer": true
|
||||
},
|
||||
"diff": {
|
||||
"version": "5.0.0",
|
||||
@ -13024,7 +13089,8 @@
|
||||
"hammerjs": {
|
||||
"version": "2.0.8",
|
||||
"resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz",
|
||||
"integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ=="
|
||||
"integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==",
|
||||
"peer": true
|
||||
},
|
||||
"has": {
|
||||
"version": "1.0.3",
|
||||
@ -13172,7 +13238,8 @@
|
||||
"ids": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ids/-/ids-1.0.0.tgz",
|
||||
"integrity": "sha512-Zvtq1xUto4LttpstyOlFum8lKx+i1OmRfg+6A9drFS9iSZsDPMHG4Sof/qwNR4kCU7jBeWFPrY2ocHxiz7cCRw=="
|
||||
"integrity": "sha512-Zvtq1xUto4LttpstyOlFum8lKx+i1OmRfg+6A9drFS9iSZsDPMHG4Sof/qwNR4kCU7jBeWFPrY2ocHxiz7cCRw==",
|
||||
"peer": true
|
||||
},
|
||||
"ignore": {
|
||||
"version": "5.2.0",
|
||||
@ -13554,7 +13621,8 @@
|
||||
"json-source-map": {
|
||||
"version": "0.6.1",
|
||||
"resolved": "https://registry.npmjs.org/json-source-map/-/json-source-map-0.6.1.tgz",
|
||||
"integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg=="
|
||||
"integrity": "sha512-1QoztHPsMQqhDq0hlXY5ZqcEdUzxQEIxgFkKl4WUp2pgShObl+9ovi4kRh2TfvAfxAoHOJ9vIMEqk3k4iex7tg==",
|
||||
"peer": true
|
||||
},
|
||||
"json-stable-stringify-without-jsonify": {
|
||||
"version": "1.0.1",
|
||||
@ -13745,6 +13813,7 @@
|
||||
"version": "0.4.0",
|
||||
"resolved": "https://registry.npmjs.org/lezer-feel/-/lezer-feel-0.4.0.tgz",
|
||||
"integrity": "sha512-yd+AWsOE4NGVeW4x50HXUA9dKs9MUa7H8PATPNEmBiXKfIijPlC6+FEy8OLjOzb4b9y9pPPpAqnZ2/kvLmvZVw==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@lezer/lr": "^0.16.0"
|
||||
},
|
||||
@ -13752,12 +13821,14 @@
|
||||
"@lezer/common": {
|
||||
"version": "0.16.1",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/common/-/common-0.16.1.tgz",
|
||||
"integrity": "sha512-qPmG7YTZ6lATyTOAWf8vXE+iRrt1NJd4cm2nJHK+v7X9TsOF6+HtuU/ctaZy2RCrluxDb89hI6KWQ5LfQGQWuA=="
|
||||
"integrity": "sha512-qPmG7YTZ6lATyTOAWf8vXE+iRrt1NJd4cm2nJHK+v7X9TsOF6+HtuU/ctaZy2RCrluxDb89hI6KWQ5LfQGQWuA==",
|
||||
"peer": true
|
||||
},
|
||||
"@lezer/lr": {
|
||||
"version": "0.16.3",
|
||||
"resolved": "https://registry.npmjs.org/@lezer/lr/-/lr-0.16.3.tgz",
|
||||
"integrity": "sha512-pau7um4eAw94BEuuShUIeQDTf3k4Wt6oIUOYxMmkZgDHdqtIcxWND4LRxi8nI9KuT4I1bXQv67BCapkxt7Ywqw==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"@lezer/common": "^0.16.0"
|
||||
}
|
||||
@ -14160,6 +14231,7 @@
|
||||
"version": "9.0.6",
|
||||
"resolved": "https://registry.npmjs.org/moddle-xml/-/moddle-xml-9.0.6.tgz",
|
||||
"integrity": "sha512-tl0reHpsY/aKlLGhXeFlQWlYAQHFxTkFqC8tq8jXRYpQSnLVw13T6swMaourLd7EXqHdWsc+5ggsB+fEep6xZQ==",
|
||||
"peer": true,
|
||||
"requires": {
|
||||
"min-dash": "^3.5.2",
|
||||
"moddle": "^5.0.2",
|
||||
@ -14437,7 +14509,8 @@
|
||||
"object-refs": {
|
||||
"version": "0.3.0",
|
||||
"resolved": "https://registry.npmjs.org/object-refs/-/object-refs-0.3.0.tgz",
|
||||
"integrity": "sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ=="
|
||||
"integrity": "sha512-eP0ywuoWOaDoiake/6kTJlPJhs+k0qNm4nYRzXLNHj6vh+5M3i9R1epJTdxIPGlhWc4fNRQ7a6XJNCX+/L4FOQ==",
|
||||
"peer": true
|
||||
},
|
||||
"object.assign": {
|
||||
"version": "4.1.2",
|
||||
@ -14602,7 +14675,8 @@
|
||||
"path-intersection": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/path-intersection/-/path-intersection-2.2.1.tgz",
|
||||
"integrity": "sha512-9u8xvMcSfuOiStv9bPdnRJQhGQXLKurew94n4GPQCdH1nj9QKC9ObbNoIpiRq8skiOBxKkt277PgOoFgAt3/rA=="
|
||||
"integrity": "sha512-9u8xvMcSfuOiStv9bPdnRJQhGQXLKurew94n4GPQCdH1nj9QKC9ObbNoIpiRq8skiOBxKkt277PgOoFgAt3/rA==",
|
||||
"peer": true
|
||||
},
|
||||
"path-is-absolute": {
|
||||
"version": "1.0.1",
|
||||
@ -14694,6 +14768,7 @@
|
||||
"version": "2.1.1",
|
||||
"resolved": "https://registry.npmjs.org/preact-markup/-/preact-markup-2.1.1.tgz",
|
||||
"integrity": "sha512-8JL2p36mzK8XkspOyhBxUSPjYwMxDM0L5BWBZWxsZMVW8WsGQrYQDgVuDKkRspt2hwrle+Cxr/053hpc9BJwfw==",
|
||||
"peer": true,
|
||||
"requires": {}
|
||||
},
|
||||
"prelude-ls": {
|
||||
@ -15073,7 +15148,8 @@
|
||||
"saxen": {
|
||||
"version": "8.1.2",
|
||||
"resolved": "https://registry.npmjs.org/saxen/-/saxen-8.1.2.tgz",
|
||||
"integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw=="
|
||||
"integrity": "sha512-xUOiiFbc3Ow7p8KMxwsGICPx46ZQvy3+qfNVhrkwfz3Vvq45eGt98Ft5IQaA1R/7Tb5B5MKh9fUR9x3c3nDTxw==",
|
||||
"peer": true
|
||||
},
|
||||
"schema-utils": {
|
||||
"version": "4.0.0",
|
||||
@ -15131,7 +15207,8 @@
|
||||
"semver-compare": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/semver-compare/-/semver-compare-1.0.0.tgz",
|
||||
"integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow=="
|
||||
"integrity": "sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==",
|
||||
"peer": true
|
||||
},
|
||||
"serialize-javascript": {
|
||||
"version": "6.0.0",
|
||||
@ -15270,9 +15347,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"socket.io-parser": {
|
||||
"version": "4.0.4",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.4.tgz",
|
||||
"integrity": "sha512-t+b0SS+IxG7Rxzda2EVvyBZbvFPBCjJoyHuE0P//7OAsN23GItzDRdWa6ALxZI/8R5ygK7jAR6t028/z+7295g==",
|
||||
"version": "4.0.5",
|
||||
"resolved": "https://registry.npmjs.org/socket.io-parser/-/socket.io-parser-4.0.5.tgz",
|
||||
"integrity": "sha512-sNjbT9dX63nqUFIOv95tTVm6elyIU4RvB1m8dOeZt+IgWwcWklFDOdmGcfo3zSiRsnR/3pJkjY5lfoGqEe4Eig==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@types/component-emitter": "^1.2.10",
|
||||
@ -15445,7 +15522,8 @@
|
||||
"style-mod": {
|
||||
"version": "4.0.0",
|
||||
"resolved": "https://registry.npmjs.org/style-mod/-/style-mod-4.0.0.tgz",
|
||||
"integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw=="
|
||||
"integrity": "sha512-OPhtyEjyyN9x3nhPsu76f52yUGXiZcgvsrFVtvTkyGRQJ0XK+GPc6ov1z+lRpbeabka+MYEQxOYRnt5nF30aMw==",
|
||||
"peer": true
|
||||
},
|
||||
"supports-color": {
|
||||
"version": "7.2.0",
|
||||
@ -15469,9 +15547,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"terser": {
|
||||
"version": "5.14.0",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.14.0.tgz",
|
||||
"integrity": "sha512-JC6qfIEkPBd9j1SMO3Pfn+A6w2kQV54tv+ABQLgZr7dA3k/DL/OBoYSWxzVpZev3J+bUHXfr55L8Mox7AaNo6g==",
|
||||
"version": "5.15.1",
|
||||
"resolved": "https://registry.npmjs.org/terser/-/terser-5.15.1.tgz",
|
||||
"integrity": "sha512-K1faMUvpm/FBxjBXud0LWVAGxmvoPbZbfTCYbSgaaYQaIXI3/TdI7a7ZGA73Zrou6Q8Zmz3oeUTsp/dj+ag2Xw==",
|
||||
"dev": true,
|
||||
"requires": {
|
||||
"@jridgewell/source-map": "^0.3.2",
|
||||
@ -15771,7 +15849,8 @@
|
||||
"w3c-keyname": {
|
||||
"version": "2.2.6",
|
||||
"resolved": "https://registry.npmjs.org/w3c-keyname/-/w3c-keyname-2.2.6.tgz",
|
||||
"integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg=="
|
||||
"integrity": "sha512-f+fciywl1SJEniZHD6H+kUO8gOnwIr7f4ijKA6+ZvJFjeGi1r4PDLl53Ayud9O/rk64RqgoQine0feoeOU0kXg==",
|
||||
"peer": true
|
||||
},
|
||||
"watchpack": {
|
||||
"version": "2.4.0",
|
||||
|
@ -72,11 +72,12 @@
|
||||
"webpack": "^5.73.0",
|
||||
"webpack-cli": "^4.9.2"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"bpmn-js": "*",
|
||||
"bpmn-js-properties-panel": "*",
|
||||
"diagram-js": "*"
|
||||
},
|
||||
"dependencies": {
|
||||
"@bpmn-io/properties-panel": "^0.19.0",
|
||||
"bpmn-js": "^9.4.0",
|
||||
"bpmn-js-properties-panel": "^1.5.0",
|
||||
"diagram-js": "^8.5.0",
|
||||
"inherits": "^2.0.4",
|
||||
"inherits-browser": "^0.0.1",
|
||||
"min-dash": "^3.8.1",
|
||||
|
63
bpmn-js-spiffworkflow/test/spec/IOInterceptorSpec.js
Normal file
63
bpmn-js-spiffworkflow/test/spec/IOInterceptorSpec.js
Normal file
@ -0,0 +1,63 @@
|
||||
import { bootstrapPropertiesPanel } from './helpers';
|
||||
import dataObjectInterceptor from '../../app/spiffworkflow/DataObject';
|
||||
import { BpmnPropertiesPanelModule, BpmnPropertiesProviderModule } from 'bpmn-js-properties-panel';
|
||||
import {
|
||||
inject,
|
||||
} from 'bpmn-js/test/helper';
|
||||
import { findDataObjects } from '../../app/spiffworkflow/DataObject/DataObjectHelpers';
|
||||
import IoInterceptor from '../../app/spiffworkflow/InputOutput/IoInterceptor';
|
||||
import InputOutput from '../../app/spiffworkflow/InputOutput';
|
||||
|
||||
describe('Input/Output Interceptor', function() {
|
||||
|
||||
let xml = require('./bpmn/empty_diagram.bpmn').default;
|
||||
|
||||
beforeEach(bootstrapPropertiesPanel(xml, {
|
||||
debounceInput: false,
|
||||
additionalModules: [
|
||||
InputOutput,
|
||||
BpmnPropertiesPanelModule,
|
||||
BpmnPropertiesProviderModule,
|
||||
]
|
||||
}));
|
||||
|
||||
it('New Data Input should create an IOSpecification with a single dataInput object', inject(function(canvas, modeling) {
|
||||
|
||||
expect(canvas.getRootElement().businessObject.ioSpecification).to.be.undefined;
|
||||
|
||||
// IF - a new dataObjectReference is created
|
||||
let rootShape = canvas.getRootElement();
|
||||
const dataInput = modeling.createShape({ type: 'bpmn:DataInput' },
|
||||
{ x: 220, y: 220 }, rootShape);
|
||||
|
||||
// THEN - the process should now have an IO Specification
|
||||
const iospec = canvas.getRootElement().businessObject.ioSpecification;
|
||||
expect(iospec).to.not.be.null;
|
||||
expect(iospec.dataInputs.length).to.equal(1)
|
||||
}));
|
||||
|
||||
|
||||
it('IOSpecification always contain input sets and output sets if they exist at all.', inject(function(canvas, modeling) {
|
||||
|
||||
expect(canvas.getRootElement().businessObject.ioSpecification).to.be.undefined;
|
||||
|
||||
// IF - a new dataObjectReference is created
|
||||
let rootShape = canvas.getRootElement();
|
||||
const dataInput = modeling.createShape({type: 'bpmn:DataInput'},
|
||||
{x: 220, y: 220}, rootShape);
|
||||
|
||||
// THEN - there are inputSets and outputSets
|
||||
const iospec = canvas.getRootElement().businessObject.ioSpecification;
|
||||
expect(iospec.inputSets).to.not.be.null;
|
||||
expect(iospec.outputSets).to.not.be.null;
|
||||
}));
|
||||
|
||||
it('After removing all input sets, the ioSpecification should be null.', inject(function(canvas, modeling) {
|
||||
// IF - a new dataObjectReference is created and then deleted.
|
||||
let rootShape = canvas.getRootElement();
|
||||
const dataInput = modeling.createShape({type: 'bpmn:DataInput'},
|
||||
{x: 220, y: 220}, rootShape);
|
||||
modeling.removeShape(dataInput)
|
||||
expect(canvas.getRootElement().businessObject.ioSpecification).to.be.null;
|
||||
}));
|
||||
});
|
@ -14,10 +14,10 @@
|
||||
</bpmn:collaboration>
|
||||
<bpmn:correlationProperty id="message_correlation_property" name="Message Correlation Property">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_send">
|
||||
<bpmn:formalExpression>to</bpmn:formalExpression>
|
||||
<bpmn:messagePath>to</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_response">
|
||||
<bpmn:formalExpression>from.name</bpmn:formalExpression>
|
||||
<bpmn:messagePath>from.name</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:process id="message_send_process" name="Message Send Process" isExecutable="true">
|
||||
@ -68,7 +68,7 @@
|
||||
</bpmn:process>
|
||||
<bpmn:correlationProperty id="correlation_property_one" name="Correlation Property One">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="message_send">
|
||||
<bpmn:formalExpression>new</bpmn:formalExpression>
|
||||
<bpmn:messagePath>new</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmndi:BPMNDiagram id="BPMNDiagram_1">
|
||||
|
@ -26,26 +26,26 @@
|
||||
<bpmn:message id="love_letter_response" name="Love Letter Response" />
|
||||
<bpmn:correlationProperty id="lover_instrument" name="Lover's Instrument">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter">
|
||||
<bpmn:formalExpression>lover.instrument</bpmn:formalExpression>
|
||||
<bpmn:messagePath>lover.instrument</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter_response">
|
||||
<bpmn:formalExpression>from.instrument</bpmn:formalExpression>
|
||||
<bpmn:messagePath>from.instrument</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:correlationProperty id="lover_name" name="Lover's Name">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter">
|
||||
<bpmn:formalExpression>lover.name</bpmn:formalExpression>
|
||||
<bpmn:messagePath>lover.name</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter_response">
|
||||
<bpmn:formalExpression>from.name</bpmn:formalExpression>
|
||||
<bpmn:messagePath>from.name</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:formalExpression>heartbreaker</bpmn:formalExpression>
|
||||
<bpmn:messagePath>heartbreaker</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:correlationProperty id="singer_name" name="Singer's Name">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="love_letter_response">
|
||||
<bpmn:formalExpression>to.name</bpmn:formalExpression>
|
||||
<bpmn:messagePath>to.name</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
<bpmn:process id="process_buddy" name="Process Buddy" isExecutable="true">
|
||||
|
@ -46,46 +46,46 @@
|
||||
|
||||
<bpmn:correlationProperty id="invoice_id" name="Invoice ID">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_invoice">
|
||||
<bpmn:formalExpression>invoice.invoice_id</bpmn:formalExpression>
|
||||
<bpmn:messagePath>invoice.invoice_id</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_payment">
|
||||
<bpmn:formalExpression>payment.invoice_id</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payment.invoice_id</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
|
||||
<bpmn:correlationProperty id="invoice_total" name="Invoice Total">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_invoice">
|
||||
<bpmn:formalExpression>invoice.total</bpmn:formalExpression>
|
||||
<bpmn:messagePath>invoice.total</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_payment">
|
||||
<bpmn:formalExpression>payment.invoice_amount</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payment.invoice_amount</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
|
||||
<bpmn:correlationProperty id="invoice_date" name="Invoice Date">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_invoice">
|
||||
<bpmn:formalExpression>invoice.date</bpmn:formalExpression>
|
||||
<bpmn:messagePath>invoice.date</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_payment">
|
||||
<bpmn:formalExpression>payment.invoice_date</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payment.invoice_date</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
|
||||
<bpmn:correlationProperty id="payment_date" name="Payment Date">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_payment">
|
||||
<bpmn:formalExpression>payment.date</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payment.date</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
|
||||
<bpmn:correlationProperty id="payment_total" name="Payment Total">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_payment">
|
||||
<bpmn:formalExpression>payment.total</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payment.total</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
|
||||
<bpmn:correlationProperty id="payment_id" name="Payment ID">
|
||||
<bpmn:correlationPropertyRetrievalExpression messageRef="send_payment">
|
||||
<bpmn:formalExpression>payment.id</bpmn:formalExpression>
|
||||
<bpmn:messagePath>payment.id</bpmn:messagePath>
|
||||
</bpmn:correlationPropertyRetrievalExpression>
|
||||
</bpmn:correlationProperty>
|
||||
|
||||
|
2
flask-bpmn/.github/workflows/constraints.txt
vendored
2
flask-bpmn/.github/workflows/constraints.txt
vendored
@ -2,4 +2,4 @@ pip==22.3
|
||||
nox==2022.8.7
|
||||
nox-poetry==1.0.1
|
||||
poetry==1.2.2
|
||||
virtualenv==20.16.3
|
||||
virtualenv==20.16.6
|
||||
|
185
flask-bpmn/poetry.lock
generated
185
flask-bpmn/poetry.lock
generated
@ -370,7 +370,7 @@ testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)",
|
||||
|
||||
[[package]]
|
||||
name = "coverage"
|
||||
version = "6.4.4"
|
||||
version = "6.5.0"
|
||||
description = "Code coverage measurement for Python"
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -483,18 +483,18 @@ pycodestyle = "*"
|
||||
|
||||
[[package]]
|
||||
name = "flake8-bugbear"
|
||||
version = "22.7.1"
|
||||
version = "22.10.27"
|
||||
description = "A plugin for flake8 finding likely bugs and design problems in your program. Contains warnings that don't belong in pyflakes and pycodestyle."
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
python-versions = ">=3.7"
|
||||
|
||||
[package.dependencies]
|
||||
attrs = ">=19.2.0"
|
||||
flake8 = ">=3.0.0"
|
||||
|
||||
[package.extras]
|
||||
dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit"]
|
||||
dev = ["coverage", "hypothesis", "hypothesmith (>=0.2)", "pre-commit", "tox"]
|
||||
|
||||
[[package]]
|
||||
name = "flake8-docstrings"
|
||||
@ -945,11 +945,11 @@ mypy-extensions = "*"
|
||||
|
||||
[[package]]
|
||||
name = "mypy"
|
||||
version = "0.971"
|
||||
version = "0.982"
|
||||
description = "Optional static typing for Python"
|
||||
category = "dev"
|
||||
optional = false
|
||||
python-versions = ">=3.6"
|
||||
python-versions = ">=3.7"
|
||||
|
||||
[package.dependencies]
|
||||
mypy-extensions = ">=0.4.3"
|
||||
@ -1206,7 +1206,7 @@ tzdata = {version = "*", markers = "python_version >= \"3.6\""}
|
||||
|
||||
[[package]]
|
||||
name = "pyupgrade"
|
||||
version = "2.37.3"
|
||||
version = "3.1.0"
|
||||
description = "A tool to automatically upgrade syntax for newer versions."
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -1233,7 +1233,7 @@ python-versions = ">=3.6"
|
||||
|
||||
[[package]]
|
||||
name = "reorder-python-imports"
|
||||
version = "3.8.5"
|
||||
version = "3.9.0"
|
||||
description = "Tool for reordering python imports"
|
||||
category = "dev"
|
||||
optional = false
|
||||
@ -1316,7 +1316,7 @@ gitlab = ["python-gitlab (>=1.3.0)"]
|
||||
|
||||
[[package]]
|
||||
name = "sentry-sdk"
|
||||
version = "1.9.10"
|
||||
version = "1.10.1"
|
||||
description = "Python client for Sentry (https://sentry.io)"
|
||||
category = "main"
|
||||
optional = false
|
||||
@ -1578,7 +1578,7 @@ pytz = "*"
|
||||
type = "git"
|
||||
url = "https://github.com/sartography/SpiffWorkflow"
|
||||
reference = "main"
|
||||
resolved_reference = "a094adad8767f82e9c5fa806a46597e066252a72"
|
||||
resolved_reference = "2d3bd00854ab483e823c4b386430abc9267f536b"
|
||||
|
||||
[[package]]
|
||||
name = "sqlalchemy"
|
||||
@ -1853,7 +1853,7 @@ testing = ["func-timeout", "jaraco.itertools", "pytest (>=6)", "pytest-black (>=
|
||||
[metadata]
|
||||
lock-version = "1.1"
|
||||
python-versions = "^3.7"
|
||||
content-hash = "6f6900d191eca1b800dded9dc844a82d858c7c592cac88e2d76d8a919b56eeca"
|
||||
content-hash = "f5c0fcc30ff491c23da05e4d24c2dc9c66f43a2dfde028345f9dffd5e91f3f0a"
|
||||
|
||||
[metadata.files]
|
||||
alabaster = [
|
||||
@ -2058,56 +2058,56 @@ configparser = [
|
||||
{file = "configparser-5.2.0.tar.gz", hash = "sha256:1b35798fdf1713f1c3139016cfcbc461f09edbf099d1fb658d4b7479fcaa3daa"},
|
||||
]
|
||||
coverage = [
|
||||
{file = "coverage-6.4.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e7b4da9bafad21ea45a714d3ea6f3e1679099e420c8741c74905b92ee9bfa7cc"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:fde17bc42e0716c94bf19d92e4c9f5a00c5feb401f5bc01101fdf2a8b7cacf60"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cdbb0d89923c80dbd435b9cf8bba0ff55585a3cdb28cbec65f376c041472c60d"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:67f9346aeebea54e845d29b487eb38ec95f2ecf3558a3cffb26ee3f0dcc3e760"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:42c499c14efd858b98c4e03595bf914089b98400d30789511577aa44607a1b74"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:c35cca192ba700979d20ac43024a82b9b32a60da2f983bec6c0f5b84aead635c"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:9cc4f107009bca5a81caef2fca843dbec4215c05e917a59dec0c8db5cff1d2aa"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:5f444627b3664b80d078c05fe6a850dd711beeb90d26731f11d492dcbadb6973"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-win32.whl", hash = "sha256:66e6df3ac4659a435677d8cd40e8eb1ac7219345d27c41145991ee9bf4b806a0"},
|
||||
{file = "coverage-6.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:35ef1f8d8a7a275aa7410d2f2c60fa6443f4a64fae9be671ec0696a68525b875"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:c1328d0c2f194ffda30a45f11058c02410e679456276bfa0bbe0b0ee87225fac"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:61b993f3998ee384935ee423c3d40894e93277f12482f6e777642a0141f55782"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d5dd4b8e9cd0deb60e6fcc7b0647cbc1da6c33b9e786f9c79721fd303994832f"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7026f5afe0d1a933685d8f2169d7c2d2e624f6255fb584ca99ccca8c0e966fd7"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:9c7b9b498eb0c0d48b4c2abc0e10c2d78912203f972e0e63e3c9dc21f15abdaa"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:ee2b2fb6eb4ace35805f434e0f6409444e1466a47f620d1d5763a22600f0f892"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:ab066f5ab67059d1f1000b5e1aa8bbd75b6ed1fc0014559aea41a9eb66fc2ce0"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-win32.whl", hash = "sha256:9d6e1f3185cbfd3d91ac77ea065d85d5215d3dfa45b191d14ddfcd952fa53796"},
|
||||
{file = "coverage-6.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:e3d3c4cc38b2882f9a15bafd30aec079582b819bec1b8afdbde8f7797008108a"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:a095aa0a996ea08b10580908e88fbaf81ecf798e923bbe64fb98d1807db3d68a"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ef6f44409ab02e202b31a05dd6666797f9de2aa2b4b3534e9d450e42dea5e817"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4b7101938584d67e6f45f0015b60e24a95bf8dea19836b1709a80342e01b472f"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:14a32ec68d721c3d714d9b105c7acf8e0f8a4f4734c811eda75ff3718570b5e3"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:6a864733b22d3081749450466ac80698fe39c91cb6849b2ef8752fd7482011f3"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:08002f9251f51afdcc5e3adf5d5d66bb490ae893d9e21359b085f0e03390a820"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:a3b2752de32c455f2521a51bd3ffb53c5b3ae92736afde67ce83477f5c1dd928"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-win32.whl", hash = "sha256:f855b39e4f75abd0dfbcf74a82e84ae3fc260d523fcb3532786bcbbcb158322c"},
|
||||
{file = "coverage-6.4.4-cp37-cp37m-win_amd64.whl", hash = "sha256:ee6ae6bbcac0786807295e9687169fba80cb0617852b2fa118a99667e8e6815d"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:564cd0f5b5470094df06fab676c6d77547abfdcb09b6c29c8a97c41ad03b103c"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cbbb0e4cd8ddcd5ef47641cfac97d8473ab6b132dd9a46bacb18872828031685"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6113e4df2fa73b80f77663445be6d567913fb3b82a86ceb64e44ae0e4b695de1"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d032bfc562a52318ae05047a6eb801ff31ccee172dc0d2504614e911d8fa83e"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e431e305a1f3126477abe9a184624a85308da8edf8486a863601d58419d26ffa"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:cf2afe83a53f77aec067033199797832617890e15bed42f4a1a93ea24794ae3e"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:783bc7c4ee524039ca13b6d9b4186a67f8e63d91342c713e88c1865a38d0892a"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ff934ced84054b9018665ca3967fc48e1ac99e811f6cc99ea65978e1d384454b"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-win32.whl", hash = "sha256:e1fabd473566fce2cf18ea41171d92814e4ef1495e04471786cbc943b89a3781"},
|
||||
{file = "coverage-6.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:4179502f210ebed3ccfe2f78bf8e2d59e50b297b598b100d6c6e3341053066a2"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:98c0b9e9b572893cdb0a00e66cf961a238f8d870d4e1dc8e679eb8bdc2eb1b86"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:fc600f6ec19b273da1d85817eda339fb46ce9eef3e89f220055d8696e0a06908"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7a98d6bf6d4ca5c07a600c7b4e0c5350cd483c85c736c522b786be90ea5bac4f"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:01778769097dbd705a24e221f42be885c544bb91251747a8a3efdec6eb4788f2"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dfa0b97eb904255e2ab24166071b27408f1f69c8fbda58e9c0972804851e0558"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:fcbe3d9a53e013f8ab88734d7e517eb2cd06b7e689bedf22c0eb68db5e4a0a19"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:15e38d853ee224e92ccc9a851457fb1e1f12d7a5df5ae44544ce7863691c7a0d"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:6913dddee2deff8ab2512639c5168c3e80b3ebb0f818fed22048ee46f735351a"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-win32.whl", hash = "sha256:354df19fefd03b9a13132fa6643527ef7905712109d9c1c1903f2133d3a4e145"},
|
||||
{file = "coverage-6.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:1238b08f3576201ebf41f7c20bf59baa0d05da941b123c6656e42cdb668e9827"},
|
||||
{file = "coverage-6.4.4-pp36.pp37.pp38-none-any.whl", hash = "sha256:f67cf9f406cf0d2f08a3515ce2db5b82625a7257f88aad87904674def6ddaec1"},
|
||||
{file = "coverage-6.4.4.tar.gz", hash = "sha256:e16c45b726acb780e1e6f88b286d3c10b3914ab03438f32117c4aa52d7f30d58"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:ef8674b0ee8cc11e2d574e3e2998aea5df5ab242e012286824ea3c6970580e53"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:784f53ebc9f3fd0e2a3f6a78b2be1bd1f5575d7863e10c6e12504f240fd06660"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b4a5be1748d538a710f87542f22c2cad22f80545a847ad91ce45e77417293eb4"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:83516205e254a0cb77d2d7bb3632ee019d93d9f4005de31dca0a8c3667d5bc04"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:af4fffaffc4067232253715065e30c5a7ec6faac36f8fc8d6f64263b15f74db0"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:97117225cdd992a9c2a5515db1f66b59db634f59d0679ca1fa3fe8da32749cae"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a1170fa54185845505fbfa672f1c1ab175446c887cce8212c44149581cf2d466"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:11b990d520ea75e7ee8dcab5bc908072aaada194a794db9f6d7d5cfd19661e5a"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-win32.whl", hash = "sha256:5dbec3b9095749390c09ab7c89d314727f18800060d8d24e87f01fb9cfb40b32"},
|
||||
{file = "coverage-6.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:59f53f1dc5b656cafb1badd0feb428c1e7bc19b867479ff72f7a9dd9b479f10e"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:4a5375e28c5191ac38cca59b38edd33ef4cc914732c916f2929029b4bfb50795"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4ed2820d919351f4167e52425e096af41bfabacb1857186c1ea32ff9983ed75"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:33a7da4376d5977fbf0a8ed91c4dffaaa8dbf0ddbf4c8eea500a2486d8bc4d7b"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a8fb6cf131ac4070c9c5a3e21de0f7dc5a0fbe8bc77c9456ced896c12fcdad91"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:a6b7d95969b8845250586f269e81e5dfdd8ff828ddeb8567a4a2eaa7313460c4"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1ef221513e6f68b69ee9e159506d583d31aa3567e0ae84eaad9d6ec1107dddaa"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cca4435eebea7962a52bdb216dec27215d0df64cf27fc1dd538415f5d2b9da6b"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-win32.whl", hash = "sha256:98e8a10b7a314f454d9eff4216a9a94d143a7ee65018dd12442e898ee2310578"},
|
||||
{file = "coverage-6.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:bc8ef5e043a2af066fa8cbfc6e708d58017024dc4345a1f9757b329a249f041b"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:4433b90fae13f86fafff0b326453dd42fc9a639a0d9e4eec4d366436d1a41b6d"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4f05d88d9a80ad3cac6244d36dd89a3c00abc16371769f1340101d3cb899fc3"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:94e2565443291bd778421856bc975d351738963071e9b8839ca1fc08b42d4bef"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:027018943386e7b942fa832372ebc120155fd970837489896099f5cfa2890f79"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:255758a1e3b61db372ec2736c8e2a1fdfaf563977eedbdf131de003ca5779b7d"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:851cf4ff24062c6aec510a454b2584f6e998cada52d4cb58c5e233d07172e50c"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:12adf310e4aafddc58afdb04d686795f33f4d7a6fa67a7a9d4ce7d6ae24d949f"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-win32.whl", hash = "sha256:b5604380f3415ba69de87a289a2b56687faa4fe04dbee0754bfcae433489316b"},
|
||||
{file = "coverage-6.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:4a8dbc1f0fbb2ae3de73eb0bdbb914180c7abfbf258e90b311dcd4f585d44bd2"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d900bb429fdfd7f511f868cedd03a6bbb142f3f9118c09b99ef8dc9bf9643c3c"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2198ea6fc548de52adc826f62cb18554caedfb1d26548c1b7c88d8f7faa8f6ba"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c4459b3de97b75e3bd6b7d4b7f0db13f17f504f3d13e2a7c623786289dd670e"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:20c8ac5386253717e5ccc827caad43ed66fea0efe255727b1053a8154d952398"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6b07130585d54fe8dff3d97b93b0e20290de974dc8177c320aeaf23459219c0b"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dbdb91cd8c048c2b09eb17713b0c12a54fbd587d79adcebad543bc0cd9a3410b"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:de3001a203182842a4630e7b8d1a2c7c07ec1b45d3084a83d5d227a3806f530f"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e07f4a4a9b41583d6eabec04f8b68076ab3cd44c20bd29332c6572dda36f372e"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-win32.whl", hash = "sha256:6d4817234349a80dbf03640cec6109cd90cba068330703fa65ddf56b60223a6d"},
|
||||
{file = "coverage-6.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:7ccf362abd726b0410bf8911c31fbf97f09f8f1061f8c1cf03dfc4b6372848f6"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:633713d70ad6bfc49b34ead4060531658dc6dfc9b3eb7d8a716d5873377ab745"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:95203854f974e07af96358c0b261f1048d8e1083f2de9b1c565e1be4a3a48cfc"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:b9023e237f4c02ff739581ef35969c3739445fb059b060ca51771e69101efffe"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:265de0fa6778d07de30bcf4d9dc471c3dc4314a23a3c6603d356a3c9abc2dfcf"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8f830ed581b45b82451a40faabb89c84e1a998124ee4212d440e9c6cf70083e5"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:7b6be138d61e458e18d8e6ddcddd36dd96215edfe5f1168de0b1b32635839b62"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:42eafe6778551cf006a7c43153af1211c3aaab658d4d66fa5fcc021613d02518"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:723e8130d4ecc8f56e9a611e73b31219595baa3bb252d539206f7bbbab6ffc1f"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-win32.whl", hash = "sha256:d9ecf0829c6a62b9b573c7bb6d4dcd6ba8b6f80be9ba4fc7ed50bf4ac9aecd72"},
|
||||
{file = "coverage-6.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:fc2af30ed0d5ae0b1abdb4ebdce598eafd5b35397d4d75deb341a614d333d987"},
|
||||
{file = "coverage-6.5.0-pp36.pp37.pp38-none-any.whl", hash = "sha256:1431986dac3923c5945271f169f59c45b8802a114c8f548d611f2015133df77a"},
|
||||
{file = "coverage-6.5.0.tar.gz", hash = "sha256:f642e90754ee3e06b0e7e51bce3379590e76b7f76b708e1a71ff043f87025c84"},
|
||||
]
|
||||
darglint = [
|
||||
{file = "darglint-1.8.1-py3-none-any.whl", hash = "sha256:5ae11c259c17b0701618a20c3da343a3eb98b3bc4b5a83d31cdd94f5ebdced8d"},
|
||||
@ -2141,8 +2141,8 @@ flake8-bandit = [
|
||||
{file = "flake8_bandit-2.1.2.tar.gz", hash = "sha256:687fc8da2e4a239b206af2e54a90093572a60d0954f3054e23690739b0b0de3b"},
|
||||
]
|
||||
flake8-bugbear = [
|
||||
{file = "flake8-bugbear-22.7.1.tar.gz", hash = "sha256:e450976a07e4f9d6c043d4f72b17ec1baf717fe37f7997009c8ae58064f88305"},
|
||||
{file = "flake8_bugbear-22.7.1-py3-none-any.whl", hash = "sha256:db5d7a831ef4412a224b26c708967ff816818cabae415e76b8c58df156c4b8e5"},
|
||||
{file = "flake8-bugbear-22.10.27.tar.gz", hash = "sha256:a6708608965c9e0de5fff13904fed82e0ba21ac929fe4896459226a797e11cd5"},
|
||||
{file = "flake8_bugbear-22.10.27-py3-none-any.whl", hash = "sha256:6ad0ab754507319060695e2f2be80e6d8977cfcea082293089a9226276bd825d"},
|
||||
]
|
||||
flake8-docstrings = [
|
||||
{file = "flake8-docstrings-1.6.0.tar.gz", hash = "sha256:9fe7c6a306064af8e62a055c2f61e9eb1da55f84bb39caef2b84ce53708ac34b"},
|
||||
@ -2494,29 +2494,30 @@ monkeytype = [
|
||||
{file = "MonkeyType-22.2.0.tar.gz", hash = "sha256:6b0c00b49dcc5095a2c08d28246cf005e05673fc51f64d203f9a6bca2036dfab"},
|
||||
]
|
||||
mypy = [
|
||||
{file = "mypy-0.971-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f2899a3cbd394da157194f913a931edfd4be5f274a88041c9dc2d9cdcb1c315c"},
|
||||
{file = "mypy-0.971-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:98e02d56ebe93981c41211c05adb630d1d26c14195d04d95e49cd97dbc046dc5"},
|
||||
{file = "mypy-0.971-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:19830b7dba7d5356d3e26e2427a2ec91c994cd92d983142cbd025ebe81d69cf3"},
|
||||
{file = "mypy-0.971-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:02ef476f6dcb86e6f502ae39a16b93285fef97e7f1ff22932b657d1ef1f28655"},
|
||||
{file = "mypy-0.971-cp310-cp310-win_amd64.whl", hash = "sha256:25c5750ba5609a0c7550b73a33deb314ecfb559c350bb050b655505e8aed4103"},
|
||||
{file = "mypy-0.971-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d3348e7eb2eea2472db611486846742d5d52d1290576de99d59edeb7cd4a42ca"},
|
||||
{file = "mypy-0.971-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3fa7a477b9900be9b7dd4bab30a12759e5abe9586574ceb944bc29cddf8f0417"},
|
||||
{file = "mypy-0.971-cp36-cp36m-win_amd64.whl", hash = "sha256:2ad53cf9c3adc43cf3bea0a7d01a2f2e86db9fe7596dfecb4496a5dda63cbb09"},
|
||||
{file = "mypy-0.971-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:855048b6feb6dfe09d3353466004490b1872887150c5bb5caad7838b57328cc8"},
|
||||
{file = "mypy-0.971-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:23488a14a83bca6e54402c2e6435467a4138785df93ec85aeff64c6170077fb0"},
|
||||
{file = "mypy-0.971-cp37-cp37m-win_amd64.whl", hash = "sha256:4b21e5b1a70dfb972490035128f305c39bc4bc253f34e96a4adf9127cf943eb2"},
|
||||
{file = "mypy-0.971-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:9796a2ba7b4b538649caa5cecd398d873f4022ed2333ffde58eaf604c4d2cb27"},
|
||||
{file = "mypy-0.971-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:5a361d92635ad4ada1b1b2d3630fc2f53f2127d51cf2def9db83cba32e47c856"},
|
||||
{file = "mypy-0.971-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b793b899f7cf563b1e7044a5c97361196b938e92f0a4343a5d27966a53d2ec71"},
|
||||
{file = "mypy-0.971-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d1ea5d12c8e2d266b5fb8c7a5d2e9c0219fedfeb493b7ed60cd350322384ac27"},
|
||||
{file = "mypy-0.971-cp38-cp38-win_amd64.whl", hash = "sha256:23c7ff43fff4b0df93a186581885c8512bc50fc4d4910e0f838e35d6bb6b5e58"},
|
||||
{file = "mypy-0.971-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:1f7656b69974a6933e987ee8ffb951d836272d6c0f81d727f1d0e2696074d9e6"},
|
||||
{file = "mypy-0.971-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d2022bfadb7a5c2ef410d6a7c9763188afdb7f3533f22a0a32be10d571ee4bbe"},
|
||||
{file = "mypy-0.971-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef943c72a786b0f8d90fd76e9b39ce81fb7171172daf84bf43eaf937e9f220a9"},
|
||||
{file = "mypy-0.971-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:d744f72eb39f69312bc6c2abf8ff6656973120e2eb3f3ec4f758ed47e414a4bf"},
|
||||
{file = "mypy-0.971-cp39-cp39-win_amd64.whl", hash = "sha256:77a514ea15d3007d33a9e2157b0ba9c267496acf12a7f2b9b9f8446337aac5b0"},
|
||||
{file = "mypy-0.971-py3-none-any.whl", hash = "sha256:0d054ef16b071149917085f51f89555a576e2618d5d9dd70bd6eea6410af3ac9"},
|
||||
{file = "mypy-0.971.tar.gz", hash = "sha256:40b0f21484238269ae6a57200c807d80debc6459d444c0489a102d7c6a75fa56"},
|
||||
{file = "mypy-0.982-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5085e6f442003fa915aeb0a46d4da58128da69325d8213b4b35cc7054090aed5"},
|
||||
{file = "mypy-0.982-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:41fd1cf9bc0e1c19b9af13a6580ccb66c381a5ee2cf63ee5ebab747a4badeba3"},
|
||||
{file = "mypy-0.982-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:f793e3dd95e166b66d50e7b63e69e58e88643d80a3dcc3bcd81368e0478b089c"},
|
||||
{file = "mypy-0.982-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:86ebe67adf4d021b28c3f547da6aa2cce660b57f0432617af2cca932d4d378a6"},
|
||||
{file = "mypy-0.982-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:175f292f649a3af7082fe36620369ffc4661a71005aa9f8297ea473df5772046"},
|
||||
{file = "mypy-0.982-cp310-cp310-win_amd64.whl", hash = "sha256:8ee8c2472e96beb1045e9081de8e92f295b89ac10c4109afdf3a23ad6e644f3e"},
|
||||
{file = "mypy-0.982-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:58f27ebafe726a8e5ccb58d896451dd9a662a511a3188ff6a8a6a919142ecc20"},
|
||||
{file = "mypy-0.982-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d6af646bd46f10d53834a8e8983e130e47d8ab2d4b7a97363e35b24e1d588947"},
|
||||
{file = "mypy-0.982-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e7aeaa763c7ab86d5b66ff27f68493d672e44c8099af636d433a7f3fa5596d40"},
|
||||
{file = "mypy-0.982-cp37-cp37m-win_amd64.whl", hash = "sha256:724d36be56444f569c20a629d1d4ee0cb0ad666078d59bb84f8f887952511ca1"},
|
||||
{file = "mypy-0.982-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:14d53cdd4cf93765aa747a7399f0961a365bcddf7855d9cef6306fa41de01c24"},
|
||||
{file = "mypy-0.982-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:26ae64555d480ad4b32a267d10cab7aec92ff44de35a7cd95b2b7cb8e64ebe3e"},
|
||||
{file = "mypy-0.982-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6389af3e204975d6658de4fb8ac16f58c14e1bacc6142fee86d1b5b26aa52bda"},
|
||||
{file = "mypy-0.982-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:7b35ce03a289480d6544aac85fa3674f493f323d80ea7226410ed065cd46f206"},
|
||||
{file = "mypy-0.982-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:c6e564f035d25c99fd2b863e13049744d96bd1947e3d3d2f16f5828864506763"},
|
||||
{file = "mypy-0.982-cp38-cp38-win_amd64.whl", hash = "sha256:cebca7fd333f90b61b3ef7f217ff75ce2e287482206ef4a8b18f32b49927b1a2"},
|
||||
{file = "mypy-0.982-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:a705a93670c8b74769496280d2fe6cd59961506c64f329bb179970ff1d24f9f8"},
|
||||
{file = "mypy-0.982-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:75838c649290d83a2b83a88288c1eb60fe7a05b36d46cbea9d22efc790002146"},
|
||||
{file = "mypy-0.982-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:91781eff1f3f2607519c8b0e8518aad8498af1419e8442d5d0afb108059881fc"},
|
||||
{file = "mypy-0.982-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:eaa97b9ddd1dd9901a22a879491dbb951b5dec75c3b90032e2baa7336777363b"},
|
||||
{file = "mypy-0.982-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a692a8e7d07abe5f4b2dd32d731812a0175626a90a223d4b58f10f458747dd8a"},
|
||||
{file = "mypy-0.982-cp39-cp39-win_amd64.whl", hash = "sha256:eb7a068e503be3543c4bd329c994103874fa543c1727ba5288393c21d912d795"},
|
||||
{file = "mypy-0.982-py3-none-any.whl", hash = "sha256:1021c241e8b6e1ca5a47e4d52601274ac078a89845cfde66c6d5f769819ffa1d"},
|
||||
{file = "mypy-0.982.tar.gz", hash = "sha256:85f7a343542dc8b1ed0a888cdd34dca56462654ef23aa673907305b260b3d746"},
|
||||
]
|
||||
mypy-extensions = [
|
||||
{file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"},
|
||||
@ -2607,8 +2608,8 @@ pytz-deprecation-shim = [
|
||||
{file = "pytz_deprecation_shim-0.1.0.post0.tar.gz", hash = "sha256:af097bae1b616dde5c5744441e2ddc69e74dfdcb0c263129610d85b87445a59d"},
|
||||
]
|
||||
pyupgrade = [
|
||||
{file = "pyupgrade-2.37.3-py2.py3-none-any.whl", hash = "sha256:9746efd064dbf53d7f86d6f88a1d48120f58dbfc378f517768634740ea2225e2"},
|
||||
{file = "pyupgrade-2.37.3.tar.gz", hash = "sha256:1414c7a7c558004cf610e6180716b876814b639b5a5789c3da023c5cdaebcd49"},
|
||||
{file = "pyupgrade-3.1.0-py2.py3-none-any.whl", hash = "sha256:77c6101a710be3e24804891e43388cedbee617258e93b09c8c5e58de08617758"},
|
||||
{file = "pyupgrade-3.1.0.tar.gz", hash = "sha256:7a8d393d85e15e0e2753e90b7b2e173b9d29dfd71e61f93d93e985b242627ed3"},
|
||||
]
|
||||
pyyaml = [
|
||||
{file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"},
|
||||
@ -2729,8 +2730,8 @@ regex = [
|
||||
{file = "regex-2022.3.2.tar.gz", hash = "sha256:79e5af1ff258bc0fe0bdd6f69bc4ae33935a898e3cbefbbccf22e88a27fa053b"},
|
||||
]
|
||||
reorder-python-imports = [
|
||||
{file = "reorder_python_imports-3.8.5-py2.py3-none-any.whl", hash = "sha256:6c36b84add1a8125479e1de97a21b7797ee6df51530b5340857d65c79d6882ac"},
|
||||
{file = "reorder_python_imports-3.8.5.tar.gz", hash = "sha256:5e018dceb889688eafd41a1b217420f810e0400f5a26c679a08f7f9de956ca3b"},
|
||||
{file = "reorder_python_imports-3.9.0-py2.py3-none-any.whl", hash = "sha256:3f9c16e8781f54c944756d0d1eb34a8c863554f7a4eb3693f574fe19b1a29b56"},
|
||||
{file = "reorder_python_imports-3.9.0.tar.gz", hash = "sha256:49292ed537829a6bece9fb3746fc1bbe98f52643be5de01a4e13680268a5b0ec"},
|
||||
]
|
||||
requests = [
|
||||
{file = "requests-2.27.1-py2.py3-none-any.whl", hash = "sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d"},
|
||||
@ -2780,8 +2781,8 @@ safety = [
|
||||
{file = "safety-2.3.1.tar.gz", hash = "sha256:6e6fcb7d4e8321098cf289f59b65051cafd3467f089c6e57c9f894ae32c23b71"},
|
||||
]
|
||||
sentry-sdk = [
|
||||
{file = "sentry-sdk-1.9.10.tar.gz", hash = "sha256:4fbace9a763285b608c06f01a807b51acb35f6059da6a01236654e08b0ee81ff"},
|
||||
{file = "sentry_sdk-1.9.10-py2.py3-none-any.whl", hash = "sha256:2469240f6190aaebcb453033519eae69cfe8cc602065b4667e18ee14fc1e35dc"},
|
||||
{file = "sentry-sdk-1.10.1.tar.gz", hash = "sha256:105faf7bd7b7fa25653404619ee261527266b14103fe1389e0ce077bd23a9691"},
|
||||
{file = "sentry_sdk-1.10.1-py2.py3-none-any.whl", hash = "sha256:06c0fa9ccfdc80d7e3b5d2021978d6eb9351fa49db9b5847cf4d1f2a473414ad"},
|
||||
]
|
||||
setuptools = [
|
||||
{file = "setuptools-65.4.1-py3-none-any.whl", hash = "sha256:1b6bdc6161661409c5f21508763dc63ab20a9ac2f8ba20029aaaa7fdb9118012"},
|
||||
|
@ -34,9 +34,9 @@ sphinx-autoapi = "^2.0.0"
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
pytest = "^6.2.5"
|
||||
coverage = {extras = ["toml"], version = "^6.4"}
|
||||
coverage = {extras = ["toml"], version = "^6.5"}
|
||||
safety = "^2.3.1"
|
||||
mypy = "^0.971"
|
||||
mypy = "^0.982"
|
||||
typeguard = "^2.13.2"
|
||||
xdoctest = {extras = ["colors"], version = "^1.1.0"}
|
||||
sphinx = "^4.3.0"
|
||||
@ -52,16 +52,16 @@ spiffworkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "ma
|
||||
# 1.7.3 broke us. https://github.com/PyCQA/bandit/issues/841
|
||||
bandit = "1.7.2"
|
||||
|
||||
flake8-bugbear = "^22.7.1"
|
||||
flake8-bugbear = "^22.10.27"
|
||||
flake8-docstrings = "^1.6.0"
|
||||
flake8-rst-docstrings = "^0.2.7"
|
||||
pep8-naming = "^0.13.2"
|
||||
darglint = "^1.8.1"
|
||||
reorder-python-imports = "^3.8.5"
|
||||
reorder-python-imports = "^3.9.0"
|
||||
pre-commit-hooks = "^4.3.0"
|
||||
sphinx-click = "^4.3.0"
|
||||
Pygments = "^2.13.0"
|
||||
pyupgrade = "^2.37.3"
|
||||
pyupgrade = "^3.1.0"
|
||||
furo = ">=2021.11.12"
|
||||
MonkeyType = "^22.2.0"
|
||||
|
||||
|
@ -88,7 +88,6 @@ class ApiError(Exception):
|
||||
# Assure that there is nothing in the json data that can't be serialized.
|
||||
instance.task_data = ApiError.remove_unserializeable_from_dict(task.data)
|
||||
|
||||
current_app.logger.error(message, exc_info=True)
|
||||
return instance
|
||||
|
||||
@staticmethod
|
||||
@ -125,7 +124,6 @@ class ApiError(Exception):
|
||||
instance.task_name = task_spec.description or ""
|
||||
if task_spec._wf_spec:
|
||||
instance.file_name = task_spec._wf_spec.file
|
||||
current_app.logger.error(message, exc_info=True)
|
||||
return instance
|
||||
|
||||
@classmethod
|
||||
|
3686
poetry.lock
generated
Normal file
3686
poetry.lock
generated
Normal file
File diff suppressed because it is too large
Load Diff
158
pyproject.toml
Normal file
158
pyproject.toml
Normal file
@ -0,0 +1,158 @@
|
||||
[tool.poetry]
|
||||
name = "spiffworkflow-arean"
|
||||
version = "0.0.0"
|
||||
description = "Spiffworkflow Arena"
|
||||
authors = ["Jason Lantz <sartography@users.noreply.github.com>"]
|
||||
license = "MIT"
|
||||
readme = "README.rst"
|
||||
homepage = "https://github.com/sartography/spiffworkflow-arena"
|
||||
repository = "https://github.com/sartography/spiffworkflow-arena"
|
||||
classifiers = [
|
||||
"Development Status :: 1 - Planning",
|
||||
]
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = ">=3.9,<3.11"
|
||||
click = "^8.0.1"
|
||||
flask = "2.2.2"
|
||||
flask-admin = "*"
|
||||
flask-bcrypt = "*"
|
||||
flask-cors = "*"
|
||||
flask-mail = "*"
|
||||
flask-marshmallow = "*"
|
||||
flask-migrate = "*"
|
||||
flask-restful = "*"
|
||||
werkzeug = "*"
|
||||
# go back to main once https://github.com/sartography/SpiffWorkflow/pull/241 is merged
|
||||
SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"}
|
||||
# SpiffWorkflow = {develop = true, path = "/Users/kevin/projects/github/sartography/SpiffWorkflow"}
|
||||
# SpiffWorkflow = {develop = true, path = "/home/jason/projects/github/sartography/SpiffWorkflow"}
|
||||
sentry-sdk = "^1.10"
|
||||
sphinx-autoapi = "^2.0"
|
||||
# flask-bpmn = {develop = true, path = "/home/jason/projects/github/sartography/flask-bpmn"}
|
||||
# flask-bpmn = {develop = true, path = "/Users/kevin/projects/github/sartography/flask-bpmn"}
|
||||
flask-bpmn = {git = "https://github.com/sartography/flask-bpmn", rev = "main"}
|
||||
mysql-connector-python = "^8.0.29"
|
||||
pytest-flask = "^1.2.0"
|
||||
pytest-flask-sqlalchemy = "^1.1.0"
|
||||
psycopg2 = "^2.9.3"
|
||||
typing-extensions = "^4.4.0"
|
||||
connexion = {extras = [ "swagger-ui",], version = "^2"}
|
||||
lxml = "^4.9.1"
|
||||
marshmallow-enum = "^1.5.1"
|
||||
marshmallow-sqlalchemy = "^0.28.0"
|
||||
PyJWT = "^2.6.0"
|
||||
gunicorn = "^20.1.0"
|
||||
python-keycloak = "^2.5.0"
|
||||
APScheduler = "^3.9.1"
|
||||
Jinja2 = "^3.1.2"
|
||||
RestrictedPython = "^5.2"
|
||||
Flask-SQLAlchemy = "^3"
|
||||
orjson = "^3.8.0"
|
||||
|
||||
# type hinting stuff
|
||||
# these need to be in the normal (non dev-dependencies) section
|
||||
# because if not then poetry export won't have them and nox -s mypy --pythons 3.10
|
||||
# will fail
|
||||
types-Werkzeug = "^1.0.9"
|
||||
types-PyYAML = "^6.0.12"
|
||||
types-Flask = "^1.1.6"
|
||||
types-requests = "^2.28.6"
|
||||
types-pytz = "^2022.1.1"
|
||||
|
||||
# https://github.com/dropbox/sqlalchemy-stubs/pull/251
|
||||
# someday get off github
|
||||
# sqlalchemy-stubs = "^0.4"
|
||||
# sqlalchemy-stubs = { git = "https://github.com/dropbox/sqlalchemy-stubs.git", rev = "master" }
|
||||
# sqlalchemy-stubs = {develop = true, path = "/Users/kevin/projects/github/sqlalchemy-stubs"}
|
||||
# for now use my fork
|
||||
sqlalchemy-stubs = { git = "https://github.com/burnettk/sqlalchemy-stubs.git", rev = "scoped-session-delete" }
|
||||
simplejson = "^3.17.6"
|
||||
|
||||
|
||||
[tool.poetry.dev-dependencies]
|
||||
pytest = "^7.1.2"
|
||||
coverage = {extras = ["toml"], version = "^6.1"}
|
||||
safety = "^2.3.1"
|
||||
mypy = ">=0.961"
|
||||
typeguard = "^2.13.2"
|
||||
xdoctest = {extras = ["colors"], version = "^1.0.1"}
|
||||
sphinx = "^5.0.2"
|
||||
sphinx-autobuild = ">=2021.3.14"
|
||||
pre-commit = "^2.20.0"
|
||||
flake8 = "^4.0.1"
|
||||
black = ">=21.10b0"
|
||||
flake8-bandit = "^2.1.2"
|
||||
|
||||
# 1.7.3 broke us. https://github.com/PyCQA/bandit/issues/841
|
||||
bandit = "1.7.2"
|
||||
|
||||
flake8-bugbear = "^22.10.25"
|
||||
flake8-docstrings = "^1.6.0"
|
||||
flake8-rst-docstrings = "^0.2.7"
|
||||
# flask-sqlalchemy-stubs = "^0.2"
|
||||
pep8-naming = "^0.13.2"
|
||||
darglint = "^1.8.1"
|
||||
reorder-python-imports = "^3.9.0"
|
||||
pre-commit-hooks = "^4.0.1"
|
||||
sphinx-click = "^4.3.0"
|
||||
Pygments = "^2.10.0"
|
||||
pyupgrade = "^3.1.0"
|
||||
furo = ">=2021.11.12"
|
||||
MonkeyType = "^22.2.0"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
spiffworkflow-backend = "spiffworkflow_backend.__main__:main"
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
# ignore deprecation warnings from various packages that we don't control
|
||||
filterwarnings = [
|
||||
# note the use of single quote below to denote "raw" strings in TOML
|
||||
# kombu/utils/compat.py:82
|
||||
'ignore:SelectableGroups dict interface is deprecated. Use select.',
|
||||
# flask_marshmallow/__init__.py:34
|
||||
# marshmallow_sqlalchemy/convert.py:17
|
||||
'ignore:distutils Version classes are deprecated. Use packaging.version instead.',
|
||||
# connexion/spec.py:50
|
||||
'ignore:Passing a schema to Validator.iter_errors is deprecated and will be removed in a future release',
|
||||
# connexion/decorators/validation.py:16
|
||||
'ignore:Accessing jsonschema.draft4_format_checker is deprecated and will be removed in a future release.',
|
||||
# connexion/apis/flask_api.py:236
|
||||
"ignore:'_request_ctx_stack' is deprecated and will be removed in Flask 2.3",
|
||||
"ignore:Setting 'json_encoder' on the app or a blueprint is deprecated and will be removed in Flask 2.3",
|
||||
"ignore:'JSONEncoder' is deprecated and will be removed in Flask 2.3",
|
||||
"ignore:'app.json_encoder' is deprecated and will be removed in Flask 2.3"
|
||||
]
|
||||
|
||||
[tool.coverage.paths]
|
||||
source = ["src", "*/site-packages"]
|
||||
tests = ["tests", "*/tests"]
|
||||
|
||||
[tool.coverage.run]
|
||||
branch = true
|
||||
source = ["spiffworkflow_backend", "tests"]
|
||||
|
||||
[tool.coverage.report]
|
||||
show_missing = true
|
||||
fail_under = 50
|
||||
|
||||
[tool.mypy]
|
||||
strict = true
|
||||
disallow_any_generics = false
|
||||
warn_unreachable = true
|
||||
pretty = true
|
||||
show_column_numbers = true
|
||||
show_error_codes = true
|
||||
show_error_context = true
|
||||
plugins = "sqlmypy"
|
||||
|
||||
# We get 'error: Module has no attribute "set_context"' for sentry-sdk without this option
|
||||
implicit_reexport = true
|
||||
|
||||
# allow for subdirs to NOT require __init__.py
|
||||
namespace_packages = true
|
||||
explicit_package_bases = false
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=1.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
@ -9,6 +9,20 @@ set -o errtrace -o errexit -o nounset -o pipefail
|
||||
|
||||
export FLASK_SESSION_SECRET_KEY="this_is_recreate_db_secret_key"
|
||||
|
||||
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
>&2 echo "ERROR: Could not find a location for the sample processes. Last tried: $BPMN_SPEC_ABSOLUTE_DIR"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
export BPMN_SPEC_ABSOLUTE_DIR
|
||||
fi
|
||||
|
||||
tasks=""
|
||||
if [[ "${1:-}" == "clean" ]]; then
|
||||
subcommand="${2:-}"
|
||||
|
@ -19,7 +19,16 @@ fi
|
||||
|
||||
if [[ -z "${BPMN_SPEC_ABSOLUTE_DIR:-}" ]]; then
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
export BPMN_SPEC_ABSOLUTE_DIR="$script_dir/../../sample-process-models"
|
||||
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
BPMN_SPEC_ABSOLUTE_DIR="${script_dir}/../../sample-process-models"
|
||||
if [[ ! -d "$BPMN_SPEC_ABSOLUTE_DIR" ]]; then
|
||||
>&2 echo "ERROR: Could not find a location for the sample processes. Last tried: $BPMN_SPEC_ABSOLUTE_DIR"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
export BPMN_SPEC_ABSOLUTE_DIR
|
||||
fi
|
||||
|
||||
export FLASK_SESSION_SECRET_KEY=super_secret_key
|
||||
|
@ -1280,6 +1280,7 @@
|
||||
"http://localhost:7000/*",
|
||||
"http://67.205.133.116:7000/*",
|
||||
"http://167.172.242.138:7000/*",
|
||||
"https://api.{{SPIFF_SUBDOMAIN}}.spiffworkflow.org/*",
|
||||
"https://api.demo.spiffworkflow.org/*"
|
||||
],
|
||||
"webOrigins": [],
|
||||
@ -1552,6 +1553,7 @@
|
||||
"http://localhost:7001/*",
|
||||
"http://67.205.133.116:7000/*",
|
||||
"http://167.172.242.138:7001/*",
|
||||
"https://api.{{SPIFF_SUBDOMAIN}}.spiffworkflow.org/*",
|
||||
"https://api.demo.spiffworkflow.org/*"
|
||||
],
|
||||
"webOrigins": ["*"],
|
||||
@ -1623,6 +1625,7 @@
|
||||
"http://localhost:7001/*",
|
||||
"http://67.205.133.116:7000/*",
|
||||
"http://167.172.242.138:7001/*",
|
||||
"https://api.{{SPIFF_SUBDOMAIN}}.spiffworkflow.org/*",
|
||||
"https://api.demo.spiffworkflow.org/*"
|
||||
],
|
||||
"webOrigins": [],
|
||||
|
@ -18,7 +18,7 @@ set -o errtrace -o errexit -o nounset -o pipefail
|
||||
if ! docker network inspect spiffworkflow > /dev/null 2>&1; then
|
||||
docker network create spiffworkflow
|
||||
fi
|
||||
docker rm keycloak 2>/dev/null || echo 'no keycloak container found'
|
||||
docker rm keycloak 2>/dev/null || echo 'no keycloak container found, safe to start new container'
|
||||
docker run \
|
||||
-p 7002:8080 \
|
||||
-d \
|
||||
@ -31,7 +31,11 @@ docker run \
|
||||
-Dkeycloak.profile.feature.token_exchange=enabled \
|
||||
-Dkeycloak.profile.feature.admin_fine_grained_authz=enabled
|
||||
|
||||
docker cp bin/spiffworkflow-realm.json keycloak:/tmp
|
||||
script_dir="$( cd -- "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
|
||||
cp "${script_dir}/spiffworkflow-realm.json" /tmp/spiffworkflow-realm.json
|
||||
spiff_subdomain="unused-for-local-dev"
|
||||
perl -pi -e "s/{{SPIFF_SUBDOMAIN}}/${spiff_subdomain}/g" /tmp/spiffworkflow-realm.json
|
||||
docker cp /tmp/spiffworkflow-realm.json keycloak:/tmp
|
||||
|
||||
sleep 20
|
||||
remove_traps
|
||||
|
@ -37,21 +37,9 @@ from spiffworkflow_backend import create_app # noqa: E402
|
||||
def app() -> Flask:
|
||||
"""App."""
|
||||
os.environ["SPIFFWORKFLOW_BACKEND_ENV"] = "testing"
|
||||
|
||||
# os.environ["FLASK_SESSION_SECRET_KEY"] = "this_is_testing_secret_key"
|
||||
os.environ["FLASK_SESSION_SECRET_KEY"] = "super_secret_key"
|
||||
app = create_app()
|
||||
|
||||
# NOTE: set this here since nox shoves tests and src code to
|
||||
# different places and this allows us to know exactly where we are at the start
|
||||
app.config["BPMN_SPEC_ABSOLUTE_DIR"] = os.path.join(
|
||||
os.path.dirname(__file__),
|
||||
"tests",
|
||||
"spiffworkflow_backend",
|
||||
"files",
|
||||
"bpmn_specs",
|
||||
)
|
||||
|
||||
return app
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ ENV KC_HEALTH_ENABLED="true"
|
||||
# ENV KC_METRICS_ENABLED=true
|
||||
ENV PROXY_ADDRESS_FORWARDING="true"
|
||||
# ENV KC_HOSTNAME="keycloak.demo.spiffworkflow.org"
|
||||
ENV KC_HOSTNAME_URL="https://keycloak.demo.spiffworkflow.org"
|
||||
# ENV KC_HOSTNAME_URL="https://keycloak.demo.spiffworkflow.org"
|
||||
ENV KC_FEATURES="token-exchange,admin-fine-grained-authz"
|
||||
# ENV KC_DB=postgres
|
||||
# Install custom providers
|
||||
|
4
spiffworkflow-backend/poetry.lock
generated
4
spiffworkflow-backend/poetry.lock
generated
@ -639,7 +639,7 @@ werkzeug = "*"
|
||||
type = "git"
|
||||
url = "https://github.com/sartography/flask-bpmn"
|
||||
reference = "main"
|
||||
resolved_reference = "aae17b7b4152fe09d4a365ac5ec85289218c663b"
|
||||
resolved_reference = "cedc5253add81a18a274f2cd3289fe36bb138f8b"
|
||||
|
||||
[[package]]
|
||||
name = "Flask-Cors"
|
||||
@ -1873,7 +1873,7 @@ pytz = "*"
|
||||
type = "git"
|
||||
url = "https://github.com/sartography/SpiffWorkflow"
|
||||
reference = "main"
|
||||
resolved_reference = "a094adad8767f82e9c5fa806a46597e066252a72"
|
||||
resolved_reference = "2d3bd00854ab483e823c4b386430abc9267f536b"
|
||||
|
||||
[[package]]
|
||||
name = "SQLAlchemy"
|
||||
|
@ -27,15 +27,11 @@ flask-marshmallow = "*"
|
||||
flask-migrate = "*"
|
||||
flask-restful = "*"
|
||||
werkzeug = "*"
|
||||
# go back to main once https://github.com/sartography/SpiffWorkflow/pull/241 is merged
|
||||
SpiffWorkflow = {git = "https://github.com/sartography/SpiffWorkflow", rev = "main"}
|
||||
# SpiffWorkflow = {develop = true, path = "/Users/kevin/projects/github/sartography/SpiffWorkflow"}
|
||||
# SpiffWorkflow = {develop = true, path = "/home/jason/projects/github/sartography/SpiffWorkflow"}
|
||||
sentry-sdk = "^1.10"
|
||||
sphinx-autoapi = "^2.0"
|
||||
# flask-bpmn = {develop = true, path = "/home/jason/projects/github/sartography/flask-bpmn"}
|
||||
# flask-bpmn = {develop = true, path = "/Users/kevin/projects/github/sartography/flask-bpmn"}
|
||||
flask-bpmn = {git = "https://github.com/sartography/flask-bpmn", rev = "main"}
|
||||
# flask-bpmn = {develop = true, path = "../flask-bpmn"}
|
||||
mysql-connector-python = "^8.0.29"
|
||||
pytest-flask = "^1.2.0"
|
||||
pytest-flask-sqlalchemy = "^1.1.0"
|
||||
|
@ -148,6 +148,7 @@ def configure_sentry(app: flask.app.Flask) -> None:
|
||||
import sentry_sdk
|
||||
from sentry_sdk.integrations.flask import FlaskIntegration
|
||||
|
||||
# get rid of NotFound errors
|
||||
def before_send(event: Any, hint: Any) -> Any:
|
||||
"""Before_send."""
|
||||
if "exc_info" in hint:
|
||||
@ -157,18 +158,26 @@ def configure_sentry(app: flask.app.Flask) -> None:
|
||||
return None
|
||||
return event
|
||||
|
||||
sentry_sample_rate = app.config.get("SENTRY_SAMPLE_RATE")
|
||||
if sentry_sample_rate is None:
|
||||
return
|
||||
sentry_errors_sample_rate = app.config.get("SENTRY_ERRORS_SAMPLE_RATE")
|
||||
if sentry_errors_sample_rate is None:
|
||||
raise Exception("SENTRY_ERRORS_SAMPLE_RATE is not set somehow")
|
||||
|
||||
sentry_traces_sample_rate = app.config.get("SENTRY_TRACES_SAMPLE_RATE")
|
||||
if sentry_traces_sample_rate is None:
|
||||
raise Exception("SENTRY_TRACES_SAMPLE_RATE is not set somehow")
|
||||
|
||||
sentry_sdk.init(
|
||||
dsn=app.config.get("SENTRY_DSN"),
|
||||
integrations=[
|
||||
FlaskIntegration(),
|
||||
],
|
||||
environment=app.config["ENV_IDENTIFIER"],
|
||||
# Set traces_sample_rate to 1.0 to capture 100%
|
||||
# sample_rate is the errors sample rate. we usually set it to 1 (100%)
|
||||
# so we get all errors in sentry.
|
||||
sample_rate=float(sentry_errors_sample_rate),
|
||||
# Set traces_sample_rate to capture a certain percentage
|
||||
# of transactions for performance monitoring.
|
||||
# We recommend adjusting this value in production.
|
||||
traces_sample_rate=float(sentry_sample_rate),
|
||||
# We recommend adjusting this value to less than 1(00%) in production.
|
||||
traces_sample_rate=float(sentry_traces_sample_rate),
|
||||
before_send=before_send,
|
||||
)
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user