AnsweredAssumed Answered

Associating process instances with objects in domain model

Question asked by chrisc on Jul 15, 2011
Latest reply on Jul 16, 2011 by ronald.van.kuijk
This is a fairly high level question and may be going down the wrong path but I was wondering how to associate a ProcessInstance with an object instance in my domain model.

Scenario:

The process of an Invoice in the domain model with line items, customer details etc., is to have its processing managed via a ProcessInstance in the workflow engine.

Typically in a traditional state machine based design where each process is defined by a separate class definition a class would exist like InvoiceProcessInstance and it would have a reference to the Invoice object in the domain model.

Given that in Activiti (and jBPM) processes are implemented using generic objects generated from the XML process definition file how can one achieve the same kind of relationship from a ProcessInstance to an object in the domain model?

Outcomes