Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

shape "activity" ist hardly missing #1631

Closed
boessu opened this issue Dec 20, 2023 · 11 comments
Closed

shape "activity" ist hardly missing #1631

boessu opened this issue Dec 20, 2023 · 11 comments
Labels

Comments

@boessu
Copy link
Contributor

boessu commented Dec 20, 2023

Problem
At the moment (and as far as I knoiw), Plantuml doesn't provide any form of an "activity" shape for elements (see https://plantuml.com/de/deployment-diagram). This is a common shape used to visualize Activities, Processes, Value Streams and so on.
In Edgy, it is used to display activities (Journeys, Processes, Stories)
edgy-activity
In archimate, it is used to visualize value streams:
archimate_valuestream

Solution
I know these are two forms. I'm quite sure one form would help alot. My concrete proposition:

  • Introduce a new shape with the keyword activity. As far as I see that, there is actually no allocated keyword "activity" in plantuml. Alternative keywords: action, process, deed, arrow, cds (shape keyword in GraphViz; don't know what it really means...)
  • The first "Edgy"-shape might be easier to integrate as it is available in GraphViz too as the node shape "cds". From the layouting-perspective it is easier and less errorprone to draw automagically the edges / links to that node shape in a graph (The concave indentation on the left side of the archimate shape is very difficult if you want appealing results).

Alternatives
Alternatives would be the following ones, but at the end the results are all very "baa" workarounds for the missing shape:

  • hexagon
  • rectangles with skinparam DiagonalCorner
@boessu
Copy link
Contributor Author

boessu commented Dec 24, 2023

I've had a deeper look at the rendering of the actual "rectangle" svek. I've noted "diagonalCorner" is basically a "UPath" and not a "URectangle". It also seems ot be rather hard to implement a completey new shape as it would mean to re-implement all devices (beside of Graphics2D: EPS, HTML5, SVG, Tikz...). Maybe it would make more sense to add it as a skinparam of a rectangle?

something like;

skinparam rectangle {
   LeftPointing 20
}

It could be a new method in URectangle. Although I'm not sure how hard it is to integrate that:

	public Shadowable leftPointing(double pointing) {
		if (ignoreForCompressionOnX || ignoreForCompressionOnY)
			throw new IllegalStateException();

		if (pointing == 0)
			return this;

		final UPath result = UPath.none();
		result.moveTo(0, 0);
		result.lineTo(width - pointing, 0);
		result.lineTo(width, height / 2.0);
		result.lineTo(width - pointing, height);
		result.lineTo(0, height);
		result.lineTo(0, 0);
		return result;
	}

The disadvantage of that is that the existing "RoundCorner" and "DiagonalCorner" skinparams do compete with that new parameter. Quite frankly, that's already the case with the two exiting skinparams.

@arnaudroques
Copy link
Contributor

In last commit, we added process and action keywords.
Not sure that these are the best keyword, we can still change them. We are reluctant to use activity as keyword.

Any though?

@boessu
Copy link
Contributor Author

boessu commented Jan 6, 2024

Thanks. I've tested a bit, and it seems to work fine. The new element shapes are a very good thing.

I think these keywords are fine. I also already thought "activity" as a keyword would be a rather bad idea. As a 1st thing, it is a "UML Word" in the uml perspective where these will live on now, and 2nd it's already used in the skins (activityDiagram.activity). Quite frankly, even if it would be a keyword, the according Java files shouldn't have the word "activity" in it as it has already a plethora of classes with the word "activity" in it (as far as I see that all depending on the UML activity diagram area). That's not very helpful for contributors either if that would result in a mess...

Actually, these are only usable as element shapes. Is it possible to use it "like" the rectangle shape, which can be used either as element shape or as grouping shape? The reason why I'm asking are pictures from the area of E2E Processes like this:
Screenshot 2024-01-06 155448
or this (like in edgy)
EDGY-Process-Map_Process-Model_Process-Chart
Would that be possible?

@arnaudroques
Copy link
Contributor

Sure, with last snapshot, you can try:

@startuml
action action {
action action1
action action2
}
process process {
process process1
process process2
}
@enduml

Is this what you are looking for?

@The-Lum
Copy link
Collaborator

The-Lum commented Jan 8, 2024

Hi @arnaudroques, and all,

  • Is it plan to have specific style for action or process?
  • Currently, it depends only of rectangle style?

Regards,
Th.

@arnaudroques
Copy link
Contributor

  • Is it plan to have specific style for action or process?

Yes, you are right, probably we should create action and process style.
Is this useful?

@The-Lum
Copy link
Collaborator

The-Lum commented Jan 8, 2024

Is this useful?

More consistent!
😏

@arnaudroques
Copy link
Contributor

Sorry, we are lazy sometimes :-)
This should be fixed in last snapshot and on the online server.

@The-Lum
Copy link
Collaborator

The-Lum commented Jan 10, 2024

Hi @arnaudroques, and all,

During a test with smetana we observe a minor overlapping (at the top start of the arrow).
Here is a minimal example:

@startuml
!pragma layout smetana
process process {
process process1
}
@enduml

Regards,
Th.

@boessu
Copy link
Contributor Author

boessu commented Jan 10, 2024

Hello @The-Lum (and all)

I think the problem you've found is the same as this issue here: #1638
So not specific to this new shapes, but they're affected too (in a very similar manner).

Cheers
B.

@boessu
Copy link
Contributor Author

boessu commented Jan 15, 2024

@arnaudroques: I've added the new "action" keyword to the edgy library in https://github.com/plantuml/plantuml-stdlib. That was some sort of a test case. ;-)
It seems as everything works fine.
image
image

The-Lum added a commit to The-Lum/vscode-plantuml that referenced this issue Mar 29, 2024
Add keywords:
- `action`
- `process`

New PlantUML Keywords from: 
- plantuml/plantuml#1631
- plantuml/plantuml#1643
qjebbs pushed a commit to The-Lum/vscode-plantuml that referenced this issue Mar 30, 2024
Add keywords:
- `action`
- `process`

New PlantUML Keywords from: 
- plantuml/plantuml#1631
- plantuml/plantuml#1643
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants