Available Features

This documentation is divided into two main sections:

  • Public API — methods from GPI-Space made accessible in Julia.
  • Workflow — tools and utilities for defining, compiling, and visualizing workflows.

Public API

This section presents a collection of methods originating from GPI-Space (the underlying workflow management system) and made accessible in Julia through simple wrappers.

For functionality related to workflow generation, see the Workflow section below.

DistributedWorkflows.application_configMethod
application_config(port::String, impl::String, fname::String)

Convenience constructor for configuring a workflow application with a single transition.

Arguments

  • ports::String: Ports to configure for the workflow transition.
  • impl::String: Julia file containing the implementation called by the workflow transition.
  • fnames::String: Function name to be executed by the workflow transition.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source
DistributedWorkflows.application_configMethod
application_config(ports::Vector{String}, impl::String, fnames::Vector{String})

Convenience constructor for configuring a workflow application with multiple transitions sourcing their implementation details from the same file.

Arguments

  • ports::Vector{String}: List of ports to configure for the workflow transitions.
  • impl::String: Julia file containing the implementations called by the workflow transitions.
  • fnames::Vector{String}: List of function names to be executed by the workflow transitions.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source
DistributedWorkflows.application_configMethod
application_config(ports::Vector{String}, impl::Vector{String}, fnames::Vector{String})

Constructor for configuring a workflow application with multiple transitions.

Arguments

  • ports::Vector{String}: List of ports to configure for the workflow transitions.
  • impl::Vector{String}: List of julia files containing the implementations called by the workflow transitions.
  • fnames::Vector{String}: List of function names to be executed by the workflow transitions.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source
DistributedWorkflows.clientMethod
client(workers::Int, nodefile::String, rif_strategy::String, log_host::String, log_port::Int)

Configures and starts a client setting up the workflow execution infrastructure and connects to a logging service. The nodefile will be automatically populated with the local host name if it doesn't exist in the given location or the rif_strategy is local.

Arguments

  • workers::Int: Number of workers launched per node.
  • nodefile::String: Location of the nodefile.
  • rif_strategy::String: Launch mode of the workflow infrastructure. Accepts ssh for distributing the workers across multiple nodes or local for running on the localhost only.
  • log_host::String: Host of the logging service.
  • log_port::Int : Port the logging service is listening on.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source
DistributedWorkflows.clientMethod
client(workers::Int, nodefile::String, rif_strategy::String)

Configures and starts a client setting up the workflow execution infrastructure. The nodefile will be automatically populated with the local host name if it doesn't exist in the given location or the rif_strategy is local.

Arguments

  • workers::Int: Number of workers launched per node.
  • nodefile::String: Location of the nodefile.
  • rif_strategy::String: Launch mode of the workflow infrastructure. Accepts ssh for distributing the workers across multiple nodes or local for running on the localhost only.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source
DistributedWorkflows.workflow_configMethod
workflow_config(workflow::String, output_dir::String, app_config::Application_config_many)

Configures a workflow for execution by a client instance.

Arguments

  • workflow::String: Name of the workflow.
  • output_dir::String: Location to store any output data generated during the workflow execution.
  • app_config::Application_config_many: Application configurations for the workflow execution.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source
DistributedWorkflows.workflow_configMethod
workflow_config(workflow::String, output_dir::String, app_config::Application_config)

Configures a workflow for execution by a client instance.

Arguments

  • workflow::String: Name of the workflow.
  • output_dir::String: Location to store any output data generated during the workflow execution.
  • app_config::Application_config: Application configuration for the workflow execution.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source
DistributedWorkflows.workflow_configMethod
workflow_config(workflow::String, output_dir::String, app_config::Vector{Application_config})

Configures a workflow for execution by a client instance.

Arguments

  • workflow::String: Name of the workflow.
  • output_dir::String: Location to store any output data generated during the workflow execution.
  • app_config::Vector{Application_config}: List of application configurations for the workflow execution.

See also Workflow_PetriNet, generate_workflow, compile_workflow.

