if...else if...else in Workday Studio with failover-strategy
I recently used the failover-strategy
for a Workday Studio router for the first time and it was awesome! I think it's a very underutilized way of implementing if..else if...else kind of logic in an integration.
Scenario
I was working on a Greenhouse -> Workday integration that needed to detect if a new hire from Greenhouse already had an existing applicant in Workday. The "challenge" was that the applicant could be matched on email, Employee ID, or Contingent Worker ID.
Solution
I used a Studio router with a failover-strategy to try each one of the different scenarios that I had to test.
- At the end of each path, there is an mvel to throw an error if the
applicant_id
is blank so that the next route will be tried. - Each component has a validation to only run if the applicant_id hasn't been found yet (
!= ''
)