• Icon: Sub-task Sub-task
    • Resolution: Done
    • Icon: L3 - Default L3 - Default
    • 2.7.0
    • None
    • backend
    • None

      Context:
      With OPT-2887 we added the basic CRUD api for event based processes but without anything to store a particular flowNode -> event mapping, this is what is to be added in the scope of this task.

      AT:

      • there is a mappings property on the eventBasedProcess entity which is a map containing event mappings for a particular flowNode by it's id
        • the key of an entry is the flowNodeId - string - which reflects the id of the mapped flow node in the bpmn xml
        • the value - is an object that has the following properties:
          • start - ingestedEvent - which is an object that has the following properties
            • group - string
            • source - string
            • eventName - string
          • end - ingestedEvent - which is an object that has the following properties
            • group - string
            • source - string
            • eventName - string
      • the property can be provided on create and update endpoints
      • the api should validate that the provided flowNodeId's are present in the xml, reject the update/create with a 400 otherwise (we can extract that to another subtask to decrease the scope)
      • the event based processes api documentation is updated

      Example:

      {
        id: '',
        name: 'My Event based process',
        xml: '....',
        mappings: {
          flowNodeId1: {
            start: {
              group: 'eventGroup',
              source: 'order-service',
              eventName: 'OrderCreated',
            },
            end: null
          },
          flowNodeId2: {
            start: {
              group: 'eventGroup',
              source: 'order-service',
              eventName: 'OrderProcessingStarted',
            },
            end: {
              group: 'eventGroup',
              source: 'order-service',
              eventName: 'OrderProcessed',
            }
          }
        }
      }
      

      Relevant design: https://app.zeplin.io/project/5b4f294ab0d5cf0c2c391d1d/screen/5dd3e3d3a496e9af3e4e0fde shows how an event can be mapped as either start or endEvent of a particular activity

        This is the controller panel for Smart Panels app

              Unassigned Unassigned
              sebastian.bathke Sebastian Bathke
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: