Interface ActionDefinition

All Known Subinterfaces:
ActionDefinitionEntity
All Known Implementing Classes:
ActionDefinitionEntityImpl

public interface ActionDefinition
An action definition is used as the model and meta information in order to create a new Action based on such a definition. Most likely such an action is composed in the frontend and then posted as an action within a conversation and then processed by a com.flowable.engage.data.api.bot.Bot.

Action definition are registered within the ActionDefinitionRegistry and can be looked up and searched for, most likely in the context of an existing conversation.

Action definitions can either be optional or mandatory (see isMandatory()) with the difference that a mandatory action definition needs to be executed at some time and is most likely assigned to a certain user or user group.

Action definitions can setup their context where they are made available:
  • global: in that case, the action is available in all conversations (e.g. /remind)
  • existing conversation: use getScopeType() to return the explicit id of the conversation where the action should be made available (e.g. if the conversation is a case, existing tasks can be exposed over an action definition that way)

Action definitions can have meta information to describe what they need and do:
  • getName(): the name of the action (most likely mapped to the slash-action menu in the conversation)

Optionally, an action definition can have a dynamic payload, which means it has to be fetched at runtime when rendering the action definition. Such a payload can be requested through com.flowable.engage.conversation.api.ConversationService#getActionDefinitionPayload(String, String) and it might contain some data according the context of the conversation the action is created for. Most likely, a dynamic payload is used in combination with a form to input data from the user in a rich way and builds the baseline of data behind the payload later sent as part of the action.

The action definition might have a more rich way of requesting data from the user by using a form. A form is then referenced through the getFormKey(). The form is most likely rendered within a conversation or as a dialog and its data is then sent along as the payload of the action. TODO: rewrite the description to adapt to the new action engine
Author:
Micha Kiener
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the action definition links that are linked to the action definition.
    Returns the id of the assigned group of this object.
    Returns the id of the assignee of this object.
    Returns the key of the bot this action is implemented.
    Returns a set view of the optional list of candidate group ids of this object.
    Returns a set view of the optional list of candidate user ids of this object.
    Returns the creation timestamp of this data object.
    Returns the id of the user creating this data object.
     
    If this action has an attached form definition, this method returns the form key of it with which the form definition might be requested through Form Engine.
     
     
    Returns the name of this action which is also used as the slash action name (e.g.
    Returns the id of the owner of this object, most likely representing the user actually creating it or being created as part of an operation that user executed.
     
    Returns the type of scope if this action definition is bound to a certain type of scoped objects (e.g.
     
    Returns the optional id of the user having last modified this data object, if any, null otherwise.
    Returns the timestamp of the last update of this data object, in most cases where events are immutable, this timestamp is the same as the creation timestamp, but must never be null.
    int
     
    boolean
    Whether the action definition is global
    boolean
    Returns true if this is a mandatory action definition, which means it has to be executed (as an action) at some point (most likely it is then backed by a user task or anything which needs to be completed somehow).
  • Method Details

    • getId

      String getId()
    • getKey

      String getKey()
    • getVersion

      int getVersion()
    • getDeploymentId

      String getDeploymentId()
    • getTenantId

      String getTenantId()
    • getBotKey

      String getBotKey()
      Returns the key of the bot this action is implemented. When receiving an action, the bot will be looked up and send the action there for processing.
      Returns:
      the key of the bot to send the action to for processing
    • isMandatory

      boolean isMandatory()
      Returns true if this is a mandatory action definition, which means it has to be executed (as an action) at some point (most likely it is then backed by a user task or anything which needs to be completed somehow). This is an optional flag and defaults to false if not provided explicitly.
      Returns:
      true if this action definition is mandatory
    • getName

      String getName()
      Returns the name of this action which is also used as the slash action name (e.g. name 'foo' would be exposed within a conversation with '/foo' to execute it).
      Returns:
      the name of the action
    • getResourceName

      String getResourceName()
    • getFormKey

      String getFormKey()
      If this action has an attached form definition, this method returns the form key of it with which the form definition might be requested through Form Engine.
      Returns:
      the key of the form to be used to render this action definition and get input to create an action object
    • getScopeType

      String getScopeType()
      Returns the type of scope if this action definition is bound to a certain type of scoped objects (e.g. conversation, user, etc).
      Returns:
      the type of scoped objects this action definition is bound to
    • isGlobal

      boolean isGlobal()
      Whether the action definition is global
      Returns:
      true if the AD is global, false otherwise
    • getCreationTime

      Date getCreationTime()
      Returns the creation timestamp of this data object.
      Returns:
      the creation timestamp
    • getUpdateTime

      Date getUpdateTime()
      Returns the timestamp of the last update of this data object, in most cases where events are immutable, this timestamp is the same as the creation timestamp, but must never be null.
      Returns:
      the timestamp of the last update / modification of this data object
    • getCreatorId

      String getCreatorId()
      Returns the id of the user creating this data object.
      Returns:
      the id of the creation user
    • getUpdaterId

      String getUpdaterId()
      Returns the optional id of the user having last modified this data object, if any, null otherwise.
      Returns:
      the optional id of the user having last updated this data object
    • getOwnerId

      String getOwnerId()
      Returns the id of the owner of this object, most likely representing the user actually creating it or being created as part of an operation that user executed.
      Returns:
      the id of the user being the owner of this object
    • getAssigneeId

      String getAssigneeId()
      Returns the id of the assignee of this object. What the assignee actually represents is up to the objects use cases and implementation.
      Returns:
      the optional id of the user being the assignee of the object
    • getAssignedGroupId

      String getAssignedGroupId()
      Returns the id of the assigned group of this object. What the assigned group actually represents is up to the objects use cases and implementation.
      Returns:
      the id of the optional assigned group
    • getCandidateUserIds

      Set<String> getCandidateUserIds()
      Returns a set view of the optional list of candidate user ids of this object. In most cases, this is used to allow access to the object for a selected list of users.
      Returns:
      the optional list of candidate user ids attached to this object
    • getCandidateGroupIds

      Set<String> getCandidateGroupIds()
      Returns a set view of the optional list of candidate group ids of this object. Like with the list of candidate users, all users being at least a member of one of the candidate groups will also have access to this object.
      Returns:
      the optional list of candidate group ids attached to this object
    • getActionDefinitionLinks

      List<ActionDefinitionLink> getActionDefinitionLinks()
      Returns the action definition links that are linked to the action definition.
      Returns:
      the optional list of action definition links