source

Workflow

This section documents the workflow-related API: generation, compilation, rendering, and XML export.

DistributedWorkflows.Workflow_PetriNetType
Workflow_PetriNet(workflow_name::String)

A struct creating an empty Petri net named: "workflow_name". Throws an error, if workflow name is not provided.

Use the connect() function to populate the Petri net, and remove() function to remove Petri net components.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2",:string)
Place "input2" created.


julia> p3 = place("output",:string)
Place "output" created.


julia> t = transition("trans")
Transition trans created.


julia> connect(pn, p1, t, :in)
A Petri net with name "hello_julia", having 0 ports, 1 places, and 1 transitions.


julia> connect(pn, p2, t, :read)
A Petri net with name "hello_julia", having 0 ports, 2 places, and 1 transitions.


julia> connect(pn, p3, t, :out_many)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, :in, p2)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, :out, p3)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.

See also place, transition, arc, port, connect, remove, generate_workflow, compile_workflow.

source
DistributedWorkflows.arcMethod
arc(place::Place, transition::Transition, type::Symbol)

Creates an object of type Arc that joins a place to a transition in a Petri net. Note: acceptable arcs are one of the following: :in, :read, :inout, :out, :out_many

Examples

julia> p1 = place("place1", "input_place")
Place "place1" created.


julia> t1 = transition("transition1")
Transition "transition1" created.


julia> arc(p1, t1, :in)
An arc of type "in", connecting the place: place1 to the transition: transition1.

See also place, transition, Workflow_PetriNet, connect, remove.

source
DistributedWorkflows.connectMethod
connect(pnet::Workflow_PetriNet, place::Place, port::Port)
connect(pnet::Workflow_PetriNet, port::Port, place::Place)

Given a Petri net, connects the given place to the given port.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2", :string)
Place "input2" created.


julia> p3 = place("output_result", :string)
Place "output_result" created.


julia> t = transition("initial_transition")
Transition "initial_transition" created.


julia> connect(pn,[(p1, :in),(p2, :read),(p3, :out_many)], t)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, p2, :in)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, p3, :out)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.

See also place, transition, arc, port, Workflow_PetriNet, remove.

source
DistributedWorkflows.connectMethod
connect(pnet::Workflow_PetriNet, place::Place, transition::Transition, arc_type::Symbol)
connect(pnet::Workflow_PetriNet, transition::Transition, place::Place, arc_type::Symbol)

Given a Petri net connects the place to the transition with the given arc type.

Examples

# initiating an empty Petri net.
julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2",:string)
Place "input2" created.


julia> p3 = place("output",:string)
Place "output" created.


julia> t = transition("transition1")
Transition "transition1" created.


julia> connect(pn, p1,t, :in)
A Petri net with name "hello_julia", having 0 ports, 1 places, and 1 transitions.


julia> connect(pn, p2,t, :read)
A Petri net with name "hello_julia", having 0 ports, 2 places, and 1 transitions.


julia> connect(pn, p3,t, :out_many)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, :in, p2)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, :out, p3)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.

See also place, transition, arc, port, Workflow_PetriNet, remove.

source
DistributedWorkflows.connectMethod
connect(pnet::Workflow_PetriNet, port_type::Symbol, place::Place)
connect(pnet::Workflow_PetriNet, place::Place, port_type::Symbol)

Given a Petri net, connects the given place to a port of name portname and type porttype.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2", :string)
Place "input2" created.


julia> p3 = place("output_result", :string)
Place "output_result" created.


julia> t = transition("initial_transition")
Transition "initial_transition" created.


julia> connect(pn,[(p1, :in),(p2, :read),(p3, :out_many)], t)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.

julia> prt = port(:in, p1)
A port of type "in", connected to place "input1".


julia> connect(pn, p1, prt)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.

See also place, transition, arc, port, Workflow_PetriNet, remove.

