forked from microsoft/BotFramework-Composer
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add new actions in samples (microsoft#2559)
* Add foreach break and continue sample * Add Goto action * Add test cases * ContinueLoop / BreakLoop * Adds continue and break to looping Co-authored-by: zeye <[email protected]> Co-authored-by: Chris Whitten <[email protected]>
- Loading branch information
1 parent
5096a30
commit d9effa0
Showing
16 changed files
with
349 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
166 changes: 166 additions & 0 deletions
166
...ersationFlowSample/dialogs/foreachwithbreakandcontinue/foreachwithbreakandcontinue.dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{ | ||
"$kind": "Microsoft.AdaptiveDialog", | ||
"$designer": { | ||
"id": "zzWd0o", | ||
"name": "foreachwithbreakandcontinue" | ||
}, | ||
"autoEndDialog": "true", | ||
"defaultResultProperty": "dialog.result", | ||
"triggers": [ | ||
{ | ||
"$kind": "Microsoft.OnBeginDialog", | ||
"$designer": { | ||
"name": "BeginDialog", | ||
"id": "GrXVDj" | ||
}, | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.SetProperty", | ||
"property": "dialog.todo", | ||
"value": "=[]", | ||
"$designer": { | ||
"id": "eAGDyE" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.EditArray", | ||
"itemsProperty": "dialog.todo", | ||
"changeType": "push", | ||
"value": "=1", | ||
"$designer": { | ||
"id": "tb79kV" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.EditArray", | ||
"itemsProperty": "dialog.todo", | ||
"changeType": "push", | ||
"value": "=2", | ||
"$designer": { | ||
"id": "8HLtUh" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.EditArray", | ||
"itemsProperty": "dialog.todo", | ||
"changeType": "push", | ||
"value": "=3", | ||
"$designer": { | ||
"id": "b-Ce3D" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.EditArray", | ||
"itemsProperty": "dialog.todo", | ||
"changeType": "push", | ||
"value": "=4", | ||
"$designer": { | ||
"id": "bcQTV2" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.EditArray", | ||
"itemsProperty": "dialog.todo", | ||
"changeType": "push", | ||
"value": "=5", | ||
"$designer": { | ||
"id": "YbcSpP" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.EditArray", | ||
"itemsProperty": "dialog.todo", | ||
"changeType": "push", | ||
"value": "=6", | ||
"$designer": { | ||
"id": "vjA4WI" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "MLnfkV" | ||
}, | ||
"activity": "${bfdactivity-MLnfkV()}" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Foreach", | ||
"$designer": { | ||
"id": "IP5LgI" | ||
}, | ||
"itemsProperty": "dialog.todo", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.IfCondition", | ||
"condition": "(dialog.foreach.value % 2) == 1", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.ContinueLoop", | ||
"$designer": { | ||
"id": "9eRMEs" | ||
} | ||
} | ||
], | ||
"$designer": { | ||
"id": "gqgGZZ" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "_aqYPi" | ||
}, | ||
"activity": "${bfdactivity-_aqYPi()}" | ||
} | ||
] | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "49S9ax" | ||
}, | ||
"activity": "${bfdactivity-49S9ax()}" | ||
}, | ||
{ | ||
"$kind": "Microsoft.Foreach", | ||
"itemsProperty": "dialog.todo", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.IfCondition", | ||
"condition": "dialog.foreach.index > 2", | ||
"actions": [ | ||
{ | ||
"$kind": "Microsoft.BreakLoop", | ||
"$designer": { | ||
"id": "fH83G4" | ||
} | ||
} | ||
], | ||
"$designer": { | ||
"id": "d4Q17s" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "Jz-Jjl" | ||
}, | ||
"activity": "${bfdactivity-Jz-Jjl()}" | ||
} | ||
], | ||
"$designer": { | ||
"id": "UvAKgW" | ||
} | ||
}, | ||
{ | ||
"$kind": "Microsoft.SendActivity", | ||
"$designer": { | ||
"id": "8JDxhd" | ||
}, | ||
"activity": "${bfdactivity-8JDxhd()}" | ||
} | ||
] | ||
} | ||
], | ||
"generator": "foreachwithbreakandcontinue.lg" | ||
} |
16 changes: 16 additions & 0 deletions
16
...oreachwithbreakandcontinue/language-generation/en-us/foreachwithbreakandcontinue.en-us.lg
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
[import](common.lg) | ||
|
||
|
||
# bfdactivity-MLnfkV() | ||
- In continue loop, which only outputs dual. | ||
# bfdactivity-8JDxhd() | ||
- done | ||
|
||
# bfdactivity-49S9ax() | ||
- In break loop, which breaks when index > 2 | ||
|
||
|
||
# bfdactivity-_aqYPi() | ||
- index: ${dialog.foreach.index} value: ${dialog.foreach.value} | ||
# bfdactivity-Jz-Jjl() | ||
- index: ${dialog.foreach.index} value: ${dialog.foreach.value} |
Empty file.
Oops, something went wrong.