Persistence of UserTasks

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2013 08:23 AM
Hi,
I have a process with a UserTask and exclusive gateway and I save the values form the form with the following code snippt:
{code}
public void confirmUserTask(String taskId, Map<String, String> parameterMap)
{
synchronized (USER_TASK_ACCESS_SEMAPHOR)
{
taskService.setVariables(taskId, parameterMap);
}
taskService.complete(taskId);
}
{code}
After the value is persisted I looked into the database and my value is "serializable".
Now the exlusive gateway use internally an evaluation and return all time false for this expression.
My expression:
{code}
${USER_QA_NECESSARY == 'true'}
{code}
Is this the right way to persist values and use expressions?
Cheers,
Michael
I have a process with a UserTask and exclusive gateway and I save the values form the form with the following code snippt:
{code}
public void confirmUserTask(String taskId, Map<String, String> parameterMap)
{
synchronized (USER_TASK_ACCESS_SEMAPHOR)
{
taskService.setVariables(taskId, parameterMap);
}
taskService.complete(taskId);
}
{code}
After the value is persisted I looked into the database and my value is "serializable".
Now the exlusive gateway use internally an evaluation and return all time false for this expression.
My expression:
{code}
${USER_QA_NECESSARY == 'true'}
{code}
Is this the right way to persist values and use expressions?
Cheers,
Michael
Labels:
- Labels:
-
Archive
5 REPLIES 5

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2013 08:45 AM
btw. I'm using Activiti 5.12 and JDK 1.7

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2013 08:57 AM
That depends which variables you provide as part of the parameterMap.
It's a correct way to add variables to the process context. If the values are stored as text, long or serializable depends on the value type.
Best regards,
It's a correct way to add variables to the process context. If the values are stored as text, long or serializable depends on the value type.
Best regards,

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-22-2013 10:02 AM
Ok in my case the map contain only Strings which type is used in the database? My problem is that ${USER_QA_NECESSARY == 'true'} is always false. Which class resolve the value of USER_QA_NECESSARY from the database?

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2013 05:14 AM
So you are not using a boolean for true but a String value? If it's a String value it will be stored as a String as well. Can you include the exact XML definition you have? I would like to see a bit more than just the expression.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎08-23-2013 09:00 AM
I found the failure. The value was of type String[] now everything works fine for me
also the use of boolean expressions


