Calling one workflow from another for a different resource
Hi all,
I have the scenario where I am in an asset workflow executing on Asset A, and I would like to call another workflow (presumably with callActivity) against the Community of Asset A.
I tried using callActivity, providing information to the target itemResourceId (the community resource id) and itemResourceType (“CO”), and it almost works. The result is that the workflow is started, and the first task even links to the Community, but no task bar is displayed.
What am I missing?
Tom Friesen
Posted 5 years ago · Edited 1 year ago·Last reply 5 years ago
5 comments
Tom Friesen
OP5 years ago · EditedHey all,
I knew I had done this before, but the API call escaped me. So here is a code snippet for those others who stumble…
Also… I have no idea why Collibra’s own APIv2 GenerateSequentialTodo script doesn’t use this. But this can be done with the API, and would look something like this (use at your own risk):
Hope this helps.
Michael Rowan
·5 years ago · EditedDid you consider calling a subflow?
Michael Rowan
·5 years ago · Editeddid you look at the workflow instance in settings? that should tell you who has the next task
Michael Rowan
·5 years ago · Editeddid you look at the workflow instance in settings? that should tell you who has the next task
Tom Friesen
OP5 years ago · EditedHey Mike… looks like you might have responded to the wrong question… or my description was severely lacking!
This is really a workflow development question, where we are building a workflow that operates on one workflow item, and calls another workflow, which is to execute against a different workflow item. Similar to a voting subprocess, but executing against a different resource (and even resourceType). Specifically, an asset-based workflow is to call a community-based workflow against it’s own community.
In Collibra Labs’ GenerateSequentialToDo workflow, for example, they make a call like:
Interestingly, the itemResourceType kinda looks like a APIv1 throwback.
When I tried the same concept in my code, I didn’t use the itemVocabulary — as that doesn’t make sense for a Community —, and I omitted the itemCommunity as well. The callActivity, from the asset-based workflow to the community-based workflow, looks like:
As I said… it almost works, except for not displaying the green task bar.
Anyone?