Find your people. Pick a challenge. Ship something real. The CreatorCon Hackathon is coming to the Community Pavilion for one epic night. Every skill level, every role welcome. Join us on May 5th and learn more here.

Flow Designer - Dynamic Flow Reference Input gets casted to String

ngrm
Tera Contributor

Hello everyone,

 

 

i am trying to make dynamic flows work, to efficiently make decisions on which subflow to use, instead of falling back to if/else conditions. My subflows require a reference input (f.ex. a task), when i test the subflow directly, everthing works, but as soon as i try to trigger it through the dynamic flow - flow logic, every step that uses the input, fails with the error 'Value of field record is not a GlideRecord'.

 

I also managed to reproduce this on a dev-instance:

1. Create a subflow with any name f.ex. 'dynamic flow logic'

2. create an input 'task' of type reference.task

3. add an action > update record and try to update the task (f.ex. set state = 3)

 

Test the flow => flow works

 

Trigger it dynamically:
1. Create new subflow with anyname f.ex. 'dynamic trigger'
2. add a flow logic > dynamic flow step with config:
Flow Template: dynamic flow logic
Flow: dynamic flow logic
Task: select any task

 

Test the trigger subflow => it says Completed, but when you open the context of the flow that got triggered, you can see that it failed on an error in the update step "Value of field record is not a GlideRecord".

 

When i digged in deeper (trying to use a wait for condition instead of an update step), i got yet another error message that hints that the reference might be passed as a string instead of a real reference record. (Error Message: 

class java.lang.String cannot be cast to class com.glide.util.IGlideRecord (java.lang.String is in module java.base of loader 'bootstrap'; com.glide.util.IGlideRecord is in unnamed module of loader com.snc.orbit.container.tomcat8.ParallelOrbitTomcat8ClassLoader @79f5bed6))



Has anyone also experienced this problem and found a solution to this other than changing all the inputs to sys_ids and using lookup actions?

 

PS: images in the attachments of the different flows and execution results

Thank you for your responses,
Cheers Niclas

0 REPLIES 0