I'm facing an issue with Cadence where the arguments passed to an activity seem to lose their values. Specifically, the args.AuditEntry.Resource.ID inside TaskOpActivity is empty, even though it has the correct value in TaskActivity.
As you can see the AuditEntry object is different in TaskActivity and TaskOpActivity logs. These objects only differ in the value of args.AuditEntry.Resource.ID. TaskActivity has proper value for args.AuditEntry.Resource.ID and TaskOpActivity has no value for Resource.ID.
for more reference, providing the struct definition:
type CompleteTaskArgs struct {
Task entities.TaskReference
User entities.User
LogMessages []entities.PresentableString
AuditEntry *TaskAuditEntry
OperationName string
ResourceID string
}
type TaskAuditEntry struct {
Resource *entities.ResourceReference
Permission entities.Permission
AuditCode entities.AuditCode
}
type ResourceReference struct {
marshalableResourceReference
}
type marshalableResourceReference struct {
ID ResourceID
Type ResourceType
Name ResourceName
}
Why are the values of args.AuditEntry.Resource.ID not retained between TaskActivity and TaskOpActivity ?
I'm facing an issue with Cadence where the arguments passed to an activity seem to lose their values. Specifically, the args.AuditEntry.Resource.ID inside TaskOpActivity is empty, even though it has the correct value in TaskActivity.
Here is the relevant code:
The log output is as follows
As you can see the AuditEntry object is different in TaskActivity and TaskOpActivity logs. These objects only differ in the value of args.AuditEntry.Resource.ID. TaskActivity has proper value for args.AuditEntry.Resource.ID and TaskOpActivity has no value for Resource.ID.
for more reference, providing the struct definition:
Why are the values of args.AuditEntry.Resource.ID not retained between TaskActivity and TaskOpActivity ?
Thanks