Hi Experts,
For every process we creates, LC ES2 creates processID.
we know that if you creates a long lived process, all the values which are in proces will be stored some where in DB.
Here my requirement is by using processID I need to get all/some values/variables stored in database.
I am not able to get values using processID. Here I don't have clue on how to get the values.
Please tell me how to get the same by using Process Management. Link/guide would be helpful
Thanks
Praveen.
Views
Replies
Total Likes
Is it the long-lived process information you are interested in or are you more intereted in getting task-specific information. I'm trying to understand your use case.
Views
Replies
Total Likes
What about using the TaskManagerClientFactory?
_queryManager = TaskManagerClientFactory.getQueryManager(_factory);
public List getProcessVariablesValue(long processID){
List procVar = null;
try {
procVar = _queryManager.getProcessVariableValues(processID);
if(procVar == null) {
System.out.println("No process variables");
}
int size = procVar.size();
System.out.println(size);
for(int i = 0; i < size; i++){
MultiTypeVariable var = ((MultiTypeVariable)procVar.get(i));
System.out.println("name = " + var.getName());
System.out.println("value = " + var.getValue());
System.out.println("getTitle = " + var.getTitle());
System.out.println("getType = " + var.getType());
System.out.println("isSearchable = " + var.isSearchable());
System.out.println("isVisible = " + var.isVisible());
}
}
catch (Exception e) {
e.printStackTrace();
System.out.println("ERROR!!!");
}
return procVar;
}
Jasmin
Views
Replies
Total Likes
Note that you'll only get the variables that are marked searchable.
Jasmin
Views
Replies
Total Likes
Hi Jasmin,
I'm not clear between Searchable & Visible in UI properties of a variable.
Searchable help us to define search criteria in "Search Templates" - Am I correct?
Visible in UI - Still I don't find it clear to me.
Nith
Views
Replies
Total Likes
Searchable means you can put a filter criteria on it (e.g. where amount > 50000)
Visible means you can add have this column returned as an output (and therefore you can add it as column in listview and see it in Task Details).
These two attributes were provided so that queries could be done against the process variables, but the exact contents of the variables are not allowed to be seen.
Views
Replies
Total Likes
Hi Jon,
Your explanation is much clear and helpful.
I have a couple of further questions in this regard:
I have designed a service request process. Each instance of the process will have a different KPI (the KPI differs based on a value chosen from a drop-down field in the form). I created a variable named KPI and enabled the both the properties (visible & searchable).
I want this value to appear in the tracking. It does!. But the problem is the KPI shown for each task (i.e in the Audit entry list) which will be same for all rows.
Is it possible to display this value at each instance level?
If my question is complicate, I am ready to explain in detail.
Thanks,
Nith
Views
Replies
Total Likes
I presume you mean you want them to be displayed in the datagrid that lists all the process instances, because they are displayed in the Process Details tab when you select an instance - you don't need to go into the Audit tab.
Unfortunately, the column setup for the datagrid that lists all the instances for a selected process is hardcoded in the Workspace Tracking model and the query that get populates it's dataprovider doesn't pull in the variables so you can't even customize workspace to achieve what you want.
Views
Replies
Total Likes
Hi Jon,
Your understanding is correct. Thanks for your reply.
Nith
Views
Replies
Total Likes