Token

Parent Previous Next

The Token object provides general information about a workflow token. These are:


Syntax

       public class Token


Members

ProcessInstance Instance

A reference to the current process instance

Diagram Diagram

A Reference to the Diagram, the token belongs to

DiagramControl Control

A Reference to the Diagram Control, the token is attached to

TokenAttribute Attributes

A list of attributes assigned to the current token

string Details

Gets or sets token details which are displayed in the overview of the tasks (if no details have been defined, the process instance details will be displayed instead)

object GetAttribute(string name)

Retrieves an attribute from the token attributes

void SetAttribute(string name, object value)

Stores an attribute in the token attributes

void Suspend(object until)

Enables the use of cooperative multitasking by suspending the execution of the token until the given timestamp is reached (Python datetime or C# DateTime)

Users ResolveRole(string rolename)

Resolves a role. It returns a list of users.

The rolename may be a plain role name or a role keyword.



Sample

This sample sets an information as token details.


Token.Details = "waiting for approval"



This sample uses ResolveRole to determine and set the participants of a task.
The role has been defined in an organization diagram and assigned to users there. By using ResolveRole, the organization diagram is searched for the users with the specified role, in this case the keyword.