@@ -77,7 +77,7 @@ func (converter BpmnConverter) Convert(input []byte, filename string) (*cacao.Pl
7777 return nil , err
7878 }
7979 if len (definitions .Processes ) > 1 {
80- return nil , errors .New ("Unsupported : BPMN file with multiple processes" )
80+ return nil , errors .New ("unsupported : BPMN file with multiple processes" )
8181 }
8282 if len (definitions .Processes ) == 0 {
8383 return nil , errors .New ("BPMN file does not have any processes" )
@@ -249,9 +249,9 @@ func (p *BpmnProcess) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error
249249 }
250250 p .annotations = append (p .annotations , * annotation )
251251 case "intermediateThrowEvent" , "intermediateCatchEvent" :
252- return fmt .Errorf ("Throw /catch mechanism is currently not implemented in SOARCA" )
252+ return fmt .Errorf ("throw /catch mechanism is currently not implemented in SOARCA" )
253253 default :
254- return fmt .Errorf ("Unsupported element: %s" , item_type .Name .Local )
254+ return fmt .Errorf ("unsupported element: %s" , item_type .Name .Local )
255255 }
256256 case xml.EndElement :
257257 if item_type .Name == start_name {
@@ -313,12 +313,12 @@ func (flow BpmnFlow) implement(playbook *cacao.Playbook, converter *BpmnConverte
313313func (flow BpmnFlow ) implement_association (playbook * cacao.Playbook , converter * BpmnConverter ) error {
314314 source_name , ok := converter .translation [flow .SourceRef ]
315315 if ! ok {
316- return fmt .Errorf ("Could not translate source of flow: %s" , flow .SourceRef )
316+ return fmt .Errorf ("could not translate source of flow: %s" , flow .SourceRef )
317317 }
318318 source := playbook .Workflow [source_name ]
319319 target_index := slices .IndexFunc (converter .process .annotations , func (annot BpmnAnnotation ) bool { return annot .Id == flow .TargetRef })
320320 if target_index < 0 {
321- return fmt .Errorf ("Could not find text annotation %s" , flow .TargetRef )
321+ return fmt .Errorf ("could not find text annotation %s" , flow .TargetRef )
322322 }
323323 target := converter .process .annotations [target_index ]
324324 source .Condition = target .Text
@@ -328,16 +328,16 @@ func (flow BpmnFlow) implement_association(playbook *cacao.Playbook, converter *
328328func (flow BpmnFlow ) implement_flow (playbook * cacao.Playbook , converter * BpmnConverter ) error {
329329 source_name , ok := converter .translation [flow .SourceRef ]
330330 if ! ok {
331- return fmt .Errorf ("Could not translate source of flow: %s" , flow .SourceRef )
331+ return fmt .Errorf ("could not translate source of flow: %s" , flow .SourceRef )
332332 }
333333 target_name , ok := converter .translation [flow .TargetRef ]
334334 if ! ok {
335- return fmt .Errorf ("Could not translate target of flow: %s" , flow .TargetRef )
335+ return fmt .Errorf ("could not translate target of flow: %s" , flow .TargetRef )
336336 }
337337 log .Infof ("Flow from %s(%s) to %s(%s)" , source_name , flow .SourceRef , target_name , flow .TargetRef )
338338 entry , ok := playbook .Workflow [source_name ]
339339 if ! ok {
340- return fmt .Errorf ("Could not get source of flow: %s" , source_name )
340+ return fmt .Errorf ("could not get source of flow: %s" , source_name )
341341 }
342342 switch entry .Type {
343343 case cacao .StepTypeIfCondition :
@@ -353,7 +353,7 @@ func (flow BpmnFlow) implement_flow(playbook *cacao.Playbook, converter *BpmnCon
353353 } else if entry .OnFalse == "" {
354354 entry .OnTrue = target_name
355355 } else {
356- return fmt .Errorf ("Branch out of exclusive gateway with more than two branches: not supported" )
356+ return fmt .Errorf ("branch out of exclusive gateway with more than two branches: not supported" )
357357 }
358358 }
359359 case cacao .StepTypeParallel :
0 commit comments