Discussion:
[jboss-user] [jBPM] - Re: Jboss Guvnor JBPMN process variable
Tihomir Surdilovic
2012-11-28 00:12:35 UTC
Permalink
Tihomir Surdilovic [https://community.jboss.org/people/tsurdilovic] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/778714#778714

--------------------------------------------------------------
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

Loading Image... Loading Image...
5. Click on "Add Variable":
Loading Image... Loading Image...
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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/778714#778714]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
priyag gupta
2012-11-28 06:00:07 UTC
Permalink
priyag gupta [https://community.jboss.org/people/priyag] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/778746#778746

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/778746#778746]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Tihomir Surdilovic
2012-11-28 14:37:19 UTC
Permalink
Tihomir Surdilovic [https://community.jboss.org/people/tsurdilovic] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/778892#778892

--------------------------------------------------------------
You have two options, one is to use Designer to generate your process and task forms for you, for that click on the:

Loading Image... Loading Image...

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/ http://surdilovic.wordpress.com/2012/08/06/process-and-task-form-editing-in-jbpm-designer/

HTH
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/778892#778892]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
priyag gupta
2012-11-28 18:34:43 UTC
Permalink
priyag gupta [https://community.jboss.org/people/priyag] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/778974#778974

--------------------------------------------------------------
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?
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/778974#778974]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Tihomir Surdilovic
2012-11-28 19:00:42 UTC
Permalink
Tihomir Surdilovic [https://community.jboss.org/people/tsurdilovic] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/778978#778978

--------------------------------------------------------------
1. 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 visualle 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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/778978#778978]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
priyag gupta
2012-12-04 05:57:24 UTC
Permalink
priyag gupta [https://community.jboss.org/people/priyag] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/779766#779766

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

Reply to this message by going to Community
[https://community.jboss.org/message/779766#779766]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Hugo Borda
2013-01-07 21:16:47 UTC
Permalink
Hugo Borda [https://community.jboss.org/people/hugoaborda] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/788972#788972

--------------------------------------------------------------
Tihomir, I have a 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 colection.  I could not find an example of assign to a particular element in a collection, could you please tell if that is even possible?

Regards, Hugo
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/788972#788972]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Tihomir Surdilovic
2013-01-07 23:29:30 UTC
Permalink
Tihomir Surdilovic [https://community.jboss.org/people/tsurdilovic] created the discussion

"Re: Jboss Guvnor JBPMN process variable"

To view the discussion, visit: https://community.jboss.org/message/789059#789059

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/789059#789059]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]
Loading...