I am trying to create a web page that describes the state of a particular workflow. First I have to get that information. So in Java through the WorkflowService, I can get a list of workflows that are in progress. perfect.
But from there it gets hard. There is nothing like getTaskInstanceForWorkflow(workflowInstanceId) that returns a List of TaskInstance. I want a way to traverse a wokflow and pull info from it.
Can someone point me in the right direction? Is there a tutorial out there that focuses on a pure Java aproach to handleing workflows?
Hi!
Maybe this tutorial can help you to clarify what is possible to achieve and how. But, you need to take in account the API of your Alfresco version.
Cheers!
I have been through that tutorial several times, and it seems to be geared more twords the workflow console and not the Java. I am looking for more of a java based approach. like, without haveing to go through source code (which I may endup doing) java examples for each of those dashboard commands.
Hi!
On that tutorial you have examples about how can you build your first workflow using java, after you have it, you'll need to play by yourself using the Java api according to your Alfresco's version.
In adition you have this in the official documentation.
Cheers,
Cristina.
You can try WorkflowTaskQuery to get tasks of instance.
Ex.
WorkflowTaskQuery taskQuery = new WorkflowTaskQuery(); taskQuery.setActive(null); taskQuery.setProcessId(workflowInstanceId); taskQuery.setTaskState(state); taskQuery.setOrderBy(new OrderBy[] { OrderBy.TaskDue_Asc }); List<WorkflowTask> allTasks; = workflowService.queryTasks(taskQuery);
Thanks @sanjaybandhniya by the way do you know an updated tutorial for developing workflows? Maybe that can help too @mangar
Cheers!
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.