22 Messages
•
1.2K Points
Getting the Domain ID from an asset Object
Hi everyone,
For my workflow, I need to get the Domain ID for an asset. I have retrieved the asset object successfully find the FindAssetsRequest.builder.
I tried different ways, but keep running into errors retrieving the Domain ID from that Object. The bolded is what I need. getDomain().getId() did not work.
Here is my object for reference.
[AssetImpl{displayName=howlite, articulationScore=80.0, excludedFromAutoHyperlinking=false, domain=NamedResourceReference{name='saras_datalake > saras_prod > howlite'} ResourceReferenceImpl{id=f47d37b0-4f99-42f3-96d7-c8fee7bff117, resourceType=Domain}, type=NamedResourceReference{name='Schema'} ResourceReferenceImpl{id=00000000-0000-0000-0001-000400000002, resourceType=AssetType}, status=NamedResourceReference{name='Accepted'} ResourceReferenceImpl{id=00000000-0000-0000-0000-000000005009, resourceType=Status}, avgRating=0.0, ratingsCount=0} NamedResource{name='saras_datalake>saras_prod>howlite'} Resource{createdBy=fffcc2f9-b27f-44d7-8335-cb5fdbf45ba0, createdOn=1692187791719, lastModifiedBy=b953a84f-3ed7-4ddf-8b1e-05b49c7ecb9a, lastModifiedOn=1715980991426, system=false, resourceType=Asset} EntityImpl{id=5e7b2cda-9402-4f3d-ba9e-44e165c56a88}, AssetImpl{displayName=howlite_callcenter, articulationScore=80.0, excludedFromAutoHyperlinking=false, domain=NamedResourceReference{name='saras_datalake > saras_prod > howlite_callcenter'} ResourceReferenceImpl{id=018e9d2d-cc53-76cd-a302-57f0d033d5d3, resourceType=Domain}, type=NamedResourceReference{name='Schema'} ResourceReferenceImpl{id=00000000-0000-0000-0001-000400000002, resourceType=AssetType}, status=NamedResourceReference{name='Accepted'} ResourceReferenceImpl{id=00000000-0000-0000-0000-000000005009, resourceType=Status}, avgRating=0.0, ratingsCount=0} NamedResource{name='saras_datalake>saras_prod>howlite_callcenter'} Resource{createdBy=00000000-0000-0000-0000-000000900001, createdOn=1712034013942, lastModifiedBy=b953a84f-3ed7-4ddf-8b1e-05b49c7ecb9a, lastModifiedOn=1715979876206, system=false, resourceType=Asset} EntityImpl{id=018e9d2d-e2b5-7be0-b19d-9458632be22b}, AssetImpl{displayName=howlite_callcenter_deab, articulationScore=80.0, excludedFromAutoHyperlinking=false, domain=NamedResourceReference{name='saras_datalake > saras_prod > howlite_callcenter_deab'} ResourceReferenceImpl{id=018e9d2d-cf45-7d0c-a7bb-6b824280553e, resourceType=Domain}, type=NamedResourceReference{name='Schema'} ResourceReferenceImpl{id=00000000-0000-0000-0001-000400000002, resourceType=AssetType}, status=NamedResourceReference{name='Accepted'} ResourceReferenceImpl{id=00000000-0000-0000-0000-000000005009, resourceType=Status}, avgRating=0.0, ratingsCount=0} NamedResource{name='saras_datalake>saras_prod>howlite_callcenter_deab'} Resource{createdBy=00000000-0000-0000-0000-000000900001, createdOn=1712034013942, lastModifiedBy=eb18f12f-496a-44c4-b0ae-aed1566e7d24, lastModifiedOn=1722946942586, system=false, resourceType=Asset} EntityImpl{id=018e9d2d-e2b5-7be0-b19d-9458632be235}, AssetImpl{displayName=howlite_callcenter_dep, articulationScore=80.0, excludedFromAutoHyperlinking=false, domain=NamedResourceReference{name='saras_datalake > saras_prod > howlite_callcenter_dep'} ResourceReferenceImpl{id=018e9d2d-d00b-71ea-93a0-4aa7bbc25806, resourceType=Domain}, type=NamedResourceReference{name='Schema'} ResourceReferenceImpl{id=00000000-0000-0000-0001-000400000002, resourceType=AssetType}, status=NamedResourceReference{name='Accepted'} ResourceReferenceImpl{id=00000000-0000-0000-0000-000000005009, resourceType=Status}, avgRating=0.0, ratingsCount=0} NamedResource{name='saras_datalake>saras_prod>howlite_callcenter_dep'} Resource{createdBy=00000000-0000-0000-0000-000000900001, createdOn=1712034013941, lastModifiedBy=eb18f12f-496a-44c4-b0ae-aed1566e7d24, lastModifiedOn=1722946942586, system=false, resourceType=Asset} EntityImpl{id=018e9d2d-e2b5-7be0-b19d-9458632be234}, AssetImpl{displayName=howlite_cust_enrollment, articulationScore=80.0, excludedFromAutoHyperlinking=false, domain=NamedResourceReference{name='saras_datalake > saras_prod > howlite_cust_enrollment'} ResourceReferenceImpl{id=018e9d2d-d0dd-7cf3-bdbd-6ee1a476e936, resourceType=Domain}, type=NamedResourceReference{name='Schema'} ResourceReferenceImpl{id=00000000-0000-0000-0001-000400000002, resourceType=AssetType}, status=NamedResourceReference{name='Accepted'} ResourceReferenceImpl{id=00000000-0000-0000-0000-000000005009, resourceType=Status}, avgRating=0.0, ratingsCount=0} NamedResource{name='saras_datalake>saras_prod>howlite_cust_enrollment'} Resource{createdBy=00000000-0000-0000-0000-000000900001, createdOn=1712034013942, lastModifiedBy=b953a84f-3ed7-4ddf-8b1e-05b49c7ecb9a, lastModifiedOn=1715979982173, system=false, resourceType=Asset} EntityImpl{id=018e9d2d-e2b5-7be0-b19d-9458632be22c}, AssetImpl{displayName=howlite_cust_portfolio, articulationScore=80.0, excludedFromAutoHyperlinking=false, domain=NamedResourceReference{name='saras_datalake > saras_prod > howlite_cust_portfolio'} ResourceReferenceImpl{id=018e9d2d-d19a-7359-9122-42e40719ea7c, resourceType=Domain}, type=NamedResourceReference{name='Schema'} ResourceReferenceImpl{id=00000000-0000-0000-0001-000400000002, resourceType=AssetType}, status=NamedResourceReference{name='Accepted'} ResourceReferenceImpl{id=00000000-0000-0000-0000-000000005009, resourceType=Status}, avgRating=0.0, ratingsCount=0} NamedResource{name='saras_datalake>saras_prod>howlite_cust_portfolio'} Resource{createdBy=00000000-0000-0000-0000-000000900001, createdOn=1712034013942, lastModifiedBy=b953a84f-3ed7-4ddf-8b1e-05b49c7ecb9a, lastModifiedOn=1715979982173, system=false, resourceType=Asset} EntityImpl{id=018e9d2d-e2b5-7be0-b19d-9458632be233}]+++++++++++++++++ [authenticated_id=fffcc2f9-b27f-44d7-8335-cb5fdbf45ba0, session_hash=b1e52501bc212f85a01c5311aa585dfd, trace_id=3bd8920e832a777c3545de3b73e5fc90, trace_flags=01, span_id=6d433ef8b3a40401]
2024-08-26 18:47:55.026 [http-nio-0.0.0.0-4400-exec-234] WARN c.c.d.w.s.g.b.SecureGroovyTaskActivityBehavior - Exception while executing scriptTask4 : groovy script evaluation failed: 'javax.script.ScriptException: groovy.lang.MissingMethodException: No signature of method: java.util.ArrayList.getDomain() is applicable for argument types: () values: []
Possible solutions: getClass(), getLast()' Trace: scopeType=bpmn, scopeDefinitionKey=dataTransformationRequestDTRCreate, scopeDefinitionId=019190df-561e-7d1e-863e-ac930a5b40b0, subScopeDefinitionKey=scriptTask4, tenantId=<empty>, type=scriptTask [authenticated_id=fffcc2f9-b27f-44d7-8335-cb5fdbf45ba0, session_hash=b1e52501bc212f85a01c5311aa585dfd, trace_id=3bd8920e832a777c3545de3b73e5fc90, trace_flags=01, span_id=0135634aa02a4480]
2024-08-26 18:47:55.026 [http-nio-0.0.0.0-4400-exec-234] ERROR c.c.d.c.w.a.WorkflowExceptionHandler - Error when completing task with id: 019190df-82d8-7581-b2db-1cd7f22dcbf6 [authenticated_id=fffcc2f9-b27f-44d7-8335-cb5fdbf45ba0, session_hash=b1e52501bc212f85a01c5311aa585dfd, trace_id=3bd8920e832a777c3545de3b73e5fc90, trace_flags=01, span_id=0135634aa02a4480]
grantrollerson1
132 Messages
•
9.1K Points
3 months ago
Howdy @gabrielechristensen
You can see a worked example here >> Onboarding workflow (collibra.com)
Cheers
Grant
1
0