Assigning responsibility to a user using a workflow; the user does not reflect on the responsibility tab
I am trying to assign a user a Technical SME responsibility on an existing business term. The workflow runs but after checking the asset, the responsibility is not added on it. Here's the sample template of the script I use:
import com.collibra.dgc.core.api.dto.instance.responsibility.AddResponsibilityRequest;
import com.collibra.dgc.core.api.model.ResourceType;
def techSmeUserId = execution.getVariable("technicalSMEUserId")
def assetUuid = execution.getVariable("businessTerm")
def techSmeRoleId = string2Uuid("e6f3d73e-b57b-427c-862f-8092b240c10b")
//Add Technical SME responsibility to user
responsibilityApi.addResponsibility(AddResponsibilityRequest.builder()
.resourceId(string2Uuid(assetUuid))
.resourceType(Asset)
.roleId(techSmeRoleId)
.ownerId(techSmeUserId)
.build());
sms_new
Posted 2 years ago · Edited 1 year ago·Last reply 1 year ago
2 comments
Venkata Reddy Padala
·1 year agoaddResponsibility() method would return the Responsibility object that was created. You can check there is the responsibility is added or not.
also looks like resourceType(Asset) is wrong.
You might want to try resourceType with explicitly define as
.resourceType(ResourceType.Asset)Sean Pyle
·2 years ago · EditedThe code seems fine at first glance. Here are some things to try if you haven't already.