Mark_RB Frequent Contributor.
Frequent Contributor.
288 views

Accessing Flow Variables in plugin\IAction

Hi All,

I am wondering if anybody could help me.  I am developing a new HP OO operator to post log messages to a GrayLog server using the GELF UDP JAVA project.  All is going well- I have messages, detail, status, OO hostname, etc.  (I intend to open source it if anyone is interested)

What I would like to do is access the flow variables, very much like you can with 'scriptletContext.get()' and 'scriptletContext.getLocal()' when creating a JavaScript scriptlet.

 Another thing that I would really like to be able to do is access name of the current flow- although I am not so sure that would be possible (It makes sense to log the flow name for troubleshooting purposes).

Any advice would be much appreciated. 

 

Regards,

 

Mark.

Tags (4)
0 Likes
2 Replies
Micro Focus Expert
Micro Focus Expert

Re: Accessing Flow Variables in plugin\IAction

Hi,

To access the flow variables from Java I suggest to add them as inputs to the method that you annotate with @Action annotation.

For getting the flow name functionality I suggest to vote on Idea Exchange the idea submitted by other users that are waiting for it:  https://community.softwaregrp.com/t5/Operations-Orchestration-Idea/New-Global-Variable-quot-RS-Previous-Step-quot/idi-p/1634163 

Hope it helps,

Lucian Revnic

0 Likes
Mark_RB Frequent Contributor.
Frequent Contributor.

Re: Accessing Flow Variables in plugin\IAction

Thanks Lucian,

I had a feeling that was going to be the answer. 

My current solution is to have key/value pairs.  We a have a couple of similar operators:

property1=${OOFlowVariable}
property2=${anotherOOFlowVariable}

 

0 Likes
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.