Replies: 3 comments 2 replies
-
Re 1 - we don't have any programmatic support for ASTs (although it is definitely something we're interested in). |
Beta Was this translation helpful? Give feedback.
-
Also - re AddTime, etc.... PowerFx has a DateAdd() method. |
Beta Was this translation helpful? Give feedback.
-
Sharing my attempt at the same thing: Interesting to read the conversation above having figured out some of this out independently. Parsing the XAML is quite straightforward using the The hairy bit currently is the VB expressions that are embedded. I could not figure out how to successfully parse those despite the above libraries supporting it on paper. So currently, those bits are just parsing out specifics with regex/split/etc. |
Beta Was this translation helpful? Give feedback.
-
I am experimenting with the possibility of creating a utility to convert simple classic workflows to Power Fx suitable for use in low code plugins. Starting from a point of total ignorance I have:
Power-Fx/src/libraries/Microsoft.PowerFx.Core/Parser/TexlParser.cs
Line 599 in caa821f
I think the next steps are to:
Is this a sane approach? Are there any thoughts on the approach, or things that should be done differently?
The following nodes in XAML WF need to be converted:
Coalesce()
+ - / *
Concatenate()
DateAdd()
DateAdd()
DateDiff()
TrimEnds()
Lookup()
, could be dot notationIf()
statementIf(conditionexpr, thenstatement, ..., defaultstatement)
Patch()
when creating a new entity for anySetAttributeValue
Set()
when updating the current record otherwise maps toPatch()
. Uses in memory values set by SetEntityPropertyWith()
Set(Owner, xxx)
orPatch(table, createdrecord, { Owner: xxx})
if(not(condition), XXX)
. Also need to roll-back any earlier CreateEntity/UpdateEntity if termination is 'Cancelled' instead of 'Successful'. UseError()
if termination is 'Cancelled' to expose message to user. Probably the most difficult to handle??Value()
orText()
Patch(email, { contents})
Beta Was this translation helpful? Give feedback.
All reactions