Swimlanes in Activity with SALT

0 votes
asked Mar 17, 2022 in Question / help by Adrian J

I am trying to construct a wireframe / activity diagram to help management understand a flow. I would like to include swimlanes, but salt seems to confuse the compiler(?)

Blow is the script that is generating the error. For bonus points, how do I wrap the Gateway salt in a condition?


@startuml
!unquoted procedure SALT($x)
"{{
salt
%invoke_procedure("_"+$x)
}}" as $x
!endprocedure

!procedure _model()
{+
<b>Product Model
[Buy Product]
}
!endprocedure

!procedure _gate()
{+
<b>Application Gateway
{
Email | "xxx@foo.com   "
. | [Continue]
}
}
!endprocedure

!procedure _ciamLogin()
{+
<b>Corporate Login
{
Email | "xxx@foo.com   "
Password | "***   "
. | [Continue]
. | <i>Signup
}
}
!endprocedure

!procedure _ciamProfile()
{+
<b>Corporate Profile
{
First Name | "......   "
Last Name | "......   "
Country | "......   "
...
. | [Continue]
}
}
!endprocedure

!procedure _appProfile()
{+
<b>Connect Profile
{
First Name | "......   " | [Edit Profile]
Last Name | "......   " | .
Country | "......   " | .
...
Facility | "...... " | .
[OK] | [Cancel]
}
}
!endprocedure

!procedure _azureLogin()
{+
<b>Azure Login
{
Email | "xxx@foo.com   "
Password | "***   "
. | [Continue]
}
}
!endprocedure

|A| Application
|C| CIAM
|Z| Azure

|A|
(*) --> SALT(model)
model --> SALT(gate)
|Z|
gate -right-> SALT(azureLogin)

gate -left-> SALT(ciamLogin)
ciamLogin -left-> SALT(ciamProfile)
ciamLogin --> SALT(appProfile)
azureLogin --> SALT(appProfile)
ciamProfile --> SALT(appProfile)
appProfile -up-> SALT(ciamProfile)
:Email Registrar;

@enduml

1 Answer

+1 vote
answered Mar 17, 2022 by Adrian J
I used this to resolve my issue

@startuml
!$app="Application"
!$corp="Corporate"
!unquoted procedure SALT($x)
"{{
salt
%invoke_procedure("_"+$x)
}}"
!endprocedure

!procedure _model()
{+
<b>Product Model
[Buy Product]
}
!endprocedure

!procedure _gate()
{+
<b>$app Gateway
{
Email | "xxx@foo.com   "
. | [Continue]
}
}
!endprocedure

!procedure _ciamLogin()
{+
<b>$corp Login
{
Email | "xxx@foo.com   "
Password | "***   "
. | [Continue]
. | <i>Signup
}
}
!endprocedure

!procedure _ciamProfile()
{+
<b>$corp Profile
{
First Name | "......   "
Last Name | "......   "
Country | "......   "
...
. | [Continue]
}
}
!endprocedure

!procedure _ciamPassword()
{+
<b>$corp Set Password
{
Password | "******   "
Confirm Password | "******  "
. | [Continue]
}
}
!endprocedure

!procedure _appProfile()
{+
<b>$app Profile
{
First Name | "......   " | [Edit Profile]
Last Name | "......   " | .
Country | "......   " | .
...
Facility | "...... " | .
[OK] | [Cancel]
}
}
!endprocedure

!procedure _azureLogin()
{+
<b>Azure Login
{
Email | "xxx@foo.com   "
Password | "***   "
. | [Continue]
}
}
!endprocedure

|C| CIAM
|A| Application
|Z| Azure

|A|
start
: Buy Product

{{
salt
%invoke_procedure(_model)
}}
;

: Gateway

{{
salt
%invoke_procedure(_gate)
}}
;

if(Is Internal User) then (external)
    |C|
    : CIAM Login

    {{
    salt
    %invoke_procedure(_ciamLogin)
    }}
    ;

    if(Signup) then (yes)
        : CIAM Profile

        {{
        salt
        %invoke_procedure(_ciamProfile)
        }}
        ;

        :Email Set Password;

        : Set Password
        {{
        salt
        %invoke_procedure(_ciamPassword)
        }}
        ;
    else (no)
    endif
else (internal)
    |Z|
    : Azure Login

    {{
    salt
    %invoke_procedure(_azureLogin)
    }}
    ;
endif
|A|

: $app Profile

{{
salt
%invoke_procedure(_appProfile)
}}
;

: Email Registrar;

stop

@enduml
...