Skip to content

Make Business Processes more flexible #153

@SlavaVedernikov

Description

@SlavaVedernikov

Context

At the moment there is an Activities property in BusinessProcess structure, which is an array of Activity objects. This works fine, but if more than one business process is composed of similar activities, then those activities would have to be re-defined multiple times in many business processes.

BigBankPlc:
  BusinessProcesses:
    CreateNewAccount:
      Label: Create New Account
      Activities:
        - Label: Sign In
          Actor: BigBankPlc.Actors.Customer
          Flows:
          - Type: Use
            Expression: BigBankPlc.SoftwareSystems.InternetBanking.Containers.SinglePageApp.Interfaces.SignIn
        - Label: View Home Page
          Actor: BigBankPlc.Actors.Customer
          Flows:
          - Type: Use
            Expression: BigBankPlc.SoftwareSystems.InternetBanking.Containers.SinglePageApp.Interfaces.ViewCustomerDetails
  1. It would be better if each activity was defined only once and then referenced in multiple business processes e.g. "Sign In" activity
  2. It would also be useful if Interfaces could be referenced directly in Activities

Requirements

Activities performed by Actors could be defined as follows:

BigBankPlc:
  Actors:
    Customer:
      Activities:
        SignIn:
          Flows:
          - Type: Use
            Expression: BigBankPlc.SoftwareSystems.InternetBanking.Containers.SinglePageApp.Interfaces.SignIn

Then those predefined activities can be referenced in business processes as follows (as well as still allowing ad-hoc activity definitions)

BigBankPlc:
  BusinessProcesses:
    CreateNewAccount:
      Label: Create New Account
      Activities:
        - BigBankPlc.Actors.Customer.Activities.SignIn
        - Label: View Home Page
          Actor: BigBankPlc.Actors.Customer
          Flows:
          - Type: Use
            Expression: BigBankPlc.SoftwareSystems.InternetBanking.Containers.SinglePageApp.Interfaces.ViewCustomerDetails

It should also be possible to add any interfaces as activities of a business process as follows:

BigBankPlc:
  BusinessProcesses:
    CreateNewAccount:
      Label: Create New Account
      Activities:
        - BigBankPlc.SoftwareSystems.InternetBanking.Containers.WebApplication.Interfaces.Navigate
        - BigBankPlc.Actors.Customer.Activities.SignIn
        - Label: View Home Page
          Actor: BigBankPlc.Actors.Customer
          Flows:
          - Type: Use
            Expression: BigBankPlc.SoftwareSystems.InternetBanking.Containers.SinglePageApp.Interfaces.ViewCustomerDetails

When an Actor's activity is added to Activities, then Actor is naturally set to the actor that owns that activity.
When an Interface is added to Activities, then Actor is set to the owner of that interface.

Metadata

Metadata

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions