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:
import java.util.List;
import java.util.logging.Logger;
import java.lang.StringBuilder;
import org.bonitasoft.engine.api.ProcessAPI
import org.bonitasoft.engine.bpm.businessdata.BusinessDataDefinition
import org.bonitasoft.engine.bpm.connector.ConnectorDefinition
import org.bonitasoft.engine.bpm.data.DataDefinition
import org.bonitasoft.engine.bpm.document.DocumentDefinition
import org.bonitasoft.engine.bpm.flownode.ActivityDefinition
import org.bonitasoft.engine.bpm.flownode.EndEventDefinition
import org.bonitasoft.engine.bpm.flownode.FlowElementContainerDefinition
import org.bonitasoft.engine.bpm.flownode.GatewayDefinition
import org.bonitasoft.engine.bpm.flownode.IntermediateCatchEventDefinition
import org.bonitasoft.engine.bpm.flownode.IntermediateThrowEventDefinition
import org.bonitasoft.engine.bpm.flownode.StartEventDefinition
import org.bonitasoft.engine.bpm.flownode.TransitionDefinition
import org.bonitasoft.engine.bpm.process.DesignProcessDefinition
import org.bonitasoft.engine.bpm.process.ProcessDeploymentInfo
import org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoCriterion;
import org.bonitasoft.engine.bpm.process.ProcessDeploymentInfoSearchDescriptor;
import org.bonitasoft.engine.bpm.process.ProcessInstance;
import org.bonitasoft.engine.bpm.process.ProcessInstanceSearchDescriptor;
import org.bonitasoft.engine.bpm.process.ProcessInstanceState;
int dI = 0;
boolean debug = true;
StringBuilder logWrite = new StringBuilder();
StringBuilder flowChartJS1 = new StringBuilder();
Logger logger = Logger.getLogger(“org.bonitasoft”);
ProcessAPI processAPI = apiAccessor.getProcessAPI();
//set the name of the routine
String processName =processAPI.getProcessInstance(processInstanceId).getName();
logWrite.append("\n\nProcess Name: “+ processName);
logWrite.append(”\nprocessInstanceId: “+ processInstanceId.toString());
logWrite.append(”\nprocessDefinitionId: "+ processDefinitionId.toString());
logWrite.append(“\nactivityInstanceId: “+ activityInstanceId.toString());
logWrite.append(”\ntaskAssigneeId: “+ taskAssigneeId.toString());
logWrite.append(”\nrootProcessInstanceId: “+ rootProcessInstanceId.toString());
logWrite.append(”\n\t” + dI++ + " Trace Start");
//TODO - Code goes in here - START
DesignProcessDefinition resultDesignProcessDefinition = processAPI.getDesignProcessDefinition(processDefinitionId);
FlowElementContainerDefinition flowElementContainer = resultDesignProcessDefinition.getFlowElementContainer();
//Start
List startEvents = flowElementContainer.getStartEvents();
for(StartEventDefinition q : startEvents){
flowChartJS1.append(q.getId().toString()+"=>start: "+q.getName().toString()+"\n");
//logWrite.append("\n\t\t" + dI++ + " startEvents = " + q.toString());
logWrite.append("\n\t\t" + dI++ + " startEvents Name = " + q.getName().toString());
logWrite.append("\n\t\t" + dI++ + " startEvents Id = " + q.getId().toString());
logWrite.append("\n\t\t" + dI++ + " startEvents IncomingTransitions= " + String.valueOf(q.getIncomingTransitions()));
logWrite.append("\n\t\t" + dI++ + " startEvents OutgoingTransitions= " + String.valueOf(q.getOutgoingTransitions()));
logWrite.append("\n");
}
//flowchart.js
//End
List endEvents = flowElementContainer.getEndEvents();
logWrite.append(“\n\n\t” + dI++ + " 7 endEvents");
for(EndEventDefinition q : endEvents){
flowChartJS1.append(q.getId().toString()+"=>end: "+q.getName().toString()+"\n");
// logWrite.append(“\n\t\t” + dI++ + " endEvents = " + q.toString());
logWrite.append(“\n\t\t” + dI++ + " endEvents Name = " + q.getName().toString());
logWrite.append(“\n\t\t” + dI++ + " endEvents Id = " + q.getId().toString());
logWrite.append(“\n\t\t” + dI++ + " endEvents IncomingTransitions= " + String.valueOf(q.getIncomingTransitions()));
logWrite.append(“\n\t\t” + dI++ + " endEvents OutgoingTransitions= " + String.valueOf(q.getOutgoingTransitions()));
logWrite.append(“\n”);
}
//Activities
List processActivities = flowElementContainer.getActivities();
for(ActivityDefinition q : processActivities){
flowChartJS1.append(q.getId().toString()+"=>operation: "+q.getName().toString()+"\n");
// logWrite.append(“\n\t\t” + dI++ + " processActivities = " + q.toString());
logWrite.append(“\n\t\t” + dI++ + " processActivities Name = " + q.getName().toString());
logWrite.append(“\n\t\t” + dI++ + " processActivities Id = " + q.getId().toString());
logWrite.append(“\n\t\t” + dI++ + " processActivities Condition = " + q.getDefaultTransition().toString());// .getCondition().toString());
logWrite.append(“\n\t\t” + dI++ + " processActivities IncomingTransitions= " + q.getIncomingTransitions().toString());
logWrite.append(“\n\t\t” + dI++ + " processActivities LoopCharacteristics= " + q.getLoopCharacteristics().toString());
logWrite.append(“\n\t\t” + dI++ + " processActivities OutgoingTransitions= " + q.getOutgoingTransitions().toString());
logWrite.append(“\n\t\t” + dI++ + " processActivities Operations = " + q.getOperations().toString());
logWrite.append(“\n”);
}
//flowchart.js
//Conditions
List gatewaysList = flowElementContainer.getGatewaysList();
for(GatewayDefinition q : gatewaysList){
flowChartJS1.append(q.getId().toString()+"=>condition: "+q.getName().toString()+"\n");
//logWrite.append("\n\t\t" + dI++ + " gatewaysList = " + q.toString());
logWrite.append("\n\t\t" + dI++ + " gatewaysList Name = " + q.getName().toString());
logWrite.append("\n\t\t" + dI++ + " gatewaysList Id = " + q.getId().toString());
logWrite.append("\n\t\t" + dI++ + " gatewaysList GatewayType = " + q.getGatewayType().toString());
logWrite.append("\n\t\t" + dI++ + " gatewaysList IncomingTransitions = " + q.getIncomingTransitions().toString());
logWrite.append("\n\t\t" + dI++ + " gatewaysList getOutgoingTransitions= " + q.getOutgoingTransitions().toString());
logWrite.append("\n");
}
//flowchart.js
//Transitions
Set transitions = flowElementContainer.getTransitions();
for(TransitionDefinition q : transitions){
flowChartJS1.append(q.getSource().toString()+"->"+q.getTarget().toString()+"\n");
//logWrite.append("\n\t\t" + dI++ + " transitions = " + q.toString());
logWrite.append("\n\t\t" + dI++ + " transitions Source = " + q.getSource().toString());
logWrite.append("\n\t\t" + dI++ + " transitions SourceFlowNode = " + q.getSourceFlowNode().getName().toString());
logWrite.append("\n\t\t" + dI++ + " transitions Target = " + q.getTarget().toString());
logWrite.append("\n\t\t" + dI++ + " transitions TargetFlowNode = " + q.getTargetFlowNode().getName().toString());
logWrite.append("\n\t\t" + dI++ + " transitions Condition = " + q.getCondition().toString());
logWrite.append("\n");
}
//TODO - Code goes in here - END
logWrite.append(“\n\t” + dI++ + " Trace End");
logWrite.append(“\n\n”);
if(debug){logger.severe(logWrite.toString())}
logger.severe(“\n\n”+flowChartJS1.toString()+“\n\n”);
To use it:
- Open a diagram (existing works best with multiple steps)
- On the first Step (not the pool or lane) add a script connector
- copy and paste the code
- execute the process
- 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