Skip to content

Commit

Permalink
Export microflows correctly. ExclusiveMerges are considered to be ter…
Browse files Browse the repository at this point in the history
…minal if not main branch
  • Loading branch information
xiwenc committed Sep 1, 2024
1 parent 7335aeb commit 84f65fb
Show file tree
Hide file tree
Showing 26 changed files with 2,135 additions and 1,153 deletions.
10 changes: 10 additions & 0 deletions docs/microflow-transformation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
## Microflow Transformation

This document outlines the thought process and approach on how to transform a program (or function if you want) from a graph like format to as-linear-as-possible textual representation.

### Mendix Microflows are not DAG's

Mendix Microflows are in abstract form a graph structure. For those warry of graph-theory, at first sight most graphs are Directed Acyclic Graph (DAG). Because there is a starting point and multiple end states. There is a minor detail: it's possible to create loops using `Exclusive Split` and `Exclusive Merge` actions. These are comparable to defining `labels` and `goto` in more classical programming languages.


### Goto
Original file line number Diff line number Diff line change
Expand Up @@ -13,131 +13,205 @@ ConcurrenyErrorMessage:
Documentation: ""
Excluded: false
ExportLevel: Hidden
MarkAsUsed: false
MicroflowActionInfo: null
MicroflowReturnType:
$Type: DataTypes$VoidType
Name: ChangePassword
ObjectCollection:
$Type: Microflows$MicroflowObjectCollection
Objects:
- $Type: Microflows$ExclusiveSplit
MainFunction:
- Attributes:
$Type: Microflows$StartEvent
ID: oaCvx6V+Ek6apqPCdgdhTg==
- Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$NoCase
ID: Lewhp/mtY0WRM2GGMZgjnw==
- Attributes:
$Type: Microflows$ExclusiveSplit
Caption: Passwords equal?
Documentation: ""
ErrorHandlingType: Rollback
SplitCondition:
$Type: Microflows$ExpressionSplitCondition
Expression: $AccountPasswordData/NewPassword = $AccountPasswordData/ConfirmPassword
- $Type: Microflows$ActionActivity
Action:
$Type: Microflows$ShowMessageAction
Blocking: true
ErrorHandlingType: Rollback
Template:
$Type: Microflows$TextTemplate
Parameters: null
Text:
$Type: Texts$Text
Items:
- $Type: Texts$Translation
LanguageCode: en_US
Text: The new passwords do not match.
- $Type: Texts$Translation
LanguageCode: nl_NL
Text: De nieuwe wachtwoorden komen niet overeen.
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
- $Type: Microflows$EndEvent
Documentation: ""
ReturnValue: ""
- $Type: Microflows$StartEvent
- $Type: Microflows$ActionActivity
Action:
$Type: Microflows$CloseFormAction
ErrorHandlingType: Rollback
NumberOfPagesToClose: ""
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
- $Type: Microflows$EndEvent
Documentation: ""
ReturnValue: ""
- $Type: Microflows$ActionActivity
Action:
$Type: Microflows$ChangeAction
ChangeVariableName: Account
Commit: "Yes"
ErrorHandlingType: Rollback
Items:
- $Type: Microflows$ChangeActionItem
Association: ""
Attribute: System.User.Password
Value: $AccountPasswordData/NewPassword
RefreshInClient: true
AutoGenerateCaption: false
BackgroundColor: Default
Caption: Save password
Disabled: false
Documentation: ""
- $Type: Microflows$ActionActivity
Action:
$Type: Microflows$ShowMessageAction
Blocking: true
ErrorHandlingType: Rollback
Template:
$Type: Microflows$TextTemplate
Parameters: null
Text:
$Type: Texts$Text
ID: ph7wLkpjbk+2RSBbHzQvdA==
Splits:
- - Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$EnumerationCase
Value: "true"
ID: +ce5i0zICkmSNSAPQMG/fQ==
- Attributes:
$Type: Microflows$ActionActivity
Action:
$Type: Microflows$RetrieveAction
ErrorHandlingType: Rollback
ResultVariableName: Account
RetrieveSource:
$Type: Microflows$AssociationRetrieveSource
AssociationId: Administration.AccountPasswordData_Account
StartVariableName: AccountPasswordData
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
ID: IDhDyYLwuUKMHOGXHkASyA==
- Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$NoCase
ID: gSuUaJ2ee02dy1kavS1yzg==
- Attributes:
$Type: Microflows$ActionActivity
Action:
$Type: Microflows$ChangeAction
ChangeVariableName: Account
Commit: "Yes"
ErrorHandlingType: Rollback
Items:
- $Type: Texts$Translation
LanguageCode: en_US
Text: The password has been updated.
- $Type: Texts$Translation
LanguageCode: nl_NL
Text: Het wachtwoord is aangepast.
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
- $Type: Microflows$MicroflowParameter
Documentation: ""
HasVariableNameBeenChanged: false
Name: AccountPasswordData
VariableType:
$Type: DataTypes$ObjectType
Entity: Administration.AccountPasswordData
- $Type: Microflows$ActionActivity
Action:
$Type: Microflows$DeleteAction
DeleteVariableName: AccountPasswordData
ErrorHandlingType: Rollback
RefreshInClient: false
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
- $Type: Microflows$ActionActivity
Action:
$Type: Microflows$RetrieveAction
ErrorHandlingType: Rollback
ResultVariableName: Account
RetrieveSource:
$Type: Microflows$AssociationRetrieveSource
AssociationId: Administration.AccountPasswordData_Account
StartVariableName: AccountPasswordData
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
- $ID: 9WFo7eFobU2/cgQ6sx+MeA==
$Type: Microflows$ChangeActionItem
Association: ""
Attribute: System.User.Password
Type: Set
Value: $AccountPasswordData/NewPassword
RefreshInClient: true
AutoGenerateCaption: false
BackgroundColor: Default
Caption: Save password
Disabled: false
Documentation: ""
ID: 9sLxxlLgsU2/V2xky73GcA==
- Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$NoCase
ID: 1gVJwtPM40CEvrXIZ3551w==
- Attributes:
$Type: Microflows$ActionActivity
Action:
$Type: Microflows$ShowMessageAction
Blocking: true
ErrorHandlingType: Rollback
Template:
$Type: Microflows$TextTemplate
Parameters: null
Text:
$Type: Texts$Text
Items:
- $ID: wc4/RFfzP0Ws9crclapzpw==
$Type: Texts$Translation
LanguageCode: en_US
Text: The password has been updated.
- $ID: NLuXQwyyZUGluUQXyM7hVQ==
$Type: Texts$Translation
LanguageCode: nl_NL
Text: Het wachtwoord is aangepast.
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
ID: wNp1ROHb/Eq122BN5e92Ig==
- Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$NoCase
ID: e5XDMXgB306OJRxxMXsJ0g==
- Attributes:
$Type: Microflows$ActionActivity
Action:
$Type: Microflows$DeleteAction
DeleteVariableName: AccountPasswordData
ErrorHandlingType: Rollback
RefreshInClient: false
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
ID: TI18/YJeD0iYOY5rgIyeJg==
- Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$NoCase
ID: A7hKv8GMx0qWV39fMWkwOA==
- Attributes:
$Type: Microflows$ActionActivity
Action:
$Type: Microflows$CloseFormAction
ErrorHandlingType: Rollback
NumberOfPagesToClose: ""
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
ID: YUnJQCbYjEyMMDKNYcI1vg==
- Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$NoCase
ID: vxmdMMeyu0GYQ1SmHYVBwQ==
- Attributes:
$Type: Microflows$EndEvent
Documentation: ""
ReturnValue: ""
ID: 2d2crnesB0q5m/orosO08A==
- - Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$EnumerationCase
Value: "false"
ID: FmwUuR+6c0el3n/7OhWBBQ==
- Attributes:
$Type: Microflows$ActionActivity
Action:
$Type: Microflows$ShowMessageAction
Blocking: true
ErrorHandlingType: Rollback
Template:
$Type: Microflows$TextTemplate
Parameters: null
Text:
$Type: Texts$Text
Items:
- $ID: 2SQKkRHuCE2S0n3uBq/Bpw==
$Type: Texts$Translation
LanguageCode: en_US
Text: The new passwords do not match.
- $ID: 2o4mhLaS2U258ElieZv/Cg==
$Type: Texts$Translation
LanguageCode: nl_NL
Text: De nieuwe wachtwoorden komen niet overeen.
AutoGenerateCaption: true
BackgroundColor: Default
Caption: Activity
Disabled: false
Documentation: ""
ID: 2QM8p13r006MrpQQdziMZA==
- Attributes:
$Type: Microflows$SequenceFlow
IsErrorHandler: false
NewCaseValue:
$Type: Microflows$NoCase
ID: 3KHsbD02OEuj5/W0Pi/5Hw==
- Attributes:
$Type: Microflows$EndEvent
Documentation: ""
ReturnValue: ""
ID: B1cPqV3m80+s2UGJBVuM8Q==
MarkAsUsed: false
MicroflowActionInfo: null
MicroflowReturnType:
$Type: DataTypes$VoidType
Name: ChangePassword
ReturnVariableName: ""
Url: ""
UrlSearchParameters: null
Expand Down
Loading

0 comments on commit 84f65fb

Please sign in to comment.