Interface ITask

All Superinterfaces:
IAdditionalPropertyable, INoteable, ch.ivyteam.ivy.workflow.IPropertyValueSource<TaskProperty>

public interface ITask extends INoteable, IAdditionalPropertyable, ch.ivyteam.ivy.workflow.IPropertyValueSource<TaskProperty>
A task is a work unit in a process that is worked by a single user
Since:
17.05.2006
API:
This is a public API.
  • Method Details

    • getApplication

      IApplication getApplication()
      Gets the application the case belongs to
      Returns:
      application
      API:
      This public API is available in Java.
    • getWorkflowContext

      IWorkflowContext getWorkflowContext()
      Gets the workflow context this case belongs to
      Returns:
      workflow context
      API:
      This public API is available in Java.
    • getProcessModel

      IProcessModel getProcessModel()
      Gets the process model the case belongs to
      Returns:
      process model
      API:
      This public API is available in Java.
    • getProcessModelVersion

      IWorkflowProcessModelVersion getProcessModelVersion()
      Gets the process model version the case was started in
      Returns:
      process model version
      API:
      This public API is available in Java.
    • getCase

      ICase getCase()
      Gets the case this task belongs to
      Returns:
      case
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadOwnCaseOfTask PERMISSION OR OWNS CaseRead PERMISSION OR OWNS CaseRead@SYSTEM PERMISSION
    • getStartSwitchEvent

      ITaskSwitchEvent getStartSwitchEvent()
      Gets the task switch event this task was started.
      Returns:
      start task switch
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskSwitchEventRead PERMISSION OR OWNS TaskSwitchEventRead@SYSTEM PERMISSION
    • getStart

      ITaskStart getStart()
      Gets the task start this task was started on
      Returns:
      task start
      API:
      This public API is available in Java.
    • getEndSwitchEvent

      ITaskSwitchEvent getEndSwitchEvent()
      Gets the task switch event on which this task has ended. Returns null if task is not yet finished
      Returns:
      end task switch or null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskSwitchEventRead PERMISSION OR OWNS TaskSwitchEventRead@SYSTEM PERMISSION
    • getEnd

      ITaskEnd getEnd()
      Gets the task end this task has ended on. Returns null if task is not yet finished.
      Returns:
      task end or null.
      API:
      This public API is available in Java.
    • getExpiredCreatorTask

      ITask getExpiredCreatorTask()
      Gets the task that created this task because it has expired. Returns null if this task in not an expiry task (See isExpiryTask().
      Returns:
      expired creator task or null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadOwnCaseTasks PERMISSION OR OWNS TaskRead PERMISSION OR OWNS TaskRead@SYSTEM PERMISSION
    • getId

      long getId()
      Returns the task identifier. You should always prefer using uuid().
      Returns:
      task identifier
      See Also:
      API:
      This public API is available in Java.
    • uuid

      String uuid()
      A globally unique identifier for this case. In principle, the UUID should always be preferred over the ID.
      Returns:
      globally unique identifier of this case
      API:
      This public API is available in Java.
    • getState

      TaskState getState()
      Gets the state of this task
      Returns:
      task state
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadState PERMISSION OR OWNS TaskReadState@SYSTEM PERMISSION
    • getBusinessState

      TaskBusinessState getBusinessState()
      Gets the business state of this task
      Returns:
      business state
      Since:
      11.1.0
      API:
      This public API is available in Java.
    • getFailReason

      String getFailReason()
      Returns the fail reason when the task state is TaskState.FAILED, TaskState.JOIN_FAILED and this state was caused by a failure.
      Returns:
      Never null, in case of no failure an empty string is returned.
      API:
      This public API is available in Java.
    • getPriority

      WorkflowPriority getPriority()
      Gets the priority of the task
      Returns:
      priority of the task
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadPriority PERMISSION OR OWNS TaskReadPriority@SYSTEM PERMISSION
    • getOriginalPriority

      WorkflowPriority getOriginalPriority()
      Gets the original priority of the task
      Returns:
      original priority of the task
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadOriginalPriority PERMISSION OR OWNS TaskReadOriginalPriority@SYSTEM PERMISSION
    • getExpiryPriority

      WorkflowPriority getExpiryPriority()
      Gets the expiry priority of the task
      Returns:
      expiry priority of the task
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadExpiryPriority PERMISSION OR OWNS TaskReadExpiryPriority@SYSTEM PERMISSION
    • setOriginalPriority

      void setOriginalPriority(WorkflowPriority originalPriority)
      Sets the original priority of the task
      Parameters:
      originalPriority - the new original priority
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteOriginalPriority PERMISSION OR OWNS TaskWriteOriginalPriority@SYSTEM PERMISSION
    • setExpiryPriority

      void setExpiryPriority(WorkflowPriority expiryPriority)
      Sets the expiry priority of the task
      Parameters:
      expiryPriority - the new expiry priority
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteExpiryPriority PERMISSION OR OWNS TaskWriteExpiryPriority@SYSTEM PERMISSION
    • getActivator

      ISecurityMember getActivator()
      Gets the task activator. An activator is a user or a role that can start the task.
      The task activator can be null if role or user has been already deleted since the task creation. You can evaluate the name of the task activator using the method getActivatorName() even if the task activator was deleted.
      This method returns the original task activator if the task is not expired or the "expired task activator" if the task is expired. The expired task activator is usually not the same user or role which is the original activator. This user or role is set when the task expires. Read more about this activator in the designer guide at task switch process element.
      Returns:
      task activator user or role (or null)
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadActivator PERMISSION OR OWNS TaskReadActivator@SYSTEM PERMISSION
    • activator

      IActivator activator()
      Access to the activator. Activator is a user or a role that is responsible to execute the task.
      Returns:
      activator
      Since:
      8.0.3
      See Also:
      API:
      This public API is available in Java.
    • getActivatorName

      String getActivatorName()
      Gets the name of the task activator (see getActivator() for more details). Never returns null even if the task activator was deleted. This method returns the original task activator name if the task is not expired or the expired task activator name if the task is expired.
      Returns:
      task activator name.
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadActivatorName PERMISSION OR OWNS TaskReadActivatorName@SYSTEM PERMISSION
    • getActivatorUserCandidates

      @Deprecated(since="8.0.3") List<IUser> getActivatorUserCandidates()
      Deprecated.

      WARNING: This methods loads the resulting users into memory.
      This can cause out of memory exceptions and bad performance depending on the number of users in your application.

      Returns:
      List of users that can activate this task
      API:
      This public API is available in Java.
    • setActivator

      void setActivator(ISecurityMember activator)
      Sets the activator of the task. Expiry activator and original activator are not changed.
      Parameters:
      activator - the new activator
      See Also:
      API:
      This public API is available in Java.
    • originalActivator

      IActivator originalActivator()
      Access to the original activator
      Returns:
      original activator
      Since:
      8.0.3
      See Also:
      API:
      This public API is available in Java.
    • getOriginalActivator

      ISecurityMember getOriginalActivator()
      Gets the original task activator. Maybe null if task activator was deleted since the task was created. You can evaluate the name of the original task activator with the method getOriginalActivatorName() even if the original task activator was deleted.
      Returns:
      original task activator or null
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadOriginalActivator PERMISSION OR OWNS TaskReadOriginalActivator@SYSTEM PERMISSION
    • getOriginalActivatorName

      String getOriginalActivatorName()
      Gets the original task activator. Never returns null even if the original task activator was deleted.
      Returns:
      original task activator name.
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadOriginalActivatorName PERMISSION OR OWNS TaskReadOriginalActivatorName@SYSTEM PERMISSION
    • setOriginalActivator

      void setOriginalActivator(ISecurityMember activator)
      Sets the original activator of the task
      Parameters:
      activator - the activator of the task
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteOriginalActivator PERMISSION OR OWNS TaskWriteOriginalActivator@SYSTEM PERMISSION
    • expiryActivator

      IActivator expiryActivator()
      Access to the expiry activator
      Returns:
      expiry activator
      Since:
      8.0.3
      See Also:
      API:
      This public API is available in Java.
    • getExpiryActivator

      ISecurityMember getExpiryActivator()
      Gets the task expiry activator. Maybe null if no expiry activator was set or the expiry activator was deleted since the task was created. You can evaluate the name of the expiry activator with the method getExpiryActivatorName() even if the expiry activator was deleted.
      Returns:
      expiry activator or null
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadExpiryActivator PERMISSION OR OWNS TaskReadExpiryActivator@SYSTEM PERMISSION
    • setExpiryActivator

      void setExpiryActivator(ISecurityMember expiryActivator)
      Sets the expiry activator of the task. This method has no effect if task is already expired.
      Parameters:
      expiryActivator - expiry activator
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteExpiryActivator PERMISSION OR OWNS TaskWriteExpiryActivator@SYSTEM PERMISSION
    • getExpiryActivatorName

      String getExpiryActivatorName()
      Gets the task activator. Maybe null if no expiry activator was set. Does not return null if an expiry activator was set even the expiry activator was deleted.
      Returns:
      task activator name or null.
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadExpiryActivatorName PERMISSION OR OWNS TaskReadExpiryActivatorName@SYSTEM PERMISSION
    • getExpiryTimestamp

      Date getExpiryTimestamp()
      Gets the timestamp when this task expires. Returns null if this task will not be expired.
      Returns:
      expiry timestamp or null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadExpiryTimestamp PERMISSION OR OWNS TaskReadExpiryTimestamp@SYSTEM PERMISSION
    • setExpiryTimestamp

      void setExpiryTimestamp(Date newExpiryTimestamp)
      Sets the expiry timestamp of the task. Can set to null if expiry of this task should be disabled. If new expiry timestamp is older than current time the task is expired immediately. This method has no effect if the task was already expired.

      If no expiry-activator is set, the task will be destroyed on expiry.

      Parameters:
      newExpiryTimestamp - the new expiry timestamp. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteExpiryTimestamp PERMISSION OR OWNS TaskWriteExpiryTimestamp@SYSTEM PERMISSION
    • getExpiresInBusinessDuration

      BusinessDuration getExpiresInBusinessDuration()
      Calculates the business time until the task expires (BusinessDuration between now and expiryTimestamp). The duration calculation is done by the IBusinessCalendar which is set on the task.
      Returns:
      The calculated business duration until the task expires or null if the expiryTimestamp is not set.
      Since:
      Pilatus
      See Also:
      API:
      This public API is available in Java.
    • isExpired

      boolean isExpired()
      Is this task expired?
      Returns:
      true if this task is expired, otherwise false
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadIsExpiry PERMISSION OR OWNS TaskReadIsExpiry@SYSTEM PERMISSION
    • isExpiryTask

      boolean isExpiryTask()
      Is this task a task that was created because an other task had expired?
      Returns:
      true if this task was created because an other task had expired, otherwise false
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadIsExpiry PERMISSION OR OWNS TaskReadIsExpiry@SYSTEM PERMISSION
    • getExpiryTaskStartElementPid

      String getExpiryTaskStartElementPid()
      Gets the pid of the start element where a task should be started if this task expires. Returns null if no task should be started
      Returns:
      pid of the start element
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadExpiryTaskStartElementPid PERMISSION OR OWNS TaskReadExpiryTaskStartElementPid@SYSTEM PERMISSION
    • getDelayTimestamp

      Date getDelayTimestamp()
      Get the delay timestamp of the task. Returns null if this task is or was not created in state TaskState.DELAYED.
      Returns:
      delay timestamp or null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadDelayTimestamp PERMISSION OR OWNS TaskReadDelayTimestamp@SYSTEM PERMISSION
    • setDelayTimestamp

      void setDelayTimestamp(Date newDelayTimestamp)
      Sets the delay timestamp of the task. The delay timestamp can be set to null to immediately switch the task out of state TaskState.DELAYED.
      This method has only effect if the task is currently in state TaskState.DELAYED.
      Parameters:
      newDelayTimestamp - the new delay timestamp. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteDelayTimestamp PERMISSION OR OWNS TaskWriteDelayTimestamp@SYSTEM PERMISSION
    • getWorkerUser

      IUser getWorkerUser()
      Gets the user who has worked or is working on this task. Return null if no user has worked on this task so far or if the user who has worked on this task was deleted. User method getWorkerUserName() to evaluate the name of the worker user even if the worker user was deleted.
      Returns:
      worker user or null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadWorkerUser PERMISSION OR OWNS TaskReadWorkerUser@SYSTEM PERMISSION
    • getWorkerUserName

      String getWorkerUserName()
      Gets the name of the user who has worked or is working on this task. Returns null if no user has worked on this task so far.
      Returns:
      name of the worker user or null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadWorkerUserName PERMISSION OR OWNS TaskReadWorkerUserName@SYSTEM PERMISSION
    • getWorkerSession

      IWorkflowSession getWorkerSession()
      Gets the worker session of this task. The worker session is the session that is currently working on this task. This methods returns null if task is not in state TaskState.RESUMED or TaskState.CREATED.
      Returns:
      worker session or null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadWorkerSession PERMISSION OR OWNS TaskReadWorkerSession@SYSTEM PERMISSION
    • getRequestPath

      String getRequestPath()
      Gets the request path of this task
      Returns:
      current request path
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadRequestPath PERMISSION OR OWNS TaskReadRequestPath@SYSTEM PERMISSION
    • getFullRequestPath

      String getFullRequestPath()
      Get the full request path of the task inclusive application name and process model version name
      Returns:
      full request path
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadRequestPath PERMISSION OR OWNS TaskReadRequestPath@SYSTEM PERMISSION
    • getStartTimestamp

      Date getStartTimestamp()
      Gets the start timestamp of the task
      Returns:
      start timestamp
      API:
      This public API is available in Java.
    • getEndTimestamp

      Date getEndTimestamp()
      Gets the end timestamp of the task or null if task is not yet finished
      Returns:
      end timestamp or null
      API:
      This public API is available in Java.
    • getModifiedTimestamp

      Date getModifiedTimestamp()
      Get the last timestamp a task has been modified.
      Returns:
      modified timestamp
      API:
      This public API is available in Java.
    • getBusinessRuntime

      BusinessDuration getBusinessRuntime()

      Gets the BusinessDuration between the creation (see getStartTimestamp()) and the completion (see getEndTimestamp()) of this task.

      The business runtime is calculated only when a task ends (state changes to TaskState.DONE or TaskState.JOINING).

      To calculate the BusinessDuration the IDefaultBusinessCalendar of the task is used.

      Returns:
      BusinessDuration between creation and completion. Returns null if the task is not yet completed or the task has been completed before the business runtime feature was introduced.
      See Also:
      API:
      This public API is available in Java.
    • getWorkingTime

      Duration getWorkingTime()
      Gets the Duration during that any user has been working on this task.
      The working time is calculated from the time where the user starts working on this task till the task is completed (state changes from TaskState.CREATED or TaskState.RESUMED to TaskState.DONE or TaskState.JOINING).
      When task gets parked or completed the elapsed time is saved. While a task is parked, the working time will not be counted until the task is resumed again. When a task is reset, the calculated working time is deleted (set to null). E.g.
          created at 12:00 - parked at 12:10     => workingTime = 10 minutes
          resumed at 12:30 - completed at 12:40  => workingTime = 10 minutes
          ------------------------------------------------------------------
          Total                                     workingTime = 20 minutes
       
      Returns:
      Working time as Duration.
      Returns null for the following situations:
      • the task has never been parked or completed
      • the task has been reset
      • the task has been completed before the working time feature was introduced.
      API:
      This public API is available in Java.
    • isPersistent

      boolean isPersistent()
      Checks if a task is persistent. A task that is persistent will also be available after a system restart. Tasks that are created on a task switch element are always persistent. The first task of a case is normally not persistent with the following exceptions:
      • The task has been joined on a task switch element
      • The case of the task was created with a trigger element
      • The task itself has triggered another case with a trigger element
      • A note or an additional attribute has been set on the task
      Returns:
      true if task is persistent, otherwise false
      API:
      This public API is available in Java.
    • getIntermediateEvent

      IIntermediateEvent getIntermediateEvent()
      Gets the intermediate event this task is waiting for or had been waited for
      Returns:
      intermediate event or null if task is not waiting or has not waited for an intermediate event.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS IntermediateEventRead PERMISSION OR OWNS IntermediateEventRead@SYSTEM PERMISSION
    • getName

      String getName()
      Get name of the task for the current session's content locale.
      Returns:
      name of the task
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadName PERMISSION OR OWNS TaskReadName@SYSTEM PERMISSION
    • setName

      void setName(String nameTemplate)

      Expands the macros in the given task name template and then sets the expanded task name for each locale.

      Note: Only <%=ivy.cms.co(...)%> macros are supported. If you want to include process data then use string concatenation instead of <%=in. ...%> macros.

      If the given task name template do not contain any macros the same task name (the name template) is set for all locales.

      Example:

      
       ivy.task.setName("<%=ivy.cms.co(\"/task/name\")%> " + in.person.name);
       
      Parameters:
      nameTemplate - the template with macros to expand
      Throws:
      IllegalArgumentException - if the given macro is null
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteName PERMISSION OR OWNS TaskWriteName@SYSTEM PERMISSION
    • names

      Get the localized names of the task.

      Example:

      String taskName = ivy.wfTask.names().current();
      Returns:
      localized names
      Since:
      9.4
      See Also:
      API:
      This public API is available in Java.
    • getDisplayNameTemplate

      @Deprecated(since="9.4", forRemoval=true) String getDisplayNameTemplate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      will always return empty string. Use getName() or names().get(Locale) instead.
      Gets the display name template of the task.
      Returns:
      empty string
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadDisplayNameTemplate PERMISSION OR OWNS TaskReadDisplayNameTemplate@SYSTEM PERMISSION
    • getDescription

      String getDescription()
      Get description of the task for the current session's content locale.
      Returns:
      description of the task
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadDescription PERMISSION OR OWNS TaskReadDescription@SYSTEM PERMISSION
    • setDescription

      void setDescription(String descriptionTemplate)

      Expands the macros in the given task description template and then sets the expanded task description for each locale.

      Note: Only <%=ivy.cms.co(...)%> macros are supported. If you want to include process data then use string concatenation instead of <%=in. ...%> macros.

      If the given task description template do not contain any macros the same task description (the name template) is set for all locales.

      Example:

      
       ivy.task.setDescription("<%=ivy.cms.co(\"/task/description\")%> " + in.person.name);
       
      Parameters:
      descriptionTemplate - the template with macros to expand
      Throws:
      IllegalArgumentException - if the given macro is null
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteDescription PERMISSION OR OWNS TaskWriteDescription@SYSTEM PERMISSION
    • descriptions

      ILocalizedStrings descriptions()

      Get the localized descriptions of the task.

      Example:

      String taskDescription = ivy.wfTask.descriptions().current();
      Returns:
      localized descriptions
      Since:
      9.4
      See Also:
      API:
      This public API is available in Java.
    • getDisplayDescriptionTemplate

      @Deprecated(since="9.4", forRemoval=true) String getDisplayDescriptionTemplate()
      Deprecated, for removal: This API element is subject to removal in a future version.
      will always return empty string. Use getDescription() or descriptions().get(Locale) instead.
      Gets the display description template of the task.
      Returns:
      empty string
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadDisplayDescriptionTemplate PERMISSION OR OWNS TaskReadDisplayDescriptionTemplate@SYSTEM PERMISSION
    • setCategoryPath

      void setCategoryPath(String categoryPath)
      Sets the given String as category path of this ITask. Use "/" as path separator.

      null or an empty string could be used to reset the category path.

      Parameters:
      categoryPath - the category path of this ITask.
      See Also:
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCategory PERMISSION OR OWNS TaskWriteCategory@SYSTEM PERMISSION
    • getCategoryPath

      String getCategoryPath()
      Returns the category path of this ITask.

      The method getCategory() returns the corresponding Category to the current set category path.

      Returns:
      the current category path, never null
      See Also:
      API:
      This public API is available in Java.
    • getCategory

      Category getCategory()
      Returns the Category of this ITask. The Category provides locale specific information like the name or the description of a category path, as defined in the CMS. See Category for more information.

      The method setCategoryPath(String) allows to set the category of a task.

      Returns:
      the current Category, corresponding to the current category path, never null
      See Also:
      API:
      This public API is available in Java.
    • getKindCode

      @Deprecated(since="7.0", forRemoval=true) String getKindCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or customFields() to store kind code and name as additional information.

      Getting task kind code with custom fields:

      ivy.task.customFields().stringField("KindCode").getOrNull();
      Gets the task kind code
      Returns:
      task kind code. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadKindCode PERMISSION OR OWNS TaskReadKindCode@SYSTEM PERMISSION
    • getKindName

      @Deprecated(since="7.0", forRemoval=true) String getKindName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or customFields() to store kind code and name as additional information.

      Getting task kind name with custom fields:

      ivy.task.customFields().stringField("KindName").getOrNull();
      Gets the task kind name
      Returns:
      task kind name. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadKindName PERMISSION OR OWNS TaskReadKindName@SYSTEM PERMISSION
    • setKind

      @Deprecated(since="7.0", forRemoval=true) void setKind(String kindCode, String kindName)
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or customFields() to store task kind code and name as additional information.

      Setting task kind code and name with custom fields:

      ivy.task.customFields().stringField("KindCode").set(kindCode);
      ivy.task.customFields().stringField("KindName").set(kindName);
      Sets the task kind.
      Parameters:
      kindCode - the new task kind code. Maybe null
      kindName - the new task kind name. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteKind PERMISSION OR OWNS TaskWriteKind@SYSTEM PERMISSION
    • getProcessCategoryCode

      @Deprecated(since="7.0", forRemoval=true) String getProcessCategoryCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case process category code.

      This method returns the same result as getCase().getProcessCategoryCode()

      Returns:
      process category code. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadProcessCategoryCode PERMISSION OR OWNS CaseReadProcessCategoryCode@SYSTEM PERMISSION
    • getProcessCategoryName

      @Deprecated(since="7.0", forRemoval=true) String getProcessCategoryName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case process category name

      This method returns the same result as getCase().getProcessCategoryName()

      Returns:
      process category name. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadProcessCategoryName PERMISSION OR OWNS CaseReadProcessCategoryName@SYSTEM PERMISSION
    • getProcessCode

      @Deprecated(since="7.0", forRemoval=true) String getProcessCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case process code

      This method returns the same result as getCase().getProcessCode()

      Returns:
      process code. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadProcessCode PERMISSION OR OWNS CaseReadProcessCode@SYSTEM PERMISSION
    • getProcessName

      @Deprecated(since="7.0", forRemoval=true) String getProcessName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case process name

      This method returns the same result as getCase().getProcessName()

      Returns:
      process name. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadProcessName PERMISSION OR OWNS CaseReadProcessName@SYSTEM PERMISSION
    • getTypeCode

      @Deprecated(since="7.0", forRemoval=true) String getTypeCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case type code

      This method returns the same result as getCase().getTypeCode()

      Returns:
      case type code. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadTypeCode PERMISSION OR OWNS CaseReadTypeCode@SYSTEM PERMISSION
    • getTypeName

      @Deprecated(since="7.0", forRemoval=true) String getTypeName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case type name

      This method returns the same result as getCase().getTypeName()

      Returns:
      cast type name. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadTypeName PERMISSION OR OWNS CaseReadTypeName@SYSTEM PERMISSION
    • getSubTypeCode

      @Deprecated(since="7.0", forRemoval=true) String getSubTypeCode()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case sub type code

      This method returns the same result as getCase().getSubTypeCode()

      Returns:
      case sub type code. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadSubTypeCode PERMISSION OR OWNS CaseReadSubTypeCode@SYSTEM PERMISSION
    • getSubTypeName

      @Deprecated(since="7.0", forRemoval=true) String getSubTypeName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      use category to categorize the case or getCategory() to categorize the task

      Gets the case sub type name

      This method returns the same result as getCase().getSubTypeName()

      Returns:
      cast sub type name. Maybe null
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadSubTypeName PERMISSION OR OWNS CaseReadSubTypeName@SYSTEM PERMISSION
    • getBusinessMilestoneTimestamp

      @Deprecated(since="7.3", forRemoval=true) Date getBusinessMilestoneTimestamp()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the business milestone timestamp. Maybe null.
      Returns:
      business milestone timestamp. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadBusinessMilestoneTimestamp PERMISSION OR OWNS TaskReadBusinessMilestoneTimestamp@SYSTEM PERMISSION
    • setBusinessMilestoneTimestamp

      @Deprecated(since="7.3", forRemoval=true) void setBusinessMilestoneTimestamp(Date businessMilestoneTimestamp)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the business milestone timestamp.
      Parameters:
      businessMilestoneTimestamp - the new business milestone timestamp. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteBusinessMilestoneTimestamp PERMISSION OR OWNS TaskWriteBusinessMilestoneTimestamp@SYSTEM PERMISSION
    • getBusinessMainContactId

      @Deprecated(since="7.3", forRemoval=true) Integer getBusinessMainContactId()
      Deprecated, for removal: This API element is subject to removal in a future version.

      Gets the case business main contact identifier. Maybe null.

      This method returns the same result as getCase().getBusinessMainContactId()

      Returns:
      the business main contact identifier. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadBusinessMainContactId PERMISSION OR OWNS CaseReadBusinessMainContactId@SYSTEM PERMISSION
    • getBusinessMainContactName

      @Deprecated(since="7.3", forRemoval=true) String getBusinessMainContactName()
      Deprecated, for removal: This API element is subject to removal in a future version.

      Gets the case business main contact name. Maybe null.

      This method returns the same result as getCase().getBusinessMainContactName()

      Returns:
      the business main contact name. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadBusinessMainContactName PERMISSION OR OWNS CaseReadBusinessMainContactName@SYSTEM PERMISSION
    • getBusinessCreatorUser

      @Deprecated(since="7.3", forRemoval=true) String getBusinessCreatorUser()
      Deprecated, for removal: This API element is subject to removal in a future version.

      Gets the case business creator user. Maybe null.

      This method returns the same result as getCase().getBusinessCreatorUser()

      Returns:
      the business creator user. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadBusinessCreatorUser PERMISSION OR OWNS CaseReadBusinessCreatorUser@SYSTEM PERMISSION
    • getBusinessStartTimestamp

      @Deprecated(since="7.3", forRemoval=true) Date getBusinessStartTimestamp()
      Deprecated, for removal: This API element is subject to removal in a future version.

      Gets the case business start timestamp. Maybe null.

      This method returns the same result as getCase().getBusinessStartTimestamp()

      Returns:
      business start timestamp. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadBusinessStartTimestamp PERMISSION OR OWNS CaseReadBusinessStartTimestamp@SYSTEM PERMISSION
    • getBusinessObjectCode

      @Deprecated(since="7.3", forRemoval=true) String getBusinessObjectCode()
      Deprecated, for removal: This API element is subject to removal in a future version.

      Gets the case business object code. Maybe null.

      This method returns the same result as getCase().getBusinessObjectCode()

      Returns:
      the business object code. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS CaseReadBusinessObjectCode PERMISSION OR OWNS CaseReadBusinessObjectCode@SYSTEM PERMISSION
    • customFields

      ICustomFields customFields()

      You can use custom fields to store additional, customer specific information on a task. You can use custom fields to search for or filter tasks.

      Examples:

      Setting a custom field:

      ivy.task.customFields().stringField("branchOffice").set("Zug");

      Getting a custom field:

      String branchOffice = ivy.task.customFields().stringField("branchOffice").getOrDefault("Luzern")

      Getting all custom fields:

      import ch.ivyteam.ivy.workflow.custom.field.ICustomField;
      List<ICustomField> customFields = ivy.task.customFields().all();
      Returns:
      custom fields
      Since:
      7.3
      See Also:
      API:
      This public API is available in Java.
    • getCustomVarCharField1

      @Deprecated(since="7.3", forRemoval=true) String getCustomVarCharField1()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom varchar field 1. Maybe null.
      Returns:
      the custom varchar field 1. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomVarCharField1 PERMISSION OR OWNS TaskReadCustomVarCharField1@SYSTEM PERMISSION
    • setCustomVarCharField1

      @Deprecated(since="7.3", forRemoval=true) void setCustomVarCharField1(String customVarCharField1)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom varchar field 1.
      Parameters:
      customVarCharField1 - the custom varchar field 1. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomVarCharField1 PERMISSION OR OWNS TaskWriteCustomVarCharField1@SYSTEM PERMISSION
    • getCustomVarCharField2

      @Deprecated(since="7.3", forRemoval=true) String getCustomVarCharField2()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom varchar field 2. Maybe null.
      Returns:
      the custom varchar field 2. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomVarCharField2 PERMISSION OR OWNS TaskReadCustomVarCharField2@SYSTEM PERMISSION
    • setCustomVarCharField2

      @Deprecated(since="7.3", forRemoval=true) void setCustomVarCharField2(String customVarCharField2)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom varchar field 2.
      Parameters:
      customVarCharField2 - the custom varchar field 2. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomVarCharField2 PERMISSION OR OWNS TaskWriteCustomVarCharField2@SYSTEM PERMISSION
    • getCustomVarCharField3

      @Deprecated(since="7.3", forRemoval=true) String getCustomVarCharField3()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom varchar field 3. Maybe null.
      Returns:
      the custom varchar field 3. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomVarCharField3 PERMISSION OR OWNS TaskReadCustomVarCharField3@SYSTEM PERMISSION
    • setCustomVarCharField3

      @Deprecated(since="7.3", forRemoval=true) void setCustomVarCharField3(String customVarCharField3)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom varchar field 3.
      Parameters:
      customVarCharField3 - the custom varchar field 3. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomVarCharField3 PERMISSION OR OWNS TaskWriteCustomVarCharField3@SYSTEM PERMISSION
    • getCustomVarCharField4

      @Deprecated(since="7.3", forRemoval=true) String getCustomVarCharField4()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom varchar field 4. Maybe null.
      Returns:
      the custom varchar field 4. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomVarCharField4 PERMISSION OR OWNS TaskReadCustomVarCharField4@SYSTEM PERMISSION
    • setCustomVarCharField4

      @Deprecated(since="7.3", forRemoval=true) void setCustomVarCharField4(String customVarCharField4)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom varchar field 4.
      Parameters:
      customVarCharField4 - the custom varchar field 4. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomVarCharField4 PERMISSION OR OWNS TaskWriteCustomVarCharField4@SYSTEM PERMISSION
    • getCustomVarCharField5

      @Deprecated(since="7.3", forRemoval=true) String getCustomVarCharField5()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom varchar field 5. Maybe null.
      Returns:
      the custom varchar field 5. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomVarCharField5 PERMISSION OR OWNS TaskReadCustomVarCharField5@SYSTEM PERMISSION
    • setCustomVarCharField5

      @Deprecated(since="7.3", forRemoval=true) void setCustomVarCharField5(String customVarCharField5)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom varchar field 5.
      Parameters:
      customVarCharField5 - the custom varchar field 5. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomVarCharField5 PERMISSION OR OWNS TaskWriteCustomVarCharField5@SYSTEM PERMISSION
    • getCustomDecimalField1

      @Deprecated(since="7.3", forRemoval=true) Number getCustomDecimalField1()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom decimal field 1. Maybe null.
      Returns:
      the custom decimal field 1. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomDecimalField1 PERMISSION OR OWNS TaskReadCustomDecimalField1@SYSTEM PERMISSION
    • setCustomDecimalField1

      @Deprecated(since="7.3", forRemoval=true) void setCustomDecimalField1(Number customDecimalField1)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom decimal field 1.
      Parameters:
      customDecimalField1 - the custom decimal field 1. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomDecimalField1 PERMISSION OR OWNS TaskWriteCustomDecimalField1@SYSTEM PERMISSION
    • getCustomDecimalField2

      @Deprecated(since="7.3", forRemoval=true) Number getCustomDecimalField2()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom decimal field 2. Maybe null.
      Returns:
      the custom decimal field 2. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomDecimalField2 PERMISSION OR OWNS TaskReadCustomDecimalField2@SYSTEM PERMISSION
    • setCustomDecimalField2

      @Deprecated(since="7.3", forRemoval=true) void setCustomDecimalField2(Number customDecimalField2)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom decimal field 2.
      Parameters:
      customDecimalField2 - the custom decimal field 2. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomDecimalField2 PERMISSION OR OWNS TaskWriteCustomDecimalField2@SYSTEM PERMISSION
    • getCustomDecimalField3

      @Deprecated(since="7.3", forRemoval=true) Number getCustomDecimalField3()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom decimal field 3. Maybe null.
      Returns:
      the custom decimal field 3. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomDecimalField3 PERMISSION OR OWNS TaskReadCustomDecimalField3@SYSTEM PERMISSION
    • setCustomDecimalField3

      @Deprecated(since="7.3", forRemoval=true) void setCustomDecimalField3(Number customDecimalField3)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom decimal field 3.
      Parameters:
      customDecimalField3 - the custom decimal field 3. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomDecimalField3 PERMISSION OR OWNS TaskWriteCustomDecimalField3@SYSTEM PERMISSION
    • getCustomDecimalField4

      @Deprecated(since="7.3", forRemoval=true) Number getCustomDecimalField4()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom decimal field 4. Maybe null.
      Returns:
      the custom decimal field 4. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomDecimalField4 PERMISSION OR OWNS TaskReadCustomDecimalField4@SYSTEM PERMISSION
    • setCustomDecimalField4

      @Deprecated(since="7.3", forRemoval=true) void setCustomDecimalField4(Number customDecimalField4)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom decimal field 4.
      Parameters:
      customDecimalField4 - the custom decimal field 4. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomDecimalField4 PERMISSION OR OWNS TaskWriteCustomDecimalField4@SYSTEM PERMISSION
    • getCustomDecimalField5

      @Deprecated(since="7.3", forRemoval=true) Number getCustomDecimalField5()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom decimal field 5. Maybe null.
      Returns:
      the custom decimal field 5. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomDecimalField5 PERMISSION OR OWNS TaskReadCustomDecimalField5@SYSTEM PERMISSION
    • setCustomDecimalField5

      @Deprecated(since="7.3", forRemoval=true) void setCustomDecimalField5(Number customDecimalField5)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom decimal field 5.
      Parameters:
      customDecimalField5 - the custom decimal field 5. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomDecimalField5 PERMISSION OR OWNS TaskWriteCustomDecimalField5@SYSTEM PERMISSION
    • getCustomTimestampField1

      @Deprecated(since="7.3", forRemoval=true) Date getCustomTimestampField1()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom timestamp field 1. Maybe null.
      Returns:
      the custom timestamp field 1. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomTimestampField1 PERMISSION OR OWNS TaskReadCustomTimestampField1@SYSTEM PERMISSION
    • setCustomTimestampField1

      @Deprecated(since="7.3", forRemoval=true) void setCustomTimestampField1(Date customTimestampField1)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom timestamp field 1.
      Parameters:
      customTimestampField1 - the custom timestamp field 1. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomTimestampField1 PERMISSION OR OWNS TaskWriteCustomTimestampField1@SYSTEM PERMISSION
    • getCustomTimestampField2

      @Deprecated(since="7.3", forRemoval=true) Date getCustomTimestampField2()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom timestamp field 2. Maybe null.
      Returns:
      the custom timestamp field 2. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomTimestampField2 PERMISSION OR OWNS TaskReadCustomTimestampField2@SYSTEM PERMISSION
    • setCustomTimestampField2

      @Deprecated(since="7.3", forRemoval=true) void setCustomTimestampField2(Date customTimestampField2)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom timestamp field 2.
      Parameters:
      customTimestampField2 - the custom timestamp field 2. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomTimestampField2 PERMISSION OR OWNS TaskWriteCustomTimestampField2@SYSTEM PERMISSION
    • getCustomTimestampField3

      @Deprecated(since="7.3", forRemoval=true) Date getCustomTimestampField3()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom timestamp field 3. Maybe null.
      Returns:
      the custom timestamp field 3. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomTimestampField3 PERMISSION OR OWNS TaskReadCustomTimestampField3@SYSTEM PERMISSION
    • setCustomTimestampField3

      @Deprecated(since="7.3", forRemoval=true) void setCustomTimestampField3(Date customTimestampField3)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom timestamp field 3.
      Parameters:
      customTimestampField3 - the custom timestamp field 3. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomTimestampField3 PERMISSION OR OWNS TaskWriteCustomTimestampField3@SYSTEM PERMISSION
    • getCustomTimestampField4

      @Deprecated(since="7.3", forRemoval=true) Date getCustomTimestampField4()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom timestamp field 4. Maybe null.
      Returns:
      the custom timestamp field 4. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomTimestampField4 PERMISSION OR OWNS TaskReadCustomTimestampField4@SYSTEM PERMISSION
    • setCustomTimestampField4

      @Deprecated(since="7.3", forRemoval=true) void setCustomTimestampField4(Date customTimestampField4)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom timestamp field 4.
      Parameters:
      customTimestampField4 - the custom timestamp field 4. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomTimestampField4 PERMISSION OR OWNS TaskWriteCustomTimestampField4@SYSTEM PERMISSION
    • getCustomTimestampField5

      @Deprecated(since="7.3", forRemoval=true) Date getCustomTimestampField5()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Gets the custom timestamp field 5. Maybe null.
      Returns:
      the custom timestamp field 5. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadCustomTimestampField5 PERMISSION OR OWNS TaskReadCustomTimestampField5@SYSTEM PERMISSION
    • setCustomTimestampField5

      @Deprecated(since="7.3", forRemoval=true) void setCustomTimestampField5(Date customTimestampField5)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Sets the custom timestamp field 5.
      Parameters:
      customTimestampField5 - the custom timestamp field 5. Maybe null.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskWriteCustomTimestampField5 PERMISSION OR OWNS TaskWriteCustomTimestampField5@SYSTEM PERMISSION
    • getWorkflowEvents

      List<IWorkflowEvent> getWorkflowEvents()
      Gets the workflow events of this task
      Returns:
      list of workflow events
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS WorkflowEventReadAll PERMISSION OR OWNS WorkflowEventReadAll@SYSTEM PERMISSION
    • destroy

      void destroy()
      Destroys this task
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskDestroy PERMISSION OR OWNS TaskDestroy@SYSTEM PERMISSION
    • reset

      void reset()

      Resets this task to the task start.

      This method can be called if the task is in one of the following states:

      After the method was called the task will be in the state TaskState.SUSPENDED.

      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReset PERMISSION OR OWNS TaskReset@SYSTEM PERMISSION
    • getStartProcessData

      CompositeObject getStartProcessData()
      Gets the process data (in-object) at the start of the task-process or null, if it is the initial task.
      Returns:
      the process data at the start of the process.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadProcessData PERMISSION OR OWNS TaskReadProcessData@SYSTEM PERMISSION
    • getEndProcessData

      CompositeObject getEndProcessData()
      Gets the process data (in-object) at the end of the task-process or null, if task was not ended.
      Returns:
      the process data at the end of the task-process or null, if task was not ended.
      API:
      This public API is available in Java.
      Security:
      SESSION OWNS TaskReadProcessData PERMISSION OR OWNS TaskReadProcessData@SYSTEM PERMISSION
    • getNumberOfResumes

      Integer getNumberOfResumes()
      Returns how many times the tasks has ben resumed by any user (task state changes to TaskState.RESUMED). For the first task of a case the resume count is automatically set to one.
      Returns:
      Number of resumes or null if the task was completed before this feature was introduced.
      API:
      This public API is available in Java.
    • getBusinessCalendar

      IDefaultBusinessCalendar getBusinessCalendar()
      The IBusinessCalendar used for this task. Never null
      Returns:
      never null
      API:
      This public API is available in Java.
    • setBusinessCalendar

      void setBusinessCalendar(IBusinessCalendar calendar)
      Defines the IBusinessCalendar for this ITask. This influences the IDefaultBusinessCalendar determination when calling ivy.cal.
      Parameters:
      calendar - may be null.
      API:
      This public API is available in Java.
    • locations

      ILocationService locations()

      Gets the locations of the task.

      Example:

       import ch.ivyteam.ivy.location.ILocation;
       ILocation location = ivy.task.locations().getLatest();
       if (location != null)
       {
         ivy.log.info("Last known position somebody has worked on the task "+ivy.task.getId()+" was "+location.getPosition());
       }
      Returns:
      location service
      API:
      This public API is available in Java.
    • getStartLink

      WebLink getStartLink()
      Gets the start link of this task.
      Returns:
      WebLink
      API:
      This public API is available in Java.
    • getStartLinkEmbedded

      WebLink getStartLinkEmbedded()
      Gets the start link of this task to embed in frame.
      Returns:
      WebLink
      API:
      This public API is available in Java.
    • getDetailLink

      WebLink getDetailLink()
      Gets the detail link of this task.
      Returns:
      WebLink
      API:
      This public API is available in Java.
    • current

      static ITask current()

      Gets the current task.

      Will return null if called out of scope. E.g. if no task is available in the current context

      Returns:
      current task or null if out of scope
      Since:
      9.1
      API:
      This public API is available in Java.