ResourceTaskStart

Defines the start of the flowchart branch modeling the task process for resource units (usually it is a resource preparation process).

In the figure below you can see the example of the preparation task. The task flowchart starts with the ResourceTaskStart block and ends when the connector goes into the lower port of the Seize block that initiated this task.

Parameters

Unit type [dynamic]
The type of resource units performing the task. This resource type is referred to below as T.
Default value: Agent
Start here
Here you specify whether all the resource units will start the task, or only some specific ones.
All the resources -
all the resources seized by the Seize block that initiated this task, start performing this task.
Specific resources - only some particular resources from the seized set, start this task.
Syntax: boolean defaultUnitsStart
Default value: true
Resource pool [dynamic]
[Visible if Start here is defined as Specific resources] - Here you can choose the particular ResourcePool, whose resource units will start this task.
Actions
On enter [code]
Code executed when the resource unit enters this ResourceTaskStart block.
Local variable: T unit - the resource unit
On remove [code]
Code executed when the resource unit is intentionally removed from this block by calling the unit's  function remove(). This code is automatically executed after the remove() function call.
Local variable: unit - the resource unit

Functions

int size() - Returns the number of units currently pending transmission in this block (which haven't yet been consumed by subsequent flowchart blocks).

long count() - Returns the number of resource units entered this flowchart block.

void take(T unit) - Inserts the given resource unit in the process flow by outputting it via the out port.

Iterator<T> iterator() - Returns the iterator over resource units currently pending transmission in this block (which has't yet been consumed by subsequent flowchart blocks) - in their take() order.

Ports

out
The output port.