Filename format: "short-desc.workflow.pu"
@startuml
title short desc
start
'some codes here...
end
@enduml
-
currentFlowis an object use to prevent multiple instance of workflow
-
returnused to store resulting value (state) of the workflow.
-
definedis used to determine whether a state is defined or not
-
nullis used to set a state to null or determine whether a state is null or not
-
oran operator in conditional expression
-
andan operator in conditional expression
-
notan operator in conditional expression
-
ofused to access member of an object state
-
isused to compare two information (states or constants)
-
greater thana conditional operator
-
less thana conditional operator
-
splitResult -
forkResult
'this is a comment
/'This is
multi-line comments'/
if (condition) then
:execute some action task;
elseif (otherCondition) then
:execute some action UI task;
endif
'using set statement
:set someState = expression;
'using UI task
:someState = execute some action UI task;
'shorthand with UI task
#UI:someState = some action;
'using service task
:someState = execute some action task;
'shorthand with service task
:someState = some action;
'store as local state with ";" semicolon
:set someState = expression;
'store as module (Owner Module) state with "|"
:set someState = expression|
'store as module (Owner Module or Anscestor) state with "]"
:set someState = expression]
@startuml
title some work
start
:someState = first argument;
:anotherState = second argument;
:someOtherState = third argument;
'some code here
stop
@enduml
'single param
:execute some task;
note: state
'multi or name params
:execute some task;
note left
param1 : "some value"
param2 : someState
end note
:execute some task;
note right
paramDesc : "some value"
end note
'With literal JSON
:execute some task;
note left
param1 : {
prop1: state,
prop2: "some"
}
pram2 : "string"
endnote
@startuml
title some work
start
if (someWork is defined) then
:set return = promise of someWork;
stop;
endif
:set someWork = currentFlow|
'some code here...
:unset someWork;
stop
@enduml
while (condition)
'some codes here....
endwhile
repeat
'some code here..
repeat while(condition)
split
'first task here...
/'return of last executing activity
is the result of the branch'/
split again
'another task here...
/'return of last executing activity
is the result of the branch'/
endsplit
:set result = splitResult;'value of winning branch
'will not proceed if exeception has occured
fork
'first task here..
/'return of last executing activity
is the result of the branch'/
fork again
'another task here
/'return of last executing activity
is the result of the branch'/
endfork
:set result = forkResult; 'Array or results
'will not proceed if exeception has occured
Format:
:set {target state} = {exression}(;|])
Example:
:set localState = expression;
:set moduleState = expression|
:set ancestorOrOwnerState = expression]
Format:
:unset {target state};
Example:
:unset someState;
Will try to unset local state first, module, then ancestors.
Format:
:{?state = }run {module name} module(;|])
Examples:
:run some module;
:someState = run some module;
:someState = run some module|
:someState = run some module]
Format:
:{?state = }execute {task name} task(;|])
Shorthand:
:{?state = }{task name}(;|])
Examples:
:execute some task;
:someState = execcute some task;
:someState = execcute some task|
:someState = execcute some task]
'short-hand
:someState = some;
Format:
:{?state = }execute {task name} UI task(;|])
Shorthand:
#UI:{?state = }{task name}(;|])
Examples:
:execute some task;
:someState = execcute some UI task;
:someState = execcute some UI task|
:someState = execcute some UI task]
'short-hand
#UI:someState = some;
Format:
:{target state} = execute {workflow name} workflow {?of ownerModule}(;|])
Examples:
:execute some workflow;
:execute some workflow of someModule;
:someState = execcute some workflow;
:someState = execcute some workflow|
:someState = execcute some workflow]
Format:
:debugger;
Format:
:invoke {method expression}(;|])
Format:
:{event name}<
Format:
:pause {expression};
Format:
:resume {expression};