ApplaudSolutions / Applaud-Workato-Connector

Code pertaining to the Applaud Workato Connector
0 stars 0 forks source link

New instances batch trigger #3

Closed duncancasemore closed 3 years ago

duncancasemore commented 4 years ago

Summary

  1. As a Integrations Designer
  2. I want to create recipes that periodically trigger from newly created Applaud instances
  3. so that I can integrate actions performed in Applaud with other applications

Acceptance Criteria

  1. I can select a 'New instances' batch trigger for the Applaud app
  2. I see that this trigger is labeled Batch
  3. I can select the Model. This is a required autocomplete field that shows all available models for that tenant, sorted in ascending alphabetical order.
  4. When I select a Model, I see that the lower case PLURAL model name is used in the trigger action title at the top and in the step viewer
  5. I can optionally choose to pick from a list when the recipe should start picking up data from (eg, 1 day ago, 1 week ago, tomorrow, etc). Alternatively I can choose the exact date and time the recipe starts picking up data from. The values that I see here are identical to other Workato batch triggers so that the integration experience is consistent.
  6. I can optionally choose to specify the exact date and time the recipe starts picking up data from.
  7. I can choose to specify the trigger interval. This defaults to 30 minutes, which is the lowest possible value allowed. The values that I see here are identical to other Workato batch triggers so that the integration experience is consistent.
  8. I can choose to specify the batch size. This defaults to 100 if not specified and has a maximum value of 200.
  9. I note that the batch size is collapsed into the optional fields section by default (not sure if this requires configuration or is automatic in Workato so this AC can be removed if automatic)
  10. I can choose to use the standard functionality to enable a trigger condition
  11. In trigger conditions, I can pick any model property to use as a condition. See open issues.
  12. In subsequent actions in the recipe, I can see all model properties as datapills. I see that each Applaud property type is typed correctly in its datapill.
  13. When this recipe first runs, I see that it picks up all created records from the initial recipe date (using created property in Applaud)
  14. When this recipe next runs, I see that it picks up all created records from the last run date (using created property in Applaud)
  15. If the trigger returns more instances than the batch size, I see it processes them in batches
  16. If the Applaud API returns just one page of results, I see that the connector handles paginating through all results not just the first page (filter={"offset":10,"limit":2})
  17. I see that the trigger runs as per the specified interval

Wireframes and mockups

New/updated real-time trigger

Note: this wireframe is for a slightly different trigger, so there will be minor (obvious) variations

Applaud trigger setup

Open Issues

a) On trigger conditions, what types of model properties will work? Do we need to exclude some types of provide special processing? For example, date range, geopoint, etc might be hard. For lookups/foreign keys do we provide autocompletes?

Developer Testing

Requestor: leave this section blank Developer: complete this section during commit/pull request

Positive testing:

Add all the things that you have checked whilst completing this story here, it should be written in a non-technical way, and a lot of this can probably be taken from the acceptance criteria, here are two different examples:

Negative testing:

Here you list the things you have checked where your code needs to show an error, handle unusual/bad input/config gracefully, or may impact separate features that use or depend on the same code. Pause and think -- they may not be obvious! Examples:

e2e test links and description:

vinaykumarkasireddy commented 3 years ago

@duncancasemore Properties like 'created', 'updated' are not fetched from elastic. These properties are by-passed by cloud team. Getting these properties using 'getFrom':'mongo' filter. Can we get this properties directly from elastic?

duncancasemore commented 3 years ago

@vinaykumarkasireddy thanks. We shouldn't be using mongo, we do need to get from elastic. This story should have added the option to use created and updated in the API filters:

https://github.com/ApplaudSolutions/applaud-cloud/issues/2900

Does this give you what you need?

vinaykumarkasireddy commented 3 years ago

Yes @duncancasemore. That's perfect.

vinaykumarkasireddy commented 3 years ago

'GetFrom: mongo' filter is not working fine. Raised a cloud git https://github.com/ApplaudSolutions/applaud-cloud/issues/2980 for the same. Verified different options mentioned in the cloud git, but its not working.

vinaykumarkasireddy commented 3 years ago

Created a recipe and verified. Batch Trigger is polling correctly according to the batch size and also it is polling in correct intervals.

duncancasemore commented 3 years ago

@vinay-applaud we shouldn't be using 'getFrom: mongo' anyway. Can you confirm we're not planning on using this?

vinaykumarkasireddy commented 3 years ago

Yes @duncancasemore Using this just for testing. We are not planning to use this.

vinaykumarkasireddy commented 3 years ago
  1. [x] I can select a 'New instances' batch trigger for the Applaud app
  2. [] I see that this trigger is labeled Batch
  3. [x] I can select the Model. This is a required autocomplete field that shows all available models for that tenant, sorted in ascending alphabetical order.
  4. [x] When I select a Model, I see that the lower case PLURAL model name is used in the trigger action title at the top and in the step viewer
  5. [x] I can optionally choose to pick from a list when the recipe should start picking up data from (eg, 1 day ago, 1 week ago, tomorrow, etc). Alternatively I can choose the exact date and time the recipe starts picking up data from. The values that I see here are identical to other Workato batch triggers so that the integration experience is consistent.
  6. [x] I can optionally choose to specify the exact date and time the recipe starts picking up data from.
  7. [x] I can choose to specify the trigger interval. This defaults to 30 minutes, which is the lowest possible value allowed. The values that I see here are identical to other Workato batch triggers so that the integration experience is consistent.
  8. [x] I can choose to specify the batch size. This defaults to 100 if not specified and has a maximum value of 200.
  9. [x] I note that the batch size is collapsed into the optional fields section by default (not sure if this requires configuration or is automatic in Workato so this AC can be removed if automatic)
  10. [x] I can choose to use the standard functionality to enable a trigger condition
  11. [x] In trigger conditions, I can pick any model property to use as a condition. See open issues.
  12. [x] In subsequent actions in the recipe, I can see all model properties as datapills. I see that each Applaud property type is typed correctly in its datapill.
  13. [x] When this recipe first runs, I see that it picks up all created records from the initial recipe date (using created property in Applaud)
  14. [] When this recipe next runs, I see that it picks up all created records from the last run date (using created property in Applaud)
  15. [x] If the trigger returns more instances than the batch size, I see it processes them in batches
  16. [x] If the Applaud API returns just one page of results, I see that the connector handles paginating through all results not just the first page (filter={"offset":10,"limit":2})
  17. [x] I see that the trigger runs as per the specified interval

Two acceptance criteria's are not met. One is with workato team and another is with cloud team.

ssarap commented 3 years ago

@vinaykumarkasireddy AC 14 is it still pending?

vinaykumarkasireddy commented 3 years ago

No @ssarap It is done. We can close this story.