免费工具可从图中生成所有路径

问题描述 投票:0回答:1

大家下午好,

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

我需要找到一个免费的工具来对流程进行建模(例如BPMN,UML活动图),并从该图生成所有可能的路径/组合。

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

更新1

enter image description here

modeling bpmn model-based-testing
1个回答
0
投票

我不确定外壳上是否存在这样的工具。我的建议是选择一种建模工具,然后>

  1. 支持您的建模(BPMN,活动等),
  2. 可以使用您喜欢的语言(Python,Java,C#等)进行扩展。
  3. 在这种情况下,您肯定会找到几种工具。为了娱乐,我选择了Modelio(https://www.modelio.org/),做一个小活动的例子,enter image description here还有一个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

© www.soinside.com 2019 - 2024. All rights reserved.