Highlighted
Absent Member.
Absent Member.
2758 views

Parameter value containing the OO Flow name/uuid?

Trying to pass along the name and/or UUID of the OO flow to a issue ticket creation flow without having to hard-code it in every instance. Is there a system/global variable that can be referenced to resolve the flow name, UUID, revision, etc?

 

For clarification - being able to reference the previous flow/operation by UUID or name in the normal context of global or local variables:

 

Something like:

${currentWorkflowName}  or ${previousStepUUID} etc. 

 

I know there are some "Debug" things hidden away, ala creating an input called returnXMLRequest to steal a look a the raw XML sent during a SOAP call. 

 

I'm looking for something similar in terms of referring to the flow name and/or UUID

0 Likes
10 Replies
Highlighted
Absent Member.. Absent Member..
Absent Member..

Execute following SQL Query...

select *, name, root_flow_uuid from run where oid = ${run_id}

Please try.

0 Likes
Highlighted
Absent Member.
Absent Member.

Are you suggesting that I run a SQL query against the OO database in every run?

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Yes.
As far as I know, It is only one solution 😉

0 Likes
Highlighted
Absent Member.
Absent Member.

Yikes, can't do that. I need to know the previous step ( workflow or op ) so that on fail I can branch and open a ticket. I'll figure out another way; SQL query at each step of the run is too costly. 

0 Likes
Highlighted
Absent Member.
Absent Member.

It may not be pretty, but you can always add a set of standard variables for each of your steps. I suggest keeping this to the key steps for which you need the information and/or for which you feel there is a higher risk of issues. For example, create two input and one possibly one output variables. Set the input variables to Single Value. Within the Input Data Flow box, there are three dropdown/combo boxes. Set those values as listed below. Set the output to carry any error messages that you care to see.

 

Variable Name                        Assign From                            Otherwise                    Assign To

stepName                               Not Assigned                           Constant                      stepName

stepInput                               Not Assigned                           Constant                       stepInput

 

Then for each constant, set the constant value to the name of your step or the inputs you used (i.e.. variable1=value1; variable2=value2;).

 

For the output (stepError), just grab the error message that is appropriate for each operation or subflow. This gives you a consistent platform for debugging and logging.

 

Disclosure: This scheme was not created by me, but by an external consultant brought in to create an initial design for one of our complex flows. This has worked out well. Unfortunately, I do not have permission from the consultant to give his name or the name of his company.

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

You can obtain the UUID by filtering it out of the URL created by the "Generate Run URL" operation in the OO Integrations folder.

0 Likes
Highlighted
New Member..
New Member..

do you happen to have a SQL Query to get all global or local variables in the current run? 🙂

 

oh and the location of SQL Query would be helpful too...  in HPOOv9 I used scriptletContext.keyset() to get all contexted global/local variables during the current operator run..  keySet() is no longer available in scriptletContext in HPOOv10 now..

0 Likes
Highlighted
Absent Member.
Absent Member.

  1. You can use ${run_id} for the flow UUID.
  2. Yiou can use getGlobalVarNames which return array of all the global context

 

 

0 Likes
Highlighted
Contributor.. Contributor..
Contributor..

${run_id} renurns only the current run_id for me, not the UUID.

I'm looking for something like var rootUUID= scriptletContext.get("ROOT_UUID");

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

What about using OO's REST API

in your case something similar to /oo/rest/v2/executions/{run_id}/summary (just check it)

the result is json and contains the flow_uuid too. you can take it and use it afterwards.

Andrei Vasile Truta
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.