process_uml_bvalue(rec(Fields),OperationTerm,DefName,Pos,Stream) :-
(select(field(from,ActorFrom),Fields,Fields1)
-> translate_bvalue(ActorFrom,AF)
; add_message(uml_generator,'Record in definition has no \'from\' field: ',DefName,Pos),
AF = '??', Fields1=Fields),
(select(field(to,ActorTo),Fields1,Fields2) -> translate_bvalue(ActorTo,AT)
; add_message(uml_generator,'Record in definition has no \'to\' field: ',DefName,Pos),
AT=AF, Fields2=Fields1),
(member(field(arrow,string(ArrowStyle)),Fields2)
-> (valid_plant_uml_arrow_style(ArrowStyle,Pos) -> true
; add_message(uml_generator,'Unrecognised arrow field: ',ArrowStyle,Pos)
)
; ArrowStyle='-->'),
(member(field(suffix,SuffixVal),Fields2)
-> to_b_string(SuffixVal,string(StrSuffix)),
check_valid_plant_uml_arrow_suffix(StrSuffix,Suffix,Pos)
; Suffix=''),
translate_event_with_limit(OperationTerm,100,TS), !,
format(Stream,'~w ~w ~w ~w : ~w~n',[AF,ArrowStyle,AT, Suffix,TS]).
process_uml_bvalue((From,ActorTo),OperationTerm,_,Pos,Stream) :-
get_arrow_style(From,ActorFrom,ArrowStyle,Suffix,Pos),
translate_bvalue(ActorFrom,AF), translate_bvalue(ActorTo,AT),
translate_event_with_limit(OperationTerm,100,TS), !,
format(Stream,'~w ~w ~w ~w : ~w~n',[AF,ArrowStyle,AT, Suffix,TS]).
process_uml_bvalue(string(''),_,_,_,_Stream) :- !. % ignore this event
process_uml_bvalue(string(Str),_,_,_,Stream) :-
!,
format(Stream, '~w~n', [Str]). % raw print, user has specified the whole line
process_uml_bvalue(Value,_,_DefName,Pos,_) :-
add_warning(write_uml_sequence_chart,'Unexpected value for UML sequence chart: ',Value,Pos),
fail.