Class CopyChangesToMainDataspace

java.lang.Object
com.orchestranetworks.workflow.ScriptTaskBean
com.apgar.common.lib.workflow.scripttask.CopyChangesToMainDataspace

public class CopyChangesToMainDataspace extends com.orchestranetworks.workflow.ScriptTaskBean
Copies changes made to a specific table in a child dataspace to the main dataspace without closing the child dataspace. This method can be used as an alternative to the merge dataspace step in a workflow.

Limitations: This class currently does not handle associations.

The following input parameters should be configured in the workflow model step:

  • Parameter name: workspace (e.g., ${workSpace})
  • Parameter name: dataspace (e.g., ${dataSpace})
  • Parameter name: dataset (e.g., ${dataSet})
  • Parameter name: table (e.g., /root/TableName)

To be utilized, the bean must be defined in the module.xml file like

  <beans>
    <bean className="com.apgar.common.lib.workflow.scripttask.CopyChangesToMainDataspace"> 
          <documentation xml:lang="en-US">
              <label>Copy Records To Core Script Task</label>
              <description></description> 
          </documentation> 
          <properties> 
              <property name="workspace" input="true"> 
                  <documentation xml:lang="en-US">
                      <label>Workspace</label> 
                  </documentation> 
              </property>
              <property name="dataspace" input="true"> 
                  <documentation xml:lang="en-US"> 
                      <label>Dataspace</label>
                  </documentation> 
              </property> 
              <property name="dataset" input="true"> 
                  <documentation xml:lang="en-US"> 
                      <label>Dataset</label> 
                  </documentation> 
              </property> 
              <property name="table" input="true"> 
                  <documentation xml:lang="en-US"> 
                      <label>Table</label> 
                  </documentation> 
              </property> 
          </properties> 
      </bean> 
  </beans>
 
Author:
APGAR Consulting
  • Constructor Details

    • CopyChangesToMainDataspace

      public CopyChangesToMainDataspace()
  • Method Details

    • executeScript

      public void executeScript(com.orchestranetworks.workflow.ScriptTaskBeanContext context) throws com.orchestranetworks.service.OperationException
      Copies changes made in the workflow working workspace to the main dataspace for a specific table in the designated dataset, including additions, modifications, and deletions. The workspace will remain open after the merge.
      Specified by:
      executeScript in class com.orchestranetworks.workflow.ScriptTaskBean
      Parameters:
      context - the context of the script task bean
      Throws:
      com.orchestranetworks.service.OperationException - if any procedure related to creation, modification, or deletion fails
    • getWorkspace

      public String getWorkspace()
      Returns the child dataspace name (workflow working workspace).
      Returns:
      the dataspace ID
    • setWorkspace

      public void setWorkspace(String workspace)
      Sets the workflow working workspace.
      Parameters:
      workspace - the working workspace ID
    • getDataspace

      public String getDataspace()
      Returns the dataspace name.
      Returns:
      the dataspace ID
    • setDataspace

      public void setDataspace(String dataspace)
      Sets the dataspace ID.
      Parameters:
      dataspace - the dataspace ID
    • getDataset

      public String getDataset()
      Returns the unique name of the dataset.
      Returns:
      the dataset ID
    • setDataset

      public void setDataset(String dataset)
      Sets the dataset ID.
      Parameters:
      dataset - the dataset ID
    • getTable

      public String getTable()
      Returns the table path.
      Returns:
      the string representation of the table path
    • setTable

      public void setTable(String table)
      Sets the table path.
      Parameters:
      table - the table path