Skip to content

Instantly share code, notes, and snippets.

@MrCoder
Last active April 18, 2018 02:25
Show Gist options
  • Save MrCoder/3f4249375647fc31b8ffcae1d3b7a1fa to your computer and use it in GitHub Desktop.
Save MrCoder/3f4249375647fc31b8ffcae1d3b7a1fa to your computer and use it in GitHub Desktop.
DSL examples for Web Sequence Chrome Extension (Get the extension from https://chrome.google.com/webstore/detail/web-sequence/kcpganeflmhffnlofpdmcjklmdpbbmef?ref=gist)
// Hello World
ZenUML.Hello(World)
// Simple RESTful API implementation
BookController.get(bookId) {
BookService.get(bookId) {
BookRepository.findOne(bookId)
}
}
// Assignment - Teachers create assignment and notify students
@Starter(Teacher)
WebSite.createAssignment() {
assignment = Assignment.create()
WebSite.post(assignment)
foreach(student) {
WebSite.notice(student)
}
}
// How a mockserver (mockserver.com) mock a response
@Starter(Client)
Response = MockServer.onRequest() {
forEach(expection) {
Expection.match()
if(matched) {
Response = ForwardAction.getResponse()
}
}
}
// Login
@Starter(Member)
LoginInterface.EnterEmail()
LoginInterface.EnterPassword()
LoginInterface.ClickLoginButton() {
:LoginServlet.processRequest() {
loginMember() {
:Webservice.loginMember() {
:LoginServlet1.sendRedirect(GetMemberServlet) {
GetMemberServlet.ProcessRequest()
}
}
}
}
}
@alexche8
Copy link

Is there any possibility to draw backward interaction like A<---B instead of response A<- - - B ?

@MrCoder
Copy link
Author

MrCoder commented Apr 18, 2018

Sorry for replying late. Please if possible use the chat feature on https://www.zenuml.com to get quick response. I often forget checking gist notifications. I got a lot of notification of other projects I am following :)

I am not quite sure what you means here. The backward interaction is a dashed boarder and controlled by:

    border-bottom-width: 2px;
    border-bottom-style: dashed;

Do you mean the space between dashes are too wide?

If you are using the Chrome extension, you can make it dotted by putting the following in the CSS editor:

.message[data-v-72ecb252] {
    position: absolute;
    width: calc(100% - 14px);
    border-bottom-width: 2px;
    border-bottom-style: dotted;
}

Not sure if it works for your usage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment