Package com.orchestranetworks.workflow

# Class BuiltInTrigger_launchWorkflow

java.lang.Object
com.orchestranetworks.schema.trigger.TableTrigger
com.orchestranetworks.workflow.BuiltInTrigger_launchWorkflow

All Implemented Interfaces:
  `com.orchestranetworks.schema.trigger.BuiltInTrigger`

public final class BuiltInTrigger_launchWorkflow extends TableTrigger implements com.orchestranetworks.schema.trigger.BuiltInTrigger
Built-in trigger to start a workflow and initialize its context.

This trigger can be specified for any table in a data model.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static final class`
  `BuiltInTrigger_launchWorkflow.IncomingEvent`
  Represents the event that launched the workflow.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `BuiltInTrigger_launchWorkflow()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getMappingWithDataContext_branch()`
  Returns the name of the data context variable that will contain the current dataspace reference.
  `String`
  `getMappingWithDataContext_incomingEvent()`
  Returns the name of the data context variable that will contain the event that launched the workflow.
  `String`
  `getMappingWithDataContext_instance()`
  Returns the name of the data context variable that will contain the current dataset reference.
  `String`
  `getMappingWithDataContext_xpathRecord()`
  Returns the name of the data context variable that will contain the current record XPath (the primary key of the record in the table).
  `String`
  `getMappingWithDataContext_xpathTable()`
  Returns the name of the data context variable that will contain the current table XPath.
  `String`
  `getParameterDescription(String parameterName, Locale aLocale)`
  Returns the description of the parameter in the specified locale.
  `String`
  `getParameterLabelOrName(String parameterName, Locale aLocale)`
  Returns the label of the parameter in the specified locale, if it exists, otherwise returns the localized name of the parameter.
  `String`
  `getPublicationName()`
  Returns the publication name of the workflow to launch.
  `String`
  `getWorkflowDescription(Locale aLocale)`
  Returns the description of the launched workflow, for the specified locale.
  `String`
  `getWorkflowLabel(Locale aLocale)`
  Returns the label of the launched workflow, for the specified locale.
  `void`
  `handleAfterCreate(AfterCreateOccurrenceContext context)`
  Launches the defined workflow if the event 'create' is enabled.
  `void`
  `handleAfterDelete(AfterDeleteOccurrenceContext context)`
  Launches the defined workflow if the event 'delete' is enabled.
  `void`
  `handleAfterModify(AfterModifyOccurrenceContext context)`
  Launches the defined workflow if the event 'modify' is enabled.
  `boolean`
  `isEnableFor_create()`
  Returns `true` if the workflow is to be launched on the event 'afterCreate'.
  `boolean`
  `isEnableFor_delete()`
  Returns `true` if the workflow is to be launched on the event 'afterDelete'.
  `boolean`
  `isEnableFor_modify()`
  Returns `true` if the workflow is to be launched on the event 'afterModify'.
  `void`
  `setEnableFor_create(boolean enableForCreate)`
  If set to `true`, declares that the workflow is to be launched on the event 'afterCreate'.
  `void`
  `setEnableFor_delete(boolean enableForDelete)`
  If set to `true`, declares that the workflow is to be launched on the event 'afterDelete'.
  `void`
  `setEnableFor_modify(boolean enableForModify)`
  If set to `true`, declares that the workflow is to be launched on the event 'afterModify'.
  `void`
  `setMappingWithDataContext_branch(String mappingWithDataContext_branch)`
  Sets the name of the data context variable that will contain the current dataspace name.
  `void`
  `setMappingWithDataContext_incomingEvent(String mappingWithDataContextIncomingEvent)`
  Sets the name of the data context variable that will contain the event that has launched the workflow.
  `void`
  `setMappingWithDataContext_instance(String mappingWithDataContext_instance)`
  Sets the name of the data context variable that will contain the current dataset reference.
  `void`
  `setMappingWithDataContext_xpathRecord(String mappingWithDataContextXPathRecord)`
  Sets the name of the data context variable that will contain the current record XPath (primary key of the record in the table).
  `void`
  `setMappingWithDataContext_xpathTable(String mappingWithDataContextXPathTable)`
  Sets the name of the data context variable that will contain the current table XPath.
  `void`
  `setPublicationName(String aPublicationName)`
  `void`
  `setup(TriggerSetupContext aContext)`
  This method is called when the data model is loaded, to check that this rule is consistent with the data model that defines it and to prepare this instance.
  `void`
  `setWorkflowDescription(String workflowDescription)`
  Sets the default description of the launched workflow.
  `void`
  `setWorkflowDescription(Locale aLocale, String workflowDescription)`
  Sets the description of the launched workflow, for the specified locale.
  `void`
  `setWorkflowLabel(String aWorkflowLabel)`
  Sets the default label of the launched workflow.
  `void`
  `setWorkflowLabel(Locale aLocale, String aWorkflowLabel)`
  Sets the label of the launched workflow, for the specified locale.

  ### Methods inherited from class com.orchestranetworks.schema.trigger.TableTrigger

  `handleBeforeCreate, handleBeforeDelete, handleBeforeModify, handleBeforeTransactionCancel, handleBeforeTransactionCommit, handleNewContext`

  ### Methods inherited from class java.lang.Object

  `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### BuiltInTrigger_launchWorkflow

    public BuiltInTrigger_launchWorkflow()

