Workflow

Manual

Form Fields

Check Box

_images/workflow-form-field-check-box.png

To create a series of tick boxes, the type must be boolean:

<activiti:formProperty id="monday" name="Monday" type="boolean" expression="True"></activiti:formProperty>
<activiti:formProperty id="tuesday" name="Tuesday" type="boolean" expression="True"></activiti:formProperty>
<activiti:formProperty id="wednesday" name="Wednesday" type="boolean" expression="True"></activiti:formProperty>

Form Headings

_images/workflow-form-headings.png

To create a form heading, add a formProperty with _heading appended to the id e.g:

<activiti:formProperty id="invoice_heading" name="Invoice Heading" type="string" required="true" writable="false">

The name will display as the heading.

You can add help text in Settings, Mapping, Mapping, <field name>, Help Text.

Note:

  • writable must be false
  • The property must not have a value (not sure where this comes from)
  • If the name is empty, you must add help text.

Options

dataDocument

Attach a simple PDF document with a table containing the form variables.

To get it working, add a form variable with an id of dataDocument. The name will be used as the title e.g: <activiti:formProperty id="dataDocument" name="My Data Document" type="string"></activiti:formProperty>

copyToDocumentManagement

Copy attachments to Alfresco:

<activiti:formProperty id="copyToDocumentManagement" name="Copy Attachments to Share" type="boolean" expression="True"></activiti:formProperty>

deleteWorkflow

Will add a Delete Workflow button to the task.

This is useful when the workflow is in development as the process can be deleted quickly and easily.

Prerequisite

Every task must have the following form variable:

auditDescription The text in the Expression will be added to the audit for this process.

Settings

Kubernetes

(November 2019) We are trying to use Development with Kubernetes for local development with Flowable on our workstations.

Here are a couple of links to .env and settings files:

Activiti

A standard install will have Activiti running on localhost. To configure this, add the following settings:

# 'settings/base.py'
ACTIVITI_HOST = 'localhost'
ACTIVITI_PORT = 8080

# 'settings/local.py'
ACTIVITI_PATH = 'activiti-rest'

# 'settings/production.py'
ACTIVITI_PATH = 'activiti-rest-{}'.format(DOMAIN.replace('.', '-').replace('-', '_'))

If Activiti is running on a different server, you can configure the settings differently e.g:

# 'settings/base.py'
ACTIVITI_PORT = 8080

# 'settings/local.py'
ACTIVITI_HOST = 'localhost'
ACTIVITI_PATH = 'activiti-rest'

# 'settings/production.py'
ACTIVITI_HOST = get_env_variable("ACTIVITI_HOST")
ACTIVITI_PATH = 'activiti-rest-{}'.format(DOMAIN.replace('.', '-').replace('-', '_'))

Delete a Task by ID

from workflow.activiti import Activiti
activiti = Activiti()
# replace `17077`` with your task ID
task = activiti.task_status(17077)
task.process_key
activiti.process_delete(task.process_id)