source
DistributedWorkflows.connectMethod
connect(pnet::Workflow_PetriNet, places_arcs::Vector{Tuple{Place, Symbol}}, transition::Transition)
connect(pnet::Workflow_PetriNet, transition::Transition, places_arcs::Vector{Tuple{Place, Symbol}})

Given a Petri net, connects the vector of tuples (places, arc_types) to the given transition.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2", :string)
Place "input2" created.


julia> p3 = place("output_result", :string)
Place "output_result" created.


julia> t = transition("initial_transition")
Transition "initial_transition" created.


julia> connect(pn,[(p1, :in),(p2, :read),(p3, :out_many)], t)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.

See also place, transition, arc, port, Workflow_PetriNet, remove.

source
DistributedWorkflows.placeFunction
place(name::String)
place(name::String, type::Symbol)

Creates an object of type Place for the Petri net object. Note: acceptable place types are: :string, :control, :control_init, :counter

Also, note that an input or output place cannot be of type :control.

Examples

julia> place("new_place", :string)
Place "new_place" created.

julia> place("in_place", :control)
Place "in_place" with control token created.

See also transition, arc, port, Workflow_PetriNet, connect, remove.

source
DistributedWorkflows.portMethod
port(type::Symbol, place::Place)

Creates a port connecting to the given place with respect to the arc type. Note: the allowed port types are one of the following: :in, :out, :inout

Examples

julia> p1 = place("input1", :string)
Place "input1" created.


julia> port(:in, p1)
A port of type "in" connected to place "input1".

See also place, Workflow_PetriNet, connect, remove.

source
DistributedWorkflows.removeMethod
remove(pnet::Workflow_PetriNet, arc::Arc)

Remove the arc from the given Petri net.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2", :string)
Place "input2" created.


julia> p3 = place("output_result", :string)
Place "output_result" created.


julia> t = transition("initial_transition")
Transition "initial_transition" created.


julia> connect(pn,[(p1, :in),(p2, :read),(p3, :out_many)], t)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, p2, :in)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, p3, :out)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.


julia> a1 = arc(p1,t,:in)
An arc of type "in", connecting the place: input1 to the transition: initial_transition.


julia> pn.arcs
3-element Vector{DistributedWorkflows.Arc}:
 An arc of type "in", connecting the place: input1 to the transition: initial_transition.

 An arc of type "read", connecting the place: input2 to the transition: initial_transition.

 An arc of type "out_many", connecting the place: output_result to the transition: initial_transition.


julia> remove(pn, a1)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.


julia> pn.arcs
2-element Vector{DistributedWorkflows.Arc}:
 An arc of type "read", connecting the place: input2 to the transition: initial_transition.

 An arc of type "out_many", connecting the place: output_result to the transition: initial_transition.

See also place, transition, arc, port, Workflow_PetriNet, connect.

source
DistributedWorkflows.removeMethod
remove(pnet::Workflow_PetriNet, place::Place)

Remove the place from the given Petri net.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2", :string)
Place "input2" created.


julia> p3 = place("output_result", :string)
Place "output_result" created.


julia> t = transition("initial_transition")
Transition "initial_transition" created.


julia> connect(pn,[(p1, :in),(p2, :read),(p3, :out_many)], t)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, p2, :in)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, p3, :out)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.


julia> pn.places
3-element Vector{DistributedWorkflows.Place}:
 Place "input1" created.

 Place "input2" created.

 Place "output_result" created.


julia> remove(pn, p1)
A Petri net with name "hello_julia", having 2 ports, 2 places, and 1 transitions.


julia> pn.places
2-element Vector{DistributedWorkflows.Place}:
 Place "input2" created.

 Place "output_result" created.

See also place, transition, arc, port, Workflow_PetriNet, connect.

source
DistributedWorkflows.removeMethod
remove(pnet::Workflow_PetriNet, port::Port)

Remove the port from the given Petri net.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2", :string)
Place "input2" created.


julia> p3 = place("output_result", :string)
Place "output_result" created.


julia> t = transition("initial_transition")
Transition "initial_transition" created.


