rbrookegravitt Absent Member.
Absent Member.
2543 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

Labels (1)
0 Likes
10 Replies
Absent Member.. UMETSU Absent Member..
Absent Member..

Re: Paramater value containing the OO Flow name/uuid?

Execute following SQL Query...

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

Please try.

0 Likes
rbrookegravitt Absent Member.
Absent Member.

Re: Paramater value containing the OO Flow name/uuid?

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

0 Likes
Absent Member.. UMETSU Absent Member..
Absent Member..

Re: Paramater value containing the OO Flow name/uuid?

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

0 Likes
rbrookegravitt Absent Member.
Absent Member.

Re: Paramater value containing the OO Flow name/uuid?

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
jdah5 Absent Member.
Absent Member.

Re: Parameter value containing the OO Flow name/uuid?

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
Absent Member.. BobHowell Absent Member..
Absent Member..

Re: Parameter value containing the OO Flow name/uuid?

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
New Member.. AKCL2016
New Member..

Re: Paramater value containing the OO Flow name/uuid?

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
guyhanael Absent Member.
Absent Member.

Re: Paramater value containing the OO Flow name/uuid?

  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
Established Member.. lexa77
Established Member..

Re: Paramater value containing the OO Flow name/uuid?

${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
AndreiTruta Outstanding Contributor.
Outstanding Contributor.

Re: Paramater value containing the OO Flow name/uuid?

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.