- ## Method Details

  - ### setup

    public void setup(TriggerSetupContext aContext)
    Description copied from class: `TableTrigger`
    This method is called when the data model is loaded, to check that this rule is consistent with the data model that defines it and to prepare this instance.

    Do note that during this step, all models may not be properly loaded. Thus, the repository should not be accessed during this step.

    Specified by:
      `setup` in class `TableTrigger`

  - ### handleAfterCreate

    public void handleAfterCreate(AfterCreateOccurrenceContext context) throws OperationException
    Launches the defined workflow if the event 'create' is enabled.
    Overrides:
      `handleAfterCreate` in class `TableTrigger`
    Throws:
      `OperationException` - if the publication name is empty.
    See Also:
      - `TableTrigger.handleBeforeCreate(BeforeCreateOccurrenceContext)`

  - ### handleAfterDelete

    public void handleAfterDelete(AfterDeleteOccurrenceContext context) throws OperationException
    Launches the defined workflow if the event 'delete' is enabled.
    Overrides:
      `handleAfterDelete` in class `TableTrigger`
    Throws:
      `OperationException` - if the publication name is empty.
    See Also:
      - `TableTrigger.handleBeforeDelete(BeforeDeleteOccurrenceContext)`

  - ### handleAfterModify

    public void handleAfterModify(AfterModifyOccurrenceContext context) throws OperationException
    Launches the defined workflow if the event 'modify' is enabled.
    Overrides:
      `handleAfterModify` in class `TableTrigger`
    Throws:
      `OperationException` - if the publication name is empty.
    See Also:
      - `TableTrigger.handleBeforeModify(BeforeModifyOccurrenceContext)`

  - ### getPublicationName

    public String getPublicationName()
    Returns the publication name of the workflow to launch.

  - ### setPublicationName

    public void setPublicationName(String aPublicationName)
    Parameters:
      `aPublicationName` - publication name of the workflow to launch. This parameter is required to start the workflow.

  - ### getWorkflowLabel

    public String getWorkflowLabel(Locale aLocale)
    Returns the label of the launched workflow, for the specified locale.

  - ### setWorkflowLabel

    public void setWorkflowLabel(Locale aLocale, String aWorkflowLabel)
    Sets the label of the launched workflow, for the specified locale.
    Parameters:
      `aWorkflowLabel` - label of the launched workflow, in the locale of the current user.

  - ### setWorkflowLabel

    public void setWorkflowLabel(String aWorkflowLabel)
    Sets the default label of the launched workflow.

  - ### getWorkflowDescription

    public String getWorkflowDescription(Locale aLocale)
    Returns the description of the launched workflow, for the specified locale.

  - ### setWorkflowDescription

    public void setWorkflowDescription(Locale aLocale, String workflowDescription)
    Sets the description of the launched workflow, for the specified locale.
    Parameters:
      `workflowDescription` - description of the launched workflow, in the locale of the current user.

  - ### setWorkflowDescription

    public void setWorkflowDescription(String workflowDescription)
    Sets the default description of the launched workflow.

  - ### isEnableFor_create

    public boolean isEnableFor_create()
    Returns `true` if the workflow is to be launched on the event 'afterCreate'.

  - ### setEnableFor_create

    public void setEnableFor_create(boolean enableForCreate)
    If set to `true`, declares that the workflow is to be launched on the event 'afterCreate'.

  - ### isEnableFor_delete

    public boolean isEnableFor_delete()
    Returns `true` if the workflow is to be launched on the event 'afterDelete'.

  - ### setEnableFor_delete

    public void setEnableFor_delete(boolean enableForDelete)
    If set to `true`, declares that the workflow is to be launched on the event 'afterDelete'.

  - ### isEnableFor_modify

    public boolean isEnableFor_modify()
    Returns `true` if the workflow is to be launched on the event 'afterModify'.

  - ### setEnableFor_modify

    public void setEnableFor_modify(boolean enableForModify)
    If set to `true`, declares that the workflow is to be launched on the event 'afterModify'.

  - ### getMappingWithDataContext_branch

    public String getMappingWithDataContext_branch()
    Returns the name of the data context variable that will contain the current dataspace reference.

  - ### setMappingWithDataContext_branch

    public void setMappingWithDataContext_branch(String mappingWithDataContext_branch)
    Sets the name of the data context variable that will contain the current dataspace name.

  - ### getMappingWithDataContext_instance

    public String getMappingWithDataContext_instance()
    Returns the name of the data context variable that will contain the current dataset reference.

  - ### setMappingWithDataContext_instance

    public void setMappingWithDataContext_instance(String mappingWithDataContext_instance)
    Sets the name of the data context variable that will contain the current dataset reference.

  - ### getMappingWithDataContext_xpathTable

    public String getMappingWithDataContext_xpathTable()
    Returns the name of the data context variable that will contain the current table XPath.

  - ### setMappingWithDataContext_xpathTable

    public void setMappingWithDataContext_xpathTable(String mappingWithDataContextXPathTable)
    Sets the name of the data context variable that will contain the current table XPath.

  - ### getMappingWithDataContext_xpathRecord

    public String getMappingWithDataContext_xpathRecord()
    Returns the name of the data context variable that will contain the current record XPath (the primary key of the record in the table).

  - ### setMappingWithDataContext_xpathRecord

    public void setMappingWithDataContext_xpathRecord(String mappingWithDataContextXPathRecord)
    Sets the name of the data context variable that will contain the current record XPath (primary key of the record in the table).

  - ### getMappingWithDataContext_incomingEvent

    public String getMappingWithDataContext_incomingEvent()
    Returns the name of the data context variable that will contain the event that launched the workflow.
    See Also:
      - `BuiltInTrigger_launchWorkflow.IncomingEvent.format()`

  - ### setMappingWithDataContext_incomingEvent

    public void setMappingWithDataContext_incomingEvent(String mappingWithDataContextIncomingEvent)
    Sets the name of the data context variable that will contain the event that has launched the workflow.
    See Also:
      - `BuiltInTrigger_launchWorkflow.IncomingEvent.format()`

  - ### getParameterLabelOrName

    public String getParameterLabelOrName(String parameterName, Locale aLocale)
    Returns the label of the parameter in the specified locale, if it exists, otherwise returns the localized name of the parameter.
    Specified by:
      `getParameterLabelOrName` in interface `com.orchestranetworks.schema.trigger.BuiltInTrigger`

  - ### getParameterDescription

    public String getParameterDescription(String parameterName, Locale aLocale)
    Returns the description of the parameter in the specified locale.
    Specified by:
      `getParameterDescription` in interface `com.orchestranetworks.schema.trigger.BuiltInTrigger`