xDM Workflow builder: SemQL condition with Lookup KO
A
Aubin JONCOUR
started a topic
about 1 year ago
Hello,
I am facing an issue with the router in the workflow builder.
There are two possible routes, depending on the value of child entity in the stepper.
Here is the code of both routes' SemQL condition:
Route 1 :
Lookup
FIRST FamilleAchat.Referent
FROM PreviousDataSet.Tiers.LienTiersBranche.LiensTiersBrancheFamilleAchat
WHERE FamillePrincipale = '1'
End = 'valid_auto'
Route 2 :
Lookup
FIRST FamilleAchat.Referent
FROM PreviousDataSet.Tiers.LienTiersBranche.LiensTiersBrancheFamilleAchat
WHERE FamillePrincipale = '1'
End <> 'valid_auto'
The problem is that it never works because the router is not able to find a "valid route", even though the value is valid_auto...
I also tried to reverse the logic: if value <> valid_auto routs to next task, else end => in all the case it ends the workflow...
I wonder if 'lookups' works in the router condition, since I've added the SemQL in the stepper's form ( without PreviousDataSet ) to check the value, and there it works.
Any help welcome!
Attached the error returned and the workflow screenshot.
Here are a few elements that can help with this issue
1. Remove the condition on the second branch. A router works just like a "case when" statement, which means that the last route doesn't require a condition, and if no condition is provided it will act like an else statement (which means the last route will be used only if none of the other route can be used). Setting a condition in every branch may lead to cases where the workflow can't find a proper route (for example if the value returned by the lookup is null)
2. Replace the "Lookup" statement with a "any" statement, with the following syntax. Here is the documentation about the any/all
any LienTiersBranche.LiensTiersBrancheFamilleAchat have (FamillePrincipale = '1' AND FamilleAchat.Referent = 'valid_auto')
3. Create a technical attribute in your main entity to directly access its value
1 Comment
M
Matthieu DE PILLOT DE COLIGNY
said
7 months ago
Answer
Hello,
Here are a few elements that can help with this issue
1. Remove the condition on the second branch. A router works just like a "case when" statement, which means that the last route doesn't require a condition, and if no condition is provided it will act like an else statement (which means the last route will be used only if none of the other route can be used). Setting a condition in every branch may lead to cases where the workflow can't find a proper route (for example if the value returned by the lookup is null)
2. Replace the "Lookup" statement with a "any" statement, with the following syntax. Here is the documentation about the any/all
any LienTiersBranche.LiensTiersBrancheFamilleAchat have (FamillePrincipale = '1' AND FamilleAchat.Referent = 'valid_auto')
3. Create a technical attribute in your main entity to directly access its value
Aubin JONCOUR
Hello,
I am facing an issue with the router in the workflow builder.
There are two possible routes, depending on the value of child entity in the stepper.
Here is the code of both routes' SemQL condition:
Route 1 :
Route 2 :
The problem is that it never works because the router is not able to find a "valid route", even though the value is valid_auto...
I also tried to reverse the logic: if value <> valid_auto routs to next task, else end => in all the case it ends the workflow...
I wonder if 'lookups' works in the router condition, since I've added the SemQL in the stepper's form ( without PreviousDataSet ) to check the value, and there it works.
Any help welcome!
Attached the error returned and the workflow screenshot.
Version: 2024.1
Hello,
Here are a few elements that can help with this issue
1. Remove the condition on the second branch. A router works just like a "case when" statement, which means that the last route doesn't require a condition, and if no condition is provided it will act like an else statement (which means the last route will be used only if none of the other route can be used). Setting a condition in every branch may lead to cases where the workflow can't find a proper route (for example if the value returned by the lookup is null)
2. Replace the "Lookup" statement with a "any" statement, with the following syntax. Here is the documentation about the any/all
3. Create a technical attribute in your main entity to directly access its value
Matthieu DE PILLOT DE COLIGNY
Hello,
Here are a few elements that can help with this issue
1. Remove the condition on the second branch. A router works just like a "case when" statement, which means that the last route doesn't require a condition, and if no condition is provided it will act like an else statement (which means the last route will be used only if none of the other route can be used). Setting a condition in every branch may lead to cases where the workflow can't find a proper route (for example if the value returned by the lookup is null)
2. Replace the "Lookup" statement with a "any" statement, with the following syntax. Here is the documentation about the any/all
3. Create a technical attribute in your main entity to directly access its value
-
Extend a model with new entities or attributes
-
Data types in xDM
-
Effective date on entities
-
Search using wild cards
-
Export a model from production and import on a development environment
-
"Allow Delete" vs "Allow Removal" privileges
-
LOV label in Named Query
-
Select location on a map and save coordinates
-
Is there a way to set up a master-detail relationship on browse mode?
-
Choose Either a Stepper or A Workflow Based on The User Privileges
See all 299 topics