+49 (30) 467086-20 service@microtool.de
Products » objectiF RPM » Create and Execute an Extension Function » Extension function “Generate slices for use case stories”

Extension function “Generate slices for use case stories”

Starting with version 5.2.4, you can download the extension function from the Amazon cloud and use it in a project of your choice.

You can use the extension function to create a slice for the individual use case stories of a use case and store them in a defined package.

The enhancement function is run on a use case. A slice is only created if a use case story does not yet have a slice. A derive relationship is created between the slice and the use case and the slice is named Slice zu {Name of story}.

Tip
Make sure that Node.js is enabled for the service in the Service Manager, otherwise the extension function cannot be executed.

In order for the extension function to work correctly, you’ll need to do the following after downloading the function:

Define package

Importing the extension function automatically creates a new reference property with the name UseCaseSlicePackage for the stereotype Package. It is therefore only necessary to determine a storage location for the slices.

  • In the context menu of the package that contains the use cases choose Edit.
  • Switch to the tab Further Properties and select a package of type Requirements by clicking the […] button behind UseCaseSlicePackage.

Create slices alongside the use cases

If you want the slices to be created alongside the use cases, choose the package in which the use cases are stored.

Create slices in their own package

If you’ve created a separate package, choose from the use case package the package in which the slices are to be stored. The package can be located anywhere.

Modify the state machine

Finally, you’ll need to modify the state machine for use cases.

  1. Open the Settings window and open the state machine …for use case in the state machines package.
  2. Select from the context menu of the desired state the command Edit
  1. Switch to the Entry Actions tab, for example, and select the action Run Extension Function by clicking the Plus behind the entry.
  2. Click on the three blue dots and select “Slices zu Use Case Stories erstellen”.
  1. Close the dialog with OK.
Run the extension function

When the extension function is executed, the slices are saved in the defined package. Under the respective use cases, existing slices are also displayed with names. If you do not want to see them, delete the display of the slices under the use case with the Del key and not with Delete in the context menu.

Tip
When all slices are deleted for a use case and the extension function is executed again with the action, the slices are created again.

Delete the extension function

If you are using the extension function in an action and/or as a command, you must first delete the command and/or the action. Only then can you remove the extension function by choosing the Delete command in the context menu of the function. This deletes the extension function, but not the extension schema, since it may be contained in other extension functions.