Set the Value at Channel Context Level
AnsweredHi Team,
Requirements: We want to set the workflow status to In Progress when any Channel are added.
Workflow status is a thing model attribute and also mapped to context model.
Default Locale of the tenant is "en-GB"
When User Add Channel Context, Workflow will get trigger at Channel Level.
Scenario, where it is not working.
When User select Germany Webshop channel, then Locale is selected as de-DE and the value is not stored in the de-DE...So locale is filtered based on channel selection.
When user select Uk Webshop channel, then locale is selected as en-GB which is the default locale...hence with the below BR Definition and Mapping, the value is set at Global Level and it is inherited to UK webshop Context.
We not want to inherit the data from Global...we want to set value at Context Level
Do i have to write multiple BR to this scenario? OR What is the Best solution for this Issue?
BR Definition
Governance Mapping
Please Suggest some solution.
Thanks!
-
Hello Kajal
I'm going to guess that this is an "Is Translatable?" issue - If my guess is wrong, then could you possibly share more BR code?
The attribute into which you are storing the "In Progress" value is Translatable?
The SDL (en-GB) will be shown in all contexts, so if the attribute was not translatable, then you will see the value, no matter which locale is selected.
If you need it to be translatable, then you should consider changing the attribute to a translatable List of Values - this way you can still store the value in "_DEFAULT" and have it shown up in all other locale.
1 -
Hi Eric,
Thanks for the information!
SDL is "en-GB" hence it works for UK channel as shown in screenshot.
But it is not working for any of the channel having different locale except en-GB
Note: Workflow Status is Marked as "Is Translatable" to Yes.
Workflow Status Reference Data has a Value in en-GB and de-DE Locale.
BR Definition:
varcurrentcontext:=GetContextPath["channel"];
varconcat:=Concat["channel:",varcurrentcontext]; SetEntityAttributeValueForContext["_DEFAULT","_DEFAULT",GetEntityId[],"item",varconcat,"thgtpWorkflowStatus","In Progress"]
BR Context Mapping
0 -
Hi Eric,
I Did Following changes and it worked...
1) I have Marked workflow status as "Is Translatable" to "Yes" in Thing Model and in Context Model
2) Provide the Data in all Locale for Workflow Status Reference Data (Reference Data Library)
3) BR Definition and BR Mapping as below in the screenshot.
BR Definition:
varcurrentcontext:=GetContextPath["channel"];
varconcat:=Concat["channel:",varcurrentcontext]; SetEntityAttributeValueForContext["_DEFAULT","_DEFAULT",GetEntityId[],"item",varconcat,"thgtpWorkflowStatus","In Progress"]
BR Mappings:
Note: Please do not map like channel || _ALL in "Column C" in Governance Model.
Thanks for your help!
1
Please sign in to leave a comment.
Comments
3 comments