Hi
I have written a simple component which lets you access process variable names and values for a given task. The component takes a taskID as an input parameter and return a HashMap of string which contains the process variables names and its values. Click the link below to access sample process which uses the custom component
Click to get the pdf file
Accessing Process Variable Names and Values
October 6, 2008 · 5 Comments
Categories: Uncategorized
Tagged: Process Variable Names, Process Variable Values
5 responses so far ↓
fursten // January 7, 2009 at 1:25 am |
Hello,
Is it possible to get the current value of a given process variable inside a custom component. For instance, suppose there is a process variable with a numeric value, and inside the custom component, at runtime of the process, I want to get the current value of the process variable to make a calculation to another variable or to the same variable?
I know this is possible inside a execute script because there is an object that hold the references to all variables in the process. But I would like somehting like that inside a custom component.
thank you
Girish Bedekar // January 7, 2009 at 2:16 am |
Hi
I will get back to you on this, but out of curiosity What is the use case for trying to do this?
thanks
girish
fursten // January 8, 2009 at 12:19 am |
Hello Girish,
First of all, thank you for your instantaneous support
I need to compose a text/string that depends from the text already created in previous steps of the process (that I increment/change in the same process variable) but also from user input in each subsequent steps (which are at most of times links to objects in the repository/or file system). I could make some new variables and some manipulation of that text inside, for instance, an xpath expression. However, using this method the user would need to understand and manipulate each expression. This could lead to some mistakes because my users/process developers are not power users.
So, the ideia would be to make all the “static” changes to that text/string by code in a custom component. For instance, if I would like to add a link from a repository document to a process variable that has already some text, I would make a component that would have an input parameter with a browse button to get the link, and then, inside my custom document, I would make the change (for instance a replace to the text already contained in a process variable). That way I would get my text changed inside the variable without the need for any kind of visible function (ex: xpath function) like when using a non-custom component.
Please, let me know if you need further explanation about this use case.
Thank you!
Brian // February 25, 2009 at 4:47 pm |
I am writing a class that will send data to a database and I need it to be flexible. I have several variables defined at the member level. In one of the methods, I need to read a mapping (name/value) from a configuration file. I need to use the string found in the value and pull in whatever is stored in the member variable of the same name. Is this possible?
Girish Bedekar // February 26, 2009 at 6:07 pm |
Hi Brian
Yes it is possible
mail me if you have any follow up questions
thanks
girish