if(scenario.getElementParameters() != null) {
for(ElementParameters eleType : scenario.getElementParameters()) {
if(eleType.getElementRef().equals(nodeId)) {
if(eleType.getControlParameters() != null && eleType.getControlParameters().getProbability() != null) {
FlowElement element = null;
for (RootElement root : def.getRootElements()) {
if (root instanceof Process) {
element = findElementInContainer((FlowElementsContainer) root, nodeId);
if (element != null && element instanceof SequenceFlow) {
element = ((SequenceFlow)element).getSourceRef();