Creating process variables in the GUI

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2011 11:13 AM
Is it possible to set process variables from the GUI? I understand that Forms can be used for user input, but we would like to set process variables directly (not through a script task, if possible).
How can this be done?
Currently, we do this in our Java code:
HashMap<String, Object> v = new HashMap<String, Object>(); v.put("BOKey", BOKey); engine.getRuntimeService().startProcessInstanceByKey("SeriesRouter", v);
But it would be nice to set these properties through the GUI.
Thanks,
-dan
- Labels:
-
Archive

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2011 12:32 PM
That's exactly what user task forms are for. You can define a form on a start event to present a form in the Activiti Explorer when you start a new process instance.
Best regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2011 12:42 PM
That's exactly what user task forms are for. You can define a form on a start event to present a form in the Activiti Explorer when you start a new process instance.
Is it possible to do this without user interaction?
Thanks,
-dan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2011 12:46 PM
When you want to edit process variables in a GUI, it's always with user interaction, no?
Best regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-27-2011 12:58 PM
I don't understand your question.
When you want to edit process variables in a GUI, it's always with user interaction, no?
Sorry, I'll try again.
I do want to set the variables in a GUI, but when I design the workflow in the Eclipse editor, not after the workflow has been started inside the Activiti server.
We have some components in our workflows that need to behave differently depending on a process variable. The process variables will be static in each workflow, more like a parameter that is set once rather than edited (our workflows do not have any user interaction, by design). We would also like less technical people to design workflows, but still have control over the behavior of certain components.
As far as I can tell, there is no way to use the Acvititi designer to set process variables. I do understand that I can ask for user interaction through Forms, but is only after the workflow has been started.
Thanks,
-dan

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2011 03:10 AM
It would however be simple to do by creating a process start listener or something like that.
The only way at this moment to present a different user task form based on a process variable value is to create multiple user tasks and have an exclusive gateway in front.
But the Activiti Explorer form engine is quite flexible and extendable, so you might want to look in customizing some stuff there.
Best regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2013 07:42 PM
Creating default process variables is not something that's supported by default in the Activiti Engine.
I am a bit confused by this statement.
Process Variables as I see can be declared 2 ways
1) Form variables declared are part of the process definition XML . I can set their values from a java client as well as from GUI(explorer) at the start of the process and my REST service returns them as process variables
2) Same can be done with out Form variables, by directly Java setting a map of variables. Only thing is these variables are not part of Process Definition.
so what exactly is not supported?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2013 06:27 AM
What Tijs is hinting at is the declaration of variables and its default values in the process xml, something like
<variable name="blah" value="foo" />
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2013 06:28 AM
I meant to post something like
<blockcode>
<variable name="foo" value="bar" …
</blockcode>
straight away in your process, not having to do anything with form variables

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2013 11:38 AM

