コード例 #1
0
def process_parallel_gateway(p: Process, xml_node) -> None:
    """ Create an end event from the process """
    node_name = normalize_name(xml_node.get("name"))
    task = ParallelGateway(parent_process=p,
                           id=xml_node.get("id"),
                           name=node_name)

    p.add_task(task)
コード例 #2
0
def process_exclusive_gateway(p: Process, xml_node) -> None:
    """ Create an exclusive gateway from the process """
    node_name = normalize_name(xml_node.get("name"))
    task = ExclusiveGateway(parent_process=p,
                            id=xml_node.get("id"),
                            name=node_name)

    p.add_task(task)
コード例 #3
0
def process_usertask(p: Process, xml_node) -> None:
    """ Create a HumanTask element from the process """
    node_name = normalize_name(xml_node.get("name"))
    task = UserTask(parent_process=p, id=xml_node.get("id"), name=node_name)

    task = process_potential_loop(task, xml_node)

    p.add_task(task)
コード例 #4
0
def process_script_task(p: Process, xml_node) -> None:
    """ Create a ScriptTask element from the process """
    node_name = normalize_name(xml_node.get("name"))
    language = xml_node.get("scriptFormat")

    script_node = find_node(xml_node, "script")

    task = ScriptTask(
        parent_process=p,
        id=xml_node.get("id"),
        name=node_name,
        language=language,
        script=textwrap.dedent(script_node.text),
    )

    task = process_potential_loop(task, xml_node)

    p.add_task(task)
コード例 #5
0
def process_node_sub_process(p: Process, xml_node) -> None:
    task = cast(SubProcess, read_process(p, xml_node))
    task = process_potential_loop(task, xml_node)

    p.add_task(task)