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.

  • 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:
    • 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:
    • 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:
    • 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:
    • 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:
    • 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