Effective dated process definitions

I wonder, if it is already implemented somewhere(I believe it is quite popular requirement) to have the ability to have effective dated process definitions, ie one entity called for example Process and few ProcessDefinitions attached to it, which have different effective periods. Like first will be valid from 01-01-2000 to 31-12-2018 and second will be valid from 01-01-2019 to 31-12-2099?

UPD: I’ve found docs about process definitions versioning in both Flowable and Camunda:
https://flowable.org/docs/userguide/index.html#versioningOfProcessDefinitions
https://docs.camunda.org/manual/latest/user-guide/process-engine/process-versioning/
But I have a bit different situation, which IMHO is real world need - to find(and start) process with effective date provided.
So obviously effective period should be present - starte and end dates(nullable) - in ProcessDefinition(for those, who don’t use effective dates they can be set to null) and there are 2 options:

  • unique constraint in ProcessDefinition should include key and effective period
  • new table called Process should be created and key should be moved from ProcessDefinition to that table

It is definitely a valid use case.
The downside of baking it into the process definition table, would be that the query to check the validity of the process definition becomes slightly heavier (performance-wise). This is now a simple version check.

In a way, the suspension of a process definition would cover what you need:

  • suspend the process definition after deploy. Suspended process definitions can’t spawn process instances.
  • plan an activation using the method activateProcessDefinitionById(String processDefinitionId, boolean activateProcessInstances, Date activationDate) on the repositoryService. This will create a timer job that will be triggered in the future
  • plan a suspension with a Date. This will create a second timer job. The combination of both is the validity period.
1 Like