Forum Documentation Showcase Pricing Learn more

Schedule API workflow optimization

#1

Hello bubblers,

What I am working on:

An on-boarding and training app.
Allows an end user product specialist to create and manage course content, create and manage multiple choice answer quizzes for their courses, and gauge course registrants comprehension of content.
Allows end an user registrant to register for courses and take the quizzes created for each course.

Workflows I need help optimizing or suggestions on how to go about it differently:
Scheduled API workflows that create the app’s user facing data for the registered course.

Process explanation:

Product Specialist creates a Course data type
Product Specialist creates a Module data type for every topic they expect their Course to cover
Product Specialist then breaks up their Course into Section data types and associates x number of Module data types to the Section
Product Specialist then creates a single Quiz for every Section created.
Quiz consists of many Question data types and each Question has many associated Answer data types with one designated as correct

When the Product Specialist is ready to release their Course, it becomes available for potential Registrants to access.

Registrant hits a “Register” button that kicks off a sequence of 4 Scheduled API workflows

This is what I have tried:

  1. Scheduled API Workflows on Lists:

First Scheduled API wf runs on a List of Sections. For every Section, a UserSection is created pointing back to the “Master Section” as reference and then schedules the second and third Scheduled API wf

The Second Scheduled API wf runs on a List of Modules belonging to the current Section in the previous wf. For every Module in the list, a UserModule is created pointing to the “Master Module”. This is not a duplicate, it just points to the original so I may display the content through an association.

The Third Scheduled API wf’s action in the sequence is located after the action that kicks off the second scheduled api wf in this sequence. This wf creates a UserQuestion for every Question belonging to the Quiz associated with the current Section. This isn’t a duplicate, it simply points to the original so I may display the content through an association. It then schedules the fourth Scheduled API.

Location of third sequential action:

3rd Sequential Scheduled API WF:

The fourth Scheduled API runs on a list of Answers pertaining to the current Question in the third wf’s list. It creates a UserAnswer for every Answer in the list and points back to the “Master Answer”. This isn’t a duplicate it just allows me to display the original content via an association.

  1. Recursive Scheduled API WF’s:

The only difference with this method is that for every scheduled api, rather than initiating the api by running on a list, I initiate the api wf and pass in the required data type list for the given api wf.

The workflows end by calling itself only when that underlying data type list is greater than 1. If it is, I then remove the current data type from the list.

Here’s an example from the first wf in the sequence (notice the additional schedule api action at the end):

For a Course with the following # of records, using the Schedule API on List method, it takes 2min 3sec:
1 Course
2 Sections
5 Modules
2 Quizzes
20 Questions
80 Answers

For the same course, using the recursive Schedule API method, it takes 2min 30sec.

I did do some digging on the forum prior to posting this and found some helpful tips from @rico.trevisan and the post from @josh describing the recursive api availability . Here is what I found:

Schedule API workflow on a list - does the list have a limit?

[New Feature] Scheduling API workflows can now be done recursively

Do I just have to live with this or is there a better way?

0 Likes

#2

Thanks for the hat-tip.

Your question is: can I do this faster than ~2 min?
(It was a thorough post and I might have got confused in the way)

If that’s the question, did you try boosting your application? I wonder if that would change anything.

0 Likes