Setting Related Resource in a user task
How do I set the related resource in a user task? A lot of user task, it automatically sets, but I have one where I created a new asset that is defined in our instance and it is not set automatically.
Donna Pace
Posted 2 years ago · Edited 1 year ago·Last reply 1 year ago
6 comments
Sean Pyle
·2 years ago · EditedHey Donna.
You can add a relation to an asset with a script task that use the SetAssetRelationsRequest.Builder
Hope that helps,
Sean
Sean Pyle
·2 years ago@donnapace I see what you're saying now. I can't give you a definite answer on this one.
For what it's worth, It seems to appear when I trigger an action in Collibra from an asset's page. For example, triggering the ask-the-expert workflow from an asset's page shows the Related to section in subsequent user tasks within that process.
I imagine workflows triggered by the global create button would not show this option since the system cannot determine the relation.
Paresh Maharana
·2 years ago@donnapace Hi Donna,
As of my knowledge, you can try using custom form "asset" for the user task where you have to put your variable (where you have asset id in it) in the default field in the form and set it as Read Only.
Hope this helps,
Paresh
Pascal Hess
·1 year ago@pareshmaharana1 you mean in a form you would add the "Collibra data entry" element "Asset" and assign the variable with the Asset ID in the parameter "Default value" under "Asset - General"? Unfortunately that doesn't work for me.
I have also tried to assign the new asset to the item variable in a script task, but that did not help as well. I don't see any other option to assign the new asset to some variable that is than used to populate the "Related Resource" field.
I guess what it uses is businessItemId and there is no endpoint to manipulate that when the workflow is already running?
Sean Pyle
·2 years ago · EditedHey Donna.
You can add a relation to an asset with a script task that use the SetAssetRelationsRequest.Builder
Hope that helps,
Sean
Donna Pace
OP2 years ago · Edited@SeanPyle Thanks for the reply. Maybe my question was not specific enough. I am wondering if there is a way to set a related asset so that it shows up in a user task. It seems to happen automatically in some, as shown in this pic where it shows that actual business term that was proposed and provides a link (in blue)