Security validation errors found deploying processes in file 'Sandbox2.bpmn'. Please check the logs for more details.
Has anyone experience this error when running workflows?
adrianchia
Posted 4 years ago · Edited 2 years ago·Last reply 3 years ago
13 comments
shubhangishekhar
·3 years ago · EditedYes the issue was resolved…Thanks @ravi_collibra. Also, never forget to include
import com.collibra.dgc.core.api.dto.instance.attribute.AddAttributeRequests;
shubhangishekhar
·3 years ago · Edited@ravi_collibra I do not see any difference in the code I shared and the code you sent me back. Please highlight the difference in you code.
Also, I have not used item anywhere in code so not sure where I need to correct it.
shubhangishekhar
·3 years ago · Edited@ravi_collibra I do not see any difference in the code I shared and the code you sent me back. Please highlight the difference in you code.
Also, I have not used item anywhere in code so not sure where I need to correct it.
ravi
·3 years ago · EditedYou used wrong quotes in the script.
The workflow was unable to start as you did not import the requisite libraries.
Hope, it resolves your issue.
Regards,
Ravi
ravi
·3 years ago · EditedHi @shubhangi.shekhar.tietoevry.com,
You were now able to deploy the workflow.
In your script task, you have misspelled the bean name, it should be “item”, you replaced it with “item”.
Please rectify it, it should work.
Regards,
Ravi
ravi
·3 years ago · EditedHi @shubhangi.shekhar.tietoevry.com,
Use the below code, it should work:
def requesterId = userApi.getUserByUsername(requester).getId()
def descriptionString = execution.getVariable(“description”)?.toString() ?: “”
def communityId = responsibleCommunity
def relatedAssets = execution.getVariable(“relatedAssets”) ?: []
def addAttributeToAsset(assetUuid,attributeValue,attributeTypeUuid) {
if (attributeValue == null){
return;
}
attributeApi.addAttribute(AddAttributeRequest.builder()
.assetId(assetUuid)
.typeId(string2Uuid(attributeTypeUuid))
.value(attributeValue.toString())
.build())
}
def relatedAssetsList = []
relatedAssets.each{ relatedAssetId ->
def relatedAssetRef = RelatedAssetReference.builder()
.assetId(relatedAssetId)
.direction(true)
.relationTypeId(string2Uuid(impactsRelationId))
.build()
relatedAssetsList.add(relatedAssetRef)
}
def newIssueUuid = issueApi.addIssue(AddIssueRequest.builder()
.name(subject)
.description(descriptionString)
.priority(priority)
.responsibleCommunityId(communityId)
.relatedAssets(relatedAssetsList)
.categoryIds(classifications)
.typeId(string2Uuid(dataIssueId))
.requesterId(requesterId)
.build()
).getId()
addAttributeToAsset(newIssueUuid,issueClassificationCategory,issueClassificationCategoryAttributeTypeId)
execution.setVariable(“outputCreatedTermId”,uuid2String(newIssueUuid))
PS: import the libraries as well
Regards,
Ravi
shubhangishekhar
·3 years ago · EditedHi Team,
This is the code…Please let me know if this helps to debug
def requesterId = userApi.getUserByUsername(requester).getId()
def descriptionString = execution.getVariable(“description”)?.toString() ?: “”
def communityId = responsibleCommunity
def relatedAssets = execution.getVariable(“relatedAssets”) ?: []
def addAttributeToAsset(assetUuid,attributeValue,attributeTypeUuid) {
if (attributeValue == null){
return;
}
attributeApi.addAttribute(AddAttributeRequest.builder()
.assetId(assetUuid)
.typeId(string2Uuid(attributeTypeUuid))
.value(attributeValue.toString())
.build())
}
def relatedAssetsList = []
relatedAssets.each{ relatedAssetId ->
def relatedAssetRef = RelatedAssetReference.builder()
.assetId(relatedAssetId)
.direction(true)
.relationTypeId(string2Uuid(impactsRelationId))
.build()
}
def newIssueUuid = issueApi.addIssue(AddIssueRequest.builder()
.name(subject)
.description(descriptionString)
.priority(priority)
.responsibleCommunityId(communityId)
.relatedAssets(relatedAssetsList)
.categoryIds(classifications)
.typeId(string2Uuid(dataIssueId))
.requesterId(requesterId)
.build()
).getId()
execution.setVariable(“outputCreatedTermId”,uuid2String(newIssueUuid))
daverichard
·3 years ago · EditedWorking through the virtual labs I found this error usually occurred if you had an incomplete line. Mine was in building the list. I had:
newassets []
instead of
newassets = []
The system is also very sensitive to using camel case. I have a tendency to keep shift down too long. So I would have:
.assetId(assets_new.get(2).getID())
instead of:
.assetId(assets_new.get(2).getId())
.parentId(string2UUid("{uuid}")).build())
instead of:
.parentId(string2Uuid("{uuid}")).build())
shubhangishekhar
·3 years ago · EditedHi @ravi_collibra Can you help me as well I am getting the similar issue and unable to identify through logs what is the possible error for it. if you could tell me what causes this error that would help
shubhangishekhar
·3 years ago · EditedHi @ravi_collibra Can you help me as well I am getting the similar issue and unable to identify through logs what is the possible error for it. if you could tell me what causes this error that would help
ravi
·3 years ago · EditedHi Shubhangi,
Could you post the logs error here.
Regards,
Ravi
shubhangishekhar
·3 years ago · Edited@ravi_collibra Please see the logs attached here DGC instance used: https://console-wf-vlab.collibra.com/ dgc_log.txt (1.4 MB)
ravi
·4 years ago · EditedHi Adrian,
Please refer to the console logs. It will help you in resolving the issue.
You can debug through logs.
Regards,
Ravi