3  test

3.1 Quarto

Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see https://quarto.org.

3.2 Running Code

When you click the Render button a document will be generated that includes both content and the output of embedded code. You can embed code like this:


Attaching package: 'dplyr'
The following objects are masked from 'package:stats':

    filter, lag
The following objects are masked from 'package:base':

    intersect, setdiff, setequal, union
library(dplyr)
library(bpmnR)

# Define tasks (nodes)
nodes <- tibble(
  id = c("communicate", "createPO", "reviewPO", "approvePO", "rejectPO",
         "obtainInvoice", "downloadPO", "prepareCoC", "createGRN",
         "processPayment", "spendingOverBudget"),
  name = c("Communicate to Stakeholders", "Create Purchase Order", "Review Purchase Order", 
           "Approve Purchase Order", "Reject Purchase Order", 
           "Obtain Invoice from Vendor", "Download Approved PO", 
           "Prepare CoC and Circulate", "Create GRN in the System", 
           "Process Payment in Banking Portal", "Spending Over Budget"),
  objectType = "task",
  gatewayDirection = NA
)

# Define events (start and end)
events <- tibble(
  id = c("start", "end"),
  name = c("Start Process", "End Process"),
  objectType = c("startEvent", "endEvent")
)

# Define flows (connections between tasks)
flows <- tibble(
  id = c("flow1", "flow2", "flow3", "flow4", "flow5", "flow6", "flow7", "flow8", "flow9", "flow10", "flow11", "flow12"),
  name = c("flow1", "flow2", "flow3", "flow4", "flow5", "flow6", "flow7", "flow8", "flow9", "flow10", "flow11", "flow12"),
  sourceRef = c("start", "communicate", "createPO", "reviewPO", "reviewPO", "approvePO", 
                "obtainInvoice", "downloadPO", "prepareCoC", "createGRN", "processPayment", "processPayment"),
  targetRef = c("communicate", "createPO", "reviewPO", "approvePO", "rejectPO", "obtainInvoice", 
                "downloadPO", "prepareCoC", "createGRN", "processPayment", "spendingOverBudget", "end"),
  objectType = c("sequenceFlow", "sequenceFlow", "sequenceFlow", "sequenceFlow", "sequenceFlow", 
                 "sequenceFlow", "sequenceFlow", "sequenceFlow", "sequenceFlow", 
                 "sequenceFlow", "sequenceFlow", "sequenceFlow")
)

# Create BPMN model
model <- create_bpmn(nodes, flows, events)

# Render the BPMN model
render_bpmn(model)