How to generate the process documentation?

1
0
-1

The system documentation (http://documentation.bonitasoft.com/?page=generate-process-documentation...) refer a "Menu bar > Process" that I should access to Generate Documentation, but my Bonita BPM Studio does not have a Process Menu or Submenu.
Have you ever been succeeded in generating a model/process documentation? How? Where?
Thanks.

Luciano Gomes

2 answers

1
0
-1

Ok, but the documentation does not explain that restriction. :(

I just know Community and Subscription versions. I had never heard about Performance, Efficiency and Teamwork versions. The documentation does not tell about them as well.

Finally, I will try the solution you pointed me. After, if it work, I come back here and mark as resolved.

Thanks a lot.

Comments

Submitted by Sean McP on Fri, 04/21/2017 - 04:15

The documentation does explain the distinction here :

Editions
Bonita BPM is provided in four different editions: Community, Teamwork, Efficiency, Performance.

Admittedly it's not clear but it is there...also from the sales point of view there is a section on the differences here on the main Bonitasoft site.

To help you along...here is some code I provided for another issue:

  1. import java.util.List;
  2. import java.util.logging.Logger;
  3. import java.lang.StringBuilder;
  4.  
  5. import org.bonitasoft.engine.api.ProcessAPI
  6. import org.bonitasoft.engine.bpm.businessdata.BusinessDataDefinition
  7. import org.bonitasoft.engine.bpm.connector.ConnectorDefinition
  8. import org.bonitasoft.engine.bpm.data.DataDefinition
  9. import org.bonitasoft.engine.bpm.document.DocumentDefinition
  10. import org.bonitasoft.engine.bpm.flownode.ActivityDefinition
  11. import org.bonitasoft.engine.bpm.flownode.EndEventDefinition
  12. import org.bonitasoft.engine.bpm.flownode.FlowElementContainerDefinition
  13. import org.bonitasoft.engine.bpm.flownode.GatewayDefinition
  14. import org.bonitasoft.engine.bpm.flownode.IntermediateCatchEventDefinition
  15. import org.bonitasoft.engine.bpm.flownode.IntermediateThrowEventDefinition
  16. import org.bonitasoft.engine.bpm.flownode.StartEventDefinition
  17. import org.bonitasoft.engine.bpm.flownode.TransitionDefinition
  18. import org.bonitasoft.engine.bpm.process.DesignProcessDefinition
  19. import org.bonitasoft.engine.bpm.process.ProcessDeploymentInfo
  20. import org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoCriterion;
  21. import org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoSearchDescriptor;
  22. import org.bonitasoft.engine.bpm.process.ProcessInstance;
  23. import org.bonitasoft.engine.bpm.process.ProcessInstanceSearchDescriptor;
  24. import org.bonitasoft.engine.bpm.process.ProcessInstanceState;
  25.  
  26. int dI = 0;
  27. boolean debug = true;
  28. StringBuilder logWrite = new StringBuilder();
  29. StringBuilder flowChartJS1 = new StringBuilder();
  30. Logger logger = Logger.getLogger("org.bonitasoft");
  31.  
  32. ProcessAPI processAPI = apiAccessor.getProcessAPI();
  33. //set the name of the routine
  34. String processName =processAPI.getProcessInstance(processInstanceId).getName();
  35. logWrite.append("\n\nProcess Name: "+ processName);
  36. logWrite.append("\nprocessInstanceId: "+ processInstanceId.toString());
  37. logWrite.append("\nprocessDefinitionId: "+ processDefinitionId.toString());
  38.  
  39. logWrite.append("\nactivityInstanceId: "+ activityInstanceId.toString());
  40. logWrite.append("\ntaskAssigneeId: "+ taskAssigneeId.toString());
  41. logWrite.append("\nrootProcessInstanceId: "+ rootProcessInstanceId.toString());
  42. logWrite.append("\n\t" + dI++ + " Trace Start");
  43.  
  44.  
  45. //TODO - Code goes in here - START
  46. DesignProcessDefinition resultDesignProcessDefinition = processAPI.getDesignProcessDefinition(processDefinitionId);
  47. FlowElementContainerDefinition flowElementContainer = resultDesignProcessDefinition.getFlowElementContainer();
  48.  
  49. //Start
  50. List<StartEventDefinition> startEvents = flowElementContainer.getStartEvents();
  51. for(StartEventDefinition q : startEvents){
  52.  
  53. flowChartJS1.append(q.getId().toString()+"=>start: "+q.getName().toString()+"\n");
  54.  
  55. //logWrite.append("\n\t\t" + dI++ + " startEvents = " + q.toString());
  56. logWrite.append("\n\t\t" + dI++ + " startEvents Name = " + q.getName().toString());
  57. logWrite.append("\n\t\t" + dI++ + " startEvents Id = " + q.getId().toString());
  58. logWrite.append("\n\t\t" + dI++ + " startEvents IncomingTransitions= " + String.valueOf(q.getIncomingTransitions()));
  59. logWrite.append("\n\t\t" + dI++ + " startEvents OutgoingTransitions= " + String.valueOf(q.getOutgoingTransitions()));
  60. logWrite.append("\n");
  61. }
  62.  
  63. //flowchart.js
  64. //End
  65. List<EndEventDefinition> endEvents = flowElementContainer.getEndEvents();
  66. logWrite.append("\n\n\t" + dI++ + " 7 endEvents");
  67. for(EndEventDefinition q : endEvents){
  68.  
  69. flowChartJS1.append(q.getId().toString()+"=>end: "+q.getName().toString()+"\n");
  70.  
  71. // logWrite.append("\n\t\t" + dI++ + " endEvents = " + q.toString());
  72. logWrite.append("\n\t\t" + dI++ + " endEvents Name = " + q.getName().toString());
  73. logWrite.append("\n\t\t" + dI++ + " endEvents Id = " + q.getId().toString());
  74. logWrite.append("\n\t\t" + dI++ + " endEvents IncomingTransitions= " + String.valueOf(q.getIncomingTransitions()));
  75. logWrite.append("\n\t\t" + dI++ + " endEvents OutgoingTransitions= " + String.valueOf(q.getOutgoingTransitions()));
  76. logWrite.append("\n");
  77. }
  78.  
  79. //Activities
  80. List<ActivityDefinition> processActivities = flowElementContainer.getActivities();
  81. for(ActivityDefinition q : processActivities){
  82.  
  83. flowChartJS1.append(q.getId().toString()+"=>operation: "+q.getName().toString()+"\n");
  84.  
  85. // logWrite.append("\n\t\t" + dI++ + " processActivities = " + q.toString());
  86. logWrite.append("\n\t\t" + dI++ + " processActivities Name = " + q.getName().toString());
  87. logWrite.append("\n\t\t" + dI++ + " processActivities Id = " + q.getId().toString());
  88. logWrite.append("\n\t\t" + dI++ + " processActivities Condition = " + q.getDefaultTransition().toString());// .getCondition().toString());
  89. logWrite.append("\n\t\t" + dI++ + " processActivities IncomingTransitions= " + q.getIncomingTransitions().toString());
  90. logWrite.append("\n\t\t" + dI++ + " processActivities LoopCharacteristics= " + q.getLoopCharacteristics().toString());
  91. logWrite.append("\n\t\t" + dI++ + " processActivities OutgoingTransitions= " + q.getOutgoingTransitions().toString());
  92. logWrite.append("\n\t\t" + dI++ + " processActivities Operations = " + q.getOperations().toString());
  93. logWrite.append("\n");
  94. }
  95.  
  96. //flowchart.js
  97. //Conditions
  98. List<GatewayDefinition> gatewaysList = flowElementContainer.getGatewaysList();
  99. for(GatewayDefinition q : gatewaysList){
  100.  
  101. flowChartJS1.append(q.getId().toString()+"=>condition: "+q.getName().toString()+"\n");
  102.  
  103. //logWrite.append("\n\t\t" + dI++ + " gatewaysList = " + q.toString());
  104. logWrite.append("\n\t\t" + dI++ + " gatewaysList Name = " + q.getName().toString());
  105. logWrite.append("\n\t\t" + dI++ + " gatewaysList Id = " + q.getId().toString());
  106. logWrite.append("\n\t\t" + dI++ + " gatewaysList GatewayType = " + q.getGatewayType().toString());
  107. logWrite.append("\n\t\t" + dI++ + " gatewaysList IncomingTransitions = " + q.getIncomingTransitions().toString());
  108. logWrite.append("\n\t\t" + dI++ + " gatewaysList getOutgoingTransitions= " + q.getOutgoingTransitions().toString());
  109. logWrite.append("\n");
  110. }
  111.  
  112. //flowchart.js
  113. //Transitions
  114. Set<TransitionDefinition> transitions = flowElementContainer.getTransitions();
  115. for(TransitionDefinition q : transitions){
  116.  
  117. flowChartJS1.append(q.getSource().toString()+"->"+q.getTarget().toString()+"\n");
  118.  
  119. //logWrite.append("\n\t\t" + dI++ + " transitions = " + q.toString());
  120. logWrite.append("\n\t\t" + dI++ + " transitions Source = " + q.getSource().toString());
  121. logWrite.append("\n\t\t" + dI++ + " transitions SourceFlowNode = " + q.getSourceFlowNode().getName().toString());
  122. logWrite.append("\n\t\t" + dI++ + " transitions Target = " + q.getTarget().toString());
  123. logWrite.append("\n\t\t" + dI++ + " transitions TargetFlowNode = " + q.getTargetFlowNode().getName().toString());
  124. logWrite.append("\n\t\t" + dI++ + " transitions Condition = " + q.getCondition().toString());
  125. logWrite.append("\n");
  126. }
  127.  
  128. //TODO - Code goes in here - END
  129.  
  130. logWrite.append("\n\t" + dI++ + " Trace End");
  131. logWrite.append("\n\n");
  132. if(debug){logger.severe(logWrite.toString())}
  133.  
  134. logger.severe("\n\n"+flowChartJS1.toString()+"\n\n");

To use it:

  1. Open a diagram (existing works best with multiple steps)
  2. On the first Step (not the pool or lane) add a script connector
  3. copy and paste the code
  4. execute the process
  5. look at the log (Help->Bonita BPM Engine Log)

There you will see the Start and End, Tasks, Gateways and Transitions

Please refer the the Javadoc for other capabilities of the DesignProcessDefinition API

regards
Seán

1
0
-1

You've missed the great big bit at the front that says:

Generate process documentation
Note: For Bonita BPM Performance, Efficiency, and Teamwork editions only.

So if using community this is not available. You could write your own via APIs using DesignProcessDefinition though.

regards
Seán

PS: While you may not like the answer, it gives a possible solution, please mark as resolved.

Testing
Notifications