RE: Workflow Transition History

thumbnail
Vahid Kh, modified 5 Years ago. Junior Member Posts: 54 Join Date: 8/6/19 Recent Posts
Hello Everybody
How can I get a list of all the transitions done for a special Workflow Instance ? 
kesu ks, modified 5 Years ago. Junior Member Posts: 27 Join Date: 8/31/14 Recent Posts
Hi,

which version of liferay you are using ? you can try with the below API
WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance(companyId, workflowInstanceId, logTypes, start, end, orderByComparator);
thumbnail
Vahid Kh, modified 5 Years ago. Junior Member Posts: 54 Join Date: 8/6/19 Recent Posts
No , this method don not return any information about done transitions
thumbnail
Amos Fong, modified 5 Years ago. Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
When viewing the workflow task, do you see the transitions in the bottom activities? If so, it uses this same API. Make sure you have the right ID and have WorkflowLog.TRANSITION in the logtypes.
thumbnail
Vahid Kh, modified 5 Years ago. Junior Member Posts: 54 Join Date: 8/6/19 Recent Posts
No,  I do not see any transition in activity list
And in other hand for following code it print zero for size of log list

List<integer> logTypes = new ArrayList<integer>();&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;
logTypes.add( WorkflowLog.TRANSITION);
​​​​​​​List<workflowlog> transitionLog = WorkflowLogManagerUtil.getWorkflowLogsByWorkflowInstance( companyId, workflowInstanceId, logTypes , start, end, orderByComparator );
System.out.println(transitionLog .size()); &nbsp;// print 0
</workflowlog></integer></integer>
thumbnail
Amos Fong, modified 5 Years ago. Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
What version of Liferay are you using?

Are you using Kaleo?

How are tasks transitioned?
thumbnail
Vahid Kh, modified 5 Years ago. Junior Member Posts: 54 Join Date: 8/6/19 Recent Posts
Liferay Version 7.1
Yes I'm use Kaleo 
Transitions has been done by this utility:​​​​​​​
WorkflowTaskManagerUtil.completeWorkflowTask( companyId, userId, taskId, transition, workflowComment, workflowContext );
thumbnail
Amos Fong, modified 5 Years ago. Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
hm...try adding this log type to your query:
WorkflowLog.TASK_COMPLETION
thumbnail
Amos Fong, modified 5 Years ago. Liferay Legend Posts: 2047 Join Date: 10/7/08 Recent Posts
Actually if nothing shows up in the activity list on the bottom of the workflow tasks, I don't think it'll come up in the API either.I would just double check if there's anything added to the KaleoLog table in the DB when you complete your task to see if it's an issue retrieving the log, or adding the log.
thumbnail
Vahid Kh, modified 5 Years ago. Junior Member Posts: 54 Join Date: 8/6/19 Recent Posts
I think no any data saved in DB for Transitions
In fact the problem is in adding log
According to attachment image that is a screenshot of KaleoLog Table, there is not any Transition log
How can I log it ? Does it have a separate utility ?
thumbnail
Vahid Kh, modified 5 Years ago. Junior Member Posts: 54 Join Date: 8/6/19 Recent Posts
No any idea? 
thumbnail
Mohammed Yasin, modified 5 Years ago. Liferay Master Posts: 593 Join Date: 8/8/14 Recent Posts
Hi , Have u checked in Control Panel -> Cofiguration - > workflow->monitoring , here u can check whether for given workflow instance activities are showing up or not
thumbnail
Vahid Kh, modified 5 Years ago. Junior Member Posts: 54 Join Date: 8/6/19 Recent Posts
Hi Mohammed Yasin
In monitoring  and in Activity section there is no log for Transitions, They log only tasks and states
As you can see in the attachment

Attachments: