Hi All,
I am using Alfresco Activiti 1.5.0 and Alfresco 5.1.2 versions.
Say my process and tasks as follows
Task A --> Task B ---> Task C
Here,
Task A is start of workflow and generate documents,
Task B is Publish documents to Alfresco,
Task C is User Task for Approval.
In the middle of my Activiti Process/workflow, I am publishing a document from Activiti into Alfresco. In Alfresco, I have some custom task to be done and once done, document will be updated with new properties. Only based on these update of properties, task should go to next level i.e, Task C in the Activiti Process/workflow.
So, Until the properties are updated in the Alfresco, task should not go to Task C.
How do I achieve this? How does Alfresco tell Activiti to proceed to next task in the workflow.
Thanks in Advance. Any help would be greatly appreciated.#
Solved! Go to Solution.
The easiest way to handle this is to execute an action from a REST call.
The API reference in Community Edition is here: Activiti User Guide - Execute Action
For an intermediate message event you would use the following request content:
{ "action":"messageEventReceived", "messageName":"myMessage" "variables": [ ] }
Hope this helps,
Greg
I am not sure there is any built-in way to handle what you want.
I imagine what you are experiencing today is that after the document is uploaded the Activiti process continues to the user task (Task C) without waiting for the document store task to complete.
If Alfresco can send a message on a message bus, or make an HTTP request, then you can add an intermediate message wait event after Task B which will stop execution until such time as the document system completes its flow and releases it.
Again, I am not familiar with what the ECM can do here, but that is the general pattern for these sort of things.
Greg
Thanks Greg Harley. I have been googling for an example to implement an intermediate message wait event, so that when I trigger an http request from external application, process in the workflow should move further from B to C.
Could you help me by providing any reference configuration/code??
Which URL should I call to trigger the paused workflow from external application??
I see 3 catching events, which one would be correct to use here??
Thanks in Advance,
Naveen
The easiest way to handle this is to execute an action from a REST call.
The API reference in Community Edition is here: Activiti User Guide - Execute Action
For an intermediate message event you would use the following request content:
{ "action":"messageEventReceived", "messageName":"myMessage" "variables": [ ] }
Hope this helps,
Greg
Thanks Greg..
I am using enterprise edition. I am trying to set the intermediate signal/message catching event, In both cases, it shows reference is missing. Reference drop down is showing empty value.
Screenshots below:
Thanks in Advance,
Naveen
Naveen,
You have to define the messages/signals at the process level. Then you would be able to select them.
Ciju
Ask for and offer help to other Alfresco Process Services and Activiti Users and members of the Alfresco team.
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.