Add SME to a DDOM, and run all pending workflow to this new SME.
Hi,
I have serveral workflows to manage a “business information” creation.:
-
One workflow with a form to create the business information asset, in status “Proposed”
-
One workflow to assign a SME to it. It run automatically on Buisiness Information status changed (and inside this workflow I have a script task to filter on “statuts == proposed”). In this workflow, it retrieves (script task) all SMEs of the related Data Domain of this new Business Information, and then there is a form (user task) assigned to all theses SMEs (the candidates users is a variable computed in the script task just before) asking if they want to be assigned as SME to this new asset (yes/no question).
Now I want to create a workflow which manage new SME added to a Data Domain; and when it occured, propose to this SME to be assigned or not to all pending Business Information without SME assigned.
I would like to reuse my “assigne SME” workflow (as it’s not juste a yes/no question, an SME can reassign the BI to another Data Domain, etc), but not really understand how.
I can write a workflow on Data Domain role granted (on SME), which will run the “assign SME” workflow on all BI under “proposed” status, but then I will have several problems.
For example, if a BI is waiting for a SME (status proposed), so the “assign sme” workflow is already running, and can’t be run again at the same time on this BI, as per my configuration, I’ve put to be run only one at the same time for a specific resource". If I remove this constraint, then the workflow can be run a second time at the same time… and it will ask the question to all existing SME (the new one + the old ones). So all old SMEs will have 2 times the same questions (assign to me or not) or, if they already answer “no” the first time, they will have the question again…
Another solution will be to to add this new DDOM SME to the “candidates users” of the user task of the running “assign sme” workflow… but how?
Im’ quite sure it’s a common workflow / use case in Collibra that everybody have to manage… But how to do it “smartly” ?
Regards,
Alex
alexandrebargeton
OP4 years ago · EditedHello
Thanks for the reply.
But now I’m not able to retrieve the user who has been granted…
I’ve asked it in a dedicated ticket:
https://datacitizens.collibra.com/forum/t/how-to-retrieve-in-a-workwflow-a-user-which-had-been-role-granted/1104
Regards,
Alex
alvinuseree
·4 years ago · EditedThis is an interesting use case, I can think of 2 ways to achieve this. The first involved Signal Throwing and Signal Boundary Components and the second one in a bit easier:
There’s a useful bean called the
WorkflowEventbean that would be very helpful here. As you’re defining the Candidate User Expression you’re passing to the User Task in a Script Task, you can handle the Logic in that same Script Task.You could have a simple if statement to:
The Pseudo Code for this logic would be:
This way, you won’t be alerting your SMEs twice.