从图表生成所有路径的免费工具

Free tool to generate all paths from a diagram

大家下午好,

尽管在网上进行了大量研究,但我没有找到满足我需要的解决方案。

我需要找到一个免费工具来建模流程(如 BPMN、UML activity 图)并从图中生成所有可能的 paths/combinations。

你知道什么工具可以帮助我做到这一点吗?非常感谢。

更新 1

我不确定 shell 上是否存在此类工具。我的建议是选择一种建模工具

  1. 支持您的模型化(BPMN、Activity 等),
  2. 可以使用您熟悉的语言(Python、Java、C# 等)进行扩展。

在这种情况下,您肯定会找到几个工具。 为了好玩,我选择了 Modelio (https://www.modelio.org/), 做了一个 activity 的小例子, 和一个 Jython 脚本。

## return first initial node in the selected activity
def getInitialPoint(act):
   for  node in act.getOwnedNode():
      if isinstance(node, InitialNode):
         return node

## parcours activity nodes
def getPaths(currentPath, currentNode): 
  for outgoing in currentNode.getOutgoing():
    node = outgoing.getTarget()
    if isinstance(node, ActivityFinalNode):
       paths.append(currentPath)
       return;
    elif  isinstance(node, DecisionMergeNode):
       getPaths(currentPath, node)  
    else:           
       getPaths(currentPath + " - "  + node.getName(), node) 

 ##Init
 init = getInitialPoint(elt)
 currentPath = init.getName()
 global paths
 paths = []
 getPaths(currentPath, init)

 ##Print founded paths
 for p in paths:
   print p 

希望对您有所帮助, EBR