AnsweredAssumed Answered

Getting user input with Activiti

Question asked by asinoladro on Nov 25, 2014
Latest reply on Nov 26, 2014 by martin.grofcik

I'm a Activiti newbie, and am working out how to best use it for structuring my company's work. Questions:

1. I'm keen to ensure my vision of how it'll fit in aligns with Activiti best practices.Is the below a good way of structuring things?
2. Any major technical issues that jump out?


Our company analyses video footage and writes reports for our clients. I want to coordinate work from three groups of people:
1. Our own employees - responsible for analysing our videos and writing the reports
2. Our clients - define requirements, negotiate pricing, receive reports
3. 3rd party companies - finding people to feature in our videos; making the recordings; sending the videos to us

I imagine us developing a collection of BPMN workflows whereby:
1. Work for our employees is managed via tasks. Our employees will all have Activiti accounts and will manage their own tasks via Activiti Explorer.
2. Whenever we want to get input from our client, a task will be assigned to our customer relationship manager, with an email template. This employee can adjust the email as appropriate, or call as appropriate, and complete the task when they have the required info.
3. When we need input from the 3rd parties, Activiti will send an email with a form to fill out. The 3rd parties will fill submit our forms, which will make the Activiti workflow progress to the next step.

IMPLEMENTATION (see attachment for sample BPMN)

1. Our workflows will contain a UserTask for each point at which we need input from our own employees or our clients, with our employees in a number of groups (translator, client_manager, etc).
2. MailTasks will be used for sending out email to 3rd parties. Process variables embedded in the HTML body property will be used to address the appropriate recipients, specify the right project names, and to include a custom form URL that contains the current execution ID.
3. R10/P1D TimeBoundary events will be used for daily chaser emails for input on tasks that haven't been completed.
4. We'll define forms outside of Activiti with file uploads to S3/Dropbox, radio buttons, input fields etc. On submit, these will call Activiti via the REST API (later on we'll put JMS in between via Camel).
5. We'll make a custom version of the activiti-rest module that contains a new REST webservice: 'signal/{executionid}', with new process variables as POST variables. This service will wake up the specified process execution, blocked at a ReceiveTask. As far as I can see this isn't otherwise supported - I intend on adapting this to work with the current release of Activiti.
6. We'll modify activiti-webapp-rest2 to depend on the custom version of activiti-rest with the extra webservice.
7. We'll deploy the activiti-webapp-rest2 and activiti-webapp-explorer2 together in one tomcat instance. Both will have updated to point to a server-mode H2 or MySQL instance.
8. The process variables from our custom forms/the REST calls will drive decisions at gateways, and be used for the body/titles/recipients of emails from MailTasks

Specific bits where I feel like there might be a smarter way:
a. When we need to do things like getting users to do file uploads mid-process, is using an external form our best option? This leads to a fair bit of complexity, e.g. the extra REST service - can all this be done within Activiti somehow?
b. What I'm doing with the maven modules feels wrong somehow… can I just make my own .war somehow that gets deployed alongside Activiti Explorer and the out-of-the-box REST API all in one tomcat container, sharing the same database? How would this work?