AnsweredAssumed Answered

Set JPA attribute on process startup

Question asked by redguy1 on Dec 12, 2014
OK, I know I can create JPA entity and assign it to process param in serviceTask and that I can pass it to process with startup parameters.

Passing entity as startup param would be enough but it requires special handling of such process. I need to know what entity to create and what param to assign it to during process instantiation, so it requires coding on application side (I cannot run such process from default Activiti UI).

what I need is somehow put some logic in startEvent that will prepare process param (create entity and assign it to some named process param) and then assign param provided by user on process instantiation so that some of those initial params can be mapped as entity values.

real life example: I would like to have process "ordering" with start params:, client.street,…, product.quantity, etc and during process instantiation I need two entities to be created ("client" as ClientEntity and "product" as ProductEntity) and their properties assigned with initial params. But I would like the process to have only those two params (client and product), not every single initial value remembered also as separate process param.

I am not sure if that is clear enough… but if so - can I achieve something like that?