assign output of customized operation using Scriptlet into flow varible
I am facing an issue in assigning results to flow variable though Scriptlet
in my scriptlet i have some local variables that i want in my flows/Operations output as flow variable/Output
Please help me in same.
thanks in advance.
Assuming that I'm understanding your issue correctly, you should be able to do this using the examples from the Script Template. Here is the relevant area from the Rhino template:
To set the result of the operation:
scriptletResult = "Your Result Here";
Use the context to hold data for use by other steps. It is also helpful to place information into the context to examine variables when developing and debugging scriptlets. For example to place the OutputString information into a context key called 'Output':
Note that the Key and Value are both strings. For example to place 'code' into the context:
You can also place data into the local context, which means it will only be available to the current flow, but not to its parent flow or other subflows. To do this:
To further explain... the first option "scriptletResult=" is for
the first option "scriptletResult=" is for Scriplets used in the "Output" filters only and will set the output of your filter to whatever you put here. Think of it as the final result of the Filter.
The next two are both "scriptletContext.putGlobal()" and they will create/update a Global variable that will be available to your entire flow. This may not show up in your selection list as inputs/outputs when authoring but if you manually type it in it will work.
The last one, "scriptletContext.put()" is similar to the putGlobal. The only difference is that the variable will be a Local variable and so will only be available to the specific flow and not passed to any sub- or parent flow.
I hope that helps answer your question.