-
1. Re: Jboss Guvnor JBPMN process variable
tsurdilovic Nov 27, 2012 7:12 PM (in response to priyag)1. Click on any white area of your canvas, the properties section on the right side should have title: Properties (BPMN-Diagram)
2. Open the properties section
3. Expand if needed the "Extra" section of your properties
4. Find the "Variable Definitions" property and click on the arrow at the end of the input box - this will open the variable definition editor
5. Click on "Add Variable":
6. Enter your process variable name, and select either a standard type (optional) or a Custom type (optional). If you don't select anything it will default to Object type.
7. Add more if process vars if needed.
HTH
-
2. Re: Jboss Guvnor JBPMN process variable
priyag Nov 28, 2012 1:01 AM (in response to tsurdilovic)Hi Timhomir,
Thanks for your reply. I have created some simple variable using this variable definition. Now I want to know how these variables can be associated with form on user tasks in process. I am attaching the image of my process. On start of process I want that form generated should have all this variables that I have defined as process variables like Name, Age, salary, grade. How can I do this. Also I need this on my user step i.e. Accounting approval.
Regards
Priya
-
process.png 49.6 KB
-
-
3. Re: Jboss Guvnor JBPMN process variable
tsurdilovic Nov 28, 2012 9:37 AM (in response to priyag)You have two options, one is to use Designer to generate your process and task forms for you, for that click on the:
in the navbar. You can then edit your process and task forms in Designer as well, for that see: http://surdilovic.wordpress.com/2012/08/06/process-and-task-form-editing-in-jbpm-designer/
HTH
-
4. Re: Jboss Guvnor JBPMN process variable
priyag Nov 28, 2012 1:34 PM (in response to tsurdilovic)Thanks. This link is very useful. Now I have 2 more doubts:
1. We defined process variables which was used on form. This is fine. But for user workstep do we need to define again the variables in DataInputset and DataOutputset or do we have selection wizard available for these field from process variables.
2. Apart from defining variables in designer (as shown in above demo) if I have already uploaded a POJO model and set it in my working set, can I use these variables in form? How to do this? Is there some demo or document available for doing so?
-
5. Re: Jboss Guvnor JBPMN process variable
tsurdilovic Nov 28, 2012 2:01 PM (in response to priyag)1 of 1 people found this helpful1. Tasks have local data inputs and data outputs (BPMN2 spec). You have to map process variables / data objects to Task data inputs and also if needed map Task data outputs back out to process variables / data objects.
jBPM Designer also has an intuitive data input / output editor similar to the process variables editor which you can use to visualy do the mappings
2. Process variables, data objects, data inputs/outputs can have a type. This can be a custom type (type of your spefic class) as well, so you should be able to use that in a form.
HTH
-
6. Re: Jboss Guvnor JBPMN process variable
priyag Dec 4, 2012 12:57 AM (in response to tsurdilovic)Thanks Tihomir. This worked. I am able to map process variables and generate forms now. Now I want to use rules inside my process. Do we have some demo of how to configure rule task in a process.
-
7. Re: Jboss Guvnor JBPMN process variable
hugoaborda Jan 7, 2013 4:18 PM (in response to tsurdilovic)Tihomir, I have related questions to this topic and that is "Is it possible to map to a Java collection of some fashion?" My process has a lot of variables and instead of creating individual variables I would like to create a key/value collection. I could not find an example of assign to a particular element in a collection, could you please tell me if that is even possible?
Regards, Hugo
-
8. Re: Jboss Guvnor JBPMN process variable
tsurdilovic Jan 7, 2013 6:29 PM (in response to hugoaborda)It is possible but the current task/subprocess/data object mapping support in the tooling is not really good for dealing with collections and the runtime support for transformations can be improved. I am revising data mappings at the moment so hopefully can address most issues soon in Designer. Workaround currently is to use single value types in data mappings and then populate the process variable (collections) via script tasks.
HTH