Notifications
Clear all

[Solved] PlatformUserContext object from an ActionBasedWorkflowContext does not have the enterprise details

3 Posts
2 Users
5 Likes
1,231 Views
1
Topic starter

There is an AbstractActionBasedWorkflowActivity based workflow wherein the context object does not have the enterprise details. Below code snippets return null values.

userContext.getRoleEnterpriseName();

userContext.getUserEnterpriseName();

 

2 Answers
2

Please check the user context you have. If the context is ValueChainAdmin, those values will be NULL

You will need to have enterprise level user for value to be there in userContext.getUserEnterpriseName() and enterprise (or org and site) level role for value to be there in userContext.getRoleEnterpriseName()

kvarpe Topic starter 2020-10-22 07:32:46

@isingh
Thank you for your answer. Yes, the context is of the ValueChainAdmin user. But it will be a value chain user only as this workflow is getting executed at the time of the IB interface data load. Please let me know if there any way we can have the value for enterprise in the context for value chain admin user.

2

Yes by default integration message is processed using a ValueChainAdmin context but if you need to process it through another context, you can make use of MsgProcessingContext, i.e. you can provide a context against your queue and interface by adding a record to MsgProcessingContext data model

Please refer following link for details https://devnet.onenetwork.com/oms/apps/DeveloperNetwork/www/docs/guides/SdkUsersGuide/help/index.html#modeling-ept/WorkingWithMsgProcessingContext