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();
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()
@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.
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