Agents can have generic parameters. Generics allow you to abstract over types. Using generic parameters, you can tune up agents for each particular use case and thus greatly improve the flexibility and reuse of your agent type.
You can study the usage of generic parameters by the example of Process Modeling Library objects as nearly all of them have generic parameters. Let's study, for instance, the Delay object. This object is used to model how agents passing through this flowchart block are delayed for some time. Let's assume, you have a model, where all agents are of the same Customer type(inherited from the Agent base type) with some custom fields. Assume you need to perform some actions in the On exit parameter to store the delay time of this Delay in the Customer's serviceTime field. However, although the agents in the process flow will be of the Customer type, the objects in the flowchart will continue treating them as Agent and will not allow you to explicitly address the additional functionality of Customer. But you do not want to cast your agents explicitly to the original type each time you want to access some custom fields of transient agents.
In former times, you had to write ((Customer)agent).serviceTime = delayTime in that case. And in the same manner you had to cast the agent to its original type every time you accessed custom agent's fields in the object's dynamic parameters. Now you can simply specify Customer in the Agent type property of Delay and type agent.serviceTime = delayTime. By specifying the agent type for Delay, you tell the object that the agent variable accessible in its dynamic parameters is of the Customer type and you can access its custom fields directly.
Please note that if agents of various types pass through the same flowchart block, say, some of the Customer type and some of the Staff type, you should leave the Agent type default value (Agent) and analyze the type manually by writing e.g.: if (agent instanceof Customer) ((Customer)agent).serviceTime = delayTime.
To make your agents parameterized