if (((StartEvent) flowElement).getOutgoing().size() == 1) {
SequenceFlow sequenceFlow = (((StartEvent) flowElement).getOutgoing()).get(0);
if (sequenceFlow.getTargetRef() instanceof UserTask) {
UserTask userTask = (UserTask) sequenceFlow.getTargetRef();
for (ExtensionAttributeValue extensionAttributeValue : userTask.getExtensionValues()) {
FeatureMap extensionElements = extensionAttributeValue.getValue();
for (Entry entry : extensionElements) {
if (entry.getValue() instanceof TaskCommand) {
TaskCommand taskCommand = (TaskCommand) entry.getValue();
taskCommands.add(taskCommand);
}