Passing Parameters between 2 worskflow
Afternoon
I have a workflow called Source which starts another workflow called Target
Could some please proivide me with an example as to how I could pass a parameter value, e.g. The Requesters User ID from the Source workflow to the Target workflow.
How do a define/declare it in the Source workflow and how do I get access to this parameter in the Target workflow
Could you also point me to documentation that provides clear and consise step by step instructions on how this can be done?
Obliged
Bobby
robertinnes11
Posted 2 years ago · Edited 1 year ago·Last reply 1 year ago
12 comments
robertinnes11
OP2 years ago · EditedThank Janne
I will try your suggested solution later today
Bobby
robertinnes11
OP2 years ago · EditedThanks Sean for your reply
I do not use workflow designer as I do not think that the tool is mature enough
All my coding is done in eclispe and notepad++, I find these far quicker and muc more flexible, particulary as I am not creating many forms
Does your feedback also apply to anyone using eclipse/groovy?
It would be nice to see how this is done without the use of workflow designer
Cheers
Bobby
robertinnes11
OP2 years ago · EditedThanks Sean for your reply
I do not use workflow designer as I do not think that the tool is mature enough
All my coding is done in eclispe and notepad++, I find these far quicker and muc more flexible, particulary as I am not creating many forms
Does your feedback also apply to anyone using eclipse/groovy?
It would be nice to see how this is done without the use of workflow designer
Cheers
Bobby
Sean Pyle
·2 years ago · EditedGlad to help Bobby!
To answer your question – Yes, Call activities are available as one of the types of Tasks you can use in Eclipse. You should be able to add variables as I described above by navigating to Properties -> Main Config, once you have the call activity selected. Eclipse calls the configurations for sending variables to and from the parent workflow as “Input” and “Output”. There you can configure the target and source fields to take variables you want to transfer between the parent and child processes.
Sean Pyle
·2 years ago · EditedHi Robert,
Consider using a Call Activity here. It will allow you to pass a variable to another workflow through the In property on the configuration bar. Likewise, you can retrieve variables from the other workflow using the Out property within the Call Activity.
For variables that you define as process variables in the workflow before you instantiate the call activity – you can declare them in the **Source Variable **field within the “In” property and pass them to the other (child ) process. Then you should be able to declare the variables you passed to the child process without needing to define them again (in the start form properties or a script task).
For the variable that you plan to return to the parent process (the process that started the call activity). Make sure it is defined as a process variable within the child process. Once the child process finishes execution, Collibra will retrieve the Source Variables defined in the Out configuration.
Andrea Nicole Manalo
·1 year agoHi @SeanPyle, I have two workflows. The first workflow only retrieves the asset name, which I pass to the second workflow. In the second workflow, I have a form reference that updates the asset obtained from the first workflow. However, when the flow reaches the call activity, the form does not appear. I do not know what the error since the logs does not indicate any.
This is my first workflow:
Second workflow:
Sean Pyle
·1 year ago · EditedHi there,
So you noted "when the flow reaches the call activity, the form does not appear". I need to clarify that the call activity does not instantiate a form, it triggers other processes and transfers variables to those processes. So, you shouldn't expect to see a form when process #1 reaches the call activity. If you need to enter information manually, you'll have to add a user task between your script task and call activity.
Note for the second workflow to receive the variable from the call activity, it must have the same variable defined in the start event's form properties (as I noted above).
Andrea Nicole Manalo
·1 year ago · EditedHello @SeanPyle , thanks for the reply. The call activity triggers another process, and that process have a form in the start event, but it seems the form does not appear. I am working on a workflow to retrieve first the asset and then a form will appear right away or as a pop-up to add attributes to that asset and I tried to use a user task however the form did not appear as pop-up even though the candidate user is also the initiator of the workflow.
Sean Pyle
·1 year agoHey, I tested this and ran into the same thing. I think your best bet will be to create a User Task immediately preceding the Start Event instead of using a Start Form Reference or Form Properties (I tested this too and it worked).
Andrea Nicole Manalo
·1 year ago · EditedHello, thank you! It works however the user task is directly going to the Tasks. Are there any solutions to make the form appear right away in the asset level workflow?
Edited: It works now; I added a readable property in the start event, and when I click the send button, the user task now pops up. A big thanks to you @SeanPyle
Sean Pyle
·2 years ago · EditedHi Robert,
Consider using a Call Activity here. It will allow you to pass a variable to another workflow through the In property on the configuration bar. Likewise, you can retrieve variables from the other workflow using the Out property within the Call Activity.
For variables that you define as process variables in the workflow before you instantiate the call activity – you can declare them in the **Source Variable **field within the “In” property and pass them to the other (child ) process. Then you should be able to declare the variables you passed to the child process without needing to define them again (in the start form properties or a script task).
For the variable that you plan to return to the parent process (the process that started the call activity). Make sure it is defined as a process variable within the child process. Once the child process finishes execution, Collibra will retrieve the Source Variables defined in the Out configuration.
Sean Pyle
·1 year ago · EditedGlad to help! Good luck with your workflow.