Using mxcli v0.8.0 with a project based on Studio Pro v10.24.13 I get some faulty MDL code for Microflows in a few cases. The IF on line 10 has not the right ELSE branch before line 26. Might be an issue concerning the MERGE activity. I hope the screenshot gives an idea about what was implemented in Studio Pro here.
create or modify microflow TCUApp.ACT_Deal_SaveAsVRIPipeline (
$Deal: TCUApp.Deal
)
folder 'CUW/Microflows/Deal/Create_Deal_Step2_1'
begin
@position(-100, 60)
log info node getKey(Application.ENUM_LogNode.Deal) 'ACT_Deal_SaveAsVRIPipeline has started for {1} and {2}' with ({1} = $currentUser/Name, {2} = $Deal/EnquiryNumber);
@position(75, 60)
@caption 'Pipeline Checked'
if $Deal/Pipeline = true then
@position(205, 60)
@anchor(true: (to: top))
@caption 'Pipelinedate not choosen'
if $Deal/PipelineDate = empty then
@position(205, 150)
@anchor(from: bottom, to: top)
show message 'You have to select a date before add it to Pipeline' type Information;
@position(205, 250)
@anchor(from: bottom, to: top)
log info node getKey(Application.ENUM_LogNode.Deal) 'ACT_Deal_SaveAsVRIPipeline has ended';
@position(205, 340)
@anchor(to: top)
return;
end if;
@position(525, 60)
change $Deal (Status_CUW = TCUApp.ENUM_Status.VRI, StatusDate = [%CurrentDateTime%], Star_Number = if $Deal/Rating=0 then TCUApp.ENUM_StarNumber.no_star
else
if $Deal/Rating=1 then TCUApp.ENUM_StarNumber.star1
else
if $Deal/Rating=2 then TCUApp.ENUM_StarNumber.star2
else
if $Deal/Rating=3 then TCUApp.ENUM_StarNumber.star3
else
TCUApp.ENUM_StarNumber.no_star
, PipelineDate = if $Deal/PipelineDate!=empty then
addSeconds(
addMinutes(
addHours(
addDaysUTC(
addMonthsUTC(
trimToMonthsUTC($Deal/PipelineDate)
,1)
,-1)
,00)
,00)
,00)
else empty
, HasComment = if $Deal/Comment!=empty then
TCUApp.ENUM_HasComment.yes
else
TCUApp.ENUM_HasComment.no, CommentResume = if $Deal/Comment!=empty then
(
if length(trim($Deal/Comment))>197 then
substring(trim($Deal/Comment),0,197)+'...'
else
trim($Deal/Comment)
)
else
empty, ButtonPipeline = true);
@position(720, 60)
@caption 'We come from Duplication ?'
if $Deal/DuplicatePressed then
@position(899, 60)
close page;
@position(1073, 60)
close page;
@position(1247, 60)
call microflow TCUApp.SUB_Deal_ProcessAndSave(NewDeal = $Deal) on error rollback;
@position(1421, 60)
log info node getKey(Application.ENUM_LogNode.Deal) 'ACT_Deal_SaveAsVRIPipeline has ended';
@position(1545, 60)
return;
else
@position(720, 155)
@anchor(from: bottom, to: top)
call microflow TCUApp.SUB_Deal_ProcessAndSave(NewDeal = $Deal) on error rollback;
@position(720, 250)
@anchor(from: bottom, to: top)
log info node getKey(Application.ENUM_LogNode.Deal) 'ACT_Deal_SaveAsVRIPipeline has ended';
@position(720, 340)
@anchor(to: top)
return;
end if;
end if;
end;
grant execute on microflow TCUApp.ACT_Deal_SaveAsVRIPipeline to TCUApp.Admin, TCUApp.CUW, TCUApp.Business_Admin;
/
ACT_Deal_SaveAsVRIPipeline
│
├─ LOG "started"
│
└─ IF Pipeline = true
├─ IF PipelineDate = empty
│ ├─ SHOW MESSAGE "select a date"
│ └─ RETURN
│
├─ CHANGE $Deal (Status_CUW = VRI, StarNumber, PipelineDate, HasComment, ...)
│
└─ IF DuplicatePressed
├─ TRUE:
│ ├─ CLOSE PAGE
│ ├─ CLOSE PAGE
│ ├─ CALL SUB_Deal_ProcessAndSave ← commits CoverRequest
│ └─ RETURN
│
└─ FALSE:
├─ CALL SUB_Deal_ProcessAndSave ← commits CoverRequest
└─ RETURN
[no else on outer IF — if Pipeline = false: silent exit, no commit]
Using mxcli v0.8.0 with a project based on Studio Pro v10.24.13 I get some faulty MDL code for Microflows in a few cases. The IF on line 10 has not the right ELSE branch before line 26. Might be an issue concerning the MERGE activity. I hope the screenshot gives an idea about what was implemented in Studio Pro here.
This is what Claude Code sees here: