useblocks / sphinx-needs

Adds needs/requirements to sphinx
https://sphinx-needs.readthedocs.io/en/latest/index.html
MIT License
213 stars 66 forks source link

Support for needactivity #626

Open twodrops opened 2 years ago

twodrops commented 2 years ago

It will be nice to have a new directive needactivity similar to needsequence which generates UML activity diagrams for need objects.

needsequence is good at depicting the sequence of messages flowing from one need object to another, how their messages are exchanged in what time-order.

needactivity is needed for depicting the control flowing from one need to another, especially to depict some conditional structures and loops, swimlanes etc.

The new needuml can achieve these results but there are usecases where the diagrams need to be auto-generated like with a needflow.

twodrops commented 2 years ago

An immediate usecase for this would be process-as-code where process artifacts can be modelled in sphinx-needs and activity diagrams autogenerated similar to the ones with tools like Methodpark Stages (https://www.methodpark.de/stages.html).

For example,

Needs Input

.. wp:: Example Workproduct 1 
   :id: WP_001
   :responsibility: RO_001, RO_002

   This is an example workproduct.

.. role:: Creator
   :id: RO_001

   Creates the workproduct.

.. role:: Approver
   :id: RO_002

   Approves the workproduct.

.. activity:: Create Workproduct
   :id: AC_001
   :responsibility: RO_001

.. activity:: Approve Workproduct
   :id: AC_002
   :responsibility: RO_002

Example Activity Diagram

image

The example is not complete and does not contain:

I am hoping to refine this issue with details soon.

danwos commented 2 years ago

@twodrops: How was the status with this feature request? I think we wanted to close it, as it can be done by needuml. Please reopen, if I'm wrong.

twodrops commented 2 years ago

I am re-opening this as this feature will be needed in 2023 and all features cannot be handled with needuml. Will add details soon.