0

Good afternoon everyone,

Dispite a lot of research on the web I didn't found a solution that meets my need.

I need to find a free tool to modelize process (like BPMN, UML activity diagram) and generate all possible paths/combinations from the diagram.

Do you have any idea what tool can help me do that? Thank you a lot.

Update 1

enter image description here

Royce
  • 1,557
  • 5
  • 19
  • 44

1 Answers1

1

I am not sure that such tool on the shell exists. My advise would be to choose one modelling tool which

  1. supports your modelisation (BPMN, Activity, etc.),
  2. can be extended with a language you are confortable with (Python, Java, C#, etc.).

In this case, you will find several tools for sure. For fun, I picked Modelio (https://www.modelio.org/), made a small activity example, enter image description here and a Jython script for it.

## 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 

Hoping it helps, EBR

Red Beard
  • 3,436
  • 1
  • 14
  • 17
  • Thank a lot. Could you confirmed that the result of the script is : Start - Action - Action 1 - End and Start - Action - Action 2 - End – Royce Feb 12 '20 at 11:55
  • Your solution is very nice and clear. However, I'm facing an error with your script: `AttributeError: 'org.modelio.metamodel.impl.diagrams.ActivityDiagra' object has no attribute 'getOwnedNode' in – Royce Feb 12 '20 at 14:29
  • 1
    The result is is : Start - Action - Action 1 and Start - Action - Action 2 but it can be updated to produce : Start - Action - Action 1 - End and Start - Action - Action 2 - End.. The script has to be launch from an Activity Element and not he diagram. Of course it can be updated to ba launche from one or another.. – Red Beard Feb 12 '20 at 15:44
  • The result is exactly what I'm looking for. Oh ok. I will try to execute it from an Activity Element and I give you my feedback. Thank you. – Royce Feb 12 '20 at 15:48