Am using PlantUML to create a sequence diagram which depicts a Dating App hitting a RestfulController (which uses a Service class to process data).
What I am seeking to do is to represent the Service class's internal private methods via the Sequence Diagram.
Note: This is pseudocode please don't consider the semantics.
class DatingApp {
public void hitExternalApi() {
}
}
class DatingRestController {
@Autowired
public void DatingService;
@GetMethod
public Object processService() {
return DatingService.findProfile();
}
}
class DatingService {
public Object findProfile() {
Object retValue = new Object(null, null);
var variable1 = doSomething();
var varable2 = doSomethingElse();
return retValue(variable1, variable2);
}
private String doSomething() {
}
private String doSomethingElse() {
}
}
PlantUML DSL file:
@startuml
DatingApp -> DatingRestController: hitExternalApi()
DatingRestController -> DatingService: processService()
DatingService -> DatingService: findProfile()
DatingService -> DatingService: doSomething()
DatingService -> DatingService: doSomethingElse()
DatingService -> DatingRestController: sent retValue
DatingRestController -> DatingApp: Send JSON
@enduml
My initial pass:
As you can see that this looks like the DateService class is calling the process()
method and then subsequently calling the doSomething()
and doSomethingElse()
methods.
How do I represent that doSomething()
and doSomethingElse()
methods are being called from within findProfile()
lifeline instead of looking like external public calls?