ApplaudSolutions / Applaud-Workato-Connector

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

New instance real-time trigger #5

Closed duncancasemore closed 3 years ago

duncancasemore commented 4 years ago

Summary

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

Acceptance Criteria

  1. I can select a 'New instance' real-time trigger for the Applaud app
  2. I see that this trigger is labeled Real-time (see open issue)
  3. I can set the model, which has the same behavior as #2
  4. I can see the generated webhook URL as per the wireframe
  5. I do not see the When first started, trigger interval or batch size options for real-time triggers
  6. I can set trigger conditions just as I can in #2
  7. In subsequent actions in the recipe, I can see the model properties available as datapills. I see that each Applaud property type is typed correctly in its datapill
  8. When I save a real-time trigger, I see that this automatically creates a workflow in Applaud. Specifically, I see that the connector: a) generates a Workato webhook URL, b) Creates a workflow for the selected model with the title "Integration recipe: {recipe name}", eg, '"Integration recipe: new person in Applaud'" c) sets the enrollment triggers to only include the 'Create' action, d) Adds a 'Fire webhook' action with the URL set to a Workato webhook URL
  9. I see that newly created instances in Applaud trigger the recipe in real-time
  10. If I update the real-time trigger, I see that this does not create a duplicate workflow in Applaud. Instead, I see it first checks that a workflow 'Fire Webhook' action does not already exist for this webhook URL before attempting to create one
  11. I can modify the Applaud workflow to have other conditions or capabilities (eg, fire the webhook in an if condition, or delete the generated workflow and instead move the Fire Webhook action to the end of an existing approval workflow) and that a) it still triggers, and b) doesn't create duplicate workflows when editing the trigger

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

  1. Should we only use real-time triggers or real-time triggers with backup polling?

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

Using static webhook url to configure the workflow webhook action. This is working fine. Need to change this to Dynamic webhook url. image image

vinaykumarkasireddy commented 3 years ago

Raised a new cloud git https://github.com/ApplaudSolutions/applaud-cloud/issues/3094. Need to identify the payload sent to webhook is of create/update/delete, so that we can configure the recipe accordingly.

vinaykumarkasireddy commented 3 years ago

Dependent on the cloud git https://github.com/ApplaudSolutions/applaud-cloud/issues/3147

vinaykumarkasireddy commented 3 years ago

Verified the real time trigger by posting the dynamic webhook url into some dummy model. Webhook url is getting generated dynamically, and being passed correctly to the model attribute when the recipe is started. Pending items:

  1. To get the apis from cloud team, so that configure the models workflow actions as well as post the webhook url.
  2. Need to test how the payload is passed to the workato and use it in subsequent steps.
vinaykumarkasireddy commented 3 years ago

Verified the real time triggers on stage. This is working fine.

Completion checklist:

  1. [x] I can select 'New instance' real time trigger.
  2. [x] I see that this trigger is labeled real time. image.png
  3. [x] I can select the model.
  4. [x] I can select the workflow action for which the webhook url to be updated. image.png
  5. [x] Webhook url is getting updated against the workflow action that is selected, when the recipe is started.
  6. [x] I can see the status changed to 'live' when the recipe is active. image.png
  7. [x] Webhook url is updated to null when the recipe is stopped.
  8. [x] I can see status changed to 'not live' when the recipe is not active. image.png
  9. [x] In subsequent actions in the recipe, I can see the model properties available as datapills. I see that each Applaud property type is typed correctly in its datapill image.png