Find out if the workflow event is started from the Collibra or from a workflow
Hi
I have a workflow which is started when an asset attribute is changed. I have another workflow, that changes asset attribute.
So my first workflow can start either when a user changes an attribute or when the second workflow changes an attribute.
Is there any way to find out how the workflow was started? By user change or by the other workflow change?
Thanks
narehtarasyan
Posted 3 years ago · Edited 1 year ago·Last reply 3 years ago
6 comments
narehtarasyan
OP3 years ago · EditedHi all
Thanks for all the responses. It worked using activityStreamApi.
sophiemcenteemorris
·3 years ago · EditedHi Nareh, within settings, if you go to workflow > instances this should show you any workflow tasks and you can see details here?
Tom Friesen
·3 years ago · EditedNareh is trying to determine this through the API (
event.workflowDefinition).Former User
·3 years ago · EditedWhy not put a conditional logging in the workflow? you can always read the asset history via the api
activityHistory = activityStreamApi.getActivities(FindActivitiesRequest.builder()
.contextId(item.getId())
.startDate(fromDate.getTime())
.limit(limit.intValue())
.endDate(toDate.getTime() + 86400000)
.build()).getResults()
narehtarasyan
OP3 years ago · EditedI am trying to use
event.workflowDefinitionbut it always returnsnull.Tom Friesen
·3 years ago · EditedHi @nareh.tarasyan… I’m getting this too, with an error showing in the doc log:
Curiously, the resource Id it’s referring to is the relation UUID that triggered the change, and not anything resembling a workflow definition id.
This kinda smells like a bug. Have you logged a ticket yet?