11-18-2016 09:33 AM
12-21-2016 02:38 PM
Gowtham,
Not sure I fully understand the question but best practise is to keep as little business data as possible inside the process. The data that is kept in the process should be minimal and really speak to the state of the process.
Business data should be maintained in an external system of record and accessed as needed by the process.
If you don't follow this practise, you can easily fall into out of memory and performance problems at the database layer.
As an example, I have one customer who is accessing web services from within their process (no problem here), but after parsing the data and retrieving what they need, they failed to delete (or null out) the process variable that contained the raw response. As such, they ended up with over 2Gbyte of data associated with each process instance. Now, when they are retrieving a list of instances (with variables) they regularly run out of available memory. They are working to resolve this but it is a very typical rookie mistake.
Anyway, if this isnt what you are looking for, please provide more specifics.
Thanks,
Greg
12-21-2016 03:23 PM
Thanks for responding to the question. I will put my question this way.
We are working on building an application from scratch in Java, AngularJS and Mongo. The application is built and currently running in Lotus Notes platform. So, we are basically working on a migration project which involves both technology and data migration.
We are using Activiti for workflow. We have designed our process in Activiti and make interaction with the process outside of the application via REST services. We do have couple of process variables and send very little business data to the Process.
The question here is:
We can instantiate the process for every new item that gets created in the application. We could interact with the process from the application and keep the flow going.
Apart from that, we will also be migrating the actual system of records from Lotus Notes Database to the new Mongo Database. For all these existing set of records, how the process can be initiated as each and every existing item would already have been moved to some stage in the workflow? I would need the process instantiated for each of these existing items and each item would be at its stage in the workflow.
Is this something that we can achieve in Activiti? Any kind of solution is welcome.
Thanks,
Gowtham
12-22-2016 11:42 AM
Hello Gowtham,
Thank you for the detailed explanation.
The bottom line of what you are asking is:
You have a number of existing process instances "in flight" in your existing system and you want to migrate them into the Activiti workflow at the correct running state (i.e. not start from the beginning).
Unfortunately, Activiti does not provide a means to start a process mid stream (there are other BPM engines that do provide this capability).
Therefore, the general rule is you must create alternate entry points into your process to "inject" in flight instances.
Generally you do this using Message Start events and inject at known "safe haven" states.
The above is a general approach, but having done over a dozen of these migrations, I know that it can be very complex depending on the complexity of the process (eg handling parallel flow) and the supporting data, equally, for simple processes it can be very easy.
Greg
01-06-2017 01:17 PM
Hi Greg,
Thanks for coming back with a solution. I added a Message Start Event somewhere in the middle of the process just to test whether I can initiate a workflow process in the middle. I setup the message in the process level and assigned the message in the message reference of Message Start Event.
Now, I am not sure how to trigger the message when initiating the process from an external application via REST service. I read through the documentation and no where I could find how to initiate the process with the Message Start Event. Could you help?
Thanks,
Gowtham
01-06-2017 01:45 PM
Hey Gowtham,
If you have the execution ID, you can issue a signal or message action on the execution using the REST API documented here:
Activiti User Guide - Execute an Action on an Execution
This allows you to call the message by name and inject variables at the same time.
Cheers,
Greg
01-06-2017 02:31 PM
Hi Greg,
I am using Alfresco's enterprise version. And I couldn't find any REST API in this document (Alfresco Activiti) to execute an action on an execution.
Thanks,
Gowtham
01-06-2017 02:47 PM
The Community REST API is exposed in Activiti Enterprise under the /api context.
Refer the following enterprise api docs: Alfresco Activiti - Activiti Engine REST API
Greg
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.