Task App - Assignee Task Overview Query

Assignee Task Overview Query

1
Select the Use Case Type Query (Q)
  • After selecting an aggregate, click the Use Case Query API (Q)
  • Your cursor turns into the Q icon
2
Place the Query API
  • Click on the Plan to place the Query API
  • The Query API Use Case will then appear on the Plan

Query API Use Case placed on the Plan

Use Case Sub Menu

1
Select the added Query API (Q) Use Case
  • Click the added Query API (Q) Use Case.

Query API with open sub elements view

Add Source Readmodel

1
Open the Use Case menu
  • Click the Use Case menu icon on left side.
2
Add 'task overview' Source Readmodel
  • Select the 'task overview' Source Readmodel and press the add button.

Query API with 'task overview' Readmodel

API Request

1
Change the API Request name
  • Click the name input of the Readmodel.
  • Type in 'assignee task overview'.
  • Click next to the input to save the new name.
2
Add 'assignee id' property
  • Click the plus icon on the right.
  • Type 'assignee id' in the name input.
  • Select 'uuid' in the type dropdown.
  • Click the ✓ to save the property.

API Request with changed name

Readmodel

1
Change the Query Name of the Readmodel
  • Click the query name input of the Readmodel.
  • Type in 'get tasks by assignee id'.
  • Click next to the input to save the new name.
2
Set the Query Result Amount operation
  • Set the option 'many' as Query Result Amount.
3
Add the Condition
  • Click the plus button next to 'conditions' of the Readmodel on the right of the 'task overview' Readmodel
4
Select the Value Target
  • Select the property 'assignee id'.
The Value Target is a property of the Readmodel schema.
The Value Target provides the property name of the query WHERE condition.
5
Value Source type
  • Keep the default Value Source type 'Schema'.
6
Select the Value Source
  • Select 'assignee task overview.assignee id'.
  • Click the ✓ to save the Condition.
The Value Source provides the property value of the query WHERE condition.

Readmodel with query name, result amount and condition

Set Query Overview Ready

1
Select query task overview Use Case
  • Click the query task overview Use Case.
2
Open the Use Case menu
  • Click the Use Case menu icon on left side.
3
Set generation status to ready
  • Set the generation status from 'planned' to 'ready'.
Planned Use Cases have a blue border, the Code Generator wont generate its code.
Ready Use Cases have a gray border, the Code Generator generates its code.

The four Use Cases are ready for Code Generation

Generate the Code

1
Open the Code Generator menu
  • Click on the 'Code' button to open the Code Generator menu.
2
Start Code Generation
  • Click the 'Generate Code' button.
3
Generating code
  • Wait until the activity indicator disappears and 'Code Generation done' is displayed under the button.
  • Open the selected Path with an IDE or Text Editor.

The generated code

Next
Deploy to AWS

© 2024 Codebricks | All rights reserved.