julia> connect(pn,[(p1, :in),(p2, :read),(p3, :out_many)], t)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, p2, :in)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, p3, :out)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.


julia> pn.ports
3-element Vector{DistributedWorkflows.Port}:
 A port of type "in" connected to place "input1".

 A port of type "in" connected to place "input2".

 A port of type "out" connected to place "output_result".


julia> prt = port(:in, p1)
A port of type "in" connected to place "input1".


julia> remove(pn, prt)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> pn.ports
2-element Vector{DistributedWorkflows.Port}:
 A port of type "in" connected to place "input2".

 A port of type "out" connected to place "output_result".

See also place, transition, arc, port, Workflow_PetriNet, connect.

source
DistributedWorkflows.removeMethod
remove(pnet::Workflow_PetriNet,  transition::Transition)

Remove the transition from the given Petri net.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place "input1" created.


julia> p2 = place("input2", :string)
Place "input2" created.


julia> p3 = place("output_result", :string)
Place "output_result" created.


julia> t = transition("initial_transition")
Transition "initial_transition" created.


julia> connect(pn,[(p1, :in),(p2, :read),(p3, :out_many)], t)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, p2, :in)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, p3, :out)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.


julia> pn.transitions
1-element Vector{DistributedWorkflows.Transition}:
 Transition "initial_transition" created.


julia> remove(pn, t)
A Petri net with name "hello_julia", having 2 ports, 2 places, and 0 transitions.


julia> pn.transitions
DistributedWorkflows.Transition[]

See also place, transition, arc, port, Workflow_PetriNet, connect.

source
DistributedWorkflows.transitionFunction
transition(name::String, exp::Vector{String})
transition(name::String, exp::Vector{String}, condition::String)

Creates an object of type Transition for the Petri net object containing an expression. If a condition string is given, the the transition is a conditional transition.

Note: the condition and/or expression follows Fortran style expression. The following are possible expressions that can be wrapped in a string: Comparison expressions: :lt: :le: :gt: :ge: :ne: :eq: Boolean expressions: :or: :and: :not: Operations: +, -, *, /, :=

See the example on how to use.

Examples

julia> transition("transition1")
Transition "transition1" created.

julia> transition("do_stuff", "counter :eq: 0UL")
A conditional transition "do_stuff" created.

See also place, arc, Workflow_PetriNet, connect, remove.

source
DistributedWorkflows.transitionFunction
transition(name::String)
transition(name::String, condition::String)

Creates an object of type Transition for the Petri net object. If a condition string is given, the the transition is a conditional transition.

Note: the condition and/or expression follows Fortran style expression. The following are possible expressions that can be wrapped in a string: Comparison expressions: :lt: :le: :gt: :ge: :ne: :eq: Boolean expressions: :or: :and: :not: Operations: +, -, *, /, :=

See the example on how to use.

Examples

julia> transition("transition1")
Transition "transition1" created.

julia> transition("do_stuff", "counter :eq: 0UL")
A conditional transition "do_stuff" created.

See also place, arc, Workflow_PetriNet, connect, remove.

source
DistributedWorkflows.compile_workflowFunction
compile_workflow(workflow::String, build_dir::String)

Given a path for the workflow and an accessible location for the build directory, this function compiles the XML workflow.

Note: workflow => absolute path to the xpnet file build_dir => path to build directory

Examples

tmp_dir = joinpath(@__DIR, "tmp")
julia> compile_workflow(joinpath(tmp_dir, "hello_julia.xpnet"))
...
Success: Workflow compiled

See also place, transition, arc, port, Workflow_PetriNet, connect, remove, generate_workflow.

source
DistributedWorkflows.savefigFunction
savefig(pnet::Workflow_PetriNet)
savefig(pnet::Workflow_PetriNet, format::Symbol)
savefig(pnet::Workflow_PetriNet, path::String)
savefig(pnet::Workflow_PetriNet, format::Symbol, path::String)

By default this method generates a PNG file after compiling the Petri net into an XML workflow and compiling the workflow. If path is not given then the workflow image is stored in your home directory in the "tmp/pnet" folder.

Note: Supports all the file formats by GraphViz. For example, :png, :svg, :jpg, :pdf, :webp

For other formats, check GraphViz documentation: https://graphviz.org/docs/outputs/

Examples

julia> # first generate a workflow in the form of a Petri net
julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input_file1")
Place "input_file1" created.


julia> p2 = place("input_file2")
Place "input_file2" created.


julia> p3 = place("output_file1")
Place "output_file1" created.


julia> p4 = place("output_file2")
Place "output_file2" created.


julia> t = transition("hello_jl")
Transition "hello_jl" created.


julia> connect(pn,[(p1, :in),(p2, :in),(p3, :out), (p4, :out)], t)
A Petri net with name "hello_julia", having 0 ports, 4 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 4 places, and 1 transitions.


julia> connect(pn, p2, :in)
A Petri net with name "hello_julia", having 2 ports, 4 places, and 1 transitions.


julia> connect(pn, p3, :out)
A Petri net with name "hello_julia", having 3 ports, 4 places, and 1 transitions.


julia> connect(pn, p4, :out)
A Petri net with name "hello_julia", having 4 ports, 4 places, and 1 transitions.


julia> pn
A Petri net with name "hello_julia", having 4 ports, 4 places, and 1 transitions.

# now generate the workflow image
julia> savefig(pn, :jpg, "/home/pnet")
"An image of the workflow Petri net could be found in /home/pnet/hello_julia.jpg"

# the following takes the Petri net and the path for storage and generates a PNG file which is stored in the provided path.
julia> savefig(pn, "/home/pnet")
"An image of the workflow Petri net could be found in /home/pnet/hello_julia.png"

See also Workflow_PetriNet, place, transition, arc, port, Workflow_PetriNet, connect, remove, compile_workflow, generate_workflow.

source
DistributedWorkflows.show_workflowMethod
show_workflow(pnet::Workflow_PetriNet)

Converts the given Petri net object to an SVG string and displays it as HTML to the screen. This functionality is meant to be used within environments like IJulia.jl or Pluto.jl, not the REPL.

Arguments

  • pnet::Workflow_PetriNet: Petri net object describing the workflow to visualize
source
DistributedWorkflows.generate_workflowFunction
generate_workflow(pnet::Workflow_PetriNet)
generate_workflow(pnet::Workflow_PetriNet, path::String)

Given a Petri net description, creates an XML workflow and writes it to a file in the path.

Examples

julia> pn = Workflow_PetriNet("hello_julia")
A Petri net with name "hello_julia", having 0 ports, 0 places, and 0 transitions.


julia> p1 = place("input1", :string)
Place input1 with control token created.


julia> p2 = place("input2",:string)
Place input2 with control token created.


julia> p3 = place("output",:string)
Place output with control token created.


julia> t = transition("trans")
Transition trans created.


julia> connect(pn, p1,t, :in)
A Petri net with name "hello_julia", having 0 ports, 1 places, and 1 transitions.


julia> connect(pn, p2,t, :read)
A Petri net with name "hello_julia", having 0 ports, 2 places, and 1 transitions.


julia> connect(pn, p3,t, :out_many)
A Petri net with name "hello_julia", having 0 ports, 3 places, and 1 transitions.


julia> connect(pn, p1, :in)
A Petri net with name "hello_julia", having 1 ports, 3 places, and 1 transitions.


julia> connect(pn, :in, p2)
A Petri net with name "hello_julia", having 2 ports, 3 places, and 1 transitions.


julia> connect(pn, :out, p3)
A Petri net with name "hello_julia", having 3 ports, 3 places, and 1 transitions.

# If a path is not provided, the generated workflow is stored in the home directory in the folder: tmp
julia> generate_workflow(pn, "/home/pnet/")
An XML workflow called: parallel_reduce.xpnet has been written to the location: /home/pnet/.

See also place, transition, arc, port, Workflow_PetriNet, connect, remove, compile_workflow.

source