the way you do it is the right way only thing that comes to my mind seeing this is that Person class is either not available on class path or it is not declared as type (using FQN). Check here as it can be done.
Thank you for your answer, Swiderski.
I read the document of jbpm5.4 and find the following paragraphs:
There is also a predefined variable
kcontextthat references the
ProcessContextobject (which can, for example, be used to access the current
NodeInstance, and to get and set variables, or get access to the ksession using
How to predefine variable kcontext?
as far as I know kcontext is only available in process scope so if you would use java based condition then you could directly take advantage of kcontext variable but within rules you need to insert process instance into the ksession before you can make use of it.
I try to use directly variable kcontext in a script action.It's a success.