Business Key - How to set business key using Rest/Tasklist

1,817 views
Skip to first unread message

webcyberrob

unread,
Aug 13, 2013, 9:24:24 AM8/13/13
to camunda-...@googlegroups.com
I understand that the 'businessKey' is treated as a special process variable. However, how can I set the business key using either the REST API or a start form within tasklist? For example if I use a variable called 'businessKey' in the REST API or as a form variable, these create process variables called businessKey, but the process instance business key attribute is not set.

Should it be the case that a variable called businessKey in a form or REST API call should betreated as the business key?

R

Roman Smirnov

unread,
Aug 13, 2013, 11:27:12 AM8/13/13
to camunda-...@googlegroups.com
Hi,

you are right currently it is not possible to set the 'businessKey' by using either the REST API nor within the Tasklist when you start a new process instance. Therefore I created two tickets:


In MHO we should not (ie. we will not) provide the case that a process variable named as 'businessKey' will be treated especially to set the process instance 'businessKey' in the engine. I think the impact is to high, what should we do, when the process variable 'businessKey' changed during the execution of the process instance? Should in that case the 'businessKey' be updated to? However, strictly the 'businessKey' of a process instance is not a process variable.

But if you depend on it at the moment, as a workaround you are able to add a "ExecutionListener" to the "StartEvent" in your process application. The implemented "ExecutionListener" will extract the 'businessKey' from the passed process variables and set it as the 'businessKey' of the process instance (as you suggested it).

Hope that helps?

Cheers,
Roman

Reply all
Reply to author
Forward
0 new messages