Hi there AppWorks fans,
Welcome to a new installment of AppWorks tips.
Man, did we experience something interesting again in our project! It’s a thing on ‘Lifecycle’ BB level for an entity, and it has to do with the output flows. Why care? Well, we as low-code developer team require to help the administration team on complex tasks. Trust me, when you want to really learn the strangest things of the platform, join the administration team. This team receives all the end-user struggles and let me tell you that “End Users” are a species on itself! 😱 How great thinking over the solution with all the architects and experts, there is always one specie that can still break it; Again, it’s nothing negative…It’s good we have these people around as that brings us exactly to this post…
“A valid question at the end!” would be: Is this a valid scenario? Well, that’s a discussion you can bring up into your team…I only communicate what we see, and others build in the past. Let’s call it the legacy of previous comrades! 🤔
Let get right into it…
What is the use-case? Watch the ‘Lifecycle’ BB implementation of a ‘Case’ entity like this:
I mark the “Happy flow” in the middle as “Set as primary transition”…Just that you know.
Each output flow can have a condition (these don’t for now), but let’s say that all output flows are TRUE to fire (some “species” can make it happen!)? WHAT?? Yes, jump out the window (as long if it’s not too high!) as “there we go again”! 🙄
Ok, let’s say they indeed are all TRUE; What will be the next phase when we complete the task in runtime:
…
Are you ready for the answer?
…
…
…
Well, it triggers the first one you connected! NOOOO…is it? Yes, it is! You can’t be in two phases at once…that’s the same in real life! So, the platform makes sure to move to the correct one based on your low-code skills!
See for yourself:
Trust me 😇…When I reconnect the flows and I start with
State2c
first, that’s the next phase!
…
AHA…But let’s turn this around and making them all FALSE! Yes, you got me! 🤐
I use the same condition for each output flow!
Well, I just tried it…guess what!? Nothing triggers, and you’re (what we programmers say) “in the void” with a lifecycle state that doesn’t move forward nor backward. Are you confronted with this during design-time or during deployment? I don’t see it…It’s totally valid; Do you want this? Well, that’s “A valid question at the end!” 🤪
See for yourself; The task completes, but the lifecycle isn’t moving!
…
How to solve this last one? Open the ‘Case Instance Manager (CIM)’ artifact, find the lifecycle instance, and choose its final destiny:
Termination gives this result in runtime (which you want to avoid!):
I close the case with the lessons learned and continue life with an improved version which does work…You should too!
A great “DONE” where we experienced the struggles of the administration team who must deal with this each day. You can design the greatest things, but always watch your failure scenarios closely and assess all your outcomes. Have a good weekend, and we see each other next week on another great “AppWorks Tips” topic.
Don’t forget to subscribe to get updates on the activities happening on this site. Have you noticed the quiz where you find out if you are also “The AppWorks guy”?